fr.cnes.genopus.vehicle
Class GPVehicleShape

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

public class GPVehicleShape
extends fr.cnes.genius.lowLevel.GContainer
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, GPPatrius<CustomVehicleSurfaceModel>

Widget representing a vehicle surface model.

Author:
ffsm
Default Constraint(s):
IndexClassItemConstraint
0GLabelWithIndicatorlabel0, 0 => "newline , gapleft 0 , split 2"
0, 1 => (null)
1GChoiceshapeChoice1, 0, 0 => "newline , gapleft 20 , split 2"
1, 0, 1 => (null)
1, 1 => "split"
2GChoiceshapeDefChoice2, 0, 0 => "newline , gapleft 20 , split 2"
2, 0, 1 => (null)
2, 1 => "split"
3GEntryRealsphRadEntryReal3, 0, 0 => "newline , gapleft 40 , split 2"
3, 0, 1 => (null)
3, 1 => "split 2"
3, 2 => (null)
4GEntryRealsphSurfEntryReal4, 0, 0 => "newline , gapleft 40 , split 2"
4, 0, 1 => (null)
4, 1 => "split 2"
4, 2 => (null)
5GEntryRealparallLengthEntryReal5, 0, 0 => "newline , gapleft 40 , split 2"
5, 0, 1 => (null)
5, 1 => "split 2"
5, 2 => (null)
6GEntryRealparallWidthEntryReal6, 0, 0 => "newline , gapleft 40 , split 2"
6, 0, 1 => (null)
6, 1 => "split 2"
6, 2 => (null)
7GEntryRealparallHeightEntryReal7, 0, 0 => "newline , gapleft 40 , split 2"
7, 0, 1 => (null)
7, 1 => "split 2"
7, 2 => (null)
8GEntryRealparallXSurfEntryReal8, 0, 0 => "newline , gapleft 40 , split 2"
8, 0, 1 => (null)
8, 1 => "split 2"
8, 2 => (null)
9GEntryRealparallYSurfEntryReal9, 0, 0 => "newline , gapleft 40 , split 2"
9, 0, 1 => (null)
9, 1 => "split 2"
9, 2 => (null)
10GEntryRealparallZSurfEntryReal10, 0, 0 => "newline , gapleft 40 , split 2"
10, 0, 1 => (null)
10, 1 => "split 2"
10, 2 => (null)
11GEntryRealcylRadEntryReal11, 0, 0 => "newline , gapleft 40 , split 2"
11, 0, 1 => (null)
11, 1 => "split 2"
11, 2 => (null)
12GEntryRealcylLengthEntryReal12, 0, 0 => "newline , gapleft 40 , split 2"
12, 0, 1 => (null)
12, 1 => "split 2"
12, 2 => (null)
13GEntryRealcylXSurfEntryReal13, 0, 0 => "newline , gapleft 40 , split 2"
13, 0, 1 => (null)
13, 1 => "split 2"
13, 2 => (null)
14GEntryRealcylTSurfEntryReal14, 0, 0 => "newline , gapleft 40 , split 2"
14, 0, 1 => (null)
14, 1 => "split 2"
14, 2 => (null)
15GCheckBoxWithIndicatorsolarPanelsChoice15, 0, 0 => "newline , gapleft 20 , split 2"
15, 0, 1 => (null)
15, 1 => (null)
16GEntryRealpanelXSurfEntryReal16, 0, 0 => "newline , gapleft 40 , split 2"
16, 0, 1 => (null)
16, 1 => "split 2"
16, 2 => (null)
17GEntryRealpanelYSurfEntryReal17, 0, 0 => "newline , gapleft 40 , split 2"
17, 0, 1 => (null)
17, 1 => "split 2"
17, 2 => (null)
18GEntryRealpanelZSurfEntryReal18, 0, 0 => "newline , gapleft 40 , split 2"
18, 0, 1 => (null)
18, 1 => "split 2"
18, 2 => (null)


Nested Class Summary
static class GPVehicleShape.ShapeTypes
          Enum of available shapes: sphere, parallelepiped, cylinder.
 
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
GPVehicleShape(String label)
          Creates a new instance.
GPVehicleShape(String label, CustomVehicleSurfaceModel vehicleShape)
          Creates a new instance.
