Class GridColumnBandAdapter
- java.lang.Object
-
- org.eclipse.birt.report.model.api.GridColumnBandAdapter
-
public final class GridColumnBandAdapter extends java.lang.ObjectRepresents an object of copied objects when do copy/paste operations between grids.
-
-
Field Summary
Fields Modifier and Type Field Description protected GridHandleelementThe element where the copy/paste operation occurs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intfindCellPosition(RowHandle row, int columnToInsert, boolean insert)Returns the position where the cell resides in the row.protected intgetCellPosition(CellHandle cell)Returns the column number with a given cell.protected java.util.ListgetCellsInSlot(SlotHandle handle, int columnIndex, boolean mustBeStartPosition)Returns copied cells with the given slot and column number.protected java.util.ListgetCellsUnderColumn(int columnNumber)Returns copied cells with the column number.protected java.util.ListgetCellsUnderColumn(int columnNumber, boolean mustBeStartPosition)Returns copied cells with the column number regardless whether the current position is where the cell element begins to span.protected intgetColumnCount()Returns the number of columns in the element.protected SlotHandlegetColumns()Returns the column slot.protected static intgetColumnStartPos(ColumnHandle target)Returns the column index that is the start column index of thetarget.protected ReportItemHandlegetElementHandle()Returns the element where the copy/paste operation occurs.protected org.eclipse.birt.report.model.core.ModulegetModule()Returns the module where the element belongs to.protected RowHandlegetRow(int slotId, int groupId, int rowNumber)Returns the row with the given slot id, group id and the row number.protected java.util.ListgetRowContainerSlots()Returns a list containing rows.protected intgetRowCount()Returns the number of rows in the element.protected booleanhasDroppingCell(java.util.List cells)Alwaysfalsesince the "drop" property is disabled in grid.protected booleanhasParent()Checks element has parent or not.protected booleanisDroppingCell(org.eclipse.birt.report.model.api.CellContextInfo cell)
-
-
-
Field Detail
-
element
protected GridHandle element
The element where the copy/paste operation occurs.
-
-
Method Detail
-
getElementHandle
protected ReportItemHandle getElementHandle()
Returns the element where the copy/paste operation occurs.- Returns:
- the element
-
getColumns
protected SlotHandle getColumns()
Returns the column slot.- Returns:
- the column slot
-
getCellsUnderColumn
protected java.util.List getCellsUnderColumn(int columnNumber, boolean mustBeStartPosition)Returns copied cells with the column number regardless whether the current position is where the cell element begins to span.- Parameters:
columnNumber- the column numbermustBeStartPosition-trueif it is. Otherwisefalse.- Returns:
- the matched cell
-
getCellPosition
protected int getCellPosition(CellHandle cell)
Returns the column number with a given cell.- Parameters:
cell- the cell to find.- Returns:
- the column number of the given cell.
-
getRowCount
protected int getRowCount()
Returns the number of rows in the element.- Returns:
- the number or rows in the element.
-
getColumnCount
protected int getColumnCount()
Returns the number of columns in the element.- Returns:
- the number of columns in the element
-
getRow
protected RowHandle getRow(int slotId, int groupId, int rowNumber)
Returns the row with the given slot id, group id and the row number.- Parameters:
slotId- the slot idgroupId- the group idrowNumber- the row number- Returns:
- the row that matches the input parameters
-
hasDroppingCell
protected boolean hasDroppingCell(java.util.List cells)
Alwaysfalsesince the "drop" property is disabled in grid.- Parameters:
cells- a list containing cell handles- Returns:
trueif any cell has the "drop" property, otherwisefalse.- See Also:
ColumnBandAdapter.hasDroppingCell(java.util.List)
-
getRowContainerSlots
protected java.util.List getRowContainerSlots()
Returns a list containing rows.- Returns:
- a list containing rows.
-
isDroppingCell
protected boolean isDroppingCell(org.eclipse.birt.report.model.api.CellContextInfo cell)
-
getModule
protected org.eclipse.birt.report.model.core.Module getModule()
Returns the module where the element belongs to.- Returns:
- the module
-
getColumnStartPos
protected static int getColumnStartPos(ColumnHandle target)
Returns the column index that is the start column index of thetarget.- Parameters:
target- the column to find- Returns:
- a column index
-
findCellPosition
protected int findCellPosition(RowHandle row, int columnToInsert, boolean insert)
Returns the position where the cell resides in the row.- Parameters:
row- the row handlecolumnToInsert- the column number to insert, count from 1insert- whether insert mode- Returns:
- the position indexing from 1
-
getCellsUnderColumn
protected java.util.List getCellsUnderColumn(int columnNumber)
Returns copied cells with the column number.- Parameters:
columnNumber- the column number- Returns:
- new cell instances
-
getCellsInSlot
protected java.util.List getCellsInSlot(SlotHandle handle, int columnIndex, boolean mustBeStartPosition)
Returns copied cells with the given slot and column number.- Parameters:
handle- the slotcolumnIndex- the column numbermustBeStartPosition-trueif it is. Otherwisefalse.- Returns:
- new cell instances
-
hasParent
protected final boolean hasParent()
Checks element has parent or not.- Returns:
trueif has parent, else returnfalse
-
-