org.eclipse.birt.report.model.api.elements.table
Class LayoutRow

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

public class LayoutRow
extends java.lang.Object

Represents a row in table layout.


Method Summary
protected  void addCell(LayoutCell cell)
          Addes a cell to the current row.
 java.util.Iterator cellsIterator()
          Returns handles of Cells in the row.
protected  java.util.List checkOverlappedLayoutCells(int colId, int colSpan)
          Tests whether cells are occupied within the space colPos and colPos + colSpan - 1
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.
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.
protected  int findCellColumnPos(org.eclipse.birt.report.model.elements.Cell cell)
          Finds the column position for the given cell element.
protected  int getColumnCount()
          Returns the column count of the row.
protected  LayoutSlot getContainer()
          Returns the layout slot in which the layout row resides.
protected  LayoutCell getLayoutCell(CellHandle cell)
          Returns the layout cell with the given cell element.
 LayoutCell getLayoutCell(int colId)
          Returns the cell with the given index.
 java.lang.String getLayoutString()
          Returns the string that shows the layout.
protected  int getOccupiedColumnCount()
          Returns the count of columns that has cell elements in the row.
 RowHandle getRow()
          Returns the corresponding handle of the row element.
protected  int getRowPosn()
          Returns the row position in the its container.
 java.util.Iterator layoutCellsIterator()
          Returns LayoutCells in the row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 java.util.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 java.lang.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 java.util.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 java.util.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


Copyright © 2008 Actuate Corp. All rights reserved.