public class GTable2D extends GPanel implements GReadWrite, GListener, GCondensedStatusInterface
| Index | Class | Item | Constraint |
| 0 | GLabel | dataLabel | "newline , spanx 2 , split 2 , alignx Center" |
| 1 | GLabel | columnHeaderLabel | "newline , spanx 2 , split 2 , alignx Center" |
| 2 | GLabel | rowHeaderLabel | "newline , split 2 , flowy" |
| 3 | GTable | table | (null) |
| 4 | GPopupList | dataUnitPopupList | "gapleft 2" |
| 5 | GPopupList | columnHeaderUnitPopupList | "gapleft 2" |
| 6 | GPopupList | rowHeaderUnitPopupList | (null) |
GPanel.Panel, GPanel.ScrollBarVisibilityGComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.OperationNAME_ATTRIBUTE| Constructor and Description |
|---|
GTable2D(double[] absData,
String columnHeaderTitle,
GUnit[] columnHeaderUnitList,
double[] ordData,
String rowHeaderTitle,
GUnit[] rowHeaderUnitList,
double[][] data,
String dataTitle,
GUnit[] dataUnitList)
Constructor.
|
GTable2D(int numberOfRows,
int numberOfColums,
String rowHeaderTitle,
GUnit[] rowHeaderUnitList,
String columnHeaderTitle,
GUnit[] columnHeaderUnitList,
String dataTitle,
GUnit[] dataUnitList)
Constructor.
|
GTable2D(String widgetId,
double[] absData,
String columnHeaderTitle,
GUnit[] columnHeaderUnitList,
double[] ordData,
String rowHeaderTitle,
GUnit[] rowHeaderUnitList,
double[][] data,
String dataTitle,
GUnit[] dataUnitList)
Constructor.
|
GTable2D(String widgetId,
int numberOfRows,
int numberOfColums,
String rowHeaderTitle,
GUnit[] rowHeaderUnitList,
String columnHeaderTitle,
GUnit[] columnHeaderUnitList,
String dataTitle,
GUnit[] dataUnitList)
Constructor.
|
GTable2D(String widgetId,
int numberOfRows,
int numberOfColums,
String rowHeaderTitle,
GUnit[] rowHeaderUnitList,
String columnHeaderTitle,
GUnit[] columnHeaderUnitList,
String dataTitle,
GUnit[] dataUnitList,
Double rowHeaderDefaultValue,
Double columnHeaderDefaultValue,
Double dataDefaultValue)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
after(GEvent e)
Called after the event is processed.
|
void |
before(GEvent e)
Called before the event is processed.
|
void |
clear()
Clear the table contents and units.
|
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.
|
GTable |
getGTable()
Get the GTable.
|
GComponent |
getSubComponent(int position)
Gets the subcomponent occupying the position defined by position.
|
void |
read()
Implementaion of the routines that allow the component to be loaded from a configuration file.
|
void |
setColumnWidth(int columnIndex,
Integer minWidth,
Integer maxWidth,
Integer preferredWidth)
Set the minimum, maximum and preferred with of a column.
|
void |
setCommentInConfigFile(String comment)
Sets the comment to be set in the configuration file.
|
void |
setCurrentRowsColumns(Integer rowNumber,
Integer columnNumber)
Set the current number of rows and columns.
|
protected void |
setDefaultConstraints()
set the defaults constraints
|
void |
setDefaultValues(Double rowHeaderDefaultValue,
Double columnHeaderDefaultValue,
Double dataDefaultValue)
Set the table default values for the row header, the column header and the data.
|
void |
setGlobalColumnWidth(Integer minWidth,
Integer maxWidth,
Integer preferredWidth)
Set the minimum, maximum and preferred width of the columns of the table.
|
void |
setMinMaxRowsColumns(Integer minRows,
Integer maxRows,
Integer minColumns,
Integer maxColumns)
Set the minimum and maximum number of rows and columns allowed in the table2D list.
|
void |
setNameInConfigFile(String name)
Sets the name to be used when saving the component in the configuration file.
|
void |
setValues(double[][] data,
double[] columnHeaderValues,
double[] rowHeaderValues)
Set the values of the table.
|
void |
setWidgetId(String widgetId)
Sets the widget identifier of the component.
|
void |
setWidth(int width)
Set the table width, this will resize the columns so the total size of the table matches the
requested width.
|
void |
updateCondensedStatus(GCondensedStatus condensedStatus)
Update a condensed status object with the status of one or more components.
|
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, 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, isCopyPasteEvent, isEnabled, isForcedStatus, isModified, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, setBusyCursor, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setEnabled, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItempublic GTable2D(int numberOfRows,
int numberOfColums,
String rowHeaderTitle,
GUnit[] rowHeaderUnitList,
String columnHeaderTitle,
GUnit[] columnHeaderUnitList,
String dataTitle,
GUnit[] dataUnitList)
numberOfRows - number of rows.numberOfColums - number of columns.rowHeaderTitle - row header title.rowHeaderUnitList - row unit list.columnHeaderTitle - column header title.columnHeaderUnitList - column unit list.dataTitle - data title.dataUnitList - data unit list.public GTable2D(String widgetId, int numberOfRows, int numberOfColums, String rowHeaderTitle, GUnit[] rowHeaderUnitList, String columnHeaderTitle, GUnit[] columnHeaderUnitList, String dataTitle, GUnit[] dataUnitList)
widgetId - widget identifier.numberOfRows - number of rows.numberOfColums - number of columns.rowHeaderTitle - row header title.rowHeaderUnitList - row unit list.columnHeaderTitle - column header title.columnHeaderUnitList - column unit list.dataTitle - data title.dataUnitList - data unit list.public GTable2D(String widgetId, int numberOfRows, int numberOfColums, String rowHeaderTitle, GUnit[] rowHeaderUnitList, String columnHeaderTitle, GUnit[] columnHeaderUnitList, String dataTitle, GUnit[] dataUnitList, Double rowHeaderDefaultValue, Double columnHeaderDefaultValue, Double dataDefaultValue)
widgetId - widget identifier.numberOfRows - number of rows.numberOfColums - number of columns.rowHeaderTitle - row header title.rowHeaderUnitList - row unit list.columnHeaderTitle - column header title.columnHeaderUnitList - column unit list.dataTitle - data title.dataUnitList - data unit list.rowHeaderDefaultValue - default value for the row header cells.columnHeaderDefaultValue - default value for the column header cells.dataDefaultValue - default value for the data cells.public GTable2D(double[] absData,
String columnHeaderTitle,
GUnit[] columnHeaderUnitList,
double[] ordData,
String rowHeaderTitle,
GUnit[] rowHeaderUnitList,
double[][] data,
String dataTitle,
GUnit[] dataUnitList)
data - the matrix containing the data values.absData - the array with abscissa values.ordData - the array with ordinates values.rowHeaderTitle - row header title.rowHeaderUnitList - row unit list.columnHeaderTitle - column header title.columnHeaderUnitList - column unit list.dataTitle - data title.dataUnitList - data unit list.public GTable2D(String widgetId, double[] absData, String columnHeaderTitle, GUnit[] columnHeaderUnitList, double[] ordData, String rowHeaderTitle, GUnit[] rowHeaderUnitList, double[][] data, String dataTitle, GUnit[] dataUnitList)
widgetId - widget identifier.data - the matrix containing the data values.absData - the array with abscissa values.ordData - the array with ordinates values.rowHeaderTitle - row header title.rowHeaderUnitList - row unit list.columnHeaderTitle - column header title.columnHeaderUnitList - column unit list.dataTitle - data title.dataUnitList - data unit list.public void setWidgetId(String widgetId)
setWidgetId in class GComponentwidgetId - the widget identifier of the component.protected final void setDefaultConstraints()
GPanelsetDefaultConstraints in class GPanelpublic GTable getGTable()
public void display()
throws GException
display in interface GDisplayGException - in case of problem while reading the value from file.public void generic()
throws GException
generic in class GPanelGException - in case of problem.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
GReadWriteread in interface GReadWriteGException - in case of problem while reading the value from file.public void clear()
public void write()
throws GException
write in interface GReadWriteGException - in case of problem while writing the value to file.public void setCommentInConfigFile(String comment)
setCommentInConfigFile in class GComponentcomment - to be set in the configuration file.public void setNameInConfigFile(String name)
setNameInConfigFile in class GComponentname - to be used when saving the component in the configuration file.public void setWidth(int width)
throws GTable2DException
width - table width.GTable2DException - in case the resulting column widths are zero or negative.public void setGlobalColumnWidth(Integer minWidth, Integer maxWidth, Integer preferredWidth)
minWidth - value of the minimum allowed width, if null the minimum width of the columns
is not modified.maxWidth - value of the maximum allowed width, if null the maximum width of the columns
is not modified.preferredWidth - value of the preferred allowed width, if null the preferred width of
the columsn is not modified.public void setColumnWidth(int columnIndex,
Integer minWidth,
Integer maxWidth,
Integer preferredWidth)
columnIndex - index of the column.minWidth - value of the minimum allowed width, if null the minimum width of the column
is not modified.maxWidth - value of the maximum allowed width, if null the maximum width of the column
is not modified.preferredWidth - value of the preferred allowed width, if null the preferred width of
the column is not modified.public void updateCondensedStatus(GCondensedStatus condensedStatus)
condensedStatus.update(widget1, widget2, etc)updateCondensedStatus in interface GCondensedStatusInterfacecondensedStatus - the condensed status object to be updated.public void setMinMaxRowsColumns(Integer minRows, Integer maxRows, Integer minColumns, Integer maxColumns)
minRows - minimum number of rows, if null do not change the current value.maxRows - maximum number of rows, if null do not change the current value, if -1 do
limit the maximum number of rows.minColumns - minimum number of columns, if null do not change the current value.maxColumns - maximum number of columns, if null do not change the current value, if -1
do limit the maximum number of columns.public void setCurrentRowsColumns(Integer rowNumber, Integer columnNumber)
rowNumber - number of rows, if null do not change the current value.columnNumber - number of columns,if null do not change the current value.public void setValues(double[][] data,
double[] columnHeaderValues,
double[] rowHeaderValues)
throws GArithmeticException
data - data values.columnHeaderValues - column header values.rowHeaderValues - row header values.GArithmeticException - if any of the data, column header or row header values is NaN.public void setDefaultValues(Double rowHeaderDefaultValue, Double columnHeaderDefaultValue, Double dataDefaultValue) throws GArithmeticException
rowHeaderDefaultValue - the default value for the row header.columnHeaderDefaultValue - the default value for the column header.dataDefaultValue - the default value for the data table.GArithmeticException - if rowHeaderDefaultValue, columnHeaderDefaultValue or
dataDefaultValue values is NaN.public GComponent getSubComponent(int position) throws GComponentException
getSubComponent in class GComponentposition - position of the requested component.GComponentException - in case the position argument is invalid.Copyright © 2024. All rights reserved.