Class LayoutRow
java.lang.Object
org.eclipse.birt.report.model.api.elements.table.LayoutRow
public class LayoutRow
extends java.lang.Object
Represents a row in table layout.
-
Constructor Summary
Constructors Constructor Description LayoutRow(LayoutSlot container, int rowId)
Constructs aLayoutRow
with the give index. -
Method Summary
Modifier and Type Method Description protected void
addCell(LayoutCell cell)
Addes a cell to the current row.java.util.Iterator
cellsIterator()
Returns handles ofCell
s in the row.protected java.util.List
checkOverlappedLayoutCells(int colId, int colSpan)
Tests whether cells are occupied within the spacecolPos
andcolPos + 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 spacecolId
andcolId + colSpan - 1
.protected void
fillDropSpannedCells(int cellId, int colId, int colSpan, int rowSpanOffset, org.eclipse.birt.report.model.elements.Cell content)
Occupies cells within spacecolId
andcolId + 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.LayoutCell
getLayoutCell(int colId)
Returns the cell with the given index.protected LayoutCell
getLayoutCell(CellHandle cell)
Returns the layout cell with the given cell element.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()
ReturnsLayoutCell
s in the row.
-
Constructor Details
-
LayoutRow
LayoutRow(LayoutSlot container, int rowId)Constructs aLayoutRow
with the give index.- Parameters:
container
- the layout slot that this layout row residesrowId
- the row index
-
-
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
protected java.util.List checkOverlappedLayoutCells(int colId, int colSpan)Tests whether cells are occupied within the spacecolPos
andcolPos + colSpan - 1
- Parameters:
colId
- the 0-based column positioncolSpan
- the column span- Returns:
- a list containing
LayoutCells
s 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 spacecolId
andcolId + 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 spacecolId
andcolId + 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
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
public java.util.Iterator layoutCellsIterator()ReturnsLayoutCell
s in the row. Note that modifications on the return iterator do not affect the table layout.- Returns:
- an iterator containing
LayoutCell
s.
-
cellsIterator
public java.util.Iterator cellsIterator()Returns handles ofCell
s in the row. Note that modifications on the return iterator do not affect the table layout.- Returns:
- an iterator containing
CellHandle
s.
-
getRowPosn
protected int getRowPosn()Returns the row position in the its container.- Returns:
- 1-based row position
-