fr.cnes.genopus.events
Class GPEventDetectorAbstract

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genopus.events.GPEventDetectorAbstract
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>
Direct Known Subclasses:
GPAltitudeDetector, GPDateDetector, GPRelativeDateDetector, GPTriggeredEventDetectorAbstract

public abstract class GPEventDetectorAbstract
extends fr.cnes.genius.lowLevel.GContainer
implements fr.cnes.genius.main.GReadWrite, fr.cnes.genius.main.GClear, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GDisplay, GPPatrius<CustomEventDetector>, fr.cnes.genius.main.GCondensedStatusInterface

Abstract class defining the default methods to be implemented by any class that want to define an CustomEventDetector widget.

Author:
aadt

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
protected static String ACTION
           
protected static String DETECTOR_ERROR
           
 
Fields inherited from class fr.cnes.genius.main.GComponent
NAME_ATTRIBUTE
 
Constructor Summary
GPEventDetectorAbstract(String widgetId, String label)
          Constructor.
 
Method Summary
 void after(fr.cnes.genius.main.GEvent e)
          
 void attachCopyPasteMenu(String label, fr.cnes.genius.main.GComponent.CopyPasteOperation... operationList)
          
 void blockAction(org.orekit.propagation.events.EventDetector.Action selectedAction)
          Blocks the action of the event on selectedAction.
 void clear()
          
 void display()
          
 void generic()
          
 fr.cnes.genius.lowLevel.GCheckBox getGCheckBoxExpertConfig()
          Getter for the GCheckBox to select whether expert configuration has to be shown or not.
 fr.cnes.genius.highLevel.GComboBoxWithLabel getGComboBoxAction()
          Getter for the GComboBoxWithLabel defining the action to be performed in case of event detection.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealMaxCheck()
          Getter for the GEntryReal defining the maximum checking interval (s) for event detection.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealThreshold()
          Getter for the GEntryReal defining the convergence threshold (s) for event detection.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabel()
          Getter for the label of the widget.
abstract  CustomEventDetector getPatriusObject()
          Returns the PATRIUS object associated to a GENOPUS widget.
protected  org.orekit.propagation.events.EventDetector.Action getSelectedAction()
          Get the selected action in the combobox as a EventDetector.Action enum item.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
protected abstract  GPItemType getXMLTag()
          Getter for the tag to be used int the XML configuration file.
 boolean isEnabled()
          
 boolean isModified()
          
abstract  boolean isNativeEventDetector(CustomEventDetector eventDetector)
          Check if a given event detector is defined in the native type of event detector of the widget.
 void read()
          
protected  void setAbstractClassDefaultValue(CustomEventDetector customDetector)
          Set default values for the abstract class sub-widgets from a given custom detector:
- the combo box to set the action.
protected  void setAbstractClassSavedValue(CustomEventDetector customDetector)
          Set saved values for the abstract class sub-widgets from a given custom detector:
- the combo box to set the action.
protected  void setAbstractClassValue(CustomEventDetector customDetector)
          Set values for the abstract class sub-widgets from a given custom detector:
- the combo box to set the action.
 void setConstraint(int labelGap, int subWidgetGap)
          Setter for the constraints of the Event Detector widget.
protected  void setDefaultConstraint()
          Setter for the default constraint of the date event.
abstract  void setDefaultEventDetector(CustomEventDetector defaultEventDetector)
          Setter for the default event detector.
 void setDisplayAction(boolean display)
          Sets whether the combobox to select the action is to be shown or not.
 void setDisplayExpertConfig(boolean display)
          Sets whether the expert configuration is to be shown or not.
 void setDisplayIsModifiedIndicatorAll(fr.cnes.genius.main.GComponent.DisplayIndicatorStatus displayIndicatorStatus)
          Controls the display of the isModified indicator of all sub-widgets.
 void setEnabled(boolean b)
          
abstract  void setEventDetector(CustomEventDetector eventDetector)
          Setter for the event detector.
abstract  void setSavedEventDetector(CustomEventDetector savedEventDetector)
          Setter for the reference event detector.
 void setWidgetId(String widgetId)
          
 void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
          
 void updateIsModifiedIndicator()
          
 void updateStatus()
          Update the status of the orbital parameters.
 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
 
Methods inherited from interface fr.cnes.genius.main.GListener
before
 

Field Detail

DETECTOR_ERROR

protected static final String DETECTOR_ERROR

ACTION

protected static final String ACTION
See Also:
Constant Field Values
Constructor Detail

GPEventDetectorAbstract

public GPEventDetectorAbstract(String widgetId,
                               String label)
Constructor.

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

setWidgetId

public void setWidgetId(String widgetId)

Overrides:
setWidgetId in class fr.cnes.genius.main.GComponent

getGLabel

public fr.cnes.genius.highLevel.GLabelWithIndicator getGLabel()
Getter for the label of the widget.

Returns:
the label of the widget.

getGComboBoxAction

public fr.cnes.genius.highLevel.GComboBoxWithLabel getGComboBoxAction()
Getter for the GComboBoxWithLabel defining the action to be performed in case of event detection.

Returns:
the GComboBoxWithLabel defining the action to be performed in case of event detection.

