public class LayoutSlot
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected LayoutTable |
tableContainer
The table in which the slot resides.
|
Modifier | Constructor and Description |
---|---|
protected |
LayoutSlot(LayoutTable table,
int colBufferSize)
Constructs a
Slot with the given column number. |
protected |
LayoutSlot(LayoutTable table,
int groupId,
int colBufferSize)
Constructs a
Slot with the given column number and the
group level. |
Modifier and Type | Method and Description |
---|---|
protected int |
addCell(int cellPos,
int rowSpan,
int colSpan,
org.eclipse.birt.report.model.elements.Cell content,
boolean isEffectualDrop)
Occupies spaces in the slot with the given cell information if
applicable.
|
protected int |
addCell(int cellPos,
int rowSpan,
int colSpan,
org.eclipse.birt.report.model.elements.Cell content,
boolean isEffectualDrop,
int cellId)
Occupies spaces in the slot with the given cell information if
applicable.
|
protected void |
addDropSpannedCells(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 java.util.List |
checkOverlappedLayoutCells(int rowId,
int colId,
int rowSpan,
int colSpan)
Checks whether cells in the given area have been occupied.
|
protected void |
ensureSize(int newRowCount,
int newColumnCount)
Makes the slot has enough space with the given row size and the column
size.
|
protected int |
getColumnCount()
Gets the column count of the slot.
|
protected int |
getColumnPos(int rowId,
org.eclipse.birt.report.model.elements.Cell cell)
Returns 1-based the column position with the given row index and the cell
element.
|
protected LayoutRow |
getCurrentLayoutRow()
Returns the current row worked on.
|
TableGroupHandle |
getGroup()
Returns the handle of the group that contains this slot if applicable.
|
protected int |
getGroupLevel()
Returns the group level of the slot if this slot is a Group Header or
Group Footer slot.
|
protected LayoutCell |
getLayoutCell(int rowId,
CellHandle cell)
Return the layout cell with the given row and column index.
|
LayoutCell |
getLayoutCell(int rowId,
int colId)
Return the layout cell with the given row and column index.
|
protected LayoutRow |
getLayoutRow(int rowId)
Returns the row with the give index.
|
java.lang.String |
getLayoutString()
Returns the string that shows the layout.
|
int |
getRowCount()
Returns the row count in the slot.
|
SlotHandle |
getSlot()
Returns the slot handle of the layout slot.
|
int |
getSlotId()
Returns the id of the slot.
|
java.util.Iterator |
layoutRowsIterator()
Returns
LayoutRow s in the row. |
protected void |
newLayoutRow(org.eclipse.birt.report.model.elements.TableRow row)
Creates a row in the slot.
|
java.util.Iterator |
rowsIterator()
Returns handles of
Row s in the row. |
protected LayoutTable tableContainer
protected LayoutSlot(LayoutTable table, int colBufferSize)
Slot
with the given column number.table
- the layout tablecolBufferSize
- the column countprotected LayoutSlot(LayoutTable table, int groupId, int colBufferSize)
Slot
with the given column number and the
group level.table
- the layout tablegroupId
- the group level if the slot is Group Header or Group FootercolBufferSize
- the column countprotected int addCell(int cellPos, int rowSpan, int colSpan, org.eclipse.birt.report.model.elements.Cell content, boolean isEffectualDrop, int cellId)
cellPos
- column index of the cell.rowSpan
- row span of the cellcolSpan
- col span of the cellcontent
- cell contentisEffectualDrop
- true
if the drop is effectual. Otherwise
false
.cellId
- the unique id of a cell in a table. If it is less or equal
than 0, assign a new id.protected int addCell(int cellPos, int rowSpan, int colSpan, org.eclipse.birt.report.model.elements.Cell content, boolean isEffectualDrop)
cellPos
- column index of the cell.rowSpan
- row span of the cellcolSpan
- col span of the cellcontent
- cell contentisEffectualDrop
- true
if the drop is effectual. Otherwise
false
.protected java.util.List checkOverlappedLayoutCells(int rowId, int colId, int rowSpan, int colSpan)
rowId
- the row indexcolId
- the column indexrowSpan
- the row spancolSpan
- the column spanLayoutCells
s that are
overlapped with the check area.protected void addDropSpannedCells(int cellId, int colId, int colSpan, int rowSpanOffset, org.eclipse.birt.report.model.elements.Cell content)
colId
and
colId + colSpan - 1
.cellId
- the unique cell idcolId
- the 0-based column positioncolSpan
- the column spanrowSpanOffset
- the offset of the column spancontent
- the cell elementprotected void ensureSize(int newRowCount, int newColumnCount)
newRowCount
- the new row sizenewColumnCount
- the new column sizeprotected void newLayoutRow(org.eclipse.birt.report.model.elements.TableRow row)
row
- the row elementprotected int getColumnCount()
protected LayoutRow getLayoutRow(int rowId)
rowId
- the 0-based row indexprotected LayoutRow getCurrentLayoutRow()
protected int getGroupLevel()
public int getRowCount()
protected int getColumnPos(int rowId, org.eclipse.birt.report.model.elements.Cell cell)
rowId
- the row indexcell
- the cell to searchpublic LayoutCell getLayoutCell(int rowId, int colId)
rowId
- the 0-based row indexcolId
- the 0-based column indexprotected LayoutCell getLayoutCell(int rowId, CellHandle cell)
rowId
- the 0-based row indexcell
- the cell element handlepublic java.lang.String getLayoutString()
public SlotHandle getSlot()
public TableGroupHandle getGroup()
public int getSlotId()
TableItem.HEADER_SLOT
TableItem.DETAIL_SLOT
TableItem.FOOTER_SLOT
TableGroup.HEADER_SLOT
TableGroup.FOOTER_SLOT
public java.util.Iterator layoutRowsIterator()
LayoutRow
s in the row. Note that modifications on
the return iterator do not affect the table layout.LayoutRow
s.public java.util.Iterator rowsIterator()
Row
s in the row. Note that
modifications on the return iterator do not affect the table layout.RowHandle
s.Copyright © 2008 Actuate Corp. All rights reserved.