net.sf.jzeno.echo.databinding
Class DynaDateTimeField

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by net.sf.jzeno.echo.components.CustomComponent
          extended by net.sf.jzeno.echo.databinding.DynaDateTimeField
All Implemented Interfaces:
Borderable, MouseCursorable, java.io.Serializable, BindingTarget, PropertyComponent, RebindableComponent, EventPropagator, EventSink, EventSource, Precreation, Component, FastComponent, FastComponentContainer
Direct Known Subclasses:
DateTimeEditor

public class DynaDateTimeField
extends CustomComponent
implements EventPropagator, FastComponent, Borderable, MouseCursorable, Precreation

DynaDateTimeField is a combination of a DynaDateField and a DynaTimeField and allows a user to set the date (including time) on a bound bean property.

Regionalisation is supported. You can set a property path that points to a TimeZone.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface echopoint.positionable.Borderable
Borderable.NestedStyleInfo
 
Nested classes/interfaces inherited from interface echopoint.positionable.MouseCursorable
MouseCursorable.NestedStyleInfo
 
Field Summary
 
Fields inherited from interface echopoint.positionable.Borderable
BORDER_DASHED, BORDER_DOTTED, BORDER_DOUBLE, BORDER_GROOVE, BORDER_INSET, BORDER_NONE, BORDER_OUTSET, BORDER_RIDGE, BORDER_SOLID, borderStyleSymbolics, STYLE_BORDER_COLOR, STYLE_BORDER_SIZE, STYLE_BORDER_STYLE, STYLE_BOTTOM_BORDER_COLOR, STYLE_BOTTOM_BORDER_SIZE, STYLE_BOTTOM_BORDER_STYLE, STYLE_LEFT_BORDER_COLOR, STYLE_LEFT_BORDER_SIZE, STYLE_LEFT_BORDER_STYLE, STYLE_RIGHT_BORDER_COLOR, STYLE_RIGHT_BORDER_SIZE, STYLE_RIGHT_BORDER_STYLE, STYLE_TOP_BORDER_COLOR, STYLE_TOP_BORDER_SIZE, STYLE_TOP_BORDER_STYLE
 
Fields inherited from interface echopoint.positionable.MouseCursorable
borderStyleSymbolics, CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
DynaDateTimeField()
           Creates an unbound component.
DynaDateTimeField(java.lang.Class beanClass, java.lang.String propertyName, java.lang.String constructionHints)
           Creates a date-time field that is databound.
 
