fr.cnes.genopus.maneuvers
Class GPFuelTank

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GPanel
          extended by fr.cnes.genopus.maneuvers.GPFuelTank
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<CustomFuelTank>, Cloneable

public class GPFuelTank
extends fr.cnes.genius.lowLevel.GPanel
implements fr.cnes.genius.main.GReadWrite, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GCondensedStatusInterface, fr.cnes.genius.main.GClear, Cloneable, GPPatrius<CustomFuelTank>

Widget for fuel tank definition.

Author:
sumelzi, bacr
Default Constraint(s):
IndexClassItemConstraint
0GLabelWithIndicatorlabel0, 0 => "newline , gapleft 0"
0, 1 => (null)
1GEntryStringentryStringTankName1, 0, 0 => "newline , gapleft 20"
1, 0, 1 => (null)
1, 1 => (null)
2GEntryRealentryRealPropMass2, 0, 0 => "newline , gapleft 20"
2, 0, 1 => (null)
2, 1 => (null)
2, 2 => (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
GPFuelTank()
          Constructor without tank and label (convenient for GComponentList).
GPFuelTank(CustomFuelTank tank)
          Constructor.
GPFuelTank(String tankName)
          Constructor without tank.
GPFuelTank(String label, CustomFuelTank tank)
          Constructor.
GPFuelTank(String widgetId, String tankName)
          Constructor.
GPFuelTank(String widgetId, String label, CustomFuelTank tank)
          Constructor.
 
Method Summary
 void after(fr.cnes.genius.main.GEvent e)
          
 void attachCopyPasteMenu(String label, fr.cnes.genius.main.GComponent.CopyPasteOperation... operationList)
          
 void before(fr.cnes.genius.main.GEvent e)
          
 void clear()
          
 GPFuelTank clone()
          
 void display()
          
 void generic()
          
static int getCount()
          Getter for the tanks counter.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealPropellantMass()
          Getter for the GEntryReal (m_propellantMass) of the widget.
 fr.cnes.genius.highLevel.GEntryString getGEntryStingTankName()
          Getter for the GEntryString (m_tankName) of the widget.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabel()
          Getter for the GLabel of the widget.
 CustomFuelTank getPatriusObject()
          Get tank.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
 String getTankName()
          Get tank name.
 boolean isEnabled()
          
 boolean isModified()
          
 void read()
          
static void setCount(int count)
          Getter for the tanks counter.
 void setDefaultTank(CustomFuelTank defaultTank)
          Setter for the default tank.
 void setEnabled(boolean b)
          
 void setSavedTank(CustomFuelTank savedTank)
          Setter for the reference tank.
 void setTank(CustomFuelTank tank)
          Setter for the tank.
 void setWidgetId(String widgetId)
          
 void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
          
 void updateIsModifiedIndicator()
          
 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, 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, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPFuelTank

public GPFuelTank()
Constructor without tank and label (convenient for GComponentList). The widgetId will be assigned automatically.


GPFuelTank

public GPFuelTank(CustomFuelTank tank)
Constructor. The widgetId and the label will be assigned automatically.

Parameters:
tank - default tank to set in the widget.

GPFuelTank

public GPFuelTank(String tankName)
Constructor without tank. The widgetId will be assigned automatically.

Parameters:
tankName - text to display in the label.

GPFuelTank

public GPFuelTank(String label,
                  CustomFuelTank tank)
Constructor. The widgetId will be assigned automatically.

Parameters:
label - text to display in the label.
tank - default tank to set in the widget.

GPFuelTank

public GPFuelTank(String widgetId,
                  String tankName)
Constructor.

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

GPFuelTank

public GPFuelTank(String widgetId,
                  String label,
                  CustomFuelTank tank)
Constructor.

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

getCount

public static int getCount()
Getter for the tanks counter.

Returns:
the number of already created tanks until now.

setCount

public static void setCount(int count)
Getter for the tanks counter.

Parameters:
count - the number of already created tanks until now.

getGLabel

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

Returns:
the GLabel of the widget

getGEntryStingTankName

public fr.cnes.genius.highLevel.GEntryString getGEntryStingTankName()
Getter for the GEntryString (m_tankName) of the widget.

Returns:
the GEntryString of the widget

getGEntryRealPropellantMass

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealPropellantMass()
Getter for the GEntryReal (m_propellantMass) of the widget.

Returns:
the GEntryReal of the widget

setTank

public void setTank(CustomFuelTank tank)
Setter for the tank.

Parameters:
tank - tank to set.

setDefaultTank

public void setDefaultTank(CustomFuelTank defaultTank)
Setter for the default tank.

Parameters:
defaultTank - default tank to set.

setSavedTank

public void setSavedTank(CustomFuelTank savedTank)
Setter for the reference tank.

Parameters:
savedTank - reference tank to set.

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

getTankName

public String getTankName()
Get tank name.

Returns:
the tank name

getPatriusObject

public CustomFuelTank getPatriusObject()
Get tank.

Specified by:
getPatriusObject in interface GPPatrius<CustomFuelTank>
Returns:
the tank

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

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

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

updateCondensedStatus

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

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

setWidgetId

public void setWidgetId(String widgetId)

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

clone

public GPFuelTank clone()
                 throws CloneNotSupportedException

Overrides:
clone in class Object
Throws:
CloneNotSupportedException


Copyright © 2017. All rights reserved.