GPVehicleShape(String widgetId, String label)
          Creates a new instance.
GPVehicleShape(String widgetId, String label, CustomVehicleSurfaceModel vehicleShape)
          Creates a new instance.
 
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()
          
 void display()
          
 void generic()
          
 fr.cnes.genius.highLevel.GCheckBoxWithIndicator getGCheckBoxSolarPanels()
          Getter for the checkbox to define solar panels.
 fr.cnes.genius.highLevel.GChoice getGChoiceShapeDef()
          Getter for the choice with the shape definition.
 fr.cnes.genius.highLevel.GChoice getGChoiceType()
          Getter for the choice with the type of shape.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealCylLength()
          Getter for the entry real to set the cylinder length.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealCylRad()
          Getter for the entry real to set the cylinder radius.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealCylTSurf()
          Getter for the entry real to set the cylinder transversal surface.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealCylXSurf()
          Getter for the entry real to set the cylinder X surface.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealPanelXSurf()
          Getter for the entry real to set the solar panel X surface.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealPanelYSurf()
          Getter for the entry real to set the solar panel Y surface.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealPanelZSurf()
          Getter for the entry real to set the solar panel Z surface.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallHeight()
          Getter for the entry real to set the parallelepiped height.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallLength()
          Getter for the entry real to set the parallelepiped length.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallWidth()
          Getter for the entry real to set the parallelepiped width.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallXSurf()
          Getter for the entry real to set the parallelepiped X surface.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallYSurf()
          Getter for the entry real to set the parallelepiped Y surface.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallZSurf()
          Getter for the entry real to set the parallelepiped Z surface.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealSphRad()
          Getter for the entry real to set the sphere radius.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealSphSurf()
          Getter for the entry real to set the sphere surface.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabel()
          Getter for the label of the widget.
 CustomVehicleSurfaceModel getPatriusObject()
          Getter for the vehicle shape.
 GPVehicleShape.ShapeTypes getSelectedShape()
          Get selected shape as a GPVehicleShape.ShapeTypes enum value.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
 boolean hasSolarPanels()
          Method to check if the vehicle has solar panels defined.
 boolean isEnabled()
          
 boolean isModified()
          
 void read()
          
 void setConstraint(int widgetGap)
          Setter for the constraints of the widget.
 void setDefaultVehicleShape(CustomVehicleSurfaceModel vehicleShape)
          Setter for the default CustomVehicleSurfaceModel instance.
 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 setSavedVehicleShape(CustomVehicleSurfaceModel vehicleShape)
          Setter for the saved CustomVehicleSurfaceModel instance.
 void setVehicleShape(CustomVehicleSurfaceModel vehicleShape)
          Setter for a CustomVehicleSurfaceModel instance.
 void setWidgetId(String widgetId)
          
 void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
          
protected  void updateIsModifiedIndicator()
          
 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
 

Constructor Detail

GPVehicleShape

public GPVehicleShape(String label)
Creates a new instance. The widgetId will be assigned automatically.

Parameters:
label - label for the widget.

GPVehicleShape

public GPVehicleShape(String label,
                      CustomVehicleSurfaceModel vehicleShape)
Creates a new instance. The widgetId will be assigned automatically.

Parameters:
label - label for the widget.
vehicleShape - initial vehicle shape

GPVehicleShape

public GPVehicleShape(String widgetId,
                      String label)
Creates a new instance.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created
label - label for the widget.

GPVehicleShape

public GPVehicleShape(String widgetId,
                      String label,
                      CustomVehicleSurfaceModel vehicleShape)
Creates a new instance.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created
label - label for the widget.
vehicleShape - initial vehicle shape
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.

attachCopyPasteMenu

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

Overrides:
attachCopyPasteMenu 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.

getGChoiceType

public fr.cnes.genius.highLevel.GChoice getGChoiceType()
Getter for the choice with the type of shape.

Returns:
the choice with the type of shape.

getGChoiceShapeDef

public fr.cnes.genius.highLevel.GChoice getGChoiceShapeDef()
Getter for the choice with the shape definition.

Returns:
the choice with the shape definition.

getGEntryRealSphRad

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealSphRad()
Getter for the entry real to set the sphere radius.

Returns:
the entry real to set the sphere radius.

