public class GEntryDateVector extends GEntryVectorAbstract
GTable1D
object. The class implements save / load of values in the configuration file
following the definition of the class GEntryVectorAbstract
. The class inherits of class
GEntryVectorAbstract
which is in charge of validity range handling, Insertion / Deletion
of fields.GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.Operation
NAME_ATTRIBUTE
Constructor and Description |
---|
GEntryDateVector(String name,
ArrayList<?> valueList)
Constructor.
|
GEntryDateVector(String name,
Date[] valueArray)
Constructor.
|
GEntryDateVector(String name,
String[] valueArray)
Constructor.
|
GEntryDateVector(String widgetId,
String name,
ArrayList<?> valueList)
Constructor.
|
GEntryDateVector(String widgetId,
String name,
Date[] valueArray)
Constructor.
|
GEntryDateVector(String widgetId,
String name,
String[] valueArray)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int rank,
Object value)
Adds an item to the vector.
|
Date[] |
getDateArray()
Returns the array of values stored in the array as integers.
|
GPopupList |
getGUnitMenu()
Get the unit menu widget.
|
boolean |
handleEvent(GEvent event)
Method used by GTable1D to allow the vector to handle the events received at GTable1D level.
|
boolean |
isModified()
Gets the modification status of the component against the last set of values loaded or saved.
|
protected Object |
parseValue(String value)
Parse the value in string format and return a Number to be stored in the vector.
|
protected void |
readVector(org.jdom.Element e,
String readUnit)
Reads the elements of the vector from file.
|
void |
remove(int rank)
Remove an element from the vector.
|
void |
removeAll()
Remove all the elements from the vector.
|
void |
setDefaultValue(Object defaultValue)
Set the new default value.
|
void |
setSavedValue(int rank,
Object objectValue)
Sets the saved value of an element of the vector and then updates the modified indicator.
|
void |
updateStatus()
Update the status information of the vector.
|
protected void |
writeVector(org.jdom.Element parentElement)
Writes the elements of the vector to the file.
|
addGInterval, addItem, getGComponent, getGLabelWithIndicator, getGNumberField, getIntervalList, getLabelConstraint, getName, getNameInConfigFile, getSubComponent, getUnitInConfig, getValue, getValueArray, isEnabled, read, removeAllInternal, removeGInterval, setComponentConstraint, setDefaultConstraints, setEnabled, setFieldValue, setLabelAndUnitConstraint, setLabelConstraint, setNameInConfigFile, setToolTipText, setValue, setWidgetId, size, updateGInterval, updateIntervalMessage, updateIsModifiedIndicator, updateStatus, write
activateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isForcedStatus, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setWidth, setWindowBusyCursor, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
public GEntryDateVector(String name, Date[] valueArray)
name
- of the vector.valueArray
- list of initial values.public GEntryDateVector(String name, String[] valueArray)
name
- of the vector.valueArray
- list of initial values.public GEntryDateVector(String widgetId, String name, Date[] valueArray)
widgetId
- widget identifier.name
- of the vector.valueArray
- list of initial values.public GEntryDateVector(String widgetId, String name, String[] valueArray)
widgetId
- widget identifier.name
- of the vector.valueArray
- list of initial values.public GEntryDateVector(String name, ArrayList<?> valueList)
name
- of the vector.valueList
- list of initial values.public Date[] getDateArray()
public void add(int rank, Object value) throws GDateFieldException
add
in class GEntryVectorAbstract
rank
- of the new item.value
- of the new item.GDateFieldException
- in case the date can not be parsed.public void remove(int rank)
GEntryVectorAbstract
remove
in class GEntryVectorAbstract
rank
- of the element to remove.public void removeAll()
GEntryVectorAbstract
removeAll
in class GEntryVectorAbstract
public GPopupList getGUnitMenu()
getGUnitMenu
in class GEntryVectorAbstract
protected void writeVector(org.jdom.Element parentElement)
writeVector
in class GEntryVectorAbstract
parentElement
- where the values are stored.GEntryVectorAbstract.readVector(Element, String).
protected void readVector(org.jdom.Element e, String readUnit) throws GException
readVector
in class GEntryVectorAbstract
e
- from where the values are read.readUnit
- unit read from the configuration file, that shall be used to set the current
unit at vector level.GException
GEntryVectorAbstract.writeVector(Element).
protected Object parseValue(String value) throws GDateFieldException
parseValue
in class GEntryVectorAbstract
value
- string containing the value to be parsed.GDateFieldException
- in case of error parsing the value.public boolean isModified()
GComponent
isModified
in class GComponent
public boolean handleEvent(GEvent event)
GEntryVectorAbstract
handleEvent
in class GEntryVectorAbstract
event
- to process.public void updateStatus()
GEntryVectorAbstract
updateStatus
in class GEntryVectorAbstract
public void setDefaultValue(Object defaultValue)
setDefaultValue
in class GEntryVectorAbstract
defaultValue
- new default value.public void setSavedValue(int rank, Object objectValue) throws GException
setSavedValue
in class GEntryVectorAbstract
rank
- of the value to update its saved status.objectValue
- the value in SI units.GArithmeticException
- if objectValue is NaNGException
- if the rank is out of boundsCopyright © 2024. All rights reserved.