Interface TableTilePlex

All Superinterfaces:
TableObject
All Known Implementing Classes:
TableTilePlexImpl

public interface TableTilePlex extends TableObject
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
  • 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 underlying table objects are not duplicated.
      Returns:
      The new tileplex created by the cloning operation.
    • getEmpty

      boolean getEmpty()
      True if the tileplex is empty.
    • getValid

      boolean getValid()
      True if 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 a table object 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 to getObjects control which interpretation is desired. If it is not possible to interpret the tileplex this way, no table object store is returned. If several wantxxx parameters are true, the largest possible unit (sets, grids, rows or columns, or cells) will be returned. If wantRules is true, rules will be returned if the tileplex contains any, regardless of what else is returned. If wantRules is false and the tileplex contains rules, nothing will be returned.
      Parameters:
      wantSets - True if the caller will accept sets in the table object store returned.
      wantGrids - True if the caller will accept grids in the table object store returned.
      wantColumns - True if the caller will accept columns in the table object store returned.
      wantRows - True if the caller will accept rows in the table object store returned.
      wantCells - True if the caller will accept cells in the table object store returned.
      wantRules - True if the caller will accept rules in the table object store returned.
      contiguous - If true, the tileplex must cover one contiguous area in the table if anything is to be returned.
      preferColumns - When both wantColumns and wantRows are true, and the tileplex could be interpreted either way, return columns if preferColumns is true. Otherwise, return rows.
      Returns:
      A TableObjectStore containing the contents of the TableTilePlex interpreted according to the parameters to getObjects.
    • getPasteRectangle

      TableRectangle getPasteRectangle()
      If the tileplex consists of a single rectangle and no rules, this rectangle is returned. Otherwise, a null pointer is returned. A tileplex that contains only a single rectangle is suitable for pasting somewhere using the TableRectangle.copyRectangle method.
    • pasteType

      short pasteType(TableObject targetObject)
      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 any table object so long as it is within a grid.
      Returns:
      A TableObject.Type value indicating the content that would be replaced if this tileplex were pasted to the table object indicated by targetObject. 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

      void addObject(TableObject theObject) throws TableException
      Adds a table object 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

      void addRectangle(TableRectangle theRectangle) throws TableException
      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

      TableRectangle rectangle(int rectindex)
      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 null pointer is returned
    • clear

      void clear()
      Clears the tileplex by removing all rectangles and rules that the tileplex contains.
    • isSelected

      boolean isSelected(TableObject theObject)
      Returns true if the tileplex selects the specified table object (that is, if one of the rectangles in the tileplex contains the entire rectangle defined by the table object).
      Parameters:
      theObject - The set, grid, row, column, or cell that may or may not be selected by this tileplex
      Returns:
      True if the TableTilePlex selects the specified table object.
    • deleteFromDocument

      void deleteFromDocument() throws TableException
      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