fr.cnes.genopus.maneuvers
Class GPManeuverAbstract

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genopus.maneuvers.GPManeuverAbstract
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, Cloneable
Direct Known Subclasses:
GPConstantManeuver, GPImpulseManeuver

public abstract class GPManeuverAbstract
extends fr.cnes.genius.lowLevel.GContainer
implements fr.cnes.genius.main.GReadWrite, fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GCondensedStatusInterface, fr.cnes.genius.main.GClear, Cloneable

Widget for abstract maneuver definition.

Author:
sumelzi, bacr

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 ENGINE_STR
           
protected static String FUEL_TANK_STR
           
protected static String NOT_AVAILABLE_ERROR
           
 
Fields inherited from class fr.cnes.genius.main.GComponent
NAME_ATTRIBUTE
 
Constructor Summary
GPManeuverAbstract()
          Creates a new instance.
GPManeuverAbstract(String widgetId)
          Creates a new instance.
 
Method Summary
 void attachCopyPasteMenu(String label, fr.cnes.genius.main.GComponent.CopyPasteOperation... operationList)
          
protected  void checkCoherence()
          Checks that the mass provider is not null, and that there is an engine and a fuel tank selected.
abstract  void display()
          
abstract  void generic()
          
 CustomEngine getEngine()
          Getter for the Engine of the widget.
 String getEngineSelectedName()
          Get engine selected name.
protected  int getEngineSelectedValue()
          Get engine selected value.
 CustomFuelTank getFuelTank()
          Getter for the FuelTank of the widget.
 fr.cnes.genius.highLevel.GObjectComboBoxWithLabel<CustomEngine> getGComboBoxEngines()
           
 fr.cnes.genius.highLevel.GObjectComboBoxWithLabel<CustomFuelTank> getGComboBoxTanks()
           
 fr.cnes.genius.highLevel.GEntryString getGEntryStringManName()
           
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabel()
          Getter for the GLabel of the widget.
 String getManName()
          Get maneuver name.
 org.orekit.propagation.MassProvider getMassProvider()
          Getter for the mass provider.
 String getTankSelectedName()
          Get tank selected name.
protected  int getTankSelectedValue()
          Get tank selected value.
static
<T> ArrayList<T>
listFromArray(T[] array)
          Method to convert an array into an ArrayList.
 void setDefaultEngine(CustomEngine engine)
          Set a default engine to the maneuver.
 void setDefaultTank(CustomFuelTank tank)
          Set a default fuel tank to the maneuver.
 void setEngine(CustomEngine engine)
          Set a engine to the maneuver.
 void setEnginesList(ArrayList<CustomEngine> engineList)
          Update contents of comboboxes for engines with a given list of engines.
 void setGLabel(String label)
          Setter for the GLabel of the widget.
 void setManName(String manName)
          Set maneuver name.
 void setMassProvider(org.orekit.propagation.MassProvider massProvider)
          Setter for the mass provider.
 void setTank(CustomFuelTank tank)
          Set a fuel tank to the maneuver.
 void setTanksList(ArrayList<CustomFuelTank> tankList)
          Update contents of comboboxes for tanks with a given list of tanks.
 void setWidgetId(String widgetId)
          
 void updateIsModifiedIndicator()
          
 
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, getSubComponent, getWidgetId, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isEnabled, isModified, launchInvalidPositionException, parseSimpleConstraint, processGEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setEnabled, 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.GReadWrite
read, write
 
Methods inherited from interface fr.cnes.genius.main.GListener
after, before
 
Methods inherited from interface fr.cnes.genius.main.GCondensedStatusInterface
updateCondensedStatus
 
Methods inherited from interface fr.cnes.genius.main.GClear
clear
 

Field Detail

NOT_AVAILABLE_ERROR

protected static final String NOT_AVAILABLE_ERROR

FUEL_TANK_STR

protected static final String FUEL_TANK_STR

ENGINE_STR

protected static final String ENGINE_STR
Constructor Detail

GPManeuverAbstract

public GPManeuverAbstract()
Creates a new instance.


