fr.cnes.genopus.vehicle
Class GPVehiclePropulsiveProps

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GPanel
          extended by fr.cnes.genopus.vehicle.GPVehiclePropulsiveProps
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

public class GPVehiclePropulsiveProps
extends fr.cnes.genius.lowLevel.GPanel
implements fr.cnes.genius.main.GReadWrite, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GClear, fr.cnes.genius.main.GCondensedStatusInterface

Widget representing a vehicle propulsive properties (list of tanks and engines).

Author:
ffsm
Default Constraint(s):
IndexClassItemConstraint
0GEntryRealergMassEntryReal0, 0, 0 => "newline , gapleft 20 , split 2"
0, 0, 1 => (null)
0, 1 => (null)
0, 2 => (null)
1GSeparatorenginesSeparator"newline , gapleft 20 , spanx 4 , growx"
2GOpenCloseButtonenginesOpenCloseButton"newline , gapleft 0 , split 2"
3GLabelWithIndicatorenginesLabel3, 0 => (null)
3, 1 => (null)
4GComponentListenginesList"newline , gapleft 20 , spanx 4 , growx"
(see table below)
5GSeparatortanksSeparator"newline , gapleft 20 , spanx 4 , growx"
6GOpenCloseButtontanksOpenCloseButton"newline , gapleft 0 , split 2"
7GLabelWithIndicatortanksLabel7, 0 => (null)
7, 1 => (null)
8GComponentListtanksList"newline , gapleft 20 , spanx 4 , growx"
(see table below)

Default Constraint(s) for enginesList:
IndexClassItemConstraint
4, 0GHeaderPanelheader"hmin 40"
(see table below)
4, 1GLabelspaceLabel"newline , height 0"

Default Constraint(s) for header:
IndexClassItemConstraint
4, 0, 0GEntryInttotalNumberItemsEntry4, 0, 0, 0, 0 => "newline , split 2"
4, 0, 0, 0, 1 => (null)
4, 0, 0, 1 => "skip 2 , width 50"
4, 0, 1GEntryIntcurrentItemRankEntry4, 0, 1, 0, 0 => "split 2"
4, 0, 1, 0, 1 => (null)
4, 0, 1, 1 => "width 50"
4, 0, 2GButtondecrButton"alignx Right , height 20"
4, 0, 3GButtonincrButton"height 20"
4, 0, 4GPopupListmenu(null)

Default Constraint(s) for tanksList:
IndexClassItemConstraint
8, 0GHeaderPanelheader"hmin 40"
(see table below)
8, 1GLabelspaceLabel"newline , height 0"

Default Constraint(s) for header:
IndexClassItemConstraint
8, 0, 0GEntryInttotalNumberItemsEntry8, 0, 0, 0, 0 => "newline , split 2"
8, 0, 0, 0, 1 => (null)
8, 0, 0, 1 => "skip 2 , width 50"
8, 0, 1GEntryIntcurrentItemRankEntry8, 0, 1, 0, 0 => "split 2"
8, 0, 1, 0, 1 => (null)
8, 0, 1, 1 => "width 50"
8, 0, 2GButtondecrButton"alignx Right , height 20"
8, 0, 3GButtonincrButton"height 20"
8, 0, 4GPopupListmenu(null)


Nested Class Summary
 
Nested classes/interfaces inherited from class fr.cnes.genius.lowLevel.GPanel
fr.cnes.genius.lowLevel.GPanel.Panel, fr.cnes.genius.lowLevel.GPanel.ScrollBarVisibility
 
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
GPVehiclePropulsiveProps(String widgetId, String name)
          Creates a new instance.
 
Method Summary
 void after(fr.cnes.genius.main.GEvent e)
           
 void before(fr.cnes.genius.main.GEvent e)
          
 void clear()
           
 void display()
          
 void generic()
          
 String[] getEngineNames()
          Method to get the list of engine names.
 ArrayList<CustomEngine> getEnginesList()
          Get list of engines.
 double getErgMass()
          Get ergol mass.
 fr.cnes.genius.highLevel.GComponentList getGComponentListEngines()
          Getter for the list of engines.
 fr.cnes.genius.highLevel.GComponentList getGComponentListTanks()
          Getter for the list of tanks.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealErgMass()
          Getter for the entry real with the mass of ergols.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelEngines()
          Getter for the label for the engines.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelTanks()
          Getter for the label for the tanks.
 fr.cnes.genius.highLevel.GOpenCloseButton getGOpenCloseButtonEngines()
          Getter for the open close button for the engines.
 fr.cnes.genius.highLevel.GOpenCloseButton getGOpenCloseButtonTanks()
          Getter for the open close button for the tanks.
 fr.cnes.genius.lowLevel.GSeparator getGSeparatorEngines()
          Getter for the separator for the engines.
 fr.cnes.genius.lowLevel.GSeparator getGSeparatorTanks()
          Getter for the separator for the tanks.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
 String[] getTankNames()
          Method to get the list of tank names.
 ArrayList<CustomFuelTank> getTanksList()
          Get list of tanks.
 boolean isEnabled()
          
 boolean isModified()
          
 void read()
          
 void setConstraint(int widgetGap)
          Setter for the constraints of the widget.
 void setDefaultEnginesList(ArrayList<CustomEngine> enginesList)
          Setter for the default list of engines.
 void setDefaultTanksList(ArrayList<CustomFuelTank> tanksList)
          Setter for the default list of fuel tanks.
 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 setEnginesList(ArrayList<CustomEngine> enginesList)
          Setter for the list of engines.
 void setSavedEnginesList(ArrayList<CustomEngine> enginesList)
          Setter for the saved list of engines.
 void setSavedTanksList(ArrayList<CustomFuelTank> tanksList)
          Setter for the saved list of tanks.
 void setTanksList(ArrayList<CustomFuelTank> tanksList)
          Setter for the list of fuel tanks.
 void setWidgetId(String widgetId)
          
 void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
          
