public class GEntryDate extends GContainer implements GDisplay, GReadWrite, GListener, GClear
| Index | Class | Item | Constraint |
| 0 | GLabelWithIndicator | label | 0, 0 =>
"newline , split 2" 0, 1 => (null) |
| 1 | GDateField | textField | "wmin 160" |
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.OperationNAME_ATTRIBUTE| Constructor and Description |
|---|
GEntryDate()
Constructor by default.
|
GEntryDate(String label,
Date value)
Constructor.
|
GEntryDate(String label,
String value)
Constructor.
|
GEntryDate(String widgetId,
String label,
Date value)
Constructor.
|
GEntryDate(String widgetId,
String label,
String stringValue)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGInterval(GIntervalDate interval)
Adds a validity interval to the field.
|
void |
after(GEvent e)
Called after the event is processed.
|
void |
attachCopyPasteMenu(String label,
GComponent.CopyPasteOperation... operationList)
Attach the copy and paste menu to this component.
|
void |
before(GEvent e)
Called before the event is processed.
|
void |
clear()
Called when the element is to be cleared, so it can perform the actions required to return to the last
saved/loaded values.
|
void |
display()
Called when the element is to be displayed, so it can perform the actions required for its display, and
the display of its inmmediate descendants.
|
void |
generic()
The prototype of the generic function that shall exist in all the descendants.
|
GDateField |
getGDateField()
Get the m_dateField.
|
GIntervalAbstract |
getGInterval(int index)
Get the interval of a given index in the list.
|
GLabelWithIndicator |
getGLabelWithIndicator()
Get the m_label.
|
String |
getStringValue()
Return the value of the field.
|
GComponent |
getSubComponent(int position)
Gets the subcomponent occupying the position defined by position.
|
Date |
getValue()
Return the value of the field.
|
GComponent.CopyPasteOperation |
isCopyPasteEvent(GEvent event)
Checks if the event corresponds to one of the copy and paste menu operations.
|
boolean |
isEnabled()
Gets the enable status of the widget.
|
boolean |
isModified()
Gets the modification status of the component against the last set of values loaded or saved.
|
void |
read()
Implementaion of the routines that allow the component to be loaded from a configuration file.
|
void |
removeGInterval(GIntervalDate interval)
Remove a validity interval of the field.
|
protected void |
setDefaultConstraints()
Set default constraints.
|
void |
setDefaultValue(Date newValue)
Set default value.
|
void |
setDefaultValue(String newValue)
Set default value.
|
void |
setEnabled(boolean b)
Set the enable status of the component.
|
void |
setSavedValue(Date value)
Change the saved value.
|
void |
setShortcut(int shorcutKey)
Set the shortcut key for focusing the entryField.
|
void |
setToolTipText(String text)
Set the tooltip text for the entry's label.
|
void |
setValue(Date value)
Set the value of the field.
|
void |
setValue(String stringValue)
Set the value of the field.
|
void |
updateGInterval(GIntervalDate oldInterval,
GIntervalDate newInterval)
Update a validity interval of the field.
|
protected void |
updateIsModifiedIndicator()
Updates the is modified indicator.
|
void |
updateStatus()
Update the status of the field applying the defined validity intervals.
|
void |
write()
Implementaion of the routines that allow the component to be saved to a configuration file.
|
putactivateConstraintsByType, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isForcedStatus, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setWidgetId, setWidth, setWindowBusyCursor, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItempublic GEntryDate()
throws GDateFieldException,
GArithmeticException,
ParseException
GArithmeticException - thrown if failedGDateFieldException - thrown if failedParseException - thrown if failedpublic GEntryDate(String label, String value) throws GDateFieldException, GArithmeticException, ParseException
label - of the entry.value - value of the entry.GArithmeticException - thrown if failedGDateFieldException - thrown if failedParseException - thrown if failedpublic GEntryDate(String widgetId, String label, String stringValue) throws GDateFieldException, GArithmeticException
widgetId - identifier of the widget.label - of the entry.stringValue - value of the entry.GArithmeticException - thrown if failedGDateFieldException - thrown if failedpublic GEntryDate(String label, Date value)
label - of the entry.value - value of the entry.protected final void setDefaultConstraints()
setDefaultConstraints in class GComponentpublic GComponent getSubComponent(int position) throws GComponentException
getSubComponent in class GComponentposition - position of the requested component.GComponentException - in case the position argument is invalid.public void generic()
throws GException
generic in class GContainerGException - In case of problem.public void display()
throws GException
display in interface GDisplayGException - in case of problem while reading the value from file.public boolean isEnabled()
isEnabled in class GComponentpublic void setEnabled(boolean b)
setEnabled in class GComponentb - new enable status of the component.public Date getValue()
public String getStringValue()
public void setValue(String stringValue) throws GDateFieldException, GArithmeticException
stringValue - to set in the field.GDateFieldException - in case the date in string format cannot be parsed.GArithmeticException - in case the duration in string format cannot be parsed.public void setValue(Date value)
value - to set in the field.public void setSavedValue(Date value)
value - new saved value.public void read()
throws GException
read in interface GReadWriteGExceptionpublic void write()
throws GException
write in interface GReadWriteGException - in case of problem while writing the value to file.public void addGInterval(GIntervalDate interval) throws GIntervalException
interval - to add.GIntervalException - in case the interval overlaps with an existing one.public GIntervalAbstract getGInterval(int index)
index - of the wanted interval in the intervals list.public void updateGInterval(GIntervalDate oldInterval, GIntervalDate newInterval) throws GIntervalException
oldInterval - to update.newInterval - to update newInterval.GIntervalException - in case oldInterval is not found in the list of intervals
defined for the field.public void removeGInterval(GIntervalDate interval)
interval - to be removedpublic void updateStatus()
public boolean isModified()
isModified in class GComponentpublic void before(GEvent e) throws GException
before in interface GListenere - event to processed.GException - in case there is a problem managing the event.public void after(GEvent e) throws GException, GFileManipulatorException
after in interface GListenere - processed event.GException - in case there is a problem managing the event.GFileManipulatorExceptionpublic GLabelWithIndicator getGLabelWithIndicator()
public void attachCopyPasteMenu(String label, GComponent.CopyPasteOperation... operationList)
attachCopyPasteMenu in class GComponentlabel - of the copy&paste menu, if null no label is displayed.operationList - list of operations to set in the menu. Valid values are Copy if the
"Copy" menu is available, Paste if the "Paste" menu is available, Import if the
"Import" menu is available, and Export if the "Export" menu is available.public GComponent.CopyPasteOperation isCopyPasteEvent(GEvent event)
isCopyPasteEvent in class GComponentevent - to check.public GDateField getGDateField()
protected void updateIsModifiedIndicator()
updateIsModifiedIndicator in class GComponentpublic void clear()
throws GException
GClearclear in interface GClearGException - in case of problem while clearing the values.public void setDefaultValue(Date newValue)
newValue - new default value.public void setDefaultValue(String newValue) throws GDateFieldException
newValue - new default value.GDateFieldException - in case the value can not be parsed.public void setToolTipText(String text)
setToolTipText in class GComponenttext - the tooltip text for the entry's label.public void setShortcut(int shorcutKey)
shorcutKey - the shortcut key to be attached to the wigdet.Copyright © 2024. All rights reserved.