public abstract class GPParametersAbstract extends fr.cnes.genius.lowLevel.GContainer implements fr.cnes.genius.main.GClear, fr.cnes.genius.main.GDisplay, fr.cnes.genius.main.GListener, fr.cnes.genius.main.GReadWrite, GPPatrius<fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters>, fr.cnes.genius.main.GCondensedStatusInterface
Modifier and Type | Field and Description |
---|---|
static fr.cnes.genius.unit.GUnit[] |
ANGLE_UNITS
Units for angles available in the widget.
|
static fr.cnes.genius.unit.GUnit[] |
DISTANCE_UNITS
Units for distance available in the widget.
|
static fr.cnes.genius.interval.GInterval |
INT_ERR_MNS_2_TO_2
Validity interval: [-2, 2].
|
static fr.cnes.genius.interval.GInterval |
INT_ERR_MNS_INF_TO_ZERO
Validity interval: (-inf, 0).
|
static fr.cnes.genius.interval.GInterval |
INT_ERR_MNS_ONE_TO_ONE_EXC
Validity interval: (-1, 1).
|
static fr.cnes.genius.interval.GInterval |
INT_ERR_MNS_ONE_TO_ONE_INC
Validity interval: [-1, 1].
|
static fr.cnes.genius.interval.GInterval |
INT_ERR_ZERO_EX_TO_INF
Validity interval: (0, inf).
|
static fr.cnes.genius.interval.GInterval |
INT_ERR_ZERO_IN_TO_INF
Validity interval: [0, inf).
|
static fr.cnes.genius.interval.GInterval |
INT_ERR_ZERO_TO_PI
Validity interval: [0, pi).
|
static fr.cnes.genius.interval.GInterval |
INT_WARN_MNS_PI_TO_PI
Validity interval: (-inf, (-pi, pi], inf).
|
static fr.cnes.genius.interval.GInterval |
INT_WARN_MNS_PI_TO_TWO_PI
Validity interval: (-inf, [-pi, 2pi], inf).
|
static double[] |
NULL_PARAMS
Null parameters (except Mu) associated to null orbits or empty constructor.
|
static fr.cnes.genius.unit.GUnit[] |
VELOCITY_UNITS
Units for speed available in the widget.
|
Constructor and Description |
---|
GPParametersAbstract(String widgetId,
String name,
String label)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
aditionalActionsAfter1(fr.cnes.genius.main.GEvent e)
Additional actions to be performed by the after() method of class
GPParametersAbstract , to be
implemented by its sub-classes. |
protected abstract void |
aditionalActionsBefore1(fr.cnes.genius.main.GEvent e)
Additional actions to be performed by the before() method of class
GPParametersAbstract , to be
implemented by its sub-classes. |
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) |
protected abstract fr.cnes.genius.interval.GIntervalAbstract.GStatus |
checkGlobalCoherence(fr.cnes.genius.interval.GIntervalAbstract.GStatus status)
Checks if the the global coherence conditions are fulfilled by the parameters.
|
void |
clear() |
protected abstract double[] |
computeParamsArray(fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters params)
Computes the orbital parameters array in the same order as shown in the widget .
|
protected double[] |
copyNullParams()
Initialize the array of orbital parameters to the null parameters defined by
NULL_PARAMS . |
void |
display() |
void |
generic() |
fr.cnes.genius.highLevel.GEntryReal |
getGEntryRealMu()
Getter for the GEntryReal defining the gravitational constant of the central body.
|
fr.cnes.genius.highLevel.GLabelWithIndicator |
getGLabel()
Getter for the label of the set of cartesian parameters.
|
String |
getName()
Getter for the name of the set of orbital parameters.
|
protected ArrayList<fr.cnes.genius.highLevel.GEntryReal> |
getParametersGEntryRealsList()
Generic getter for the list of GEntryReals corresponding to the orbital parameters.
|
double[] |
getParams()
Gets the orbital parameters specified in the widget.
|
abstract fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters |
getPatriusObject()
Returns the PATRIUS object associated to a GENOPUS widget.
|
fr.cnes.genius.main.GComponent |
getSubComponent(int position) |
protected abstract fr.cnes.genius.main.GItemTypeInterface |
getXMLType()
Generic getter for the set of orbital parameters item type in the XML configuration file.
|
protected boolean |
handleOrbitCopyPasteEvent(fr.cnes.genius.main.GEvent event)
Handles the orbit copy-paste event if possible.
|
boolean |
isBlockedConversions()
Getter for the blocked conversions flag.
|
boolean |
isEnabled() |
boolean |
isModified() |
boolean |
isParamsNull()
Check whether the orbital parameters defined in the widget are null or not.
|
protected double |
modMinusPiPlusPi(double angle)
Modularize an angle between 0 and 2*PI.
|
protected void |
onGEntryRealMu(fr.cnes.genius.main.GEvent e)
Actions when the event comes from the mu GEntryReal.
|
protected void |
onGEntryRealParams(fr.cnes.genius.main.GEvent e)
Actions when the event comes from any of the first 6 parameters GEntryReals.
|
void |
read() |
void |
setBlockedConversions(boolean blockedConversions)
Setter for the blocked conversions flag.
|
void |
setConstraint(int labelGap,
int paramsGap)
Setter for the constraints of the orbital parameters.
|
protected void |
setDefaultConstraint()
Setter for the default constraint of the set of parameters.
|
void |
setDefaultParams(double[] defaultParams)
Sets the default orbital parameters.
|
void |
setDefaultParams(fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters defaultParams)
Sets the default orbital parameters.
|
void |
setDisplayIsModifiedIndicatorAll(fr.cnes.genius.main.GComponent.DisplayIndicatorStatus displayIndicatorStatus)
Controls the display of the isModified indicator of all sub-widgets (except for Mu, because it is
always comparable, it is always present in the rest of representations).
|
void |
setEnabled(boolean b) |
void |
setParams(double[] params)
Sets the specified orbital parameters in the widget.
|
void |
setParams(fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters params)
Sets the specified orbital parameters in the widget.
|
void |
setSavedParams(double[] savedParams)
Sets the saved orbital parameters.
|
void |
setSavedParams(fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters savedParams)
Sets the saved orbital parameters.
|
void |
updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus) |
void |
updateIsModifiedIndicator() |
void |
updateStatus()
Update the status of the orbital parameters.
|
void |
write() |
activateConstraintsByType, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isForcedStatus, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDefaultConstraints, setDisplayIsModifiedIndicator, setElement, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidgetId, setWidth, setWindowBusyCursor, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
public static final double[] NULL_PARAMS
public static final fr.cnes.genius.interval.GInterval INT_WARN_MNS_PI_TO_TWO_PI
public static final fr.cnes.genius.interval.GInterval INT_WARN_MNS_PI_TO_PI
public static final fr.cnes.genius.interval.GInterval INT_ERR_ZERO_TO_PI
public static final fr.cnes.genius.interval.GInterval INT_ERR_ZERO_EX_TO_INF
public static final fr.cnes.genius.interval.GInterval INT_ERR_ZERO_IN_TO_INF
public static final fr.cnes.genius.interval.GInterval INT_ERR_MNS_INF_TO_ZERO
public static final fr.cnes.genius.interval.GInterval INT_ERR_MNS_ONE_TO_ONE_EXC
public static final fr.cnes.genius.interval.GInterval INT_ERR_MNS_ONE_TO_ONE_INC
public static final fr.cnes.genius.interval.GInterval INT_ERR_MNS_2_TO_2
public static final fr.cnes.genius.unit.GUnit[] DISTANCE_UNITS
public static final fr.cnes.genius.unit.GUnit[] VELOCITY_UNITS
public static final fr.cnes.genius.unit.GUnit[] ANGLE_UNITS
public String getName()
getName
in class fr.cnes.genius.main.GComponent
public fr.cnes.genius.highLevel.GLabelWithIndicator getGLabel()
public double[] getParams()
public void setParams(double[] params) throws GPOrbitException, fr.cnes.genius.exception.GArithmeticException
params
- the orbital parameters in the same order as shown in the widget.GPOrbitException
- if the given orbital parameters do not represent a valid orbit.fr.cnes.genius.exception.GArithmeticException
- if any of the params is NaN.public void setParams(fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters params) throws GPOrbitException, fr.cnes.genius.exception.GArithmeticException
params
- the orbital parameters as an IOrbitalParameters patrius object.GPOrbitException
- if params is an instance of CartesianParameters and they represent an hyperbolic orbit
(Patrius limitation)fr.cnes.genius.exception.GArithmeticException
- if parameters are not validprotected abstract double[] computeParamsArray(fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters params) throws GPOrbitException, fr.cnes.genius.exception.GArithmeticException
params
- the orbital parameters as a IOrbitalParameters patrius object.GPOrbitException
- if the params are invalid:fr.cnes.genius.exception.GArithmeticException
- if the params are invalid:public void setDefaultParams(fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters defaultParams) throws GPOrbitException, fr.cnes.genius.exception.GArithmeticException
defaultParams
- the default orbital parameters.GPOrbitException
- if the params are invalid:fr.cnes.genius.exception.GArithmeticException
- if the params contain NaNs:public void setDefaultParams(double[] defaultParams) throws fr.cnes.genius.exception.GArithmeticException
defaultParams
- the default orbital parameters in the same order as shown in the widget.fr.cnes.genius.exception.GArithmeticException
- if any of the defaultParams is NaN.public void setSavedParams(double[] savedParams) throws fr.cnes.genius.exception.GArithmeticException
savedParams
- the saved orbital parameters in the same order as shown in the widget.fr.cnes.genius.exception.GArithmeticException
- if any of the savedParams is NaN.public void setSavedParams(fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters savedParams) throws GPOrbitException, fr.cnes.genius.exception.GArithmeticException
savedParams
- the saved orbital parameters.GPOrbitException
- if the params are invalid:fr.cnes.genius.exception.GArithmeticException
- if the params contain NaNs:protected double[] copyNullParams()
NULL_PARAMS
.public boolean isParamsNull()
public boolean isEnabled()
isEnabled
in class fr.cnes.genius.main.GComponent
public void setDisplayIsModifiedIndicatorAll(fr.cnes.genius.main.GComponent.DisplayIndicatorStatus displayIndicatorStatus)
displayIndicatorStatus
- if Always the modifiedStatusIndicator is always shown, if Never the modifiedStatusIndicator
is always shown, if Automatic the modifiedStatusIndicator is shown as needed.public boolean isBlockedConversions()
public void setBlockedConversions(boolean blockedConversions)
blockedConversions
- the flag to be setpublic void generic() throws fr.cnes.genius.exception.GException
generic
in class fr.cnes.genius.lowLevel.GContainer
fr.cnes.genius.exception.GException
public void display() throws fr.cnes.genius.exception.GException
display
in interface fr.cnes.genius.main.GDisplay
fr.cnes.genius.exception.GException
public void updateStatus()
protected abstract fr.cnes.genius.interval.GIntervalAbstract.GStatus checkGlobalCoherence(fr.cnes.genius.interval.GIntervalAbstract.GStatus status)
status
- initial status.public void attachCopyPasteMenu(String label, fr.cnes.genius.main.GComponent.CopyPasteOperation... operationList)
attachCopyPasteMenu
in class fr.cnes.genius.main.GComponent
protected boolean handleOrbitCopyPasteEvent(fr.cnes.genius.main.GEvent event) throws GPOrbitException
event
- to be processed.GPOrbitException
- in case the copy-paste operation raises an exception.public void clear() throws fr.cnes.genius.exception.GException
clear
in interface fr.cnes.genius.main.GClear
fr.cnes.genius.exception.GException
public fr.cnes.genius.highLevel.GEntryReal getGEntryRealMu()
public void setConstraint(int labelGap, int paramsGap)
labelGap
- left gap from panel border to display the label of the orbital parametersparamsGap
- left gap from panel border to display the orbital parametersprotected void setDefaultConstraint()
public void updateIsModifiedIndicator()
updateIsModifiedIndicator
in class fr.cnes.genius.main.GComponent
protected ArrayList<fr.cnes.genius.highLevel.GEntryReal> getParametersGEntryRealsList()
public void before(fr.cnes.genius.main.GEvent e) throws GPOrbitException
before
in interface fr.cnes.genius.main.GListener
GPOrbitException
protected abstract void aditionalActionsBefore1(fr.cnes.genius.main.GEvent e) throws GPOrbitException
GPParametersAbstract
, to be
implemented by its sub-classes.e
- processed eventGPOrbitException
- if the previous parameters are not validpublic void after(fr.cnes.genius.main.GEvent e) throws GPOrbitException
after
in interface fr.cnes.genius.main.GListener
GPOrbitException
protected abstract void aditionalActionsAfter1(fr.cnes.genius.main.GEvent e) throws GPOrbitException
GPParametersAbstract
, to be
implemented by its sub-classes.e
- processed eventGPOrbitException
- in case of any problemprotected void onGEntryRealParams(fr.cnes.genius.main.GEvent e) throws GPOrbitException
e
- eventGPOrbitException
- if the widget orbital parameters do not represent a valid orbit.protected void onGEntryRealMu(fr.cnes.genius.main.GEvent e) throws GPOrbitException
e
- eventGPOrbitException
- if the widget orbital parameters do not represent a valid orbit.public boolean isModified()
isModified
in class fr.cnes.genius.main.GComponent
public void setEnabled(boolean b)
setEnabled
in class fr.cnes.genius.main.GComponent
protected abstract fr.cnes.genius.main.GItemTypeInterface getXMLType()
public void write() throws fr.cnes.genius.exception.GException
write
in interface fr.cnes.genius.main.GReadWrite
fr.cnes.genius.exception.GException
public void read() throws fr.cnes.genius.exception.GException
read
in interface fr.cnes.genius.main.GReadWrite
fr.cnes.genius.exception.GException
public abstract fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters getPatriusObject() throws GPOrbitException
getPatriusObject
in interface GPPatrius<fr.cnes.sirius.patrius.orbits.orbitalparameters.IOrbitalParameters>
GPOrbitException
- if the parameters cannot be createdfr.cnes.genius.exception.GArithmeticException
public fr.cnes.genius.main.GComponent getSubComponent(int position) throws fr.cnes.genius.exception.GComponentException
getSubComponent
in class fr.cnes.genius.main.GComponent
fr.cnes.genius.exception.GComponentException
public void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
updateCondensedStatus
in interface fr.cnes.genius.main.GCondensedStatusInterface
protected double modMinusPiPlusPi(double angle)
angle
- to be treated.Copyright © 2023. All rights reserved.