protected  void updateEnginesIsModifiedIndicator()
          Update the engines label modified indicator depending on the engines list modified status.
protected  void updateTanksIsModifiedIndicator()
          Update the tanks label modified indicator depending on the tanks list modified status.
 void write()
           
 
Methods inherited from class fr.cnes.genius.lowLevel.GPanel
getClassConstraint, getComponent, getHorizontalScroll, getInnerDescendantClassConstraint, getJPanel, getJScrollPane, getStringClassConstraint, getVerticalScroll, mainClear, mainDisplay, put, setClassConstraint, setColumnConstraints, setHorizontalScroll, setInnerDescendantClassConstraint, setLayoutConstraints, setPreferredSize, setRowConstraints, setVerticalScroll
 
Methods inherited from class fr.cnes.genius.main.GComponent
activateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, 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, updateIsModifiedIndicator, 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

GPVehiclePropulsiveProps

public GPVehiclePropulsiveProps(String widgetId,
                                String name)
Creates a new instance.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created
name - name in configuration file
Method Detail

setWidgetId

public void setWidgetId(String widgetId)

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

setConstraint

public void setConstraint(int widgetGap)
Setter for the constraints of the widget.

Parameters:
widgetGap - left gap from panel border to display the label of the widget.

getGEntryRealErgMass

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealErgMass()
Getter for the entry real with the mass of ergols.

Returns:
the entry real with the mass of ergols.

getGSeparatorEngines

public fr.cnes.genius.lowLevel.GSeparator getGSeparatorEngines()
Getter for the separator for the engines.

Returns:
the separator for the engines.

getGLabelEngines

public fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelEngines()
Getter for the label for the engines.

Returns:
the label for the engines.

getGOpenCloseButtonEngines

public fr.cnes.genius.highLevel.GOpenCloseButton getGOpenCloseButtonEngines()
Getter for the open close button for the engines.

Returns:
the open close button for the engines.

getGComponentListEngines

public fr.cnes.genius.highLevel.GComponentList getGComponentListEngines()
Getter for the list of engines.

Returns:
the list of engines.

getGSeparatorTanks

public fr.cnes.genius.lowLevel.GSeparator getGSeparatorTanks()
Getter for the separator for the tanks.

Returns:
the separator for the tanks.

getGLabelTanks

public fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelTanks()
Getter for the label for the tanks.

Returns:
the label for the tanks.

getGOpenCloseButtonTanks

public fr.cnes.genius.highLevel.GOpenCloseButton getGOpenCloseButtonTanks()
Getter for the open close button for the tanks.

Returns:
the open close button for the tanks.

getGComponentListTanks

public fr.cnes.genius.highLevel.GComponentList getGComponentListTanks()
Getter for the list of tanks.

Returns:
the list of tanks.

generic

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

Specified by:
generic in class fr.cnes.genius.lowLevel.GPanel
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

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

after

public void after(fr.cnes.genius.main.GEvent e)
           throws fr.cnes.genius.exception.GException
Specified by:
after in interface fr.cnes.genius.main.GListener
Throws:
fr.cnes.genius.exception.GException

before

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

Specified by:
before in interface fr.cnes.genius.main.GListener
Throws:
fr.cnes.genius.exception.GException

getEngineNames

public String[] getEngineNames()
Method to get the list of engine names.

Returns:
list of engine names

getTankNames

public String[] getTankNames()
Method to get the list of tank names.

Returns:
list of tank names

getTanksList

public ArrayList<CustomFuelTank> getTanksList()
Get list of tanks.

Returns:
list of tanks.

getEnginesList

public ArrayList<CustomEngine> getEnginesList()
Get list of engines.

Returns:
list of engines.

getErgMass

public double getErgMass()
Get ergol mass.

Returns:
the ergMass

updateCondensedStatus

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

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

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

updateTanksIsModifiedIndicator

protected void updateTanksIsModifiedIndicator()
Update the tanks label modified indicator depending on the tanks list modified status.


updateEnginesIsModifiedIndicator

protected void updateEnginesIsModifiedIndicator()
Update the engines label modified indicator depending on the engines list modified status.


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 never shown, if Automatic the modifiedStatusIndicator is shown as needed.

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

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

setEnginesList

public void setEnginesList(ArrayList<CustomEngine> enginesList)
                    throws GPVehicleException
Setter for the list of engines.

Parameters:
enginesList - the list of engines
Throws:
GPVehicleException - if the list of tanks is not coherent with the max and min of the list of engines.

setTanksList

public void setTanksList(ArrayList<CustomFuelTank> tanksList)
                  throws GPVehicleException
Setter for the list of fuel tanks.

Parameters:
tanksList - the list of fuel tanks
Throws:
GPVehicleException - if the list of tanks is not coherent with the max and min of the list of tanks.

setDefaultEnginesList

public void setDefaultEnginesList(ArrayList<CustomEngine> enginesList)
Setter for the default list of engines.

Parameters:
enginesList - the default list of engines

setDefaultTanksList

public void setDefaultTanksList(ArrayList<CustomFuelTank> tanksList)
Setter for the default list of fuel tanks.

Parameters:
tanksList - the default list of fuel tanks

setSavedEnginesList

public void setSavedEnginesList(ArrayList<CustomEngine> enginesList)
Setter for the saved list of engines.

Parameters:
enginesList - the saved list of engines

setSavedTanksList

public void setSavedTanksList(ArrayList<CustomFuelTank> tanksList)
Setter for the saved list of tanks.

Parameters:
tanksList - the saved list of tanks


Copyright © 2017. All rights reserved.