- All Known Subinterfaces:
HHeaderTable
,HHeaderTable
,HVHeadersTable
,HVHeadersTable
,Table
,VHeaderTable
,VHeaderTable
public interface Table
This interface represents a table in the data manager sidebar.
- Since:
- Omix 1.8.5
- Author:
- Dr. Peter Droste
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Table.SelectedCell
This class represents a selected cell in the tablestatic class
Table.SelectedColumn
This class represents a selected cell in the tablestatic class
Table.SelectedContent
This class represents a selected content (cell, row or column) in the tablestatic class
Table.SelectedRow
This class represents a selected cell in the tablestatic class
Table.SelectedTable
This class represents the state where the entire table is selected -
Method Summary
Modifier and Type Method Description int
columns()
returns the number of table columns.List<@IsVarType Object>
getColumn(int column)
returns the content of a column accessed by index if available, otherwise null.List<@IsVarType Object>
getColumn(int column, int startRow, int lastRow)
returns the content of a column accessed by index if available, otherwise null.String
getIdentifier()
The identifier of the table.List<@IsVarType Object>
getRow(int row)
returns the content of a row accessed by index if available, otherwise null.List<@IsVarType Object>
getRow(int row, int startColumn, int lastColumn)
returns the content of a row accessed by index if available, otherwise null.List<Table.SelectedContent>
getSelection()
Returns the current selection in the table.String
getSourceIdentifier()
The identifier of the table's data source.@IsVarType Object
getValue(int row, int column)
returns the content of a cell accessed by column and row index if available, otherwise null.int
rows()
returns the number of table rows.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.
-
Method Details
-
getIdentifier
String getIdentifier()The identifier of the table. Each table has a unique identifier in a data source.- Returns:
- identifier
- See Also:
DataManager.getTable(String, String)
,DataManager.getTableIDs(String)
-
getSourceIdentifier
String getSourceIdentifier()The identifier of the table's data source. Each data source has a unique identifier in the data manager.- Returns:
- identifier
- See Also:
DataManager.getTable(String, String)
,DataManager.getTableIDs(String)
-
rows
int rows()returns the number of table rows.- Returns:
- rows
-
columns
int columns()returns the number of table columns.- Returns:
- rows
-
getValue
returns the content of a cell accessed by column and row index if available, otherwise null.- Parameters:
row
- indexcolumn
- index- Returns:
- cell content
-
getColumn
returns the content of a column accessed by index if available, otherwise null.- Parameters:
column
- index- Returns:
- column content as list
-
getRow
returns the content of a row accessed by index if available, otherwise null.- Parameters:
row
- index- Returns:
- row content as list
-
getColumn
returns the content of a column accessed by index if available, otherwise null.- Parameters:
column
- indexstartRow
-lastRow
-- Returns:
- column content as list
-
getRow
returns the content of a row accessed by index if available, otherwise null.- Parameters:
row
- indexstartColumn
-lastColumn
-- Returns:
- row content as list
-
transposed
Table transposed()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.getSelection()
will always return an empty list.- Returns:
- transposed table
-
toHorizontalHeaderTable
HHeaderTable toHorizontalHeaderTable()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.
getSelection()
will always return an empty list.- Returns:
- HHeaderTable
- If the original table is already a
-
toVerticalHeaderTable
VHeaderTable toVerticalHeaderTable()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.
getSelection()
will always return an empty list.- Returns:
- HHeaderTable
- If the original table is already a
-
toHVHeadersTable
HVHeadersTable toHVHeadersTable()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.
getSelection()
will always return an empty list.- Returns:
- HVHeadersTable
- If the original table is already a
-
toPlainTable
Table toPlainTable()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.
getSelection()
will always return an empty list.- Returns:
- plain table
-
getSelection
List<Table.SelectedContent> getSelection()Returns the current selection in the table.- Returns:
- list of
Table.SelectedContent
objects.
-