- All Superinterfaces:
Table
- All Known Subinterfaces:
HHeaderTable
,HVHeadersTable
,VHeaderTable
public interface Table extends Table
This interface represents a table in the data manager sidebar
available for mutation within plug-ins.
- Since:
- Omix 1.8.5
- Author:
- Dr. Peter Droste
-
Nested Class Summary
Nested classes/interfaces inherited from interface omix.lang.data.Table
Table.SelectedCell, Table.SelectedColumn, Table.SelectedContent, Table.SelectedRow, Table.SelectedTable
-
Method Summary
Modifier and Type Method Description void
addDataMatrixChangeListener(DataMatrixChangeListener listener)
boolean
canGet()
Can theTable.getValue(int, int)
method be used?boolean
canSet()
Can thesetValue(int, int, Object)
method be used?<T extends DataMatrixInterface>
TgetOriginalDataMatrix(Class<T> dataMatrixInterface)
Returns the original DataMatrixInterface instance behind this table if the given class matches to the data matrixes type, otherwise null.boolean
isModified()
Has the table been modified?void
removeDataMatrixChangeListener(DataMatrixChangeListener listener)
void
setSelection(List<Table.SelectedContent> selection)
Set the selection of the table.void
setValue(int row, int column, Object value)
Sets the table content at the given position.HHeaderTable
toHorizontalHeaderTable()
Returns a table with a horizontal header.HVHeadersTable
toHVHeadersTable()
Returns a table with horizontal and vertical header.Table
toPlainTable()
Returns a table without headers.VHeaderTable
toVerticalHeaderTable()
Returns a table with a vertical header.Table
transposed()
Returns the transposed table matrix of the current table.Methods inherited from interface omix.lang.data.Table
columns, getColumn, getColumn, getIdentifier, getRow, getRow, getSelection, getSourceIdentifier, getValue, rows
-
Method Details
-
setValue
Sets the table content at the given position.- Parameters:
row
-column
-value
-
-
transposed
Table transposed()Description copied from interface:Table
Returns the transposed table matrix of the current table. The returned table is a new object which does no longer represent the actual table representation in the data manager sidebar, i.e.Table.getSelection()
will always return an empty list.- Specified by:
transposed
in interfaceTable
- Returns:
- transposed table
- See Also:
Table.transposed()
-
toHVHeadersTable
HVHeadersTable toHVHeadersTable()Description copied from interface:Table
Returns a table with horizontal and vertical header.- If the original table is already a
HVHeadersTable
, the table itself is returned. - If the table is a plain table the first data row is used as horizontal header and the first column as vertical header, i.e. all original rows r and columns c must now be accessed by decreased indexes [r-1, c-1]. The cell [0,0] of the original table is skipped at all.
- If the table is a
HHeaderTable
the first column is used as vertical header, i.e. all original columns c must now be accessed by a decreased index c-1. The first column label of the original table is skipped at all.
Table.getSelection()
will always return an empty list.- Specified by:
toHVHeadersTable
in interfaceTable
- Returns:
- HVHeadersTable
- See Also:
Table.toHVHeadersTable()
- If the original table is already a
-
toHorizontalHeaderTable
HHeaderTable toHorizontalHeaderTable()Description copied from interface:Table
Returns a table with a horizontal header.- If the original table is already a
HHeaderTable
, the table itself is returned. - If the table is a plain table the first data row is used as horizontal header, i.e. all original rows r must now be accessed by a decreased index r-1.
- If the table is a
VHeaderTable
the vertical header is inserted as first data column, i.e. all original columns c must now be accessed by an increased index c+1. The first data row is used as horizontal header, i.e. all original rows r must now be accessed by a decreased index r-1. - If the table is a
HVHeadersTable
the vertical header is inserted as first data column, i.e. all original columns c must now be accessed by an increased index c+1.
Table.getSelection()
will always return an empty list.- Specified by:
toHorizontalHeaderTable
in interfaceTable
- Returns:
- HHeaderTable
- See Also:
Table.toHorizontalHeaderTable()
- If the original table is already a
-
toVerticalHeaderTable
VHeaderTable toVerticalHeaderTable()Description copied from interface:Table
Returns a table with a vertical header.- If the original table is already a
VHeaderTable
, the table itself is returned. - If the table is a plain table the first data column is used as vertical header, i.e. all original columns c must now be accessed by a decreased index c-1.
- If the table is a
HVHeadersTable
the horizontal header is inserted as first data row, i.e. all original rows r must now be accessed by an increased index r+1. - If the table is a
HHeaderTable
the horizontal header is inserted as first data row, i.e. all original rows r must now be accessed by an increased index r+1. The first data column is used as vertical header, i.e. all original columns c must now be accessed by a decreased index c-1.
Table.getSelection()
will always return an empty list.- Specified by:
toVerticalHeaderTable
in interfaceTable
- Returns:
- HHeaderTable
- See Also:
Table.toVerticalHeaderTable()
- If the original table is already a
-
toPlainTable
Table toPlainTable()Description copied from interface:Table
Returns a table without headers.- If the original table is already plain, the table itself is returned.
- If the table is a
HHeaderTable
the horizontal header is inserted as first data row, i.e. all original rows r must now be accessed by an increased index r+1. - If the table is a
VHeaderTable
the vertical header is inserted as first data column, i.e. all original columns c must now be accessed by an increased index c+1. - If the table is a
HVHeadersTable
, additionally, the vertically header is inserted as first data column, i.e. all original columns c must now be accessed by an increased index c+1.
Table.getSelection()
will always return an empty list.- Specified by:
toPlainTable
in interfaceTable
- Returns:
- plain table
- See Also:
Table.toPlainTable()
-
canGet
boolean canGet()Can theTable.getValue(int, int)
method be used?- Returns:
- can get
-
canSet
boolean canSet()Can thesetValue(int, int, Object)
method be used?- Returns:
- can set
-
isModified
boolean isModified()Has the table been modified?- Returns:
- modified
-
getOriginalDataMatrix
Returns the original DataMatrixInterface instance behind this table if the given class matches to the data matrixes type, otherwise null.- Parameters:
dataMatrixInterface
- type of the data matrix instance.- Returns:
- instance of DataMatrixInterface
- Since:
- Omix 1.9.0
-
setSelection
Set the selection of the table. This method does not set the current selection in the table editor widget!- Parameters:
selection
- list of selection elements
-
addDataMatrixChangeListener
- Parameters:
listener
-- Since:
- Omix 1.8.6
-
removeDataMatrixChangeListener
- Parameters:
listener
-- Since:
- Omix 1.8.6
-