fr.cnes.genopus.attitudes
Class GPAxisCoordinates

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GContainer
          extended by fr.cnes.genopus.attitudes.GPAxisCoordinates
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<org.apache.commons.math3.geometry.euclidean.threed.Vector3D>

public class GPAxisCoordinates
extends fr.cnes.genius.lowLevel.GContainer
implements fr.cnes.genius.main.GReadWrite, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GDisplay, GPPatrius<org.apache.commons.math3.geometry.euclidean.threed.Vector3D>, fr.cnes.genius.main.GClear, fr.cnes.genius.main.GCondensedStatusInterface

Widget representing an OREKIT's Vector3D.

Author:
ffsm
Default Constraint(s):
IndexClassItemConstraint
0GLabelWithIndicatorlabel0, 0 => "newline , gapleft 0 , split 2"
0, 1 => (null)
1GComboBoxWithLabelcomboBoxType1, 0, 0 => "newline , gapleft 20 , split 2"
1, 0, 1 => (null)
1, 1 => (null)
2GEntryRealentryRealVecX2, 0, 0 => "newline , gapleft 20 , split 2"
2, 0, 1 => (null)
2, 1 => "split 2"
2, 2 => (null)
3GEntryRealentryRealVecY3, 0, 0 => "newline , gapleft 20 , split 2"
3, 0, 1 => (null)
3, 1 => "split 2"
3, 2 => (null)
4GEntryRealentryRealVecZ4, 0, 0 => "newline , gapleft 20 , split 2"
4, 0, 1 => (null)
4, 1 => "split 2"
4, 2 => (null)
5GEntryRealentryRealAlfa5, 0, 0 => "newline , gapleft 20 , split 2"
5, 0, 1 => (null)
5, 1 => "split 2"
5, 2 => (null)
6GEntryRealentryRealBeta6, 0, 0 => "newline , gapleft 20 , split 2"
6, 0, 1 => (null)
6, 1 => "split 2"
6, 2 => (null)
7GEntryRealentryRealNorm7, 0, 0 => "newline , gapleft 20 , split 2"
7, 0, 1 => (null)
7, 1 => "split 2"
7, 2 => (null)


Nested Class Summary
static class GPAxisCoordinates.GPAxisEnum
          Available options for the type of axis coordinates.
 
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
GPAxisCoordinates(String label, boolean isUnitary, fr.cnes.genius.unit.GUnit[] units)
          Constructor.
GPAxisCoordinates(String label, boolean isUnitary, org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector, fr.cnes.genius.unit.GUnit[] units)
          Constructor with an initial vector.
GPAxisCoordinates(String widgetId, String label, boolean isUnitary, fr.cnes.genius.unit.GUnit[] units)
          Creates a new instance.
GPAxisCoordinates(String widgetId, String label, boolean isUnitary, org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector, fr.cnes.genius.unit.GUnit[] units)
          Constructor with an initial vector.
 
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 arg0)
          
 void clear()
          
 void display()
          
 void generic()
          
 org.apache.commons.math3.geometry.euclidean.threed.Vector3D getDefaultValue()
          
 fr.cnes.genius.highLevel.GComboBoxWithLabel getGComboBoxType()
          Getter for the combo box with the type of coordinates.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealAlfa()
          Getter for the entry real to set alfa angle.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealBeta()
          Getter for the entry real to set beta angle.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealNorm()
          Getter for the entry real to set norm.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealVecX()
          Getter for the entry real to set X axis.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealVecY()
          Getter for the entry real to set Y axis.
 fr.cnes.genius.highLevel.GEntryReal getGEntryRealVecZ()
          Getter for the entry real to set Z axis.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabel()
          Getter for the label of the widget.
 org.apache.commons.math3.geometry.euclidean.threed.Vector3D getPatriusObject()
          Returns the PATRIUS object associated to a GENOPUS widget.
 org.apache.commons.math3.geometry.euclidean.threed.Vector3D getSavedValue()
          
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
 boolean isEnabled()
          
 boolean isModified()
          
 void read()
          
 void setConstraint(int widgetGap)
          Setter for the constraints of the widget.
 void setDefaultValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector)
          Setter of the default values from a PATRIUS Vector3D object.
 void setDefaultValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector, GPAxisCoordinates.GPAxisEnum typeOfCoord)
          Setter of the default values from a PATRIUS Vector3D object.
 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 setLabel(String string)
          Set title.
 void setNormInterval(fr.cnes.genius.interval.GInterval... intervals)
          Method to modify the interval for the norm of the vector.
 void setSavedValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector)
          Setter of the saved values from a PATRIUS Vector3D object.
 void setSavedValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector, GPAxisCoordinates.GPAxisEnum typeOfCoord)
          Setter of the saved values from a PATRIUS Vector3D object.
 void setToolTipText(String text)
          
 void setValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector)
          Setter from a PATRIUS Vector3D object.
 void setValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector, GPAxisCoordinates.GPAxisEnum typeOfCoord)
          Setter from a PATRIUS Vector3D object.
 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, 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

GPAxisCoordinates

public GPAxisCoordinates(String label,
                         boolean isUnitary,
                         fr.cnes.genius.unit.GUnit[] units)
Constructor. The widgetId will be assigned automatically.

Parameters:
label - label for the widget.
isUnitary - flag indicating if the widget must accept only unitary vectors. In this case, the units will be ignored.
units - list of units to display in the unit menu of the widget. Set to null for a widget without units.

GPAxisCoordinates

public GPAxisCoordinates(String widgetId,
                         String label,
                         boolean isUnitary,
                         fr.cnes.genius.unit.GUnit[] units)
