|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ReportElementHandle
org.eclipse.birt.report.model.api.ReportItemHandle
org.eclipse.birt.report.model.api.GridHandle
public class GridHandle
Represents a grid item in the design. A grid item contains a set of report items arranged into a grid. Grids contains rows and columns. The grid contains cells. Each cell can span one or more columns, or one or more rows. Each cell can contain one or more items.
Grid layout is familiar to anyone who has used HTML tables, Word tables or Excel: data is divided into a series of rows and columns.
GridItem
Field Summary |
---|
Fields inherited from class org.eclipse.birt.report.model.api.ReportItemHandle |
---|
DATABINDING_TYPE_DATA, DATABINDING_TYPE_NONE, DATABINDING_TYPE_REPORT_ITEM_REF |
Fields inherited from class org.eclipse.birt.report.model.api.ReportElementHandle |
---|
element |
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle |
---|
module |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IGridItemModel |
---|
CAPTION_KEY_PROP, CAPTION_PROP, COLUMN_SLOT, ROW_SLOT, SLOT_COUNT, SUMMARY_PROP |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IReportItemModel |
---|
ACL_EXPRESSION_PROP, ALLOW_EXPORT_PROP, BOOKMARK_PROP, BOUND_DATA_COLUMNS_PROP, CASCADE_ACL_PROP, CUBE_PROP, DATA_BINDING_REF_PROP, DATA_SET_PROP, HEIGHT_PROP, MULTI_VIEWS_PROP, ON_CREATE_METHOD, ON_PAGE_BREAK_METHOD, ON_PREPARE_METHOD, ON_RENDER_METHOD, PARAM_BINDINGS_PROP, TOC_PROP, VISIBILITY_PROP, WIDTH_PROP, X_PROP, Y_PROP, Z_INDEX_PROP |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IStyledElementModel |
---|
STYLE_PROP |
Fields inherited from interface org.eclipse.birt.report.model.api.elements.IReportItemMethodContext |
---|
ON_CREATE_CONTEXT, ON_PREPARE_CONTEXT, ON_RENDER_CONTEXT |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel |
---|
COMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP |
Constructor Summary | |
---|---|
GridHandle(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.core.DesignElement element)
Constructs a grid handle with the given design and the design element. |
Method Summary | |
---|---|
boolean |
canCopyColumn(int columnIndex)
Copies a column and cells under it with the given column number. |
boolean |
canCopyRow(RowOperationParameters parameters)
Checks whether the copy operation can be done with the given parameters. |
boolean |
canInsertAndPasteColumn(ColumnBandData data,
int columnIndex)
Checks whether the insert and paste operation can be done with the given copied column band data, the column index and the operation flag. |
boolean |
canInsertAndPasteRow(IDesignElement copiedRow,
RowOperationParameters parameters)
Checks whether the insert and paste table row to the given destination row with the given parameters. |
boolean |
canInsertRow(RowOperationParameters parameters)
Checks whether the insert operation can be done with the given parameters. |
boolean |
canPasteColumn(ColumnBandData data,
int columnIndex,
boolean inForce)
Checks whether the paste operation can be done with the given copied column band data, the column index and the operation flag. |
boolean |
canPasteRow(IDesignElement copiedRow,
RowOperationParameters parameters)
Checks whether the paste operation can be done with the given parameters. |
boolean |
canShiftColumn(int sourceColumn,
int destColumn)
Moves the column from sourceColumn to
destColumn . |
boolean |
canShiftRow(RowOperationParameters parameters)
Checks whether the shift operation can be done with the given the given parameters. |
ColumnBandData |
copyColumn(int columnIndex)
Copies a column and cells under it with the given column number. |
IDesignElement |
copyRow(RowOperationParameters parameters)
Copies table row with the given parameters. |
java.lang.String |
getCaption()
Returns the caption text of this grid. |
java.lang.String |
getCaptionKey()
Returns the resource key of the caption. |
CellHandle |
getCell(int row,
int column)
Gets the cell at the position where the given row and column intersect. |
SlotHandle |
getCellContent(int row,
int column)
Gets the content slot handle of the cell at the position where the given row and column intersect. |
int |
getColumnCount()
Returns the number of columns in the Grid. |
SlotHandle |
getColumns()
Returns a slot handle for the columns in the grid. |
SlotHandle |
getRows()
Returns a slot handle for the rows in the grid. |
java.lang.String |
getSummary()
Returns the value of the summary. |
void |
insertAndPasteColumn(ColumnBandData data,
int columnNumber)
Inserts and pastes a column with its cells to the given column number. |
void |
insertAndPasteRow(IDesignElement copiedRow,
RowOperationParameters parameters)
Inserts and paste table row to the given destination row with the given parameters. |
void |
insertRow(RowOperationParameters parameters)
Inserts table row to the given destination row with the given parameters. |
void |
pasteColumn(ColumnBandData data,
int columnNumber,
boolean inForce)
Pastes a column with its cells to the given column number. |
void |
pasteRow(IDesignElement copiedRow,
RowOperationParameters parameters)
Pastes table row to destination row with the given parameters. |
void |
setCaption(java.lang.String caption)
Sets the caption text of this grid. |
void |
setCaptionKey(java.lang.String captionKey)
Sets the resource key of the caption. |
void |
setSummary(java.lang.String summary)
Sets the value of summary. |
void |
shiftColumn(int sourceColumn,
int destColumn)
Moves the column from sourceColumn to
destIndex . |
void |
shiftRow(RowOperationParameters parameters)
Shifts table row to the given destination row with the given parameters. |
Methods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle |
---|
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMask |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GridHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
module
- the moduleelement
- the model representation of the elementMethod Detail |
---|
public SlotHandle getColumns()
SlotHandle
public SlotHandle getRows()
SlotHandle
public int getColumnCount()
public CellHandle getCell(int row, int column)
row
- the row position indexing from 1column
- the column position indexing from 1
null
public SlotHandle getCellContent(int row, int column)
row
- the row position indexing from 1column
- the column position indexing from 1
null
public boolean canCopyColumn(int columnIndex)
columnIndex
- the column position indexing from 1.
true
if this column band can be copied. Otherwise
false
.public ColumnBandData copyColumn(int columnIndex) throws SemanticException
columnIndex
- the column number
GridColumnBandAdapter
instance
SemanticException
- if the cell layout of the column is invalid.public void pasteColumn(ColumnBandData data, int columnNumber, boolean inForce) throws SemanticException
data
- the data of a column band to pastecolumnNumber
- the column index from 1 to the number of columns in the gridinForce
- true
if pastes the column regardless of the
warning. Otherwise false
.
SemanticException
public boolean canPasteColumn(ColumnBandData data, int columnIndex, boolean inForce)
data
- the column band data to pastecolumnIndex
- the column index from 1 to the number of columns in the gridinForce
- true
indicates to paste the column regardless
of the different layout of cells. false
indicates not.
true
indicates the paste operation can be done.
Otherwise false
.public void insertAndPasteColumn(ColumnBandData data, int columnNumber) throws SemanticException
data
- the data of a column band to pastecolumnNumber
- the column index from 0 to the number of columns in the grid
SemanticException
public boolean canInsertAndPasteColumn(ColumnBandData data, int columnIndex)
canPasteColumn
since this action creates an
extra column for the table.
data
- the column band data to pastecolumnIndex
- the column index from 0 to the number of columns in the grid
true
indicates the paste operation can be done.
Otherwise false
.public void shiftColumn(int sourceColumn, int destColumn) throws SemanticException
sourceColumn
to
destIndex
.
sourceColumn
- the source column ranging from 1 to the column numberdestColumn
- the target column ranging from 0 to the column number
SemanticException
- if the chosen column band is forbidden to shiftpublic boolean canShiftColumn(int sourceColumn, int destColumn)
sourceColumn
to
destColumn
.
sourceColumn
- the source column ranging from 1 to the column numberdestColumn
- the target column ranging from 0 to the column number
true
if the chosen column band is legal to shift.
Otherwise false
.public boolean canCopyRow(RowOperationParameters parameters)
parameters
- parameters needed by insert operation.
true
if this row band can be copied. Otherwise
false
.public boolean canPasteRow(IDesignElement copiedRow, RowOperationParameters parameters)
copiedRow
- the copied table rowparameters
- parameters needed by insert operation.
true
indicates the paste operation can be done.
Otherwise false
.public boolean canInsertRow(RowOperationParameters parameters)
parameters
- parameters needed by insert operation.
true
indicates the insert operation can be done.
Otherwise false
.public boolean canInsertAndPasteRow(IDesignElement copiedRow, RowOperationParameters parameters)
copiedRow
- the copied table rowparameters
- parameters needed by insert operation.
true
indicates the insert and paste operation can
be done. Otherwise false
.public boolean canShiftRow(RowOperationParameters parameters)
parameters
- parameters needed by insert operation.
true
indicates the shift operation can be done.
Otherwise false
.public IDesignElement copyRow(RowOperationParameters parameters) throws SemanticException
parameters
- parameters needed by insert operation.
TableRow
instance
SemanticException
- throw if paste operation is forbidden
java.lang.IllegalArgumentException
- throw if the input parameters are not validpublic void pasteRow(IDesignElement copiedRow, RowOperationParameters parameters) throws SemanticException
copiedRow
- the copied table rowparameters
- parameters needed by insert operation.
SemanticException
- throw if paste operation is forbidden
java.lang.IllegalArgumentException
- throw if the input parameters are not validpublic void insertRow(RowOperationParameters parameters) throws SemanticException
parameters
- parameters needed by insert operation.
SemanticException
- throw if paste operation is forbidden
java.lang.IllegalArgumentException
- throw if the input parameters are not validpublic void insertAndPasteRow(IDesignElement copiedRow, RowOperationParameters parameters) throws SemanticException
copiedRow
- the copied table rowparameters
- parameters needed by insert operation.
SemanticException
- throw if paste operation is forbidden
java.lang.IllegalArgumentException
- throw if the input parameters are not validpublic void shiftRow(RowOperationParameters parameters) throws SemanticException
parameters
- parameters needed by insert operation.
SemanticException
- throw if paste operation is forbidden
java.lang.IllegalArgumentException
- throw if the input parameters are not validpublic java.lang.String getCaption()
public void setCaption(java.lang.String caption) throws SemanticException
caption
- the caption text
SemanticException
- if the property is locked.public java.lang.String getCaptionKey()
public void setCaptionKey(java.lang.String captionKey) throws SemanticException
captionKey
- the resource key of the caption
SemanticException
- if the caption resource-key property is locked.public java.lang.String getSummary()
public void setSummary(java.lang.String summary) throws SemanticException
summary
- the value of summary
SemanticException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |