fr.cnes.genopus.events
Class GPRelativeDateDetector

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genopus.events.GPEventDetectorAbstract
              extended by fr.cnes.genopus.events.GPRelativeDateDetector
All Implemented Interfaces:
fr.cnes.genius.main.GClear, fr.cnes.genius.main.GCondensedStatusInterface, fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GReadWrite, GPPatrius<CustomEventDetector>

public class GPRelativeDateDetector
extends GPEventDetectorAbstract

Widget representing a Genopus' Relative Date Detector.

Author:
aadt
Default Constraint(s):
IndexClassItemConstraint
0GLabelWithIndicatorlabel0, 0 => "newline , gapleft 0 , split 2"
0, 1 => (null)
1GComboBoxWithLabelcomboBoxAction1, 0, 0 => "newline , gapleft 30 , split 2"
1, 0, 1 => (null)
1, 1 => (null)
2GCheckBoxcheckBoxExpertConfig"newline , gapleft 30 , split 2"
3GEntryRealentryRealMaxCheck3, 0, 0 => "newline , gapleft 30 , split 2"
3, 0, 1 => (null)
3, 1 => "split 2"
3, 2 => (null)
4GEntryRealentryRealThreshold4, 0, 0 => "newline , gapleft 30 , split 2"
4, 0, 1 => (null)
4, 1 => "split 2"
4, 2 => (null)
5GPDateOffsetdateOffset"newline"
(see table below)