Method Summary
 void applyContext()
           
 java.lang.String getActionCommand()
           
 Color getBorderColor()
           
 int getBorderSize()
           
 int getBorderStyle()
           Gets the border style of the button.
 Color getBottomBorderColor()
           
 int getBottomBorderSize()
           
 int getBottomBorderStyle()
           
 java.util.Date getDate()
           Used internally.
 Font getFont()
          Returns the font.
 java.lang.String getInvalidDateMessage()
           
 java.lang.String getInvalidTimeMessage()
           
 Color getLeftBorderColor()
           
 int getLeftBorderSize()
           
 int getLeftBorderStyle()
           
 int getMaximumYear()
           
 int getMinimumYear()
           
 int getMouseCursor()
          Returns the current mouse cursor in use.
 java.lang.String getMouseCursorURI()
           
 java.lang.String getNullValue()
           Gets the input string that corresponds to the property value null .
 Color getRightBorderColor()
           
 int getRightBorderSize()
           
 int getRightBorderStyle()
           
 java.util.Date getTime()
           Used internally.
 java.lang.String getTimeZoneProperty()
           Gets the property path that binds to a property of type TimeZone.
 Color getTopBorderColor()
           
 int getTopBorderSize()
           
 int getTopBorderStyle()
           
 boolean isAsync()
           
 boolean isReadOnly()
           
 boolean isRequired()
           Query if the editor is required to be filled in.
 void propagateEvent(ActionEvent event)
           
 void rebind()
           This operation causes the component to reset it's content to that of the domain model.
 void setActionCommand(java.lang.String actionCommand)
           
 void setAsync(boolean async)
           
 void setBackground(Color newValue)
           Sets the background color of date and time entry fields.
 void setBorderColor(Color borderColor)
          Sets the Color of the Borderable's border.
 void setBorderSize(int borderSize)
          Sets the size of the Borderables's border.
 void setBorderStyle(int style)
           Sets the border style of the button.
 void setBottomBorderColor(Color borderColor)
          Sets the Color of the Borderable's bottom border.
 void setBottomBorderSize(int borderSize)
          Sets the size of the Borderables's bottom border.
 void setBottomBorderStyle(int borderStyle)
          Sets the border style of the Borderables's bottom border.
 void setDate(java.util.Date newDate)
           Used internally.
 void setFocused(boolean focused)
           Sets the input focus on this component.
 void setFont(Font font)
          Sets the font of the component.
 void setForeground(Color newValue)
          Sets the foreground color of the date and time entry fields.
 void setInvalidDateMessage(java.lang.String invalidDateMessage)
           
 void setInvalidTimeMessage(java.lang.String invalidTimeMessage)
           
 void setLeftBorderColor(Color borderColor)
          Sets the Color of the Borderable's left border.
 void setLeftBorderSize(int borderSize)
          Sets the size of the Borderables's left border.
 void setLeftBorderStyle(int borderStyle)
          Sets the border style of the Borderables's left border.
 void setMaximumYear(int maximumYear)
           
 void setMinimumYear(int minimumYear)
           
 void setMouseCursor(int mouseCursor)
          Sets the mouse cursor to use.
 void setMouseCursorURI(java.lang.String mouseCursorURI)
          Sets the URI to a custom platform mouse cursor.
 void setNullValue(java.lang.String nullValue)
           Sets the input string that corresponds to the property value null .
 void setReadOnly(boolean readOnly)
           Mark this component as read-only.
 void setRequired(boolean required)
           Determine if the editor is required to be filled in.
 void setRightBorderColor(Color borderColor)
          Sets the Color of the Borderable's right border.
 void setRightBorderSize(int borderSize)
          Sets the size of the Borderables's right border.
 void setRightBorderStyle(int borderStyle)
          Sets the border style of the Borderables's right border.
 void setTime(java.util.Date newDate)
           Used internally.
 void setTimeZoneProperty(java.lang.String property)
           Sets the property path that bind to a property of type TimeZone.
 void setTopBorderColor(Color borderColor)
          Sets the Color of the Borderable's top border.
 void setTopBorderSize(int borderSize)
          Sets the size of the Borderables's top border.
 void setTopBorderStyle(int borderStyle)
          Sets the border style of the Borderables's top border.
 
Methods inherited from class net.sf.jzeno.echo.components.CustomComponent
addValidator, fireActionEvent, fireActionEvent, fireActionEvent, getBean, getBeanClass, getDecorator, getNullObject, getProperty, getValidationErrors, getValidators, getValue, isBound, isMarkedInvalid, isValid, markInvalid, markValid, preRender, removeValidator, setBean, setBeanClass, setDecorator, setNullObject, setProperty, setValue, traceValue, validate
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setClientId, setEnabled, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface echopoint.positionable.Borderable
applyStyle
 
Methods inherited from interface echopoint.positionable.MouseCursorable
applyStyle
 

Constructor Detail

DynaDateTimeField

public DynaDateTimeField()

Creates an unbound component.


DynaDateTimeField

public DynaDateTimeField(java.lang.Class beanClass,
                         java.lang.String propertyName,
                         java.lang.String constructionHints)

Creates a date-time field that is databound. You should bind this component to a property of type java.util.Date.

Method Detail

getNullValue

public java.lang.String getNullValue()

Gets the input string that corresponds to the property value null . Also see setNullValue(String).


setNullValue

public void setNullValue(java.lang.String nullValue)

Sets the input string that corresponds to the property value null . If the user enters this string, null will be assigned to the data binding target of this date-time field. If you want to disable this possibility, call this method with value null.


setRequired

public void setRequired(boolean required)
Description copied from interface: PropertyComponent

Determine if the editor is required to be filled in.

Specified by:
setRequired in interface PropertyComponent
Overrides:
setRequired in class CustomComponent

isRequired

public boolean isRequired()
Description copied from interface: PropertyComponent

Query if the editor is required to be filled in.

Specified by:
isRequired in interface PropertyComponent
Overrides:
isRequired in class CustomComponent

getDate

public java.util.Date getDate()

Used internally.


setDate

public void setDate(java.util.Date newDate)

Used internally.


getTime

public java.util.Date getTime()

Used internally.


setTime

public void setTime(java.util.Date newDate)

Used internally.


setBackground

public void setBackground(Color newValue)

Sets the background color of date and time entry fields.

Specified by:
setBackground in interface Component
Overrides:
setBackground in class AbstractComponent
Parameters:
newValue - The new background color of the component.

setForeground

public void setForeground(Color newValue)
Sets the foreground color of the date and time entry fields.

