|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.millstone.base.ui.AbstractComponent
|
+--org.millstone.base.ui.AbstractField
|
+--org.millstone.base.ui.DateField
A date editor component that can be bound to any bindable Property. that is compatible with java.util.Date.
Since DateField extends AbstractField it
implements the Buffered interface. A
DateField is in write-through mode by default, so
AbstractField.setWriteThrough(boolean)
must be called to enable buffering.
| Nested Class Summary |
| Nested classes inherited from class org.millstone.base.ui.AbstractField |
AbstractField.ReadOnlyStatusChangeEvent, AbstractField.ValueChangeEvent |
| Nested classes inherited from class org.millstone.base.data.Buffered |
Buffered.SourceException |
| Nested classes inherited from class org.millstone.base.data.Property |
Property.ConversionException, Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeEvent, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
| Nested classes inherited from class org.millstone.base.ui.Component |
Component.Event, Component.Listener |
| Nested classes inherited from class org.millstone.base.terminal.Paintable |
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
| Field Summary | |
static int |
RESOLUTION_DAY
Resolution identifier: days. |
static int |
RESOLUTION_HOUR
Resolution identifier: hours. |
static int |
RESOLUTION_MIN
Resolution identifier: minutes. |
static int |
RESOLUTION_MONTH
Resolution identifier: months. |
static int |
RESOLUTION_MSEC
Resolution identifier: milliseconds |
static int |
RESOLUTION_SEC
Resolution identifier: seconds. |
static int |
RESOLUTION_YEAR
Resolution identifier: years. |
| Constructor Summary | |
DateField()
Constructs an empty DateField with no caption. |
|
DateField(Property dataSource)
Constructs a new DateField that's bound to the
specified Property and has no caption. |
|
DateField(java.lang.String caption)
Constructs an empty DateField with caption. |
|
DateField(java.lang.String caption,
java.util.Date value)
Constructs a new DateField with the given caption and
initial text contents. |
|
DateField(java.lang.String caption,
Property dataSource)
Constructs a new DateField that's bound to the
specified Property and has the given caption
String. |
|
| Method Summary | |
void |
changeVariables(java.lang.Object source,
java.util.Map variables)
Called when one or more variables handled by the implementing class are changed. |
int |
getResolution()
Returns the resolution. |
java.lang.String |
getTag()
Gets the UIDL tag corresponding to the component. |
java.lang.Class |
getType()
Returns the type of the Property. |
void |
paintContent(PaintTarget target)
Paints any needed component-specific things to the given UIDL stream. |
void |
setPropertyDataSource(Property newDataSource)
Set DateField datasource. |
void |
setResolution(int resolution)
Sets the resolution of the DateField |
void |
setValue(java.lang.Object newValue)
Set the value of the field. |
java.lang.String |
toString()
Returns the value of the Property in human readable textual format. |
| Methods inherited from class org.millstone.base.ui.AbstractField |
addListener, addListener, addValidator, commit, constructField, discard, fireReadOnlyStatusChange, fireValueChange, focus, getErrorMessage, getPropertyDataSource, getValidators, getValue, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isValid, isWriteThrough, removeListener, removeListener, removeValidator, setInvalidAllowed, setInvalidCommitted, setReadOnly, setReadThrough, setWriteThrough, validate, valueChange |
| Methods inherited from class org.millstone.base.ui.AbstractComponent |
addListener, addListener, addListener, addListener, attach, childRequestedRepaint, dependsOn, detach, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getDescription, getDirectDependencies, getIcon, getLocale, getParent, getStyle, getWindow, isEnabled, isImmediate, isVisible, paint, removeDirectDependency, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setDescription, setEnabled, setIcon, setImmediate, setLocale, setParent, setStyle, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int RESOLUTION_MSEC
public static final int RESOLUTION_SEC
public static final int RESOLUTION_MIN
public static final int RESOLUTION_HOUR
public static final int RESOLUTION_DAY
public static final int RESOLUTION_MONTH
public static final int RESOLUTION_YEAR
| Constructor Detail |
public DateField()
DateField with no caption.
public DateField(java.lang.String caption)
DateField with caption.
caption - The caption of the datefield.
public DateField(java.lang.String caption,
Property dataSource)
DateField that's bound to the
specified Property and has the given caption
String.
caption - caption String for the editordataSource - the Property to be edited with this editor
public DateField(Property dataSource)
throws java.lang.IllegalArgumentException
DateField that's bound to the
specified Property and has no caption.
dataSource - the Property to be edited with this editor
public DateField(java.lang.String caption,
java.util.Date value)
DateField with the given caption and
initial text contents. The editor constructed this way will not be
bound to a Property unless
Property.Viewer.setPropertyDataSource(Property)
is called to bind it.
caption - caption String for the editor| Method Detail |
public void paintContent(PaintTarget target)
throws PaintException
AbstractComponentAbstractComponent.paint(PaintTarget) method handles
all general attributes common to all components, and it calls this
method to paint any component-specific attributes to the UIDL stream.
paintContent in class AbstractFieldtarget - target UIDL stream where the component should paint
itself to
PaintException - if the operation failedpublic java.lang.String getTag()
AbstractComponent
getTag in class AbstractComponentString
public void changeVariables(java.lang.Object source,
java.util.Map variables)
VariableOwner
changeVariables in interface VariableOwnerchangeVariables in class AbstractComponentsource - Source of the variable change. This is the origin of the
event. For example in Web Adapter this is the request.variables - Mapping from variable names to new variable valuespublic java.lang.Class getType()
PropertygetValue
and setValue must be compatible with this type: one
must be able to safely cast the value returned from
getValue to the given type and pass any variable
assignable to this type as an argument to setValue.
getType in interface PropertygetType in class AbstractFieldpublic java.lang.String toString()
AbstractField
toString in interface PropertytoString in class AbstractFieldString representation of the value stored in the
Property
public void setValue(java.lang.Object newValue)
throws Property.ReadOnlyException,
Property.ConversionException
AbstractField
setValue in interface PropertysetValue in class AbstractFieldnewValue - New value of the field.
Property.ReadOnlyException
Property.ConversionExceptionpublic void setPropertyDataSource(Property newDataSource)
setPropertyDataSource in interface Property.ViewersetPropertyDataSource in class AbstractFieldnewDataSource - the new data source PropertyProperty.Viewer.setPropertyDataSource(Property)public int getResolution()
public void setResolution(int resolution)
resolution - The resolution to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||