Class LayoutRow
java.lang.Object
org.eclipse.birt.report.model.api.elements.table.LayoutRow
Represents a row in table layout.
-
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCell(LayoutCell cell) Addes a cell to the current row.Returns handles ofCells in the row.protected 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 intReturns the column count of the row.protected LayoutSlotReturns the layout slot in which the layout row resides.getLayoutCell(int colId) Returns the cell with the given index.protected LayoutCellgetLayoutCell(CellHandle cell) Returns the layout cell with the given cell element.Returns the string that shows the layout.protected intReturns the count of columns that has cell elements in the row.getRow()Returns the corresponding handle of the row element.protected intReturns the row position in the its container.ReturnsLayoutCells in the row.
-
Method Details
-
getLayoutCell
Returns the cell with the given index.- Parameters:
colId- the 0-based column index- Returns:
- the cell
-
getLayoutCell
Returns the layout cell with the given cell element.- Parameters:
cell- the cell handle- Returns:
- the layout cell
-
addCell
Addes a cell to the current row.- Parameters:
cell- the cell
-
checkOverlappedLayoutCells
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
Returns the string that shows the layout. Mainly for the debug.- Returns:
- the string that shows the layout
-
getRow
Returns the corresponding handle of the row element.- Returns:
- the corresponding handle of the row element
-
getContainer
Returns the layout slot in which the layout row resides.- Returns:
- the layout slot
-
layoutCellsIterator
ReturnsLayoutCells in the row. Note that modifications on the return iterator do not affect the table layout.- Returns:
- an iterator containing
LayoutCells.
-
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
-