Specified by:
setForeground in interface Component
Overrides:
setForeground in class AbstractComponent
Parameters:
newValue - The new foreground color of the component.

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface PropertyComponent
Overrides:
isReadOnly in class CustomComponent

setReadOnly

public void setReadOnly(boolean readOnly)
Description copied from interface: PropertyComponent

Mark this component as read-only.

Specified by:
setReadOnly in interface PropertyComponent
Overrides:
setReadOnly in class CustomComponent

rebind

public void rebind()
Description copied from interface: RebindableComponent

This operation causes the component to reset it's content to that of the domain model.

Specified by:
rebind in interface RebindableComponent
Overrides:
rebind in class CustomComponent

setTimeZoneProperty

public void setTimeZoneProperty(java.lang.String property)

Sets the property path that bind to a property of type TimeZone. If this property path is valid, than the TimeZone instance it refers to will translate from UTC to local time on the user interface. It is highly advised to store dates and times internally in UTC, and only translate to local time at the interfaces of the system (GUI,Messaging,...). If this property path is null no timezone conversion is applied. The property path specified is relative to the same root bean as this components regular data binding.


getTimeZoneProperty

public java.lang.String getTimeZoneProperty()

Gets the property path that binds to a property of type TimeZone. Also see setTimeZoneProperty(String).


setFocused

public void setFocused(boolean focused)

Sets the input focus on this component.

Specified by:
setFocused in interface Component
Overrides:
setFocused in class AbstractComponent
Parameters:
focused - True if the component is to be focused.

getBorderSize

public int getBorderSize()
Specified by:
getBorderSize in interface Borderable
Returns:
The size of the Borderables's border.

getBottomBorderColor

public Color getBottomBorderColor()
Specified by:
getBottomBorderColor in interface Borderable
Returns:
The Color of the Borderable's bottom border.

getBottomBorderSize

public int getBottomBorderSize()
Specified by:
getBottomBorderSize in interface Borderable
Returns:
The size of the Borderables's bottom border.

getBottomBorderStyle

public int getBottomBorderStyle()
Specified by:
getBottomBorderStyle in interface Borderable
Returns:
The style of the Borderables's bottom border.
See Also:
Borderable.getBorderStyle()

getLeftBorderColor

public Color getLeftBorderColor()
Specified by:
getLeftBorderColor in interface Borderable
Returns:
The Color of the Borderable's left border.

getLeftBorderSize

public int getLeftBorderSize()
Specified by:
getLeftBorderSize in interface Borderable
Returns:
The size of the Borderables's left border.

getLeftBorderStyle

public int getLeftBorderStyle()
Specified by:
getLeftBorderStyle in interface Borderable
Returns:
The style of the Borderables's left border.
See Also:
Borderable.getBorderStyle()

getRightBorderColor

public Color getRightBorderColor()
Specified by:
getRightBorderColor in interface Borderable
Returns:
The Color of the Borderable's right border.

getRightBorderSize

public int getRightBorderSize()
Specified by:
getRightBorderSize in interface Borderable
Returns:
The size of the Borderables's right border.

getRightBorderStyle

public int getRightBorderStyle()
Specified by:
getRightBorderStyle in interface Borderable
Returns:
The style of the Borderables's right border.
See Also:
Borderable.getBorderStyle()

getTopBorderColor

public Color getTopBorderColor()
Specified by:
getTopBorderColor in interface Borderable
Returns:
The Color of the Borderable's top border.

getTopBorderSize

public int getTopBorderSize()
Specified by:
getTopBorderSize in interface Borderable
Returns:
The size of the Borderables's top border.

getTopBorderStyle

public int getTopBorderStyle()
Specified by:
getTopBorderStyle in interface Borderable
Returns:
The style of the Borderables's top border.
See Also:
Borderable.getBorderStyle()

setBorderSize

public void setBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's border. This will also set the left, top, right and bottom border size.

Specified by:
setBorderSize in interface Borderable

setBottomBorderColor

public void setBottomBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's bottom border.

Specified by:
setBottomBorderColor in interface Borderable

setBottomBorderSize

public void setBottomBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's bottom border.

Specified by:
setBottomBorderSize in interface Borderable

setBottomBorderStyle

public void setBottomBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's bottom border.

Specified by:
setBottomBorderStyle in interface Borderable
See Also:
Borderable.setBorderStyle(int)

setLeftBorderColor

public void setLeftBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's left border.

Specified by:
setLeftBorderColor in interface Borderable

setLeftBorderSize

public void setLeftBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's left border.

Specified by:
setLeftBorderSize in interface Borderable

setLeftBorderStyle

