|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.cnes.genius.main.GComponent
fr.cnes.genius.lowLevel.GContainer
fr.cnes.genopus.time.GPDateOffset
public class GPDateOffset
Widget defining a date offset. The allowed formats for the offset are:
- Cal1:
[-]<DD...>j<HH...>h<MM...>m<SS...>s<AAA...>ms<BBB...>us<CCC...>ns
- Cal2: [-]<DD...> <HH...> <MM...> <SS...> <AAA...> <BBB...>
<CCC...>
- Fractional: [-]<Offset>[.<OffsetFraction>][ ~<Unit>]
, with <Unit> one of: j, h, mn, s, ms, us, ns (if not present, default unit is j). The number of digits
allowed for <OffsetFraction> depends on the selected <Unit> in order to always have a precision of
1 nanosecond: 14 (for days),
13 (for hours),
11 (for minutes),
9 (for seconds),
6 (for milliseconds),
3 (for microseconds) and
0 for nanoseconds.
| Index | Class | Item | Constraint |
| 0 | GLabelWithIndicator | label | 0, 0 => "newline , gapleft 0 , split 2" 0, 1 => (null) |
| 1 | GPDateOffsetField | offsetField | "split 2" |
| 2 | GPopupList | popupListUnits | (null) |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class fr.cnes.genius.main.GComponent |
|---|
fr.cnes.genius.main.GComponent.CopyPasteOperation, fr.cnes.genius.main.GComponent.DisplayIndicatorStatus, fr.cnes.genius.main.GComponent.ItemType, fr.cnes.genius.main.GComponent.Operation |
| Field Summary |
|---|
| Fields inherited from class fr.cnes.genius.main.GComponent |
|---|
NAME_ATTRIBUTE |
| Constructor Summary | |
|---|---|
GPDateOffset(String label)
Constructor. |
|
GPDateOffset(String label,
double offset)
Constructor. |
|
GPDateOffset(String widgetId,
String label)
Constructor. |
|
GPDateOffset(String widgetId,
String label,
double offset)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addInterval(fr.cnes.genius.interval.GInterval interval)
Adds a validity interval to the offset value. |
void |
after(fr.cnes.genius.main.GEvent e)
|
void |
attachCopyPasteMenu(String label,
fr.cnes.genius.main.GComponent.CopyPasteOperation... operationList)
|
void |
before(fr.cnes.genius.main.GEvent e)
|
void |
clear()
|
void |
display()
|
void |
generic()
|
GPDateOffsetField.GPOffsetFormat |
getCurrentFormat()
Getter for the offset format. |
fr.cnes.genius.highLevel.GLabelWithIndicator |
getGlabel()
Getter for the label of the widget. |
fr.cnes.genius.highLevel.GPopupList |
getGPopupList()
Getter for the GPopupList defining the unit of a fractional offset. |
fr.cnes.genius.lowLevel.GTextField |
getGTextField()
Getter for the offset field. |
double |
getOffset()
Getter for the offset value. |
fr.cnes.genius.main.GComponent |
getSubComponent(int position)
|
boolean |
isEnabled()
|
boolean |
isModified()
|
void |
read()
|
void |
setConstraint(int labelGap)
Setter for the constraints of the widget. |
void |
setCurrentFormat(GPDateOffsetField.GPOffsetFormat offsetFormat)
Setter for the offset format. |
void |
setDefaultOffset(double defaultOffset)
Setter for the default offset value in seconds. |
void |
setEnabled(boolean b)
|
void |
setOffset(double offset)
Setter for the offset value in seconds. |
void |
setSavedOffset(double savedOffset)
Setter for the reference offset value in seconds. |
void |
setUnit(fr.cnes.genius.unit.GUnit offsetUnit)
Setter for the offset unit. |
void |
setValue(String stringOffset)
Set offset from string. |
void |
setWidgetId(String widgetId)
|
void |
updateIsModifiedIndicator()
|
void |
write()
|
| Methods inherited from class fr.cnes.genius.lowLevel.GContainer |
|---|
put |
| Methods inherited from class fr.cnes.genius.main.GComponent |
|---|
activateConstraintsByType, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getSimpleWidgetId, getStatus, getStringConstraint, getWidgetId, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, launchInvalidPositionException, parseSimpleConstraint, processGEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setNameAndCommentInConfigFile, setNameInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidth, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GPDateOffset(String label)
label - text to display in the label.
public GPDateOffset(String label,
double offset)
label - text to display in the label.offset - date offset to set. Its absolute value must be lower than Long.MAX_VALUE
public GPDateOffset(String widgetId,
String label)
widgetId - widget identifier.label - text to display in the label.
public GPDateOffset(String widgetId,
String label,
double offset)
widgetId - widget identifier.label - text to display in the label.offset - date offset to set. Its absolute value must be lower than Long.MAX_VALUE| Method Detail |
|---|
public void setWidgetId(String widgetId)
setWidgetId in class fr.cnes.genius.main.GComponentpublic fr.cnes.genius.highLevel.GLabelWithIndicator getGlabel()
public fr.cnes.genius.lowLevel.GTextField getGTextField()
public fr.cnes.genius.highLevel.GPopupList getGPopupList()
public void setOffset(double offset)
throws GPDateException
offset - the offset in seconds to set.
GPDateException - if the absolute value of the offset in days is too high ( Long.MAX_VALUE
)
public void setUnit(fr.cnes.genius.unit.GUnit offsetUnit)
throws GPDateException
offsetUnit - format in which the offset will be shown in the widget.
GPDateException - if given unit is not available in the widget.
public void setValue(String stringOffset)
throws GPDateException
stringOffset - string offset to set.
GPDateException - if offset is in bad formatpublic GPDateOffsetField.GPOffsetFormat getCurrentFormat()
public void setCurrentFormat(GPDateOffsetField.GPOffsetFormat offsetFormat)
offsetFormat - format in which the offset will be shown in the widget.public void setConstraint(int labelGap)
labelGap - left gap from panel border to display the label
public fr.cnes.genius.main.GComponent getSubComponent(int position)
throws fr.cnes.genius.exception.GComponentException
getSubComponent in class fr.cnes.genius.main.GComponentfr.cnes.genius.exception.GComponentException
public void addInterval(fr.cnes.genius.interval.GInterval interval)
throws fr.cnes.genius.exception.GIntervalException
interval - real interval to add.
fr.cnes.genius.exception.GIntervalException - in case the interval overlaps with an existing one.
public void attachCopyPasteMenu(String label,
fr.cnes.genius.main.GComponent.CopyPasteOperation... operationList)
attachCopyPasteMenu in class fr.cnes.genius.main.GComponentpublic void updateIsModifiedIndicator()
updateIsModifiedIndicator in class fr.cnes.genius.main.GComponentpublic boolean isEnabled()
isEnabled in class fr.cnes.genius.main.GComponentpublic void setEnabled(boolean b)
setEnabled in class fr.cnes.genius.main.GComponentpublic boolean isModified()
isModified in class fr.cnes.genius.main.GComponentpublic void generic()
generic in class fr.cnes.genius.lowLevel.GContainer
public void display()
throws fr.cnes.genius.exception.GException
display in interface fr.cnes.genius.main.GDisplayfr.cnes.genius.exception.GExceptionpublic void before(fr.cnes.genius.main.GEvent e)
before in interface fr.cnes.genius.main.GListener
public void after(fr.cnes.genius.main.GEvent e)
throws GPDateException
after in interface fr.cnes.genius.main.GListenerGPDateException
public void read()
throws fr.cnes.genius.exception.GException
read in interface fr.cnes.genius.main.GReadWritefr.cnes.genius.exception.GException
public void write()
throws fr.cnes.genius.exception.GException
write in interface fr.cnes.genius.main.GReadWritefr.cnes.genius.exception.GExceptionpublic void clear()
clear in interface fr.cnes.genius.main.GClearpublic double getOffset()
public void setDefaultOffset(double defaultOffset)
throws GPDateException
defaultOffset - the default offset in seconds to set.
GPDateException - if the absolute value of the defaultOffset in days is too high (
Long.MAX_VALUE )
public void setSavedOffset(double savedOffset)
throws GPDateException
savedOffset - the reference offset in seconds to set.
GPDateException - if the absolute value of the defaultOffset in days is too high (
Long.MAX_VALUE )
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||