Class CellHandle
java.lang.Object
org.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ReportElementHandle
org.eclipse.birt.report.model.api.CellHandle
- All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.ICellModel,org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
public class CellHandle
extends ReportElementHandle
implements org.eclipse.birt.report.model.elements.interfaces.ICellModel
Represents a cell within a table or grid. A cell can span multiple rows
and/or columns. A cell can contain zero, one or many contents. However, since
BIRT will position multiple items automatically, the application should
generally provide its own container if the cell is to hold multiple items.
The application generally does not create cell handles directly. Instead, it
uses one of the navigation methods available on other element handles such as
RowHandle.
- See Also:
-
CellRowHandle.getCells()
-
Field Summary
Fields inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
elementFields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
moduleFields inherited from interface org.eclipse.birt.report.model.elements.interfaces.ICellModel
ALT_TEXT_KEY_PROP, ALT_TEXT_PROP, ANTIDIAGONAL_COLOR_PROP, ANTIDIAGONAL_NUMBER_PROP, ANTIDIAGONAL_STYLE_PROP, ANTIDIAGONAL_THICKNESS_PROP, BOOKMARK_DISPLAY_NAME_PROP, BOOKMARK_PROP, COL_SPAN_PROP, COLUMN_PROP, CONTENT_SLOT, DIAGONAL_COLOR_PROP, DIAGONAL_NUMBER_PROP, DIAGONAL_STYLE_PROP, DIAGONAL_THICKNESS_PROP, DROP_PROP, HEADERS_PROP, HEIGHT_PROP, LANGUAGE_PROP, ON_CREATE_METHOD, ON_PREPARE_METHOD, ON_RENDER_METHOD, ROW_SPAN_PROP, SCOPE_PROP, STYLE_PROP, TAG_TYPE_PROP, WIDTH_PROPFields 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, NEW_HANDLER_ON_EACH_EVENT_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP -
Constructor Summary
ConstructorsConstructorDescriptionCellHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructs a handle for the given design and design element. -
Method Summary
Modifier and TypeMethodDescriptionReturns the alternate text of this label item.Returns the resource key of the alternate text of this image.Gets a color handle to deal with the color of the anti-diagonal.intGets the number of the anti-diagonal lines that are from the top-right to bottom-left.Returns the style of the anti-diagonal that is from top-right to bottom-left corner.Gets a dimension handle to deal with the anti-diagonal thickness.Gets the book mark value on the cell element.Gets the display name of the bookmark.intReturns the cell's column property.intReturns the cell's column span.Returns the contents of the cell.Gets a color handle to deal with the color of the diagonal.intGets the number of the diagonal lines that are from top-left to bottom-right corners.Returns the style of the diagonal that is from top-left to bottom-right.Gets a dimension handle to deal with the diagonal thickness.getDrop()Returns the cell's drop property.Gets the headers value on the cell element.Returns the cell's height.Returns the language of this label item.Gets the on-finish script of the group.Gets the on-prepare script of the group.Gets the on-finish script of the group.intReturns the cell's row span.getScope()Gets the scope value of the cell.The return value is one of the constants defined inDesignChoiceConstants:SCOPE_TYPE_ROWSCOPE_TYPE_COLSCOPE_TYPE_ROWGROUPSCOPE_TYPE_COLGROUPReturns the tag type of this label item.getWidth()Returns the cell's width.voidsetAltTextExpression(Expression altText) Sets the alternate text of this label item.voidsetAltTextKey(String altTextKey) Sets the resource key of the alternate text of this image.voidsetAntidiagonalNumber(int antidiagonalNumber) Sets the number of the anti-diagonal lines that are from the top-right to bottom-left.voidsetAntidiagonalStyle(String antidiagonalStyle) Sets the style of the anti-diagonal that is from top-right to bottom-left corner.voidsetBookmark(String bookmark) Sets the book mark value on the cell element.voidsetBookmarkDisplayName(String bookmarkDisplayName) Sets the display name of the bookmark.voidsetColumn(int column) Sets the cell's column property.voidsetColumnSpan(int span) Sets the cell's column span.voidsetDiagonalNumber(int diagonalNumber) Sets the number of the diagonal lines that are from top-left to bottom-right corners.voidsetDiagonalStyle(String lineStyle) Sets the style of the diagonal that is from top-left to bottom-right.voidSets the cell's drop property.voidsetHeaders(String headers) Sets the headers value on the cell element.voidsetLanguage(String language) Sets the language of this label item.voidsetOnCreate(String script) Sets the on-create script of the group element.voidsetOnPrepare(String script) Sets the on-prepare script of the group element.voidsetOnRender(String script) Sets the on-render script of the group element.voidsetRowSpan(int span) Sets the cell's row span.voidSets the scope value of the cell.The input value is one of the constants defined inDesignChoiceConstants:SCOPE_TYPE_ROWSCOPE_TYPE_COLSCOPE_TYPE_ROWGROUPSCOPE_TYPE_COLGROUPvoidsetTagType(String tagType) Sets the tag type of this label item.Methods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMaskMethods inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
add, add, addElement, addElement, addListener, addUserPropertyDefn, cachePropertyHandles, canContain, canContain, canContain, canContain, canDrop, canEdit, canTransformToTemplate, clearAllProperties, clearContents, clearProperty, clientsIterator, copy, copyPropertyTo, createTemplateElement, derivedIterator, doSort, drop, drop, drop, dropAndClear, dropAndClear, dropAndClear, dropUserPropertyDefn, findContentSlot, getBooleanProperty, getChoices, getColorProperty, getContainer, getContainerPropertyHandle, getContainerSlotHandle, getContent, getContentCount, getContents, getDefn, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getEventHandlerClass, getExpressionProperty, getExtends, getExternalizedValue, getExternalizedValue, getExternalizedValue, getFactoryElementHandle, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getMethods, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getProperty, getPropertyBinding, getPropertyBindingExpression, getPropertyBindings, getPropertyDefn, getPropertyHandle, getPropertyIterator, getQualifiedName, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, initializeSlotHandles, isDirectionRTL, isInTemplateParameter, isTemplateParameterValue, isValid, localize, move, move, moveTo, moveTo, moveTo, moveTo, newHandlerOnEachEvent, paste, paste, paste, paste, removeListener, revertToReportItem, revertToTemplate, semanticCheck, setBooleanProperty, setEncryption, setEventHandlerClass, setExpressionProperty, setExtends, setExtendsElement, setExtendsName, setFloatProperty, setIntProperty, setName, setNewHandlerOnEachEvent, setNumberProperty, setProperties, setProperty, setPropertyBinding, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, shift, showError, slotsIterator
-
Constructor Details
-
CellHandle
public CellHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructs a handle for the given design and design element. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.- Parameters:
module- the moduleelement- the model representation of the element
-
-
Method Details
-
getColumnSpan
public int getColumnSpan()Returns the cell's column span. This is the number of table or grid columns occupied by this cell.- Returns:
- the column span
-
setColumnSpan
Sets the cell's column span. This is the number of table or grid columns occupied by this cell.- Parameters:
span- the column span- Throws:
SemanticException- if this property is locked.
-
getRowSpan
public int getRowSpan()Returns the cell's row span. This is the number of table or grid rows occupied by this cell.- Returns:
- the row span
-
setRowSpan
Sets the cell's row span. This is the number of table or grid rows occupied by this cell.- Parameters:
span- the row span- Throws:
SemanticException- if this property is locked.
-
getDrop
Returns the cell's drop property. This is how the cell should expand to fill the entire table or group. This property is valid only for cells within a table; but not for cells within a grid.- Returns:
- the string value of the drop property
- See Also:
-
setDrop
Sets the cell's drop property. The input value is defined inDesignChoiceConstantsand can be one of:- DROP_TYPE_NONE
- DROP_TYPE_DETAIL
- DROP_TYPE_ALL
Note that This property is valid only for cells within a table; but not for cells within a grid.
- Parameters:
drop- the string value of the drop property- Throws:
SemanticException- if the property is locked or the input value is not one of the above.- See Also:
-
getContent
Returns the contents of the cell. The cell can contain any number of items, but normally contains just one.- Returns:
- a handle to the content slot
-
getColumn
public int getColumn()Returns the cell's column property. The return value gives the column in which the cell starts. Columns are numbered from 1.- Returns:
- the column index, starting from 1.
-
setColumn
Sets the cell's column property. The input value gives the column in which the cell starts. Columns are numbered from 1.- Parameters:
column- the column index, starting from 1.- Throws:
SemanticException- if this property is locked.
-
getHeight
Returns the cell's height.- Returns:
- the cell's height
-
getWidth
Returns the cell's width.- Returns:
- the cell's width
-
getOnPrepare
Gets the on-prepare script of the group. Startup phase. No data binding yet. The design of an element can be changed here.- Returns:
- the on-prepare script of the group
-
getOnCreate
Gets the on-finish script of the group. Presentation phase. The report item has been read from the report document, but not sent to emitter yet.- Returns:
- the on-finish script of the group
-
getOnRender
Gets the on-finish script of the group. Presentation phase. The report item has been read from the report document, but not sent to emitter yet.- Returns:
- the on-finish script of the group
-
setOnPrepare
Sets the on-prepare script of the group element.- Parameters:
script- the script to set- Throws:
SemanticException- if the method is locked.- See Also:
-
setOnCreate
Sets the on-create script of the group element.- Parameters:
script- the script to set- Throws:
SemanticException- if the method is locked.- See Also:
-
setOnRender
Sets the on-render script of the group element.- Parameters:
script- the script to set- Throws:
SemanticException- if the method is locked.- See Also:
-
setDiagonalNumber
Sets the number of the diagonal lines that are from top-left to bottom-right corners.- Parameters:
diagonalNumber- the diagonal number- Throws:
SemanticException
-
getDiagonalNumber
public int getDiagonalNumber()Gets the number of the diagonal lines that are from top-left to bottom-right corners.- Returns:
- the diagonal number.
-
getDiagonalThickness
Gets a dimension handle to deal with the diagonal thickness. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:LINE_WIDTH_THINLINE_WIDTH_MEDIUMLINE_WIDTH_THICK
- Returns:
- a DimensionHandle for the diagonal thickness
-
setDiagonalStyle
Sets the style of the diagonal that is from top-left to bottom-right. The input value is one of constants defined inDesignChoiceConstants:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Parameters:
lineStyle- the line style.- Throws:
SemanticException- if the input value is not one of the above values.
-
getDiagonalStyle
Returns the style of the diagonal that is from top-left to bottom-right. The return value is one of constants defined inDesignChoiceConstants:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Returns:
- the diagonal style.
-
getDiagonalColor
Gets a color handle to deal with the color of the diagonal.- Returns:
- a ColorHandle to for the color of the diagonal.
-
setAntidiagonalNumber
Sets the number of the anti-diagonal lines that are from the top-right to bottom-left.- Parameters:
antidiagonalNumber- the anti-diagonal number- Throws:
SemanticException
-
getAntidiagonalNumber
public int getAntidiagonalNumber()Gets the number of the anti-diagonal lines that are from the top-right to bottom-left.- Returns:
- the anti-diagonal number.
-
getAntidiagonalThickness
Gets a dimension handle to deal with the anti-diagonal thickness. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:LINE_WIDTH_THINLINE_WIDTH_MEDIUMLINE_WIDTH_THICK
- Returns:
- a DimensionHandle for the anti-diagonal thickness
-
getAntidiagonalStyle
Returns the style of the anti-diagonal that is from top-right to bottom-left corner. The return value is one of constants defined inDesignChoiceConstants:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Returns:
- the anti-diagonal style.
-
setAntidiagonalStyle
Sets the style of the anti-diagonal that is from top-right to bottom-left corner. The input value is one of constants defined inDesignChoiceConstants:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Parameters:
antidiagonalStyle- the anti-diagonal style.- Throws:
SemanticException- if the input value is not one of the above values.
-
getAntidiagonalColor
Gets a color handle to deal with the color of the anti-diagonal.- Returns:
- a ColorHandle to for the color of the anti-diagonal.
-
setScope
Sets the scope value of the cell.The input value is one of the constants defined inDesignChoiceConstants:SCOPE_TYPE_ROWSCOPE_TYPE_COLSCOPE_TYPE_ROWGROUPSCOPE_TYPE_COLGROUP
- Parameters:
scope- the scope- Throws:
SemanticException- if the input value is not one of the above values.
-
getScope
Gets the scope value of the cell.The return value is one of the constants defined inDesignChoiceConstants:SCOPE_TYPE_ROWSCOPE_TYPE_COLSCOPE_TYPE_ROWGROUPSCOPE_TYPE_COLGROUP
- Returns:
- the scope.
-
setBookmark
Sets the book mark value on the cell element.- Parameters:
bookmark- the book mark.- Throws:
SemanticException- if this property is locked.
-
getBookmark
Gets the book mark value on the cell element.- Returns:
- the book mark value.
-
getHeaders
Gets the headers value on the cell element.- Returns:
- the headers value.
-
setHeaders
Sets the headers value on the cell element.- Parameters:
headers- the headers value.- Throws:
SemanticException- if this property is locked.
-
getBookmarkDisplayName
Gets the display name of the bookmark.- Returns:
- the display name of the bookmark.
-
setBookmarkDisplayName
Sets the display name of the bookmark.- Parameters:
bookmarkDisplayName- the display name of the bookmark to set- Throws:
SemanticException
-
getTagType
Returns the tag type of this label item.- Returns:
- the tag type value
-
setTagType
Sets the tag type of this label item.- Parameters:
tagType- type the tag type- Throws:
SemanticException- if the property is locked.
-
getLanguage
Returns the language of this label item.- Returns:
- the language
-
setLanguage
Sets the language of this label item.- Parameters:
language- the language- Throws:
SemanticException- if the property is locked.
-
getAltTextExpression
Returns the alternate text of this label item.- Returns:
- the alternate text
-
setAltTextExpression
Sets the alternate text of this label item.- Parameters:
altText- the alternate text expression.- Throws:
SemanticException- if the property is locked.
-
getAltTextKey
Returns the resource key of the alternate text of this image.- Returns:
- the resource key of the alternate text
-
setAltTextKey
Sets the resource key of the alternate text of this image.- Parameters:
altTextKey- the alternate text key- Throws:
SemanticException
-