fr.cnes.genopus.attitudes
Class GPAttitudeSequence

java.lang.Object
  extended by fr.cnes.genius.main.GComponent
      extended by fr.cnes.genius.lowLevel.GPanel
          extended by fr.cnes.genopus.attitudes.GPAttitudeSequence
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.orekit.attitudes.AttitudesSequence>, GPPatriusWithObjects<org.orekit.attitudes.AttitudesSequence>

public final class GPAttitudeSequence
extends fr.cnes.genius.lowLevel.GPanel
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, GPPatriusWithObjects<org.orekit.attitudes.AttitudesSequence>

Class defining an attitude sequence widget.

Author:
ffsm
Default Constraint(s):
IndexClassItemConstraint
0GPDualAbsoluteDaterefAbsoluteDate"newline"
(see table below)
1GLabelWithIndicatorattitudeLawsLabel1, 0 => "newline , split 2"
1, 1 => (null)
2GButtonselectLawsButton"newline , gapleft 10 , spanx 3"
3GLabelWithIndicatorswitchesLabel3, 0 => "newline , split 2"
3, 1 => (null)
4GComponentListswitchComponentList"newline , gapleft 0 , spanx 3"
(see table below)
5GStandardPanelDialoglawListDialog"newline , pushx , pushy , growx , growy"

Default Constraint(s) for refAbsoluteDate:
IndexClassItemConstraint
0, 0GLabelWithIndicatorlabel0, 0, 0 => "newline , gapleft 0 , split 2"
0, 0, 1 => "wmin 24"
0, 1GChoicetypeDateChoice0, 1, 0, 0 => "newline , gapleft 20 , split 2"
0, 1, 0, 1 => (null)
0, 1, 1 => "split"
0, 2GPAbsoluteDatereferenceAbsoluteDate"newline"
(see table below)
0, 3GPAbsoluteDateexternalAbsoluteDate"newline"
(see table below)

Default Constraint(s) for referenceAbsoluteDate:
IndexClassItemConstraint
0, 2, 0GLabelWithIndicatorlabel0, 2, 0, 0 => "newline , gapleft 20 , split 2"
0, 2, 0, 1 => (null)
0, 2, 1GPDateFielddateField(null)
0, 2, 2GPopupListWithLabelpopupListTimeScales0, 2, 2, 0, 0 => "split 4"
0, 2, 2, 0, 1 => (null)
0, 2, 2, 1 => (null)
0, 2, 3GButtonbuttonRelativeDate(null)

Default Constraint(s) for externalAbsoluteDate:
IndexClassItemConstraint
0, 3, 0GLabelWithIndicatorlabel0, 3, 0, 0 => "newline , gapleft 20 , split 2"
0, 3, 0, 1 => (null)
0, 3, 1GPDateFielddateField(null)
0, 3, 2GPopupListWithLabelpopupListTimeScales0, 3, 2, 0, 0 => "split 4"
0, 3, 2, 0, 1 => (null)
0, 3, 2, 1 => (null)
0, 3, 3GButtonbuttonRelativeDate(null)

Default Constraint(s) for switchComponentList:
IndexClassItemConstraint
4, 0GHeaderPanelheader"hmin 40"
(see table below)
4, 1GLabelspaceLabel"newline , height 0"

Default Constraint(s) for header:
IndexClassItemConstraint
4, 0, 0GEntryInttotalNumberItemsEntry4, 0, 0, 0, 0 => "newline , split 2"
4, 0, 0, 0, 1 => (null)
4, 0, 0, 1 => "skip 2 , width 50"
4, 0, 1GEntryIntcurrentItemRankEntry4, 0, 1, 0, 0 => "split 2"
4, 0, 1, 0, 1 => (null)
4, 0, 1, 1 => "width 50"
4, 0, 2GButtondecrButton"alignx Right , height 20"
4, 0, 3GButtonincrButton"height 20"
4, 0, 4GPopupListmenu(null)


