fr.cnes.genopus.attitudes
Class GPRotation

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genopus.attitudes.GPRotation
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<CustomRotation>

public class GPRotation
extends fr.cnes.genius.lowLevel.GContainer
implements fr.cnes.genius.main.GListener, fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GReadWrite, fr.cnes.genius.main.GClear, GPPatrius<CustomRotation>, fr.cnes.genius.main.GCondensedStatusInterface

Widget for a rotation definition.

Author:
ffsm
Default Constraint(s):
IndexClassItemConstraint
0GLabelWithIndicatorlabel0, 0 => "newline , gapleft 0 , split 2"
0, 1 => (null)
1GButtonforcePivotButton(null)
2GCheckBoxdeactivateConversionsCheckbox"newline , gapleft 20 , spanx 4"
3GComboBoxWithLabelcomboBoxRotationOrder3, 0, 0 => "newline , gapleft 20 , split 2"
3, 0, 1 => (null)
3, 1 => (null)
4GEntryRealentryRealPsi4, 0, 0 => "newline , gapleft 20 , split 2"
4, 0, 1 => (null)
4, 1 => "split 2"
4, 2 => (null)
5GEntryRealentryRealTheta5, 0, 0 => "newline , gapleft 20 , split 2"
5, 0, 1 => (null)
5, 1 => "split 2"
5, 2 => (null)
6GEntryRealentryRealPhi6, 0, 0 => "newline , gapleft 20 , split 2"
6, 0, 1 => (null)
6, 1 => "split 2"
6, 2 => (null)


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
 
Fields inherited from class fr.cnes.genius.main.GComponent
NAME_ATTRIBUTE
 
Constructor Summary
GPRotation(String label)
          Constructor.
GPRotation(String label, CustomRotation rotation)
          Constructor with an initial rotation.
GPRotation(String widgetId, String label)
          Constructor.
GPRotation(String widgetId, String label, CustomRotation rotation)
          Constructor with an initial rotation.
 
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.lowLevel.GButton getGButtonForcePivot()
          Getter for the GButton used to force the pivot.
 fr.cnes.genius.lowLevel.GCheckBox getGCheckBoxBlockConversions()
          Getter for the GCheckBox used to block conversions.
 fr.cnes.genius.highLevel.GComboBoxWithLabel getGComboBoxRotationOrder()
          Getter for the GComboBoxWithLabel used to select rotation order.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealPhi()
          Getter for the GEntryReal corresponding to Phi angle.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealPsi()
          Getter for the GEntryReal corresponding to Psi angle.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealTheta()
          Getter for the GEntryReal corresponding to Theta angle.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabel()
          Getter for the label of the widget.
 CustomRotation getPatriusObject()
          Returns the PATRIUS object associated to a GENOPUS widget.
 double getPhi()
          Get phi (third elementary rotation).
 double getPsi()
          Get psi (first elementary rotation).
 org.apache.commons.math3.geometry.euclidean.threed.RotationOrder getRotationOrder()
          Get rotation order.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
 double getTeta()
          Get theta (second elementary rotation).
 boolean isEnabled()
          
 boolean isModified()
          
 void read()
          
 void setConstraint(int widgetGap)
          Setter for the constraints of the widget.
 void setDefaultRotation(CustomRotation rotation)
          Setter for a default rotation.
 void setDefaultRotation(CustomRotation rotation, org.apache.commons.math3.geometry.euclidean.threed.RotationOrder rotationOrder)
          Setter for a default rotation.
 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 setRotation(CustomRotation rotation)
          Setter for a rotation.
 void setRotation(CustomRotation rotation, org.apache.commons.math3.geometry.euclidean.threed.RotationOrder rotationOrder)
          Setter for a rotation.
 void setSavedRotation(CustomRotation rotation)
          Setter for a saved rotation.
 void setSavedRotation(CustomRotation rotation, org.apache.commons.math3.geometry.euclidean.threed.RotationOrder rotationOrder)
          Setter for a saved rotation.
 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

GPRotation