public void setLeftBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's left border.

Specified by:
setLeftBorderStyle in interface Borderable
See Also:
Borderable.setBorderStyle(int)

setRightBorderColor

public void setRightBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's right border.

Specified by:
setRightBorderColor in interface Borderable

setRightBorderSize

public void setRightBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's right border.

Specified by:
setRightBorderSize in interface Borderable

setRightBorderStyle

public void setRightBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's right border.

Specified by:
setRightBorderStyle in interface Borderable
See Also:
Borderable.setBorderStyle(int)

setTopBorderColor

public void setTopBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's top border.

Specified by:
setTopBorderColor in interface Borderable

setTopBorderSize

public void setTopBorderSize(int borderSize)
Description copied from interface: Borderable
Sets the size of the Borderables's top border.

Specified by:
setTopBorderSize in interface Borderable

setTopBorderStyle

public void setTopBorderStyle(int borderStyle)
Description copied from interface: Borderable
Sets the border style of the Borderables's top border.

Specified by:
setTopBorderStyle in interface Borderable
See Also:
Borderable.setBorderStyle(int)

setBorderStyle

public void setBorderStyle(int style)

Sets the border style of the button. (See the Borderable interface in EchoPoint).

Specified by:
setBorderStyle in interface Borderable

getBorderStyle

public int getBorderStyle()

Gets the border style of the button.

Specified by:
getBorderStyle in interface Borderable
Returns:
int the current border style

getMouseCursor

public int getMouseCursor()
Description copied from interface: MouseCursorable
Returns the current mouse cursor in use. This will be one of the following values.

Specified by:
getMouseCursor in interface MouseCursorable
Returns:
The current mouse cursor in use.

getMouseCursorURI

public java.lang.String getMouseCursorURI()
Specified by:
getMouseCursorURI in interface MouseCursorable
Returns:
The custom URI for the mouse cursor or null

setMouseCursor

public void setMouseCursor(int mouseCursor)
Description copied from interface: MouseCursorable
Sets the mouse cursor to use. This will be one of the following values.

Specified by:
setMouseCursor in interface MouseCursorable
Parameters:
mouseCursor - - the mouse cursor to use

setMouseCursorURI

public void setMouseCursorURI(java.lang.String mouseCursorURI)
Description copied from interface: MouseCursorable
Sets the URI to a custom platform mouse cursor. This will only be used if the mosue cusor is set to CURSOR_CUSTOM.

Specified by:
setMouseCursorURI in interface MouseCursorable
Parameters:
mouseCursorURI - the URI to a custom platform mouse cursor.

setBorderColor

public void setBorderColor(Color borderColor)
Description copied from interface: Borderable
Sets the Color of the Borderable's border. This will also set the left, top, right and bottom border color.

Specified by:
setBorderColor in interface Borderable

getBorderColor

public Color getBorderColor()
Specified by:
getBorderColor in interface Borderable
Returns:
The Color of the Borderable's border.

setFont

public void setFont(Font font)
Description copied from interface: Component
Sets the font of the component.

Specified by:
setFont in interface Component
Overrides:
setFont in class AbstractComponent
Parameters:
font - The new font of the component.

getFont

public Font getFont()
Description copied from interface: Component
Returns the font.

Specified by:
getFont in interface Component
Overrides:
getFont in class AbstractComponent
Returns:
The font of the component.

setActionCommand

public void setActionCommand(java.lang.String actionCommand)
Specified by:
setActionCommand in interface EventSource
Overrides:
setActionCommand in class CustomComponent

getActionCommand

public java.lang.String getActionCommand()
Specified by:
getActionCommand in interface EventSource
Overrides:
getActionCommand in class CustomComponent

setAsync

public void setAsync(boolean async)

isAsync

public boolean isAsync()

setMinimumYear

public void setMinimumYear(int minimumYear)

getMinimumYear

public int getMinimumYear()

setMaximumYear

public void setMaximumYear(int maximumYear)

getMaximumYear

public int getMaximumYear()

setInvalidDateMessage

public void setInvalidDateMessage(java.lang.String invalidDateMessage)

getInvalidDateMessage

public java.lang.String getInvalidDateMessage()

setInvalidTimeMessage

public void setInvalidTimeMessage(java.lang.String invalidTimeMessage)

getInvalidTimeMessage

public java.lang.String getInvalidTimeMessage()

applyContext

public void applyContext()
Specified by:
applyContext in interface Precreation

propagateEvent

public void propagateEvent(ActionEvent event)
Specified by:
propagateEvent in interface EventPropagator