Nested Class Summary
static class GPAttitudeSequence.GPAttitudeSequenceSwitch
          Widget for attitude sequence switches with an attitude law before and after a given event chosen by an event selector.
 
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
 
Nested classes/interfaces inherited from interface fr.cnes.genopus.main.GPPatriusWithObjects
GPPatriusWithObjects.ArgsChecker
 
Field Summary
 
Fields inherited from class fr.cnes.genius.main.GComponent
NAME_ATTRIBUTE
 
Constructor Summary
GPAttitudeSequence(org.orekit.time.AbsoluteDate externalDate, boolean switchListSingleMode)
          Constructor with an external date.
GPAttitudeSequence(boolean switchListSingleMode)
          Constructor.
GPAttitudeSequence(String widgetId, org.orekit.time.AbsoluteDate externalDate, boolean switchListSingleMode)
          Constructor with an external date.
GPAttitudeSequence(String widgetId, boolean switchListSingleMode)
          Constructor.
 
Method Summary
 void after(fr.cnes.genius.main.GEvent e)
          
 void before(fr.cnes.genius.main.GEvent e)
          
 void clear()
          
 void display()
          
 void generic()
          
 ArrayList<GPAttitudeLawSelector> getAttLawsList()
          Get attitude laws list.
 org.orekit.bodies.BodyShape getEarthShape()
          Getter for the Earth shape.
 fr.cnes.genius.lowLevel.GButton getGButtonSelectLaws()
          Get the select laws button sub-widget.
 fr.cnes.genius.highLevel.GComponentList getGComponentListAttitudeLaws()
          Get the attitude laws component list sub-widget.
 fr.cnes.genius.highLevel.GComponentList getGComponentListSwitches()
          Get the switches component list sub-widget.
 fr.cnes.genius.lowLevel.GStandardPanelDialog getGDialogAttitudeLaws()
          Get the attitude laws dialog sub-widget.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelAttitudeLaws()
          Get the attitude laws label sub-widget.
 fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelSwitches()
          Get the switches label sub-widget.
 GPDualAbsoluteDate getGPDualAbsoluteDate()
          Get the reference date sub-widget.
 org.orekit.attitudes.AttitudesSequence getPatriusObject()
          Method to obtain a PATRIUS AttitudesSequence object builded with MMI parameters.
 org.orekit.attitudes.AttitudesSequence getPatriusObject(Object... args)
          Returns the PATRIUS object associated to a GENOPUS widget.
 fr.cnes.genius.main.GComponent getSubComponent(int position)
          
 ArrayList<GPAttitudeSequence.GPAttitudeSequenceSwitch> getSwitchList()
          Get switches list.
 boolean isEnabled()
          
 void read()
          
 void setBodyShapeWidgetsVisible(boolean b)
          Method to force the GPOneAxisEllipsoid widget to be visible/invisible.
 void setConstraint(int widgetGap)
          Setter for the constraints of the widget.
 void setCurrentLawsNumber(int currentLawsNumber)
          Set the current number of items in the attitude laws list, if the value is not contained in minLawNumber <= currentLawsNumber <= maxLawNumber, nothing is done.
 void setCurrentSwitchesNumber(int currentSwitchesNumber)
          Set the current number of items in the attitude switches list, if the value is not contained in minSwitchesNumber <= currentSwitchesNumber <= maxSwitchesNumber, nothing is done.
 void setEarthShape(org.orekit.bodies.BodyShape earthValues)
          Method to set the reference date for the attitude laws.
 void setEnabled(boolean flag)
          
 void setExternalDate(org.orekit.time.AbsoluteDate externalDate)
          Method to set the external date used as reference date in "external" mode.
 void setMinMaxLawsNumber(Integer minLawNumber, Integer maxLawNumber)
          Set the minimum and maximum number of attitude laws allowed.
 void setMinMaxSwitchesNumber(Integer minSwitchesNumber, Integer maxSwitchesNumber)
          Set the minimum and maximum number of attitude switches allowed.
 void setPropagationFrame(org.orekit.frames.Frame propagationFrame)
          Setter for the propagation frame.
 void setReferenceDate(org.orekit.time.AbsoluteDate date)
          Set the reference date.
 void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
          
 void updateExternalDate(org.orekit.time.AbsoluteDate externalDate)
          Update external date value.
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.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, 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, isModified, launchInvalidPositionException, parseSimpleConstraint, processGEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setNameAndCommentInConfigFile, setNameInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidgetId, setWidth, updateIsModifiedIndicator, 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

