Class RowBandPasteAction

java.lang.Object
org.eclipse.birt.report.model.api.RowBandPasteAction

public class RowBandPasteAction extends Object
Does table row paste operation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected RowBandAdapter
    Adapter to work on the grid/table columns.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a RowBandAdapter for the paste action.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected int
    adjustPosition(int destIndex, int count)
    Adjusts position of destination index.
    protected boolean
    canPaste(org.eclipse.birt.report.model.elements.TableRow clonedRow, RowOperationParameters parameters)
    Checks whether the paste operation can be done with the given copied column band data, the column index and the operation flag.
    protected int
    Returns column count in the given row.
    protected int
    computeColumnCount(org.eclipse.birt.report.model.elements.TableRow row)
    Returns column count in the given row.
    protected boolean
    Checks every cell contains row span or not.
    protected IDesignElement
    copyRow(RowHandle rowHandle)
    Copies a row with the given row handle.
    protected org.eclipse.birt.report.model.elements.TableRow
    copyRow(org.eclipse.birt.report.model.elements.TableRow row)
    Copies a row with the given table row
    protected void
    doPaste(org.eclipse.birt.report.model.elements.TableRow copiedRow, RowOperationParameters parameters)
    Pastes the given table row to target row with the given slot id , group id and destination index.
    protected int
    getPositionOfRow(org.eclipse.birt.report.model.elements.TableRow row)
    Gets position of table row.
    protected SlotHandle
    Get slot handle in table or group according to the slot id and group id.
    protected boolean
    Checks whether copied row handle is a rectangle.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • adapter

      protected RowBandAdapter adapter
      Adapter to work on the grid/table columns.
  • Constructor Details

    • RowBandPasteAction

      public RowBandPasteAction(RowBandAdapter adapter)
      Constructs a RowBandAdapter for the paste action.
      Parameters:
      adapter - the adapter to work on tables and grids.
  • Method Details

    • canPaste

      protected boolean canPaste(org.eclipse.birt.report.model.elements.TableRow clonedRow, RowOperationParameters parameters)
      Checks whether the paste operation can be done with the given copied column band data, the column index and the operation flag.
      Parameters:
      clonedRow - the copied table row.
      parameters - parameters needed by insert operation.
      Returns:
      true indicates the paste operation can be done. Otherwise false.
    • doPaste

      protected void doPaste(org.eclipse.birt.report.model.elements.TableRow copiedRow, RowOperationParameters parameters) throws SemanticException
      Pastes the given table row to target row with the given slot id , group id and destination index.
      Parameters:
      copiedRow - the copied table row.
      parameters - parameters needed by insert operation.
      Throws:
      SemanticException
    • copyRow

      protected IDesignElement copyRow(RowHandle rowHandle)
      Copies a row with the given row handle.
      Parameters:
      rowHandle - handle of row
      Returns:
      a new row instance
    • copyRow

      protected org.eclipse.birt.report.model.elements.TableRow copyRow(org.eclipse.birt.report.model.elements.TableRow row)
      Copies a row with the given table row
      Parameters:
      row - table row
      Returns:
      a new row instance
    • isRectangleArea

      protected boolean isRectangleArea(RowHandle rowHandle)
      Checks whether copied row handle is a rectangle.
      Parameters:
      rowHandle - handle of row
      Returns:
      true if the shape of integrated row handle is a rectangle, otherwise false.
    • containsRowSpan

      protected boolean containsRowSpan(RowHandle rowHandle)
      Checks every cell contains row span or not. If contains any row span , return false;Otherwise return true
      Parameters:
      rowHandle - handle of row.
      Returns:
      If contains any row span , return true;Otherwise return false
    • getPositionOfRow

      protected int getPositionOfRow(org.eclipse.birt.report.model.elements.TableRow row)
      Gets position of table row.
      Parameters:
      row - table row . can't be copied row, because copied row is not in tree.
      Returns:
      position of table row.
    • computeColumnCount

      protected int computeColumnCount(org.eclipse.birt.report.model.elements.TableRow row)
      Returns column count in the given row.
      Parameters:
      row - table row including copied row and row in design file.
      Returns:
      column count in the given row.
    • computeColumnCount

      protected int computeColumnCount(RowHandle rowHandle)
      Returns column count in the given row.
      Parameters:
      rowHandle - row handle
      Returns:
      column count in the given row.
    • getSlotHandle

      protected SlotHandle getSlotHandle(RowOperationParameters parameters)
      Get slot handle in table or group according to the slot id and group id.
      Parameters:
      parameters - parameters for getting slot container.
      Returns:
      if can be found, return SlotHandle.Otherwise return null.
    • adjustPosition

      protected int adjustPosition(int destIndex, int count)
      Adjusts position of destination index. The range is from zero to count-1.
      Parameters:
      destIndex - index of destination
      count - count of row.
      Returns:
      position after adjusting.