public GPRotation(String label)
Constructor. The widgetId will be assigned automatically.

Parameters:
label - text to display in the label.

GPRotation

public GPRotation(String label,
                  CustomRotation rotation)
Constructor with an initial rotation. The widgetId will be assigned automatically.

Parameters:
label - text to display in the label.
rotation - to show in the widget.

GPRotation

public GPRotation(String widgetId,
                  String label)
Constructor.

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

GPRotation

public GPRotation(String widgetId,
                  String label,
                  CustomRotation rotation)
Constructor with an initial rotation.

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

setWidgetId

public void setWidgetId(String widgetId)

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

getGButtonForcePivot

public fr.cnes.genius.lowLevel.GButton getGButtonForcePivot()
Getter for the GButton used to force the pivot.

Returns:
the GButton used to force the pivot.

getGCheckBoxBlockConversions

public fr.cnes.genius.lowLevel.GCheckBox getGCheckBoxBlockConversions()
Getter for the GCheckBox used to block conversions.

Returns:
the GCheckBox used to block conversions.

getGComboBoxRotationOrder

public fr.cnes.genius.highLevel.GComboBoxWithLabel getGComboBoxRotationOrder()
Getter for the GComboBoxWithLabel used to select rotation order.

Returns:
the GComboBoxWithLabel used to select rotation order.

getGEntryRealPsi

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealPsi()
Getter for the GEntryReal corresponding to Psi angle.

Returns:
the GEntryReal corresponding to Psi angle.

getGEntryRealTheta

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealTheta()
Getter for the GEntryReal corresponding to Theta angle.

Returns:
the GEntryReal corresponding to Theta angle.

getGEntryRealPhi

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealPhi()
Getter for the GEntryReal corresponding to Phi angle.

Returns:
the GEntryReal corresponding to Phi angle.

isModified

public boolean isModified()

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

isEnabled

public boolean isEnabled()

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

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

setEnabled

public void setEnabled(boolean b)

Overrides:
setEnabled 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

updateIsModifiedIndicator

protected void updateIsModifiedIndicator()

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

getRotationOrder

public org.apache.commons.math3.geometry.euclidean.threed.RotationOrder getRotationOrder()
Get rotation order.

Returns:
the rotation order

getPsi

public double getPsi()
Get psi (first elementary rotation).

Returns:
psi

getTeta

public double getTeta()
Get theta (second elementary rotation).

Returns:
theta

getPhi

public double getPhi()
Get phi (third elementary rotation).

Returns:
phi

getPatriusObject

public CustomRotation getPatriusObject()
Returns the PATRIUS object associated to a GENOPUS widget.

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

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

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

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

setRotation

public void setRotation(CustomRotation rotation)
Setter for a rotation.

Parameters:
rotation - the rotation to be set.

setRotation

public void setRotation(CustomRotation rotation,
                        org.apache.commons.math3.geometry.euclidean.threed.RotationOrder rotationOrder)
Setter for a rotation.

Parameters:
rotation - the rotation to be set.
rotationOrder - the rotation order to be set.

setDefaultRotation

public void setDefaultRotation(CustomRotation rotation)
Setter for a default rotation.

Parameters:
rotation - the rotation to be set as default

setDefaultRotation

public void setDefaultRotation(CustomRotation rotation,
                               org.apache.commons.math3.geometry.euclidean.threed.RotationOrder rotationOrder)
Setter for a default rotation.

Parameters:
rotation - the rotation to be set as default
rotationOrder - the rotation order to be set as default

setSavedRotation

public void setSavedRotation(CustomRotation rotation)
Setter for a saved rotation.

Parameters:
rotation - the rotation to be set as saved.

setSavedRotation

public void setSavedRotation(CustomRotation rotation,
                             org.apache.commons.math3.geometry.euclidean.threed.RotationOrder rotationOrder)
Setter for a saved rotation.

Parameters:
rotation - the rotation to be set as saved
rotationOrder - the rotation order to be set as saved

updateCondensedStatus

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

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

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.


Copyright © 2017. All rights reserved.