java.lang.Object
org.eclipse.birt.report.model.api.elements.table.LayoutRow

public class LayoutRow extends Object
Represents a row in table layout.
  • Method Details

    • getLayoutCell

      public LayoutCell getLayoutCell(int colId)
      Returns the cell with the given index.
      Parameters:
      colId - the 0-based column index
      Returns:
      the cell
    • getLayoutCell

      protected LayoutCell getLayoutCell(CellHandle cell)
      Returns the layout cell with the given cell element.
      Parameters:
      cell - the cell handle
      Returns:
      the layout cell
    • addCell

      protected void addCell(LayoutCell cell)
      Addes a cell to the current row.
      Parameters:
      cell - the cell
    • checkOverlappedLayoutCells

      protected List checkOverlappedLayoutCells(int colId, int colSpan)
      Tests whether cells are occupied within the space colPos and colPos + colSpan - 1
      Parameters:
      colId - the 0-based column position
      colSpan - the column span
      Returns:
      a list containing LayoutCellss that are overlapped with the check area.
    • fillCells

      protected void fillCells(int cellId, int colId, int colSpan, int rowSpanOffset, org.eclipse.birt.report.model.elements.Cell content, boolean isEffectualDrop)
      Occupies cells within space colId and colId + colSpan - 1.
      Parameters:
      cellId - the unique cell id
      colId - the 0-based column position
      colSpan - the column span
      rowSpanOffset - the offset of the column span
      content - the cell element
      isEffectualDrop - indicates whether the drop property of the cell can take effects.
    • fillDropSpannedCells

      protected void fillDropSpannedCells(int cellId, int colId, int colSpan, int rowSpanOffset, org.eclipse.birt.report.model.elements.Cell content)
      Occupies cells within space colId and colId + colSpan - 1.
      Parameters:
      cellId - the unique cell id
      colId - the 0-based column position
      colSpan - the column span
      rowSpanOffset - the offset of the column span
      content - the cell element
    • findCellColumnPos

      protected int findCellColumnPos(org.eclipse.birt.report.model.elements.Cell cell)
      Finds the column position for the given cell element.
      Parameters:
      cell - the cell element
      Returns:
      1-based column position
    • getColumnCount

      protected int getColumnCount()
      Returns the column count of the row.
      Returns:
      the column count
    • getOccupiedColumnCount

      protected int getOccupiedColumnCount()
      Returns the count of columns that has cell elements in the row.
      Returns:
      the column count
    • getLayoutString

      public String getLayoutString()
      Returns the string that shows the layout. Mainly for the debug.
      Returns:
      the string that shows the layout
    • getRow

      public RowHandle getRow()
      Returns the corresponding handle of the row element.
      Returns:
      the corresponding handle of the row element
    • getContainer

      protected LayoutSlot getContainer()
      Returns the layout slot in which the layout row resides.
      Returns:
      the layout slot
    • layoutCellsIterator

      public Iterator layoutCellsIterator()
      Returns LayoutCells in the row. Note that modifications on the return iterator do not affect the table layout.
      Returns:
      an iterator containing LayoutCells.
    • cellsIterator

      public Iterator cellsIterator()
      Returns handles of Cells in the row. Note that modifications on the return iterator do not affect the table layout.
      Returns:
      an iterator containing CellHandles.
    • getRowPosn

      protected int getRowPosn()
      Returns the row position in the its container.
      Returns:
      1-based row position