fr.cnes.genopus.attitudes
Class GPAttitudeLawAbstract

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genopus.attitudes.GPAttitudeLawAbstract
All Implemented Interfaces:
fr.cnes.genius.main.GClear, fr.cnes.genius.main.GCondensedStatusInterface, fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GReadWrite, GPPatrius<CustomAttitudeLaw>
Direct Known Subclasses:
GPAeroAttitudeLaw, GPSpinStabilizedAbstract, GPYawSteeringAttitudeLaw

public abstract class GPAttitudeLawAbstract
extends fr.cnes.genius.lowLevel.GContainer
implements fr.cnes.genius.main.GReadWrite, fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GClear, GPPatrius<CustomAttitudeLaw>, fr.cnes.genius.main.GCondensedStatusInterface

Abstract class defining the default methods to be implemented by any attitude law class.

Author:
ffsm

Nested Class Summary
static interface GPAttitudeLawAbstract.GPAttitudeLawWithEarthShape
          Interface to be implemented by all the types of attitude law requiering the Earth Shape.
 
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 fr.cnes.genius.unit.GUnit[] ANGLE_UNITS
          Angular units.
protected static fr.cnes.genius.unit.GUnit[] ANGULAR_SPEED_UNITS
          Angular speed units.
protected static int SUB_GAP
          Subsequent left gap for subwidgets.
 
Fields inherited from class fr.cnes.genius.main.GComponent
NAME_ATTRIBUTE
 
Constructor Summary
GPAttitudeLawAbstract(String widgetId, String label)
          Constructor.
 
Method Summary
 void display()
          
 void generic()
          
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelLawName()
          Getter for the label name subwidget.
 fr.cnes.genius.lowLevel.GSeparator getGSeparator1()
          Getter for the separator subwidget after the law name label.
abstract  CustomAttitudeLaw getPatriusObject()
          Returns the PATRIUS object associated to a GENOPUS widget.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
 boolean isEnabled()
          
abstract  boolean isNativeAttitudeLaw(CustomAttitudeLaw attLaw)
          Method to check if an attitude law is an instance of this type.
 void read()
          
abstract  void setAttitudeLaw(CustomAttitudeLaw attitudeLaw)
          Setter from a PATRIUS attitude law.
protected  void setConstraint(int widgetGap)
          Setter for the constraints of the widget.
abstract  void setDefaultAttitudeLaw(CustomAttitudeLaw defaultAttitudeLaw)
          Setter of the default value from a PATRIUS attitude law.
protected  void setDefaultConstraints()
          Setter for the default constraint of the widget.
abstract  void setDisplayIsModifiedIndicatorAll(fr.cnes.genius.main.GComponent.DisplayIndicatorStatus displayIndicatorStatus)
          Controls the display of the isModified indicator of all sub-widgets.
 void setEnabled(boolean flag)
          
abstract  void setSavedAttitudeLaw(CustomAttitudeLaw savedAttitudeLaw)
          Setter of the saved value from a PATRIUS attitude law.
 void setWidgetId(String widgetId)
          
protected  void updateIsModifiedIndicator()
          
protected  void updateStatus()
          Update the global status of the widget following the status of its components.
 void write()
          
 
Methods inherited from class fr.cnes.genius.lowLevel.GContainer
put
 
Methods inherited from class fr.cnes.genius.main.GComponent
activateConstraintsByType, attachCopyPasteMenu, 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, isModified, 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
 
Methods inherited from interface fr.cnes.genius.main.GClear
clear
 
Methods inherited from interface fr.cnes.genius.main.GCondensedStatusInterface
updateCondensedStatus
 

Field Detail

SUB_GAP

protected static final int SUB_GAP
Subsequent left gap for subwidgets.

See Also:
Constant Field Values

ANGLE_UNITS

protected static final fr.cnes.genius.unit.GUnit[] ANGLE_UNITS
Angular units.


ANGULAR_SPEED_UNITS

protected static final fr.cnes.genius.unit.GUnit[] ANGULAR_SPEED_UNITS
Angular speed units.

Constructor Detail

GPAttitudeLawAbstract

public GPAttitudeLawAbstract(String widgetId,
                             String label)
Constructor.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created
label - label for the attitude law contents section.
Method Detail

setWidgetId

public void setWidgetId(String widgetId)

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

getGSeparator1

public fr.cnes.genius.lowLevel.GSeparator getGSeparator1()
Getter for the separator subwidget after the law name label.

Returns:
the separator subwidget after the law name label

getGLabelLawName

public fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelLawName()
Getter for the label name subwidget.

Returns:
the label name subwidget

setDefaultConstraints

protected void setDefaultConstraints()
Setter for the default constraint of the widget.


setConstraint

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

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

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

isNativeAttitudeLaw

public abstract boolean isNativeAttitudeLaw(CustomAttitudeLaw attLaw)
Method to check if an attitude law is an instance of this type.

Parameters:
attLaw - input attitude law.
Returns:
true if it is an instance of this.

setAttitudeLaw

public abstract void setAttitudeLaw(CustomAttitudeLaw attitudeLaw)
                             throws GPAttitudeException
Setter from a PATRIUS attitude law.

Parameters:
attitudeLaw - to be set in the widget
Throws:
GPAttitudeException - if the given attitude law is not compatible with the widget.

setDefaultAttitudeLaw

public abstract void setDefaultAttitudeLaw(CustomAttitudeLaw defaultAttitudeLaw)
                                    throws GPAttitudeException
Setter of the default value from a PATRIUS attitude law.

Parameters:
defaultAttitudeLaw - to be set as default in the widget
Throws:
GPAttitudeException - if the given attitude law is not compatible with the widget.

setSavedAttitudeLaw

public abstract void setSavedAttitudeLaw(CustomAttitudeLaw savedAttitudeLaw)
                                  throws GPAttitudeException
Setter of the saved value from a PATRIUS attitude law.

Parameters:
savedAttitudeLaw - to be set as saved in the widget
Throws:
GPAttitudeException - if the given attitude law is not compatible with the widget.

setDisplayIsModifiedIndicatorAll

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

getPatriusObject

public abstract CustomAttitudeLaw getPatriusObject()
                                            throws GPAttitudeException
Returns the PATRIUS object associated to a GENOPUS widget.

Specified by:
getPatriusObject in interface GPPatrius<CustomAttitudeLaw>
Returns:
the PATRIUS object associated to the widget.
Throws:
GPAttitudeException

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

setEnabled

public void setEnabled(boolean flag)

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

isEnabled

public boolean isEnabled()

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

updateIsModifiedIndicator

protected void updateIsModifiedIndicator()

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

updateStatus

protected void updateStatus()
Update the global status of the widget following the status of its components.



Copyright © 2017. All rights reserved.