Package com.arbortext.epic.table
Interface TableCell
- All Superinterfaces:
TableObject
- All Known Implementing Classes:
TableCellImpl
Represents a single cell in a table. May be part of a spanned
TableMulticell, but represents a single cell in that
multicell if so.- 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 TypeMethodDescriptionvoidDeletes the font PI from the table cell if it has one.findFontPI(boolean create) Returns anElementnode for the font PI in the cell, creating it if asked to.The cell above this cell.The cell below this cell.The cell to the left of this cell.The cell to the right of this cell.The column that the cell is part of.The contents of the cell.TheTableMulticellthat this cell is part of.booleanTrueif the cell is on the bottom edge of a multicell.booleanTrueif the cell is on the left edge of a multicell.booleanTrueif the cell is on the right edge of a multicell.booleanTrueif the cell in on the top edge of a multicell.getRow()The row that the cell is part of.TheTableRuleon the top edge of the cell.TheTableRuleon the bottom edge of the cell.TheTableRuleon the left edge of the cell.TheTableRuleon the right edge of the cell.booleanTrueif this cell is in a multicell and is not the spanning cell in the multicellbooleanTrueif this cell is the spanning cell in a multicellbooleaninSameColumn(TableCell otherCell) Returns true if this cell is in the same column in the same grid as the indicated cell.booleanReturnstrueif this cell is in the same row in the same grid as the indicated cell.voidMarks the cell as being non-sparse.booleanisAdjacent(TableCell otherCell) Returnstrueif the indicated cell is a neighbor.nextGalleyCell(boolean wrap) Returns the next cell in galley order, wrapping around from the last to the first if requested.previousGalleyCell(boolean wrap) Returns the previous cell in galley order, wrapping around from the first to the last if requested.Returns aTableRectanglewith this cell on one corner and the cell given as the parameter on the other corner.Creates a span of a rectangle of cells.voidunspan()Unspans the cell, which must be in a multicell.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
-
getRuleAbove
TableRule getRuleAbove()TheTableRuleon the top edge of the cell. -
getRuleRight
TableRule getRuleRight()TheTableRuleon the right edge of the cell. -
getRuleBelow
TableRule getRuleBelow()TheTableRuleon the bottom edge of the cell. -
getRuleLeft
TableRule getRuleLeft()TheTableRuleon the left edge of the cell. -
getColumn
TableColumn getColumn()The column that the cell is part of. -
getRow
TableRow getRow()The row that the cell is part of. -
inSameColumn
Returns true if this cell is in the same column in the same grid as the indicated cell.- Parameters:
otherCell- The other cell that may be in the same column.- Returns:
Trueif the two cells are in the same column.
-
inSameRow
Returnstrueif this cell is in the same row in the same grid as the indicated cell.- Parameters:
otherCell- The other cell that may be in the same row.- Returns:
Trueif the two cells are in the same row.
-
isAdjacent
Returnstrueif the indicated cell is a neighbor.- Parameters:
otherCell- The cell that might be a neighbor.- Returns:
Trueif the other cell is a neighbor.
-
getMulticell
TableMulticell getMulticell()TheTableMulticellthat this cell is part of. Will benullif not part of a multicell. -
getCellAbove
TableCell getCellAbove()The cell above this cell. -
getCellRight
TableCell getCellRight()The cell to the right of this cell. -
getCellBelow
TableCell getCellBelow()The cell below this cell. -
getCellLeft
TableCell getCellLeft()The cell to the left of this cell. -
span
Creates a span of a rectangle of cells. This cell is on one corner and the cell given as a parameter is on the other corner.- Parameters:
otherCorner- The cell on the other corner. Either cell may be the upper left or lower right.- Returns:
- The multicell created to represent the span.
- Throws:
TableException- INVALID_SPAN_ERR: Raised if a span can't be created from the two corner cells
-
unspan
Unspans the cell, which must be in a multicell.- Throws:
TableException- INVALID_SPAN_ERR: Raised if the cell is not in a multicell.
-
getContents
Range getContents()The contents of the cell. TheRangereturned contains the cell's contents. If the cell has no contents, a collapsedRangeis returned. The contents of the cell can be changed by changing the contents of theRange. -
rectangle
Returns aTableRectanglewith this cell on one corner and the cell given as the parameter on the other corner. Either cell may be the upper left cell. Both must be in the same grid.- Parameters:
otherCorner- TheTableCellthat defines the other corner of the rectangle.- Returns:
- A rectangle with the specified corner cells.
- Throws:
TableException- INVALID_PARAMETER_ERR: Raised if the two cells are not in the same grid.
-
findFontPI
Returns anElementnode for the font PI in the cell, creating it if asked to.- Parameters:
create- Iftrue, then the font PI is created if it doesn't exist and the table model allows the creation.- Returns:
- The font PI.
Nullif none and create not specified. - Throws:
TableException- OPERATION_FAILED_ERR: Raised if an attempt to create font PI fails.
-
deleteFontPI
Deletes the font PI from the table cell if it has one. Otherwise does nothing.- Throws:
TableException- OPERATION_FAILED_ERR: Raised if the font PI can't be deleted.
-
instantiate
void instantiate()Marks the cell as being non-sparse. Some table models allow sparse markup, where some cells of a table are not explicitly described in markup. PTC Arbortext Editor and PTC Arbortext Publishing Engine add generated cell markup to the document when reading a sparse table so that there is markup underlying every table cell. When a document containing a table is saved, this generated markup is deleted, unless the cell has acquired content, attributes, or some other reason for existence. This function allows the user to require that the markup corresponding to a cell NOT be discarded, even if it is generated markup. -
nextGalleyCell
Returns the next cell in galley order, wrapping around from the last to the first if requested.- Parameters:
wrap- Iftrue, wrap around from the last cell to the first.- Returns:
- The next cell in galley order, if any.
-
previousGalleyCell
Returns the previous cell in galley order, wrapping around from the first to the last if requested.- Parameters:
wrap- Iftrue, wrap around from the first cell to the last.- Returns:
- The previous cell in galley order, if any.
-
getOnTopMulticellEdge
boolean getOnTopMulticellEdge()Trueif the cell in on the top edge of a multicell. -
getOnRightMulticellEdge
boolean getOnRightMulticellEdge()Trueif the cell is on the right edge of a multicell. -
getOnBottomMulticellEdge
boolean getOnBottomMulticellEdge()Trueif the cell is on the bottom edge of a multicell. -
getOnLeftMulticellEdge
boolean getOnLeftMulticellEdge()Trueif the cell is on the left edge of a multicell. -
getSpanned
boolean getSpanned()Trueif this cell is in a multicell and is not the spanning cell in the multicell -
getSpanning
boolean getSpanning()Trueif this cell is the spanning cell in a multicell
-