getGCheckBoxExpertConfig

public fr.cnes.genius.lowLevel.GCheckBox getGCheckBoxExpertConfig()
Getter for the GCheckBox to select whether expert configuration has to be shown or not.

Returns:
the GCheckBox to select whether expert configuration has to be shown or not.

getGEntryRealMaxCheck

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealMaxCheck()
Getter for the GEntryReal defining the maximum checking interval (s) for event detection.

Returns:
the GEntryReal defining the maximum checking interval (s) for event detection.

getGEntryRealThreshold

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealThreshold()
Getter for the GEntryReal defining the convergence threshold (s) for event detection.

Returns:
the GEntryReal defining the convergence threshold (s) for event detection.

getSelectedAction

protected org.orekit.propagation.events.EventDetector.Action getSelectedAction()
Get the selected action in the combobox as a EventDetector.Action enum item.

Returns:
the selected action

setEventDetector

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

Parameters:
eventDetector - event detector to set.
Throws:
GPEventException - if the given event detector is not compatible with the widget.

setAbstractClassValue

protected void setAbstractClassValue(CustomEventDetector customDetector)
Set values for the abstract class sub-widgets from a given custom detector:
- the combo box to set the action.
- the entry real for the max check.
- the entry real for the threshold.

Parameters:
customDetector - the custom detector where to extract the values for the sub-widgets

setDefaultEventDetector

public abstract 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.

Parameters:
defaultEventDetector - default event detector to set.
Throws:
GPEventException - if the given event detector is not compatible with the widget.

setAbstractClassDefaultValue

protected void setAbstractClassDefaultValue(CustomEventDetector customDetector)
Set default values for the abstract class sub-widgets from a given custom detector:
- the combo box to set the action.
- the entry real for the max check.
- the entry real for the threshold.

Parameters:
customDetector - the custom detector where to extract the values to be set as default ones in the sub-widgets

setSavedEventDetector

public abstract 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.

Parameters:
savedEventDetector - reference event detector to set.
Throws:
GPEventException - if the given event detector is not compatible with the widget.

setAbstractClassSavedValue

protected void setAbstractClassSavedValue(CustomEventDetector customDetector)
Set saved values for the abstract class sub-widgets from a given custom detector:
- the combo box to set the action.
- the entry real for the max check.
- the entry real for the threshold.

Parameters:
customDetector - the custom detector where to extract the values to be set as saved ones in the sub-widgets

isNativeEventDetector

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

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.

setDefaultConstraint

protected void setDefaultConstraint()
Setter for the default constraint of the date event.


setConstraint

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

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.

Parameters:
displayIndicatorStatus - if Always the modifiedStatusIndicator is always shown, if Never the modifiedStatusIndicator is always shown, if Automatic the modifiedStatusIndicator is shown as needed.

setDisplayAction

public void setDisplayAction(boolean display)
Sets whether the combobox to select the action is to be shown or not.

Parameters:
display - whether the combobox to select the action is to be shown or not.

setDisplayExpertConfig

public void setDisplayExpertConfig(boolean display)
Sets whether the expert configuration is to be shown or not.

Parameters:
display - whether the expert configuration is to be shown or not.

attachCopyPasteMenu

public void attachCopyPasteMenu(String label,
                                fr.cnes.genius.main.GComponent.CopyPasteOperation... operationList)

Overrides:
attachCopyPasteMenu in class fr.cnes.genius.main.GComponent

updateIsModifiedIndicator

public void updateIsModifiedIndicator()

Overrides:
updateIsModifiedIndicator in class fr.cnes.genius.main.GComponent

isEnabled

public boolean isEnabled()

Overrides:
isEnabled in class fr.cnes.genius.main.GComponent

setEnabled

public void setEnabled(boolean b)

Overrides:
setEnabled in class fr.cnes.genius.main.GComponent

isModified

public boolean isModified()

Overrides:
isModified in class fr.cnes.genius.main.GComponent

generic

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

Specified by:
generic in class fr.cnes.genius.lowLevel.GContainer
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
Throws:
fr.cnes.genius.exception.GException

after

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

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

read

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

Specified by:
read in interface fr.cnes.genius.main.GReadWrite
Throws:
fr.cnes.genius.exception.GException

write

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

Specified by:
write in interface fr.cnes.genius.main.GReadWrite
Throws:
fr.cnes.genius.exception.GException

getXMLTag

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

Returns:
the tag to be used int the XML configuration file

clear

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

Specified by:
clear in interface fr.cnes.genius.main.GClear
Throws:
fr.cnes.genius.exception.GException

getSubComponent

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

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

getPatriusObject

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

Specified by:
getPatriusObject in interface GPPatrius<CustomEventDetector>
Returns:
the PATRIUS object associated to the widget.
Throws:
GPEventException

updateStatus

public void updateStatus()
Update the status of the orbital parameters.


updateCondensedStatus

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

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

blockAction

public void blockAction(org.orekit.propagation.events.EventDetector.Action selectedAction)
Blocks the action of the event on selectedAction.

Parameters:
selectedAction - the blocked action


Copyright © 2017. All rights reserved.