fr.cnes.genopus.bodies
Class GPCelestialBody

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genius.highLevel.GComboBoxWithLabel
              extended by fr.cnes.genius.highLevel.GObjectComboBoxWithLabel<org.orekit.bodies.CelestialBody>
                  extended by fr.cnes.genopus.bodies.GPCelestialBody
All Implemented Interfaces:
fr.cnes.genius.main.GClear, fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GReadWrite, GPPatrius<org.orekit.bodies.CelestialBody>

public class GPCelestialBody
extends fr.cnes.genius.highLevel.GObjectComboBoxWithLabel<org.orekit.bodies.CelestialBody>
implements GPPatrius<org.orekit.bodies.CelestialBody>

Class implementing a combo box to select a celestial body.

Author:
ffsm
Default Constraint(s):
IndexClassItemConstraint
0GLabelWithIndicatorlabel0, 0 => "newline , split 2"
0, 1 => (null)
1GComboBoxcombobox(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
GPCelestialBody(String label)
          Constructor.
GPCelestialBody(String widgetId, String label)
          Constructor.
GPCelestialBody(String widgetId, String label, org.orekit.bodies.CelestialBody initialBody, org.orekit.bodies.CelestialBody[] availableBodies)
          Constructor.
 
Method Summary
 org.orekit.bodies.CelestialBody getPatriusObject()
          Returns the PATRIUS object associated to a GENOPUS widget.
 void setObjectList(org.orekit.bodies.CelestialBody... bodiesToShow)
          Setter for the list of celestial bodies available in the widget.
 
Methods inherited from class fr.cnes.genius.highLevel.GObjectComboBoxWithLabel
clear, getDefaultObject, getObject, getObjectList, getSavedObject, setDefaultObject, setDefaultObjectList, setDefaultObjectList, setDefaultValue, setDefaultValue, setDefaultValueList, setDefaultValueList, setDefaultValueList, setObject, setObjectList, setObjectList, setSavedObject, setSavedValue, setSavedValue, setValue, setValue, setValueList, setValueList, setValueList
 
Methods inherited from class fr.cnes.genius.highLevel.GComboBoxWithLabel
after, attachCopyPasteMenu, before, display, generic, getDefaultValue, getDefaultValueEnum, getGComboBox, getGLabelWithIndicator, getSavedValue, getSavedValueEnum, getSelectedItem, getSubComponent, getValue, getValueEnum, isCopyPasteEvent, isEnabled, isModified, read, setEnabled, setStringConstraint, setTooltipsList, setToolTipText, setWidgetId, updateIsModifiedIndicator, 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, launchInvalidPositionException, parseSimpleConstraint, processGEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setNameAndCommentInConfigFile, setNameInConfigFile, setStatus, 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

GPCelestialBody

public GPCelestialBody(String label)
Constructor. The widget identifier is created automatically.

Parameters:
label - to display on the side of the combobox.
Throws:
org.orekit.errors.OrekitException

GPCelestialBody

public GPCelestialBody(String widgetId,
                       String label)
Constructor.

Parameters:
widgetId - widget identifier.
label - to display on the side of the combobox.
Throws:
org.orekit.errors.OrekitException

GPCelestialBody

public GPCelestialBody(String widgetId,
                       String label,
                       org.orekit.bodies.CelestialBody initialBody,
                       org.orekit.bodies.CelestialBody[] availableBodies)
Constructor.

Parameters:
widgetId - widget identifier.
label - to display on the side of the combobox.
initialBody - initial body to be selected. It must be a body available in the widget, otherwise it will throw a GRuntimeException.
availableBodies - list of available bodies to be present in the combobox.
Throws:
org.orekit.errors.OrekitException
Method Detail

getPatriusObject

public org.orekit.bodies.CelestialBody getPatriusObject()
                                                 throws fr.cnes.genius.exception.GException
Returns the PATRIUS object associated to a GENOPUS widget.

Specified by:
getPatriusObject in interface GPPatrius<org.orekit.bodies.CelestialBody>
Returns:
the PATRIUS object associated to the widget.
Throws:
fr.cnes.genius.exception.GException - if the PATRIUS object cannot be created from the widget data.

setObjectList

public void setObjectList(org.orekit.bodies.CelestialBody... bodiesToShow)
Setter for the list of celestial bodies available in the widget. The current selected body must be one of them. If the list of bodies is null or empty, all of them will be shown.

Parameters:
bodiesToShow - an array of CelestialBody with the list of celestial bodies to show in the widget. If null or empty: all bodies will be shown.


Copyright © 2017. All rights reserved.