Class ReportElementHandle
java.lang.Object
org.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ReportElementHandle
- All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
- Direct Known Subclasses:
AbstractThemeHandle
,CellHandle
,ColumnHandle
,CubeHandle
,DataSetHandle
,DataSourceHandle
,DimensionHandle
,GroupHandle
,HierarchyHandle
,LevelHandle
,MasterPageHandle
,MeasureGroupHandle
,MeasureHandle
,ParameterGroupHandle
,ParameterHandle
,ReportItemHandleImpl
,RowHandle
,StyleHandle
,TemplateElementHandle
,TemplateParameterDefinitionHandle
Abstract base class for working with all elements except the report design. A
report element can defines property masks for its property. A property mask
says how to hide or lock an BIRT ERD-defined or developer-defined property.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.birt.report.model.core.DesignElement
The target report element.Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
module
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, 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
ConstructorsConstructorDescriptionReportElementHandle
(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructs the handle for a report element with the given design and element. -
Method Summary
Modifier and TypeMethodDescriptionGets the comments of the report element.Gets the custom XML.Gets the display name.Gets the resource key of the display name.org.eclipse.birt.report.model.core.DesignElement
Returns the element to which this handle is attached.getPropertyMask
(String propName) Returns the mask of the specified property given its internal name.boolean
Checks whether the compound element is valid.boolean
Deprecated.Returns property masks on this element.void
setComments
(String theComments) Sets the comments of the report element.void
setCustomXml
(String customXml) Sets the custom XML.void
setDisplayName
(String displayName) Sets the display name.void
setDisplayNameKey
(String displayNameKey) Sets the resource key of the display name.void
setPropertyMask
(String propName, String maskValue) Sets the mask of the specified property.Methods 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
-
Field Details
-
element
protected org.eclipse.birt.report.model.core.DesignElement elementThe target report element.
-
-
Constructor Details
-
ReportElementHandle
public ReportElementHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructs the handle for a report element with the given design and 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
-
getElement
public org.eclipse.birt.report.model.core.DesignElement getElement()Description copied from class:DesignElementHandle
Returns the element to which this handle is attached.- Specified by:
getElement
in classDesignElementHandle
- Returns:
- The attached element. Will be null if the handle is not attached.
-
propertyMaskIterator
Returns property masks on this element. This method follows these rules:- If any property mask exists on this element, returns property mask list of itself.
- If no property masks on this element, returns property mask list of its parent.
- Returns:
- the iterator of property mask structure list
- See Also:
-
getPropertyMask
Returns the mask of the specified property given its internal name. This method follows these rules:- If the mask of a specified property is defined on this element, returns the mask value.
- If the mask of a specified property is not defined on this element, returns the mask value inherited from its ancestor.
null
is returned if no mask value defined on this property.
The optional mask values are defined in
DesignChoiceConstants.
and they arePROPERTYMASK_TYPE_CHANGE
PROPERTYMASK_TYPE_LOCK
PROPERTYMASK_TYPE_HIDE
- Parameters:
propName
- the name of the property to get. Can be a system-defined or user-defined property name.- Returns:
- the property mask, or null if the mask is not set.
- See Also:
-
setPropertyMask
Sets the mask of the specified property. The mask values are defined inDesignChoiceConstants
and they are:PROPERTYMASK_TYPE_CHANGE
PROPERTYMASK_TYPE_LOCK
PROPERTYMASK_TYPE_HIDE
Note it is not allowed to set the mask on
PROPERTY_MASKS_PROP
. This method does nothing for this situation.- Parameters:
propName
- the property name to get. Can be a system-defined or user-defined property name.maskValue
- the mask value- Throws:
SemanticException
- if the maskValue is not one of the above.- See Also:
-
setDisplayNameKey
Sets the resource key of the display name.- Parameters:
displayNameKey
- the resource key of the display name- Throws:
SemanticException
- if the display name resource-key property is locked or not defined on this element.
-
getDisplayNameKey
Gets the resource key of the display name.- Returns:
- the resource key of the display name
-
setDisplayName
Sets the display name.- Parameters:
displayName
- the display name- Throws:
SemanticException
- if the display name property is locked or not defined on this element.
-
getDisplayName
Gets the display name.- Returns:
- the display name
-
setCustomXml
Sets the custom XML.- Parameters:
customXml
- the custom XML to set- Throws:
SemanticException
- if the custom XML is locked or not defined on this element.
-
getCustomXml
Gets the custom XML.- Returns:
- the custom XML
-
setComments
Sets the comments of the report element.- Parameters:
theComments
- the comments to set- Throws:
SemanticException
- if the comments property is locked or not defined on this element.
-
getComments
Gets the comments of the report element.- Returns:
- the comments of the report element
-
isValidReferenceForCompoundElement
Deprecated.Checks whether the compound element is valid if the element has no extends property value or if the current element is compound elements and extends value is unresovled.- Returns:
true
if the compound element is valid. Otherwisefalse
.
-
isValidLayoutForCompoundElement
public boolean isValidLayoutForCompoundElement()Checks whether the compound element is valid. If a table/grid has no rows/columns, it is invalid. If the table has overlapped areas, it is invalid.- Returns:
true
if the compound element is valid. Otherwisefalse
.
-