Default Constraint(s) for dateOffset:
IndexClassItemConstraint
5, 0GLabelWithIndicatorlabel5, 0, 0 => "newline , gapleft 30 , split 2"
5, 0, 1 => (null)
5, 1GPDateOffsetFieldoffsetField"split 2"
5, 2GPopupListpopupListUnits(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.genopus.events.GPEventDetectorAbstract
ACTION, DETECTOR_ERROR
 
Fields inherited from class fr.cnes.genius.main.GComponent
NAME_ATTRIBUTE
 
Constructor Summary
GPRelativeDateDetector(String label)
          Constructor without default relative date detector.
GPRelativeDateDetector(String label, CustomRelativeDateDetector relativeDateDetector)
          Constructor.
GPRelativeDateDetector(String widgetId, String label)
          Constructor without default relative date detector.
GPRelativeDateDetector(String widgetId, String label, CustomRelativeDateDetector relativeDateDetector)
          Constructor.
 
Method Summary
 void after(fr.cnes.genius.main.GEvent e)
          
 void before(fr.cnes.genius.main.GEvent e)
          
 void display()
          
 void generic()
          
 GPDateOffset getGPDateOffset()
          Getter for the GPDateOffset defining the target relative date of the event detector.
 CustomRelativeDateDetector getPatriusObject()
          Returns the PATRIUS object associated to a GENOPUS widget.
 org.orekit.time.AbsoluteDate getReferenceDate()
          Method to get the reference date for the relative date detector.
 org.orekit.time.TimeScale getReferenceTimeScale()
          Method to get the reference time scale.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
protected  GPItemType getXMLTag()
          Getter for the tag to be used int the XML configuration file.
 boolean isModified()
          
 boolean isNativeEventDetector(CustomEventDetector eventDetector)
          Check if a given event detector is defined in the native type of event detector of the widget.
 void setConstraint(int labelGap, int subWidgetGap)
          Setter for the constraints of the Event Detector widget.
 void setDefaultEventDetector(CustomEventDetector defaultEventDetector)
          Setter for the default event detector.
 void setDisplayIsModifiedIndicatorAll(fr.cnes.genius.main.GComponent.DisplayIndicatorStatus displayIndicatorStatus)
          Controls the display of the isModified indicator of all sub-widgets.
 void setEnabled(boolean b)
          
 void setEventDetector(CustomEventDetector eventDetector)
          Setter for the event detector.
 void setReferenceDate(org.orekit.time.AbsoluteDate refDate, org.orekit.time.TimeScale timeScale)
          Method to set the reference date for the relative date detector.
 void setSavedEventDetector(CustomEventDetector savedEventDetector)
          Setter for the reference event detector.
 void setWidgetId(String widgetId)
          
 void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
          
 
Methods inherited from class fr.cnes.genopus.events.GPEventDetectorAbstract
attachCopyPasteMenu, blockAction, clear, getGCheckBoxExpertConfig, getGComboBoxAction, getGEntryRealMaxCheck, getGEntryRealThreshold, getGLabel, getSelectedAction, isEnabled, read, setAbstractClassDefaultValue, setAbstractClassSavedValue, setAbstractClassValue, setDefaultConstraint, setDisplayAction, setDisplayExpertConfig, updateIsModifiedIndicator, updateStatus, 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

GPRelativeDateDetector

public GPRelativeDateDetector(String label)
Constructor without default relative date detector. The widgetId will be assigned automatically.

Parameters:
label - text to display in the label.

GPRelativeDateDetector

public GPRelativeDateDetector(String label,
                              CustomRelativeDateDetector relativeDateDetector)
Constructor. The widgetId will be assigned automatically.

Parameters:
label - text to display in the label.
relativeDateDetector - relative date detector to set.

GPRelativeDateDetector

public GPRelativeDateDetector(String widgetId,
                              String label)
Constructor without default relative date detector.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created.
label - text to display in the label.

GPRelativeDateDetector

public GPRelativeDateDetector(String widgetId,
                              String label,
                              CustomRelativeDateDetector relativeDateDetector)
Constructor.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created.
label - text to display in the label.
relativeDateDetector - relative date detector to set.
Method Detail

setWidgetId

public void setWidgetId(String widgetId)

Overrides:
setWidgetId in class GPEventDetectorAbstract

getGPDateOffset

public GPDateOffset getGPDateOffset()
Getter for the GPDateOffset defining the target relative date of the event detector.

Returns:
the GPAbsoluteDate defining the target relative date of the event detector.

setReferenceDate

public void setReferenceDate(org.orekit.time.AbsoluteDate refDate,
                             org.orekit.time.TimeScale timeScale)
Method to set the reference date for the relative date detector.

Parameters:
refDate - reference date
timeScale - time scale for the relative date

getReferenceDate

public org.orekit.time.AbsoluteDate getReferenceDate()
                                              throws GPEventException
Method to get the reference date for the relative date detector.

Returns:
reference date
Throws:
GPEventException - if the reference date is undefined.

getReferenceTimeScale

public org.orekit.time.TimeScale getReferenceTimeScale()
                                                throws GPEventException
Method to get the reference time scale. This is the time scale in which the relative date is expressed in.

Returns:
reference time scale
Throws:
GPEventException - if the reference time scale is undefined.

getPatriusObject

public CustomRelativeDateDetector getPatriusObject()
                                            throws GPEventException
Returns the PATRIUS object associated to a GENOPUS widget.

Specified by:
getPatriusObject in interface GPPatrius<CustomEventDetector>
Specified by:
getPatriusObject in class GPEventDetectorAbstract
Returns:
the PATRIUS object associated to the widget.
Throws:
GPEventException - if reference date is undefined.

setEventDetector

public void setEventDetector(CustomEventDetector eventDetector)
                      throws GPEventException
Setter for the event detector. Event detector can only be set if it is compatible with the widget.

Specified by:
setEventDetector in class GPEventDetectorAbstract
Parameters:
eventDetector - event detector to set.
Throws:
GPEventException - if the given event detector is not compatible with the widget.

setDefaultEventDetector

public void setDefaultEventDetector(CustomEventDetector defaultEventDetector)
                             throws GPEventException
Setter for the default event detector. Event detector can only be set if it is compatible with the widget.

Specified by:
setDefaultEventDetector in class GPEventDetectorAbstract
Parameters:
defaultEventDetector - default event detector to set.
Throws:
GPEventException - if the given event detector is not compatible with the widget.

setSavedEventDetector

public void setSavedEventDetector(CustomEventDetector savedEventDetector)
                           throws GPEventException
Setter for the reference event detector. Event detector can only be set if it is compatible with the widget.

Specified by:
setSavedEventDetector in class GPEventDetectorAbstract
Parameters:
savedEventDetector - reference event detector to set.
Throws:
GPEventException - if the given event detector is not compatible with the widget.

setConstraint

public void setConstraint(int labelGap,
                          int subWidgetGap)
Setter for the constraints of the Event Detector widget.

Overrides:
setConstraint in class GPEventDetectorAbstract
Parameters:
labelGap - left gap from panel border to display the label of the event.
subWidgetGap - left gap from panel border to display the sub-widgets of the event.

setDisplayIsModifiedIndicatorAll

public void setDisplayIsModifiedIndicatorAll(fr.cnes.genius.main.GComponent.DisplayIndicatorStatus displayIndicatorStatus)
Controls the display of the isModified indicator of all sub-widgets.

Overrides:
setDisplayIsModifiedIndicatorAll in class GPEventDetectorAbstract
Parameters:
displayIndicatorStatus - if Always the modifiedStatusIndicator is always shown, if Never the modifiedStatusIndicator is always shown, if Automatic the modifiedStatusIndicator is shown as needed.

isNativeEventDetector

public boolean isNativeEventDetector(CustomEventDetector eventDetector)
Check if a given event detector is defined in the native type of event detector of the widget.

Specified by:
isNativeEventDetector in class GPEventDetectorAbstract
Parameters:
eventDetector - the event detector to be checked.
Returns:
true if the given event detector is defined in the native type of event detector of the widget.

setEnabled

public void setEnabled(boolean b)

Overrides:
setEnabled in class GPEventDetectorAbstract

isModified

public boolean isModified()

Overrides:
isModified in class GPEventDetectorAbstract

generic

public void generic()
             throws fr.cnes.genius.exception.GException

Overrides:
generic in class GPEventDetectorAbstract
Throws:
fr.cnes.genius.exception.GException

display

public void display()
             throws fr.cnes.genius.exception.GException

Specified by:
display in interface fr.cnes.genius.main.GDisplay
Overrides:
display in class GPEventDetectorAbstract
Throws:
fr.cnes.genius.exception.GException

before

public void before(fr.cnes.genius.main.GEvent e)


after

public void after(fr.cnes.genius.main.GEvent e)
           throws GPEventException

Specified by:
after in interface fr.cnes.genius.main.GListener
Overrides:
after in class GPEventDetectorAbstract
Throws:
GPEventException

getXMLTag

protected GPItemType getXMLTag()
Getter for the tag to be used int the XML configuration file.

Specified by:
getXMLTag in class GPEventDetectorAbstract
Returns:
the tag to be used int the XML configuration file

getSubComponent

public fr.cnes.genius.main.GComponent getSubComponent(int position)
                                               throws fr.cnes.genius.exception.GComponentException

Overrides:
getSubComponent in class GPEventDetectorAbstract
Throws:
fr.cnes.genius.exception.GComponentException

updateCondensedStatus

public void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)

Specified by:
updateCondensedStatus in interface fr.cnes.genius.main.GCondensedStatusInterface
Overrides:
updateCondensedStatus in class GPEventDetectorAbstract


Copyright © 2017. All rights reserved.