Package com.arbortext.epic.table
Interface TableTilePlex
- All Superinterfaces:
TableObject
- All Known Implementing Classes:
TableTilePlexImpl
A
TableTilePlex is used to represent a table selection. It may
contain either a collection of TableRectangle objects or a
collection of TableRule objects or both. All of the
contents of any one tileplex must be in the same document and must be
managed by the same table model.- 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 TypeMethodDescriptionvoidaddObject(TableObject theObject) Adds atableobject to the tileplex.voidaddRectangle(TableRectangle theRectangle) Adds a rectangle to the tileplex.voidclear()Clears the tileplex by removing all rectangles and rules that the tileplex contains.Makes a copy of the specified tileplex.voidDeletes the contents of this tileplex from the document if possible.booleangetEmpty()Trueif the tileplex is empty.getObjects(boolean wantSets, boolean wantGrids, boolean wantColumns, boolean wantRows, boolean wantCells, boolean wantRules, boolean contiguous, boolean preferColumns) Returns atableobject store containing the contents of the tileplex interpreted according to the parameters.If the tileplex consists of a single rectangle and no rules, this rectangle is returned.booleangetValid()Trueif the tileplex is valid.booleanisSelected(TableObject theObject) Returnstrueif the tileplex selects the specifiedtableobject (that is, if one of the rectangles in the tileplex contains the entire rectangle defined by thetableobject).shortpasteType(TableObject targetObject) Content that would be replaced if the tileplex were pasted to the specified location.rectangle(int rectindex) Returns the rectangle from the tileplex corresponding to the index given.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
-
clonePlex
TableTilePlex clonePlex()Makes a copy of the specified tileplex. The tileplex and all of the rectangles it contains are duplicated, but the underlyingtableobjects are not duplicated.- Returns:
- The new tileplex created by the cloning operation.
-
getEmpty
boolean getEmpty()Trueif the tileplex is empty. -
getValid
boolean getValid()Trueif the tileplex is valid. It is valid if all the rectangles in the tileplex are valid. -
getObjects
TableObjectStore getObjects(boolean wantSets, boolean wantGrids, boolean wantColumns, boolean wantRows, boolean wantCells, boolean wantRules, boolean contiguous, boolean preferColumns) Returns atableobject store containing the contents of the tileplex interpreted according to the parameters. A given tileplex can often be interpreted in many ways. For example, as a set of grids, a set of rows, a set of columns, or a set of cells. The parameters togetObjectscontrol which interpretation is desired. If it is not possible to interpret the tileplex this way, notableobject store is returned. If severalwantxxx parameters are true, the largest possible unit (sets, grids, rows or columns, or cells) will be returned. IfwantRulesistrue, rules will be returned if the tileplex contains any, regardless of what else is returned. IfwantRulesis false and the tileplex contains rules, nothing will be returned.- Parameters:
wantSets-Trueif the caller will accept sets in thetableobject store returned.wantGrids-Trueif the caller will accept grids in thetableobject store returned.wantColumns-Trueif the caller will accept columns in thetableobject store returned.wantRows-Trueif the caller will accept rows in thetableobject store returned.wantCells-Trueif the caller will accept cells in thetableobject store returned.wantRules-Trueif the caller will accept rules in thetableobject store returned.contiguous- Iftrue, the tileplex must cover one contiguous area in the table if anything is to be returned.preferColumns- When bothwantColumnsandwantRowsaretrue, and the tileplex could be interpreted either way, return columns ifpreferColumnsistrue. Otherwise, return rows.- Returns:
- A
TableObjectStorecontaining the contents of theTableTilePlexinterpreted according to the parameters togetObjects.
-
getPasteRectangle
TableRectangle getPasteRectangle()If the tileplex consists of a single rectangle and no rules, this rectangle is returned. Otherwise, anullpointer is returned. A tileplex that contains only a single rectangle is suitable for pasting somewhere using theTableRectangle.copyRectanglemethod. -
pasteType
Content that would be replaced if the tileplex were pasted to the specified location.- Parameters:
targetObject- The proposed target of the paste operation. It may be anytableobject so long as it is within a grid.- Returns:
- A
TableObject.Typevalue indicating the content that would be replaced if this tileplex were pasted to thetableobject indicated bytargetObject. If the tileplex does not contain a single rectangle, then INVALID_TYPE is returned. Otherwise TABLE_GRID, TABLE_ROW, TABLE_COLUMN, or TABLE_CELL is returned if pasting the rectangle to the indicated location would replace a grid, one or more rows, one or more columns, or a collection of cells respectively.
-
addObject
Adds atableobject to the tileplex.- Parameters:
theObject- The object to be added to the tileplex. It may be a set, grid, row, column, cell, or rule. If possible, the object will be added to an existing rectangle in the tileplex. If not possible, a new rectangle will be added to the tileplex. (Unless a rule is being added.)- Throws:
TableException- INVALID_PARAMETER_ERR: Raised if the object can not be added to the tileplex because it is inconsistent with the existing contents of the tileplex.
-
addRectangle
Adds a rectangle to the tileplex. It will be consolidated with an existing rectangle if possible.- Parameters:
theRectangle- The rectangle to be added to the tileplex.- Throws:
TableException- INVALID_PARAMETER_ERR: Raised if the rectangle can not be added to the tileplex because it is inconsistent with the existing contents of the tileplex.
-
rectangle
Returns the rectangle from the tileplex corresponding to the index given. The rectangles are indexed in no particular order.- Parameters:
rectindex- The index of the rectangle to return- Returns:
- The indicated rectangle. If no such rectangle exists, a
nullpointer is returned
-
clear
void clear()Clears the tileplex by removing all rectangles and rules that the tileplex contains. -
isSelected
Returnstrueif the tileplex selects the specifiedtableobject (that is, if one of the rectangles in the tileplex contains the entire rectangle defined by thetableobject).- Parameters:
theObject- The set, grid, row, column, or cell that may or may not be selected by this tileplex- Returns:
Trueif theTableTilePlexselects the specifiedtableobject.
-
deleteFromDocument
Deletes the contents of this tileplex from the document if possible.- Throws:
TableException- OPERATION_FAILED_ERR: Raised if the contents of the tileplex can not be deleted from the document
-