|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.cnes.genius.main.GComponent
fr.cnes.genius.lowLevel.GPanel
fr.cnes.genopus.utils.GPInstrumentedTestPanel
public abstract class GPInstrumentedTestPanel
Class to test basic widget aspects that are similar for all widgets: enabled/disabled status getPatriusObject method, getters for the widget subcomponents, etc. It consists on a split pane with the test component in the left panel and some generic test instrument widgets in the right panel. To use it, make your GPXXXTest classes to extend this class.
| Nested Class Summary |
|---|
| 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 |
| Field Summary |
|---|
| Fields inherited from class fr.cnes.genius.main.GComponent |
|---|
NAME_ATTRIBUTE |
| Constructor Summary | |
|---|---|
GPInstrumentedTestPanel()
Constructor. |
|
| Method Summary | ||
|---|---|---|
void |
clear()
|
|
void |
display()
|
|
void |
generic()
|
|
String |
getPatriusObjectString()
Method to get a string representation of the patrius object extracted from the test component. |
|
abstract fr.cnes.genius.main.GComponent[] |
getSubcomponents()
Getter of the list of subcomponents of the test component. |
|
fr.cnes.genius.main.GComponent |
getTestComponent(int i)
Getter for a test component. |
|
void |
read()
|
|
abstract void |
setDefaultPatriusObject(Object patriusObject)
Method to set a default PATRIUS object to the test component. |
|
void |
setExtraComponentsToDisplay(fr.cnes.genius.main.GComponent... components)
Method to add particular widgets to the right panel of the split pane (instruments panel). |
|
void |
setOtherConstructions(String[] otherConstructionDescrs,
fr.cnes.genius.main.GComponent[] otherConstructions)
Method to add to the test a set of buttons that will open a new dialog each one, with another example of construction of the test component (with alternative arguments). |
|
abstract void |
setPatriusObject(Object patriusObject)
Method to set a PATRIUS object to the test component. |
|
|
setPatriusObjectsToBeSet(String[] patriusObjectsLabels,
PatriusType[] patriusObjects)
Method to define the patrius objects that can be set into the widget. |
|
abstract void |
setSavedPatriusObject(Object patriusObject)
Method to set a saved PATRIUS object to the test component. |
|
void |
setTestComponent(fr.cnes.genius.main.GComponent... testComponent)
Setter for the test component(s). |
|
void |
setTestComponentMinWidth(int minWidth)
Set the prefered with of the left panel of the split pane, the test component panel. |
|
void |
updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
|
|
void |
write()
|
|
void |
writeToInfoTextArea(String textAreaTitle,
String textAreaContents)
Method to update the info text area with new contents. |
|
| 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, getSubComponent, getWidgetId, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isEnabled, isModified, launchInvalidPositionException, parseSimpleConstraint, processGEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setEnabled, 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 |
|---|
public GPInstrumentedTestPanel()
#setTestComponent(GComponent) mandatory,setExtraComponentsToDisplay(GComponent...) optional setPatriusObjectsToBeSet(String[], Object[]) optional setOtherConstructions(String[], GComponent[]) optional
| Method Detail |
|---|
public fr.cnes.genius.main.GComponent getTestComponent(int i)
i - component index
public void setOtherConstructions(String[] otherConstructionDescrs,
fr.cnes.genius.main.GComponent[] otherConstructions)
otherConstructionDescrs - short descriptions of each instantiation (it will be added to the associated button and the
dialog title).otherConstructions - instantiations of test component with alternative arguments.public void setTestComponent(fr.cnes.genius.main.GComponent... testComponent)
testComponent - the test component(s) to be setpublic void setExtraComponentsToDisplay(fr.cnes.genius.main.GComponent... components)
GListener interface and override GListener.after(fr.cnes.genius.main.GEvent) method to specify the actions to be
performed by these widgets.
components - list of widgets to be added to the instruments panel.
public void writeToInfoTextArea(String textAreaTitle,
String textAreaContents)
textAreaTitle - text to show in the labeltextAreaContents - text to show in the text area
public void generic()
throws fr.cnes.genius.exception.GException
generic in class fr.cnes.genius.lowLevel.GPanelfr.cnes.genius.exception.GException
public void display()
throws fr.cnes.genius.exception.GException
display in interface fr.cnes.genius.main.GDisplayfr.cnes.genius.exception.GException
public void clear()
throws fr.cnes.genius.exception.GException
clear in interface fr.cnes.genius.main.GClearfr.cnes.genius.exception.GException
public void read()
throws fr.cnes.genius.exception.GException
read in interface fr.cnes.genius.main.GReadWritefr.cnes.genius.exception.GException
public void write()
throws fr.cnes.genius.exception.GException
write in interface fr.cnes.genius.main.GReadWritefr.cnes.genius.exception.GExceptionpublic void updateCondensedStatus(fr.cnes.genius.main.GCondensedStatus condensedStatus)
updateCondensedStatus in interface fr.cnes.genius.main.GCondensedStatusInterface
public String getPatriusObjectString()
throws fr.cnes.genius.exception.GException
fr.cnes.genius.exception.GException - if the test component does not implements GPPatrius interface.
public <PatriusType> void setPatriusObjectsToBeSet(String[] patriusObjectsLabels,
PatriusType[] patriusObjects)
PatriusType - Patrius object class.patriusObjectsLabels - patrius object labels to be used in the combo boxpatriusObjects - patrius objects to be set to the widgetpublic void setTestComponentMinWidth(int minWidth)
minWidth - prefered with for the panel containing the test component.public abstract fr.cnes.genius.main.GComponent[] getSubcomponents()
public GComponent[] getSubcomponents() {
return new GComponent[] { m_testComponent.getReferenceDateGLabel(),
m_testComponent.getDateModeGChoice(), m_testComponent.getReferenceGPAbsoluteDate(),
m_testComponent.getExternalGPAbsoluteDate(), m_testComponent.getAttitudeLawsGLabel(),
m_testComponent.getSelectLawsGButton(), m_testComponent.getAttitudeLawsGDialog(),
m_testComponent.getAttitudeLawsGComponentList(), m_testComponent.getSwitchesGLabel(),
m_testComponent.getSwitchesGComponentList() };
}
public abstract void setPatriusObject(Object patriusObject)
throws fr.cnes.genius.exception.GException
public void setPatriusObject(Object patriusObject) throws GException {
CustomAttitudeLaw attitudeLaw = ((CustomAttitudeLaw) patriusObject);
m_testComponent.setAttitudeLaw(attitudeLaw);
}
patriusObject - the patrius object
fr.cnes.genius.exception.GException - in case of problem
public abstract void setDefaultPatriusObject(Object patriusObject)
throws fr.cnes.genius.exception.GException
public void setDefaultPatriusObject(Object patriusObject) throws GException {
CustomAttitudeLaw attitudeLaw = ((CustomAttitudeLaw) patriusObject);
m_testComponent.setDefaultAttitudeLaw(attitudeLaw);
}
patriusObject - the patrius object to be set as default one
fr.cnes.genius.exception.GException - in case of problem
public abstract void setSavedPatriusObject(Object patriusObject)
throws fr.cnes.genius.exception.GException
public void setSavedPatriusObject(Object patriusObject) throws GException {
CustomAttitudeLaw attitudeLaw = ((CustomAttitudeLaw) patriusObject);
m_testComponent.setSavedAttitudeLaw(attitudeLaw);
}
patriusObject - the patrius object to be set as saved one
fr.cnes.genius.exception.GException - in case of problem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||