GPAttitudeSequence

public GPAttitudeSequence(boolean switchListSingleMode)
Constructor. The widgetId will be assigned automatically.

Parameters:
switchListSingleMode - flag to determine if the switches component list is in "single widget mode" or not.

GPAttitudeSequence

public GPAttitudeSequence(String widgetId,
                          boolean switchListSingleMode)
Constructor.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created.
switchListSingleMode - flag to determine if the switches component list is in "single widget mode" or not.

GPAttitudeSequence

public GPAttitudeSequence(org.orekit.time.AbsoluteDate externalDate,
                          boolean switchListSingleMode)
Constructor with an external date. The widgetId will be assigned automatically.

Parameters:
externalDate - date to be initially set as reference date.
switchListSingleMode - flag to determine if the switches component list is in "single widget mode" or not.

GPAttitudeSequence

public GPAttitudeSequence(String widgetId,
                          org.orekit.time.AbsoluteDate externalDate,
                          boolean switchListSingleMode)
Constructor with an external date.

Parameters:
widgetId - widget identifier, if null an identifier will be automatically created.
externalDate - date to be initially set as reference date.
switchListSingleMode - flag to determine if the switches component list is in "single widget mode" or not.
Method Detail

getGPDualAbsoluteDate

public GPDualAbsoluteDate getGPDualAbsoluteDate()
Get the reference date sub-widget.

Returns:
the reference date sub-widget

getGLabelAttitudeLaws

public fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelAttitudeLaws()
Get the attitude laws label sub-widget.

Returns:
the attitude laws label sub-widget

getGButtonSelectLaws

public fr.cnes.genius.lowLevel.GButton getGButtonSelectLaws()
Get the select laws button sub-widget.

Returns:
the select laws button sub-widget

getGDialogAttitudeLaws

public fr.cnes.genius.lowLevel.GStandardPanelDialog getGDialogAttitudeLaws()
Get the attitude laws dialog sub-widget.

Returns:
the attitude laws dialog sub-widget

getGComponentListAttitudeLaws

public fr.cnes.genius.highLevel.GComponentList getGComponentListAttitudeLaws()
Get the attitude laws component list sub-widget.

Returns:
the attitude laws component list sub-widget

getGLabelSwitches

public fr.cnes.genius.highLevel.GLabelWithIndicator getGLabelSwitches()
Get the switches label sub-widget.

Returns:
the switches label sub-widget

getGComponentListSwitches

public fr.cnes.genius.highLevel.GComponentList getGComponentListSwitches()
Get the switches component list sub-widget.

Returns:
the switches component sub-widget

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.

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

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

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

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

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

setReferenceDate

public void setReferenceDate(org.orekit.time.AbsoluteDate date)
Set the reference date.

Parameters:
date - the reference date

setExternalDate

public void setExternalDate(org.orekit.time.AbsoluteDate externalDate)
Method to set the external date used as reference date in "external" mode.

Parameters:
externalDate - date to be set.

updateExternalDate

public void updateExternalDate(org.orekit.time.AbsoluteDate externalDate)
Update external date value.

Parameters:
externalDate - the new external date

getAttLawsList

public ArrayList<GPAttitudeLawSelector> getAttLawsList()
Get attitude laws list.

Returns:
the law list

getSwitchList

public ArrayList<GPAttitudeSequence.GPAttitudeSequenceSwitch> getSwitchList()
Get switches list.

Returns:
the switch list

getPatriusObject