Creates a new instance.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created
label - label for the widget.
isUnitary - flag indicating if the widget must accept only unitary vectors. In this case, the units will be ignored.
units - list of units to display in the unit menu of the widget. Set to null for a widget without units.

GPAxisCoordinates

public GPAxisCoordinates(String widgetId,
                         String label,
                         boolean isUnitary,
                         org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector,
                         fr.cnes.genius.unit.GUnit[] units)
Constructor with an initial vector.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created
label - label for the widget
isUnitary - flag indicating if the widget must accept only unitary vectors. In this case, the units will be ignored.
vector - to be set in the widget
units - list of units to display in the unit menu of the widget. Set to null for a widget without units.

GPAxisCoordinates

public GPAxisCoordinates(String label,
                         boolean isUnitary,
                         org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector,
                         fr.cnes.genius.unit.GUnit[] units)
Constructor with an initial vector. The widgetId will be assigned automatically.

Parameters:
label - label for the widget
isUnitary - flag indicating if the widget must accept only unitary vectors. In this case, the units will be ignored.
vector - to be set in the widget
units - list of units to display in the unit menu of the widget. Set to null for a widget without units.
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.

getGComboBoxType

public fr.cnes.genius.highLevel.GComboBoxWithLabel getGComboBoxType()
Getter for the combo box with the type of coordinates.

Returns:
the combo box with the type of coordinates.

getGEntryRealVecX

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealVecX()
Getter for the entry real to set X axis.

Returns:
the entry real to set X axis.

getGEntryRealVecY

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealVecY()
Getter for the entry real to set Y axis.

Returns:
the entry real to set Y axis.

getGEntryRealVecZ

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealVecZ()
Getter for the entry real to set Z axis.

Returns:
the entry real to set Z axis.

getGEntryRealAlfa

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealAlfa()
Getter for the entry real to set alfa angle.

Returns:
the entry real to set alfa angle.

getGEntryRealBeta

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealBeta()
Getter for the entry real to set beta angle.

Returns:
the entry real to set beta angle.

getGEntryRealNorm

public fr.cnes.genius.highLevel.GEntryReal getGEntryRealNorm()
Getter for the entry real to set norm.

Returns:
the entry real to set norm.

attachCopyPasteMenu

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

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

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 arg0)
            throws fr.cnes.genius.exception.GException

Specified by:
before in interface fr.cnes.genius.main.GListener
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

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

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.

setLabel

public void setLabel(String string)
Set title.

Parameters:
string - title

getPatriusObject

public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getPatriusObject()
Returns the PATRIUS object associated to a GENOPUS widget.

Specified by:
getPatriusObject in interface GPPatrius<org.apache.commons.math3.geometry.euclidean.threed.Vector3D>
Returns:
the PATRIUS object associated to the widget.

getDefaultValue

public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getDefaultValue()


getSavedValue

public org.apache.commons.math3.geometry.euclidean.threed.Vector3D getSavedValue()


setValue

public void setValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector)
Setter from a PATRIUS Vector3D object. If the widget is for a unitary vector and the vector is not unitary it will be normalized.

Parameters:
vector - to be set in the widget.

setValue

public void setValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector,
                     GPAxisCoordinates.GPAxisEnum typeOfCoord)
Setter from a PATRIUS Vector3D object. If the widget is for a unitary vector and the vector is not unitary it will be normalized.

Parameters:
vector - to be set in the widget. It cannot be null.
typeOfCoord - type of coordinates to select in the combobox.

setDefaultValue

public void setDefaultValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector)
Setter of the default values from a PATRIUS Vector3D object. If the widget is for a unitary vector and the vector is not unitary it will be normalized.

Parameters:
vector - to be set as default one in the widget. It cannot be null.

setDefaultValue

public void setDefaultValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector,
                            GPAxisCoordinates.GPAxisEnum typeOfCoord)
Setter of the default values from a PATRIUS Vector3D object. If the widget is for a unitary vector and the vector is not unitary it will be normalized.

Parameters:
vector - to be set as default one in the widget. It cannot be null.
typeOfCoord - default type of coordinates

setSavedValue

public void setSavedValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector)
Setter of the saved values from a PATRIUS Vector3D object. If the widget is for a unitary vector and the vector is not unitary it will be normalized.

Parameters:
vector - to be set as saved one in the widget. It cannot be null.

setSavedValue

public void setSavedValue(org.apache.commons.math3.geometry.euclidean.threed.Vector3D vector,
                          GPAxisCoordinates.GPAxisEnum typeOfCoord)
Setter of the saved values from a PATRIUS Vector3D object. If the widget is for a unitary vector and the vector is not unitary it will be normalized.

Parameters:
vector - to be set as saved one in the widget. It cannot be null.
typeOfCoord - saved type of Coordinates

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

updateCondensedStatus

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

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

updateIsModifiedIndicator

protected void updateIsModifiedIndicator()

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

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

setEnabled

public void setEnabled(boolean b)

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

setToolTipText

public void setToolTipText(String text)

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

setNormInterval

public void setNormInterval(fr.cnes.genius.interval.GInterval... intervals)
                     throws fr.cnes.genius.exception.GIntervalException
Method to modify the interval for the norm of the vector. It removes the previous intervals and adds the new ones. If the list is empty or null, it just removes the intervals.

Parameters:
intervals - new intervals for the norm of the vector.
Throws:
fr.cnes.genius.exception.GIntervalException - in case that the new intervals overlaps with each other


Copyright © 2017. All rights reserved.