public class GTable1D extends GPanel implements GReadWrite, GListener
GEntryIntVector and GEntryRealVector. It is possible to mix
the two types of vectors. The class GTable1D contains an abstract object
GEntryVectorAbstract for vectors handling. The class allows inserting or deleting lines /
columns depending of orientation of the table.| Index | Class | Item | Constraint |
| 0 | GLabel | title | "wrap" |
| 1 | GEntryRealVector | realVector | "newline" (see table below) |
| 2 | GEntryIntVector | intVector | "newline" (see table below) |
| 3 | GEntryDateVector | dateVector | "newline" (see table below) |
| ... | ... | ... | ... |
| numVec+1 | GPopupList | popup_0 | (null) |
| numVec+2 | GPopupList | popup_1 | (null) |
| numVec+3 | GPopupList | popup_2 | (null) |
| ... | ... | ... | ... |
| numVec+i+1 | GPopupList | popup_i | (null) |
| Index | Class | Item | Constraint |
| 1, 0 | GLabelWithIndicator | label | 1, 0, 0 =>
"split 2 , alignx Center" 1, 0, 1 => (null) |
| 1, 1 | GRealField | field_1 | "newline" |
| 1, 2 | GRealField | field_2 | "newline" |
| ... | ... | ... | ... |
| 1, i | GRealField | field_i | "newline" |
| 1, 3 | GPopupList | unitPopup | "alignx Center , cell 0 1" |
| Index | Class | Item | Constraint |
| 2, 0 | GLabelWithIndicator | label | 2, 0, 0 =>
"split 2 , alignx Center" 2, 0, 1 => (null) |
| 2, 1 | GIntField | field_1 | "" |
| 2, 2 | GIntField | field_2 | "" |
| ... | ... | ... | ... |
| 2, i | GIntField | field_i | "" |
| Index | Class | Item | Constraint |
| 3, 0 | GLabelWithIndicator | label | 3, 0, 0 =>
"split 2 , alignx Center" 3, 0, 1 => (null) |
| 3, 1 | GDateField | field_1 | "wmin 160" |
| 3, 2 | GDateField | field_2 | "wmin 160" |
| ... | ... | ... | ... |
| 3, i | GDateField | field_i | "wmin 160" |
| Modifier and Type | Class and Description |
|---|---|
static class |
GTable1D.TableOrientation
Defines the orientation of the table.
|
GPanel.Panel, GPanel.ScrollBarVisibilityGComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.OperationNAME_ATTRIBUTE| Constructor and Description |
|---|
GTable1D(String name,
GTable1D.TableOrientation orientation,
GEntryVectorAbstract... vectors)
Constructor.
|
GTable1D(String widgetId,
String label,
GTable1D.TableOrientation orientation,
GEntryVectorAbstract... vectors)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
after(GEvent e)
Called after the event is processed.
|
void |
attachCopyPasteMenu(String label,
GComponent.CopyPasteOperation... operationList)
Attach the copy and paste menu to this component.
|
void |
before(GEvent e)
Called before the event is processed.
|
void |
display()
Called when the element is to be displayed, so it can perform the actions required for its display, and
the display of its inmmediate descendants.
|
void |
generic()
Abstract generic function that need to be implemented by the descendants.
|
GEntryVectorAbstract |
getGVector(int index)
Getter for the vector with the specified index.
|
GComponent |
getSubComponent(int position)
Gets the subcomponent occupying the position defined by position.
|
GComponent.CopyPasteOperation |
isCopyPasteEvent(GEvent event)
Checks if the event corresponds to one of the copy and paste menu operations.
|
boolean |
isEnabled()
Gets the enable status of the widget.
|
boolean |
isModified()
Gets the modification status of the component against the last set of values loaded or saved.
|
void |
read()
Implementaion of the routines that allow the component to be loaded from a configuration file.
|
void |
setCopyPasteMenuEnabled(boolean b)
Set the enable status of the copy-paste menu associated to the component.
|
protected void |
setDefaultConstraints()
set the defaults constraints
|
void |
setDefaultValues(Object... defaultValues)
Setter for the default values for each vector of the table.
|
void |
setEnabled(boolean flag)
Set the enable status of the component.
|
void |
setSavedValues(Object[]... vectors)
Setter for the table saved values.
|
void |
setValues(Object[]... vectors)
Setter for the table values.
|
void |
setWidgetId(String widgetId)
Sets the widget identifier of the component.
|
protected void |
updateIsModifiedIndicator()
Updates the is modified indicator.
|
void |
updateStatus()
Update status.
|
void |
write()
Implementaion of the routines that allow the component to be saved to a configuration file.
|
clearConstraint, getClassConstraint, getComponent, getHorizontalScroll, getInnerDescendantClassConstraint, getJPanel, getJScrollPane, getLayoutConstraints, getStringClassConstraint, getVerticalScroll, mainClear, mainDisplay, processMouseWheelEvent, put, setClassConstraint, setColumnConstraints, setConstraint, setHorizontalScroll, setInnerDescendantClassConstraint, setLayoutConstraints, setMargins, setPanelConstraints, setPreferredSize, setRowConstraints, setUnitIncrement, setVerticalScroll, unputactivateConstraintsByType, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isForcedStatus, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, setBusyCursor, setCommentInConfigFile, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidth, setWindowBusyCursor, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItempublic GTable1D(String name, GTable1D.TableOrientation orientation, GEntryVectorAbstract... vectors)
name - of the table, the name is used in the configuration file.orientation - of the table, it can be HORIZONTAL or VERTICAL.vectors - array of GEntryVectorAbstract with the values for the different functions
f(x), g(x), etc to display.public GTable1D(String widgetId, String label, GTable1D.TableOrientation orientation, GEntryVectorAbstract... vectors)
widgetId - widget identifier.label - of the table, it is also used in the configuration file.orientation - of the table, it can be HORIZONTAL or VERTICAL.vectors - array of GEntryVectorAbstract with the values for the different functions
f(x), g(x), etc to display.protected final void setDefaultConstraints()
GPanelsetDefaultConstraints in class GPanelpublic void setWidgetId(String widgetId)
setWidgetId in class GComponentwidgetId - the widget identifier of the component.public void setEnabled(boolean flag)
setEnabled in class GComponentflag - new enable status of the component.public boolean isEnabled()
isEnabled in class GComponentpublic GEntryVectorAbstract getGVector(int index)
index - of the vector to get.public void generic()
throws GException
generic in class GPanelGException - in case of problem.public void display()
throws GException
display in interface GDisplayGException - in case of problem while reading the value from file.public void before(GEvent e) throws GException
before in interface GListenere - event to processed.GException - in case there is a problem managing the event.public void after(GEvent e) throws GException
after in interface GListenere - processed event.GException - in case there is a problem managing the event.public void read()
throws GException
read in interface GReadWriteGException - in case of problem while reading the value from file.public void write()
throws GException
write in interface GReadWriteGException - in case of problem while writing the value to file.public final void updateStatus()
public void attachCopyPasteMenu(String label, GComponent.CopyPasteOperation... operationList)
attachCopyPasteMenu in class GComponentlabel - of the copy&paste menu, if null no label is displayed.operationList - list of operations to set in the menu. Valid values are Copy if the
"Copy" menu is available, Paste if the "Paste" menu is available, Import if the
"Import" menu is available, and Export if the "Export" menu is available.public void setCopyPasteMenuEnabled(boolean b)
setCopyPasteMenuEnabled in class GComponentb - new enable status.public GComponent.CopyPasteOperation isCopyPasteEvent(GEvent event)
isCopyPasteEvent in class GComponentevent - to check.public GComponent getSubComponent(int position) throws GComponentException
getSubComponent in class GComponentposition - position of the requested component.GComponentException - in case the position argument is invalid.public void setValues(Object[]... vectors) throws GArithmeticException, GException
vectors - array of vectors to set in the tableGArithmeticException - if vectors contains is NaNGException - if the number of vectors in the array does not correspond to the table or
if the vectors have different sizes.public void setDefaultValues(Object... defaultValues) throws GArithmeticException, GException
defaultValues - array of default values for each vector of the tableGException - if the number of default values does not correspond to the table.GArithmeticException - if defaultValues is NaN.public void setSavedValues(Object[]... vectors) throws GArithmeticException, GException
vectors - array of vectors with the saved values to set in the tableGArithmeticException - if vectors contains NaN.GException - if the number of vectors in the array does not correspond to the table or
if the vectors have different sizes.protected void updateIsModifiedIndicator()
updateIsModifiedIndicator in class GComponentpublic boolean isModified()
isModified in class GComponentCopyright © 2024. All rights reserved.