public org.orekit.attitudes.AttitudesSequence getPatriusObject(Object... args)
                                                        throws fr.cnes.genius.exception.GException
Returns the PATRIUS object associated to a GENOPUS widget.

Specified by:
getPatriusObject in interface GPPatriusWithObjects<org.orekit.attitudes.AttitudesSequence>
Parameters:
args - The parameters are 0: BodyShape.
Returns:
the PATRIUS object associated to the widget.
Throws:
fr.cnes.genius.exception.GException - if the PATRIUS object cannot be created from the widget data.

getPatriusObject

public org.orekit.attitudes.AttitudesSequence getPatriusObject()
                                                        throws GPAttitudeException
Method to obtain a PATRIUS AttitudesSequence object builded with MMI parameters.

Specified by:
getPatriusObject in interface GPPatrius<org.orekit.attitudes.AttitudesSequence>
Returns:
PATRIUS AttitudesSequence object
Throws:
GPAttitudeException - in case the law before or after of one of the switches is undefined

setEarthShape

public void setEarthShape(org.orekit.bodies.BodyShape earthValues)
                   throws GPAttitudeException
Method to set the reference date for the attitude laws.

Parameters:
earthValues - Earth Shape to be set.
Throws:
GPAttitudeException - In case of problems settings Earth Shape to event Selector or if the Earth shape is not an instance of an ExtendedOneAxisEllipsoid

getEarthShape

public org.orekit.bodies.BodyShape getEarthShape()
Getter for the Earth shape.

Returns:
the Earth shape

setBodyShapeWidgetsVisible

public void setBodyShapeWidgetsVisible(boolean b)
Method to force the GPOneAxisEllipsoid widget to be visible/invisible.

Parameters:
b - if true the widget will be visible, if false it will not.

setPropagationFrame

public void setPropagationFrame(org.orekit.frames.Frame propagationFrame)
                         throws GPAttitudeException
Setter for the propagation frame. It will set the pseudo inertial frame of all the LOF attitude Laws to the given frame.

Parameters:
propagationFrame - frame to be set as pseudoinertial frame in the LOF attitude law (only
Throws:
GPAttitudeException - In case the of invalid frame.

updateCondensedStatus

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

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

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

updateStatus

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


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

setMinMaxLawsNumber

public void setMinMaxLawsNumber(Integer minLawNumber,
                                Integer maxLawNumber)
Set the minimum and maximum number of attitude laws allowed.

Parameters:
minLawNumber - minimum number of attitude laws, if null do not change the current value.
maxLawNumber - maximum number of attitude laws, if null do not change the current value, if -1 do limit the maximum number of attitude laws.

setCurrentLawsNumber

public void setCurrentLawsNumber(int currentLawsNumber)
Set the current number of items in the attitude laws list, if the value is not contained in minLawNumber <= currentLawsNumber <= maxLawNumber, nothing is done.

Parameters:
currentLawsNumber - current number of items in the attitude laws list, if the value is not contained in minLawNumber <= currentLawsNumber <= maxLawNumber, nothing is done.

setMinMaxSwitchesNumber

public void setMinMaxSwitchesNumber(Integer minSwitchesNumber,
                                    Integer maxSwitchesNumber)
Set the minimum and maximum number of attitude switches allowed.

Parameters:
minSwitchesNumber - minimum number of attitude switches, if null do not change the current value.
maxSwitchesNumber - maximum number of attitude switches, if null do not change the current value, if -1 do limit the maximum number of attitude switches.

setCurrentSwitchesNumber

public void setCurrentSwitchesNumber(int currentSwitchesNumber)
Set the current number of items in the attitude switches list, if the value is not contained in minSwitchesNumber <= currentSwitchesNumber <= maxSwitchesNumber, nothing is done.

Parameters:
currentSwitchesNumber - current number of items in the attitude switches list, if the value is not contained in minSwitchesNumber <= currentSwitchesNumber <= maxSwitchesNumber, nothing is done.


Copyright © 2017. All rights reserved.