GPManeuverAbstract

public GPManeuverAbstract(String widgetId)
Creates a new instance.

Parameters:
widgetId - widgetId
Method Detail

setWidgetId

public void setWidgetId(String widgetId)

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

getGEntryStringManName

public fr.cnes.genius.highLevel.GEntryString getGEntryStringManName()
Returns:
the m_entryStringManName

getGComboBoxEngines

public fr.cnes.genius.highLevel.GObjectComboBoxWithLabel<CustomEngine> getGComboBoxEngines()
Returns:
the m_comboBoxEngines

getGComboBoxTanks

public fr.cnes.genius.highLevel.GObjectComboBoxWithLabel<CustomFuelTank> getGComboBoxTanks()
Returns:
the m_comboBoxTanks

getEngineSelectedName

public String getEngineSelectedName()
Get engine selected name.

Returns:
the engine selected name

getTankSelectedName

public String getTankSelectedName()
Get tank selected name.

Returns:
the tank selected name

getEngineSelectedValue

protected int getEngineSelectedValue()
Get engine selected value.

Returns:
the engine selected value

getTankSelectedValue

protected int getTankSelectedValue()
Get tank selected value.

Returns:
the tank selected value

getManName

public String getManName()
Get maneuver name.

Returns:
the maneuver name

setManName

public void setManName(String manName)
Set maneuver name.

Parameters:
manName - the maneuver name

display

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

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

generic

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

Specified by:
generic in class fr.cnes.genius.lowLevel.GContainer
Throws:
fr.cnes.genius.exception.GException

getGLabel

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

Returns:
the GLabel of the widget

getEngine

public CustomEngine getEngine()
Getter for the Engine of the widget.

Returns:
the Engine of the widget

getFuelTank

public CustomFuelTank getFuelTank()
Getter for the FuelTank of the widget.

Returns:
the FuelTank of the widget

getMassProvider

public org.orekit.propagation.MassProvider getMassProvider()
Getter for the mass provider.

Returns:
the mass provider.

setMassProvider

public void setMassProvider(org.orekit.propagation.MassProvider massProvider)
Setter for the mass provider.

Parameters:
massProvider - the mass provider.

setGLabel

public void setGLabel(String label)
Setter for the GLabel of the widget.

Parameters:
label - the label

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

setEngine

public void setEngine(CustomEngine engine)
Set a engine to the maneuver. It replaces the list of engines of the combobox to the only one choice of the input engine.

Parameters:
engine - engine to be set.

setDefaultEngine

public void setDefaultEngine(CustomEngine engine)
Set a default engine to the maneuver. It replaces the list of default engines of the combobox to the only one choice of the input engine.

Parameters:
engine - engine to be set by default.

setEnginesList

public void setEnginesList(ArrayList<CustomEngine> engineList)
Update contents of comboboxes for engines with a given list of engines.

Parameters:
engineList - list of engines

setTank

public void setTank(CustomFuelTank tank)
Set a fuel tank to the maneuver. It replaces the list of tanks of the combobox to the only one choice of the input tank.

Parameters:
tank - tank to be set.

setDefaultTank

public void setDefaultTank(CustomFuelTank tank)
Set a default fuel tank to the maneuver. It replaces the list of default tanks of the combobox to the only one choice of the input tank.

Parameters:
tank - tank to be set by default.

setTanksList

public void setTanksList(ArrayList<CustomFuelTank> tankList)
Update contents of comboboxes for tanks with a given list of tanks.

Parameters:
tankList - list of tanks

listFromArray

public static <T> ArrayList<T> listFromArray(T[] array)
Method to convert an array into an ArrayList. It does not add the null elements.

Type Parameters:
T - the elements type.
Parameters:
array - the array
Returns:
the array list

checkCoherence

protected void checkCoherence()
                       throws GPManeuverException
Checks that the mass provider is not null, and that there is an engine and a fuel tank selected.

Throws:
GPManeuverException - if one of the conditions is not fulfilled.


Copyright © 2017. All rights reserved.