Package com.arbortext.epic.table
Interface TableGrid
- All Superinterfaces:
TableObject
- All Known Implementing Classes:
TableGridImpl
Represents a table grid which is a rectangular array of cells. All rows and
all columns are the same length.
- Since:
- Epic 4.3
-
Field Summary
Fields inherited from interface com.arbortext.epic.table.TableObject
ABOVE, BELOW, EXAMINE_ALL_COLSPECS, EXAMINE_TFOOT_COLSPECS, EXAMINE_TGROUP_COLSPECS, EXAMINE_THEAD_COLSPECS, HORIZONTAL, INVALID_TYPE, LEFT, RIGHT, TABLE_CELL, TABLE_COLUMN, TABLE_GRID, TABLE_OBJECT_STORE, TABLE_ROW, TABLE_RULE, TABLE_SET, TABLE_TILEPLEX, VERTICAL -
Method Summary
Modifier and TypeMethodDescriptionMethod overload which omits the last 2 parameters.addColumn(TableColumn refColumn) Method overload which omits the last parameter.addColumn(TableColumn refColumn, boolean addBefore) Add an empty column to the grid.addRow()Method overload which omits the last 2 parameters.Method overload which omits the last parameter.Add an empty row to the grid.cell(int colIndex, int rowIndex) Returns the cell at the specified coordinates.column(int columnIndex) Returns the column given its index.voiddeleteColumn(TableColumn column) Delete a column from the grid.voidDelete a row from the grid.getCells()ATableObjectStorecontaining all the cells in the grid.intThe number of columns in the gridATableObjectStorecontaining all the columns in the grid.The first cell in the grid in galley order.The grid above this one in the table set, if any.The grid below this one in the table set, if any.intgetIndex()The index of this table in theTableSetit is part of.The last cell in the grid in galley order.intThe number of rows in the gridgetRows()ATableObjectStorecontaining all the rows in the grid.getRules()ATableObjectStorecontaining all the rules in the grid sorted in row major order.hlineRuleList(int y, int startX, int endX) Returns a table object store containing all theTableRules in a specified horizontal line.voidinsertColumns(TableRectangle contents) Method overload which omits the last parameter.voidinsertColumns(TableRectangle contents, TableColumn refColumn) Insert one or more columns into the grid.voidinsertRows(TableRectangle contents) Method overload which omits the last parameter.voidinsertRows(TableRectangle contents, TableRow refRow) Insert one or more rows into the grid.row(int rowIndex) Returns a row given its index.rule(int startCol, int startRow, int endCol, int endRow) Returns the rule at a specified location in the grid.Splits the grid at the row indicated.vlineRuleList(int x, int startY, int endY) Returns a table object store containing all theTableRules in a specified vertical line.Methods inherited from interface com.arbortext.epic.table.TableObject
clearAttributes, deleteAttribute, deletePrivateColspecs, deleteSpanspecs, getAttribute, getDocument, getElement, getGrid, getModifiable, getSet, getTableModel, getToid, getType, minimizeAttributes, renameColspec, renameColumns, renameSpanspec, setAttribute
-
Method Details
-
cell
Returns the cell at the specified coordinates. The upper left cell is (1,1).- Parameters:
colIndex- The column of the cell.rowIndex- The row of the cell.- Returns:
- The cell or
nullif no such sell exists. - Throws:
TableException- INVALID_INDEX_ERR: Raised ifcolIndexandrowIndexdo not specify a cell in this grid.
-
rule
Returns the rule at a specified location in the grid. Rules are addressed using cell coordinates (with (1,1) being the upper left cell). For cell (m,n), (m,n) is actually the cell's upper left corner.- Parameters:
startCol- The starting column of the rule.startRow- The ending column of the rule. It must bestartCol(for a vertical rule) orstartCol+ 1 (for a horizontal rule).endCol- The starting row of the rule.endRow- The ending row of the rule. It must bestartRow(for a horizontal rule) orstarRow+ 1 (for a vertical rule).- Returns:
- The rule at the indicated location.
- Throws:
TableException- INVALID_INDEX_ERR: Raised if the indexes given do not specify a rule in this grid.
-
row
Returns a row given its index. The first row is row 1.- Parameters:
rowIndex- The index of the row.- Returns:
- The indicated
TableRow - Throws:
TableException- INVALID_INDEX_ERR: Raised ifrowIndexdoes not specify a row in this grid.
-
column
Returns the column given its index. The first column is column 1.- Parameters:
columnIndex- The index of the column.- Returns:
- The indicated
TableColumn. - Throws:
TableException- INVALID_INDEX_ERR: Raised ifcolumnIndexdoes not specify a column in this grid.
-
getIndex
int getIndex()The index of this table in theTableSetit is part of. -
getColumnCount
int getColumnCount()The number of columns in the grid -
getRowCount
int getRowCount()The number of rows in the grid -
getRows
TableObjectStore getRows()ATableObjectStorecontaining all the rows in the grid. This is a static store; if rows are added or removed it is not updated. -
getColumns
TableObjectStore getColumns()ATableObjectStorecontaining all the columns in the grid. This is a static store; if columns are added or removed it is not updated. -
getCells
TableObjectStore getCells()ATableObjectStorecontaining all the cells in the grid. This is a static store; if cells are added to or removed from the grid (by adding or deleting rows or columns) it is not updated. -
insertRows
Insert one or more rows into the grid.- Parameters:
contents- The contents of this rectangle is copied into the new rows. This rectangle must be as wide as the grid. Its height determines the number of rows inserted.refRow- The row before which the new rows are to be inserted. Ifnullthe new rows are inserted as the last rows in the grid.- Throws:
TableException- INVALID_PARAMETER_ERR: Raised if therefRowis not in this grid or if the table model doesn't allow rows to be inserted.
-
insertRows
Method overload which omits the last parameter.- Throws:
TableException
-
insertColumns
Insert one or more columns into the grid.- Parameters:
contents- The contents of this rectangle is copied into the new columns. This rectangle must be as high as the grid. Its width determines the number of columns inserted.refColumn- The column before which the new columns are to be inserted. Ifnullthe new columns are inserted as the last columns in the grid.- Throws:
TableException- INVALID_PARAMETER_ERR: Raised if therefColumnis not in this grid or if the table model doesn't allow a column to be inserted.
-
insertColumns
Method overload which omits the last parameter.- Throws:
TableException
-
addRow
Add an empty row to the grid.- Parameters:
refRow- The row before or after which the new row is to be inserted. Ifnullthe new row is inserted as the last row in the grid. Some attributes of the new row are set fromrefRow.addBefore- If omitted or false, the new row is added afterrefRow, if true it is added before it.- Returns:
- The
TableRowthat was inserted. - Throws:
TableException- INVALID_PARAMETER_ERR: Raised if therefRowis not in this grid or if the table model doesn't allow rows to be inserted.
-
addRow
Method overload which omits the last parameter.- Throws:
TableException
-
addRow
Method overload which omits the last 2 parameters.- Throws:
TableException
-
addColumn
Add an empty column to the grid.- Parameters:
refColumn- The column before or after which the new column is to be inserted. Ifnullthe new column is inserted as the last column in the grid. Some attributes of the new column are set fromrefColumn.addBefore- If omitted or false, the new column is added afterrefColumn, if true it is added before it.- Returns:
- The
TableColumnthat was inserted. - Throws:
TableException- INVALID_PARAMETER_ERR: Raised if therefColumnis not in this grid or if the table model doesn't allow columns to be inserted.
-
addColumn
Method overload which omits the last parameter.- Throws:
TableException
-
addColumn
Method overload which omits the last 2 parameters.- Throws:
TableException
-
deleteRow
Delete a row from the grid.- Parameters:
row- The row to be deleted.- Throws:
TableException- INVALID_PARAMETER_ERR: Raised if therowis not in this grid or if the table model does not allow it to be deleted.
-
deleteColumn
Delete a column from the grid.- Parameters:
column- The column to be deleted.- Throws:
TableException- INVALID_PARAMETER_ERR: Raised if thecolumnis not in this grid or if the table model does not allow it to be deleted.
-
getFirstGalleyCell
TableCell getFirstGalleyCell()The first cell in the grid in galley order. -
getLastGalleyCell
TableCell getLastGalleyCell()The last cell in the grid in galley order. -
getGridAbove
TableGrid getGridAbove()The grid above this one in the table set, if any. -
getGridBelow
TableGrid getGridBelow()The grid below this one in the table set, if any. -
getRules
TableObjectStore getRules()ATableObjectStorecontaining all the rules in the grid sorted in row major order. -
split
Splits the grid at the row indicated. That row will be the top row in a new grid inserted after this one.- Parameters:
topRow- The row that should be the top row in the new grid.- Returns:
- The new grid that was inserted after this grid.
- Throws:
TableException- OPERATION_FAILED_ERR: Raised if the grid can not be split because the table model does not allow multiple grids or one of the resulting grids would be invalid in some way.
-
hlineRuleList
Returns a table object store containing all theTableRules in a specified horizontal line.- Parameters:
y- The vertical coordinate of the horizontal line to be returnedstartX- The horizontal coordinate of the left end of the rules to be returned.endX- The horizontal coordinate of the right end of the rules to be returned- Returns:
- A store containing all the rules at vertical coordinate x
between
startXandendX.
-
vlineRuleList
Returns a table object store containing all theTableRules in a specified vertical line.- Parameters:
x- The horizontal coordinate of the vertical line to be returnedstartY- The vertical coordinate of the top end of the rules to be returned.endY- The vertical coordinate of the bottom end of the rules to be returned- Returns:
- A store containing all the rules at horizontal coordinate x
between
startYandendY.
-