getGEntryRealSphSurf

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealSphSurf()
Getter for the entry real to set the sphere surface.

Returns:
the entry real to set the sphere surface.

getGEntryRealParallLength

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallLength()
Getter for the entry real to set the parallelepiped length.

Returns:
the entry real to set the parallelepiped length.

getGEntryRealParallWidth

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallWidth()
Getter for the entry real to set the parallelepiped width.

Returns:
the entry real to set the parallelepiped width.

getGEntryRealParallHeight

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallHeight()
Getter for the entry real to set the parallelepiped height.

Returns:
the entry real to set the parallelepiped height.

getGEntryRealParallXSurf

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallXSurf()
Getter for the entry real to set the parallelepiped X surface.

Returns:
the entry real to set the parallelepiped X surface.

getGEntryRealParallYSurf

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallYSurf()
Getter for the entry real to set the parallelepiped Y surface.

Returns:
the entry real to set the parallelepiped Y surface.

getGEntryRealParallZSurf

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealParallZSurf()
Getter for the entry real to set the parallelepiped Z surface.

Returns:
the entry real to set the parallelepiped Z surface.

getGEntryRealCylRad

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealCylRad()
Getter for the entry real to set the cylinder radius.

Returns:
the entry real to set the cylinder radius.

getGEntryRealCylLength

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealCylLength()
Getter for the entry real to set the cylinder length.

Returns:
the entry real to set the cylinder length.

getGEntryRealCylXSurf

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealCylXSurf()
Getter for the entry real to set the cylinder X surface.

Returns:
the entry real to set the cylinder X surface.

getGEntryRealCylTSurf

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealCylTSurf()
Getter for the entry real to set the cylinder transversal surface.

Returns:
the entry real to set the cylinder transversal surface.

getGCheckBoxSolarPanels

public fr.cnes.genius.highLevel.GCheckBoxWithIndicator getGCheckBoxSolarPanels()
Getter for the checkbox to define solar panels.

Returns:
the checkbox to define solar panels.

getGEntryRealPanelXSurf

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealPanelXSurf()
Getter for the entry real to set the solar panel X surface.

Returns:
the entry real to set the solar panel X surface.

getGEntryRealPanelYSurf

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealPanelYSurf()
Getter for the entry real to set the solar panel Y surface.

Returns:
the entry real to set the solar panel Y surface.

getGEntryRealPanelZSurf

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealPanelZSurf()
Getter for the entry real to set the solar panel Z surface.

Returns:
the entry real to set the solar panel Z surface.

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

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

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

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

getSelectedShape

public GPVehicleShape.ShapeTypes getSelectedShape()
Get selected shape as a GPVehicleShape.ShapeTypes enum value.

Returns:
the selected shape

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

getPatriusObject

public CustomVehicleSurfaceModel getPatriusObject()
Getter for the vehicle shape.

Specified by:
getPatriusObject in interface GPPatrius<CustomVehicleSurfaceModel>
Returns:
the vehicle shape.

setVehicleShape

public void setVehicleShape(CustomVehicleSurfaceModel vehicleShape)
                     throws GPVehicleException
Setter for a CustomVehicleSurfaceModel instance.

Parameters:
vehicleShape - the vehicle shape
Throws:
GPVehicleException - if the main body shape is not supported

setDefaultVehicleShape

public void setDefaultVehicleShape(CustomVehicleSurfaceModel vehicleShape)
                            throws GPVehicleException
Setter for the default CustomVehicleSurfaceModel instance.

Parameters:
vehicleShape - the vehicle shape
Throws:
GPVehicleException - if the main body shape is not supported

setSavedVehicleShape

public void setSavedVehicleShape(CustomVehicleSurfaceModel vehicleShape)
                          throws GPVehicleException
Setter for the saved CustomVehicleSurfaceModel instance.

Parameters:
vehicleShape - the vehicle shape
Throws:
GPVehicleException - if the main body shape is not supported

hasSolarPanels

public boolean hasSolarPanels()
Method to check if the vehicle has solar panels defined.

Returns:
true if the vehicle has solar panels

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

updateIsModifiedIndicator

protected void updateIsModifiedIndicator()

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

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


Copyright © 2017. All rights reserved.