Class LayoutRow
- java.lang.Object
-
- org.eclipse.birt.report.model.api.elements.table.LayoutRow
-
public class LayoutRow extends java.lang.ObjectRepresents a row in table layout.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCell(LayoutCell cell)Addes a cell to the current row.java.util.IteratorcellsIterator()Returns handles ofCells in the row.protected java.util.ListcheckOverlappedLayoutCells(int colId, int colSpan)Tests whether cells are occupied within the spacecolPosandcolPos + colSpan - 1protected voidfillCells(int cellId, int colId, int colSpan, int rowSpanOffset, org.eclipse.birt.report.model.elements.Cell content, boolean isEffectualDrop)Occupies cells within spacecolIdandcolId + colSpan - 1.protected voidfillDropSpannedCells(int cellId, int colId, int colSpan, int rowSpanOffset, org.eclipse.birt.report.model.elements.Cell content)Occupies cells within spacecolIdandcolId + colSpan - 1.protected intfindCellColumnPos(org.eclipse.birt.report.model.elements.Cell cell)Finds the column position for the given cell element.protected intgetColumnCount()Returns the column count of the row.protected LayoutSlotgetContainer()Returns the layout slot in which the layout row resides.LayoutCellgetLayoutCell(int colId)Returns the cell with the given index.protected LayoutCellgetLayoutCell(CellHandle cell)Returns the layout cell with the given cell element.java.lang.StringgetLayoutString()Returns the string that shows the layout.protected intgetOccupiedColumnCount()Returns the count of columns that has cell elements in the row.RowHandlegetRow()Returns the corresponding handle of the row element.protected intgetRowPosn()Returns the row position in the its container.java.util.IteratorlayoutCellsIterator()ReturnsLayoutCells in the row.
-
-
-
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 spacecolPosandcolPos + colSpan - 1- Parameters:
colId- the 0-based column positioncolSpan- 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 spacecolIdandcolId + colSpan - 1.- Parameters:
cellId- the unique cell idcolId- the 0-based column positioncolSpan- the column spanrowSpanOffset- the offset of the column spancontent- the cell elementisEffectualDrop- 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 spacecolIdandcolId + colSpan - 1.- Parameters:
cellId- the unique cell idcolId- the 0-based column positioncolSpan- the column spanrowSpanOffset- the offset of the column spancontent- 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()
ReturnsLayoutCells 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 ofCells 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
-
-