Class LayoutTableModel
- java.lang.Object
-
- org.eclipse.birt.report.model.api.elements.table.LayoutTableModel
-
public class LayoutTableModel extends java.lang.ObjectThe table model for the UI render. It encapsulates details about the unclear layout of table elment in the design files.
-
-
Constructor Summary
Constructors Constructor Description LayoutTableModel(TableHandle table)Constructs aLayoutTableModelwith the given table element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CellHandlegetCell(int rowPosn, int colPosn)Returns the cell at the given position.CellHandlegetCell(int slotId, int rowId, int colId)Return a cell element with the given poistion.CellHandlegetCell(int groupLevel, int slotId, int rowId, int colId)Return a cell element with the given poistion.intgetColumnCount()Returns the column count in the table.LayoutGroupgetLayoutGroup(int groupLevel)Returns the layout group with the given group level.LayoutSlotgetLayoutSlotDetail()Returns the detail slot.LayoutSlotgetLayoutSlotFooter()Returns the footer slot.LayoutSlotgetLayoutSlotHeader()Returns the header slot.intgetRowCount()Returns the column count in the table.TableHandlegetTable()Returns the table to which the layout model belongs.
-
-
-
Constructor Detail
-
LayoutTableModel
public LayoutTableModel(TableHandle table)
Constructs aLayoutTableModelwith the given table element.- Parameters:
table- the handle of the table element
-
-
Method Detail
-
getLayoutSlotHeader
public LayoutSlot getLayoutSlotHeader()
Returns the header slot.- Returns:
- the header slot
-
getLayoutSlotDetail
public LayoutSlot getLayoutSlotDetail()
Returns the detail slot.- Returns:
- the detail slot
-
getLayoutSlotFooter
public LayoutSlot getLayoutSlotFooter()
Returns the footer slot.- Returns:
- the footer slot
-
getTable
public TableHandle getTable()
Returns the table to which the layout model belongs.- Returns:
- the handle of the table element
-
getLayoutGroup
public LayoutGroup getLayoutGroup(int groupLevel)
Returns the layout group with the given group level.- Parameters:
groupLevel- the 1-based group level- Returns:
- the layout group
-
getColumnCount
public int getColumnCount()
Returns the column count in the table.- Returns:
- the column count in the table.
-
getRowCount
public int getRowCount()
Returns the column count in the table.- Returns:
- the column count in the table.
-
getCell
public CellHandle getCell(int slotId, int rowId, int colId)
Return a cell element with the given poistion. Uses this method to find cells in Table Header, Detail and Footer slots.- Parameters:
slotId- the slot index,rowId- the 1-based row indexcolId- the 1-based column index- Returns:
- the cell element. If no cell on the position, return
null.
-
getCell
public CellHandle getCell(int groupLevel, int slotId, int rowId, int colId)
Return a cell element with the given poistion. Uses this method to find cells in Table Header, Detail and Footer slots.- Parameters:
groupLevel- the 1-based group levelslotId- the slot index,rowId- the 1-based row indexcolId- the 1-based column index- Returns:
- the cell element. If no cell on the position, return
null.
-
getCell
public CellHandle getCell(int rowPosn, int colPosn)
Returns the cell at the given position. The table is viewed as be constructed by a set of flattened rows. Each row has a set of cells. Please note that the returnCellHandleis an element that occupies the given position in the layout rendering.For example, if a cell occupies the position (1, 1) and (1, 2), return
CellHandles with parameters (1, 1) and (1, 2) are same.- Parameters:
rowPosn- the 1-based row positioncolPosn- the 1-based column position- Returns:
- the cell handle at the given position
-
-