public abstract class ContentElementHandle extends DesignElementHandle
| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.birt.report.model.core.DesignElement |
element
The target report element.
|
moduleCOMMENTS_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 and Description |
|---|
ContentElementHandle(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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Listener obj)
Registers a change event listener.
|
boolean |
canTransformToTemplate()
Determines if the current element can be transformed to a template
element.
|
java.util.Iterator |
clientsIterator()
Returns an iterator over the clients of this element.
|
TemplateElementHandle |
createTemplateElement(java.lang.String name)
Creates a template element handle and transforms the current element
handle to the created template element.
|
java.util.Iterator |
derivedIterator()
Returns an iterator over the elements that derive from this one.
|
org.eclipse.birt.report.model.core.DesignElement |
getElement()
Returns the element to which this handle is attached.
|
java.lang.String |
getEventHandlerClass()
Gets a string that defines the event handle class.
|
DesignElementHandle |
getExtends()
Returns a handle to the element that this element extends.
|
java.lang.String |
getName()
Returns the name of this element.
|
StyleHandle |
getPrivateStyle()
Returns a handle to work with the style properties of this element.
|
java.lang.String |
getQualifiedName()
Gets the name of this element.
|
boolean |
isTemplateParameterValue()
Checks whether this element is based on a template parameter definition
or not.
|
void |
localize()
Localize the element, break the parent/child relationship and set all the
extended properties locally.
|
void |
removeListener(Listener obj)
Removes a given listener.
|
void |
revertToReportItem()
if this design element is based on a template definition
DesignElementHandle.isTemplateParameterValue(),get rid of the template definition ) |
TemplateElementHandle |
revertToTemplate(java.lang.String name)
Creates a template element handle and transforms the current element
handle to the created template element if the current element is based on
a template parameter definition.
|
void |
setEventHandlerClass(java.lang.String expr)
Sets the group expression.
|
void |
setExtends(DesignElementHandle parent)
Sets this element to extend the given element.
|
void |
setExtendsName(java.lang.String name)
Sets the name of the element that this element extends.
|
void |
setName(java.lang.String name)
Sets the name of this element.
|
void |
setStyle(SharedStyleHandle style)
Sets the shared style element for this element.
|
void |
setStyleName(java.lang.String name)
Sets the name of the shared style for this element.
|
add, add, addElement, addElement, addUserPropertyDefn, cachePropertyHandles, canContain, canContain, canContain, canContain, canDrop, canEdit, clearAllProperties, clearContents, clearProperty, copy, copyPropertyTo, 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, getExpressionProperty, getExternalizedValue, getExternalizedValue, getFactoryElementHandle, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getMethods, getModule, getModuleHandle, getNumberProperty, getProperty, getPropertyBinding, getPropertyBindingExpression, getPropertyBindings, getPropertyDefn, getPropertyHandle, getPropertyIterator, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, initializeSlotHandles, isDirectionRTL, isInTemplateParameter, isValid, move, move, moveTo, moveTo, moveTo, moveTo, newHandlerOnEachEvent, paste, paste, paste, paste, semanticCheck, setBooleanProperty, setEncryption, setExpressionProperty, setExtendsElement, setFloatProperty, setIntProperty, setNewHandlerOnEachEvent, setNumberProperty, setProperties, setProperty, setPropertyBinding, setPropertyBinding, setStringProperty, setStyleElement, setValid, shift, showError, slotsIteratorprotected org.eclipse.birt.report.model.core.DesignElement element
public ContentElementHandle(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.core.DesignElement element)
module - the moduleelement - the model representation of the elementpublic final org.eclipse.birt.report.model.core.DesignElement getElement()
DesignElementHandlegetElement in class DesignElementHandlepublic final void addListener(Listener obj)
DesignElementHandleaddListener in class DesignElementHandleobj - the listener to registerpublic final boolean isTemplateParameterValue()
DesignElementHandleDesignElementHandle.revertToTemplate(String)to assure that this element can be
reverted to a template element. If this method returns false, method
revertToTemplate(String) must fail too.isTemplateParameterValue in class DesignElementHandlepublic final void localize()
throws SemanticException
DesignElementHandlelocalize in class DesignElementHandleSemanticException - the element can not be localized properly. It may be because
that the element is not extended from a parent, or that same
properties can not be localized on the element or the content
elements inside it.public final void removeListener(Listener obj)
DesignElementHandleremoveListener in class DesignElementHandleobj - the listener to de-registerpublic final void revertToReportItem()
throws SemanticException
DesignElementHandleDesignElementHandle.isTemplateParameterValue(),get rid of the template definition )revertToReportItem in class DesignElementHandleSemanticExceptionpublic final TemplateElementHandle revertToTemplate(java.lang.String name) throws SemanticException
DesignElementHandlerevertToTemplate in class DesignElementHandlename - the name of created template element handleSemanticException - if the current element can not be transformed to a template
element, current element has no template parameter
definition, current module is not a report design or some
containing contexts don't matchpublic final boolean canTransformToTemplate()
DesignElementHandlecanTransformToTemplate in class DesignElementHandlepublic final java.util.Iterator clientsIterator()
DesignElementHandleclientsIterator in class DesignElementHandlegetNext( ) method is of type
DesignElementHandle. Nothing will be iterated over an
element that is not ReferenceableElement.public final TemplateElementHandle createTemplateElement(java.lang.String name) throws SemanticException
DesignElementHandlecreateTemplateElement in class DesignElementHandlename - the name of created template element handleSemanticException - if the current element can not be transformed to a template
element, current module is not a report design or some
containing contexts don't matchpublic final java.util.Iterator derivedIterator()
DesignElementHandlederivedIterator in class DesignElementHandlegetNext( ) method is
of type DesignElementHandle.public java.lang.String getName()
DesignElementHandlenull if the
element does not have a name. Many elements do not require a name. The
name does not inherit. If this element does not have a name, it will not
inherit the name of its parent element.getName in class DesignElementHandlepublic final StyleHandle getPrivateStyle()
DesignElementHandle
Note a key difference between this method and the
getStyle( ) method. This method returns a handle to the
this element. The getStyle( ) method returns a
handle to the shared style, if any, that this element references.
getPrivateStyle in class DesignElementHandlenull if this element does not have style
properties.public final java.lang.String getQualifiedName()
DesignElementHandlegetName(), plus the namespace of the module that the
element is contained, if the element name resides in the whole design
tree scope; otherwise we will append the name of the holder where the
element name resides. If the element is existed in the current
module,this method and getName() will return identical
results.getQualifiedName in class DesignElementHandlepublic final void setEventHandlerClass(java.lang.String expr)
throws SemanticException
DesignElementHandlesetEventHandlerClass in class DesignElementHandleexpr - the expression to setSemanticException - If the expression is invalid.DesignElementHandle.getEventHandlerClass()public final void setExtends(DesignElementHandle parent) throws ExtendsException
DesignElementHandlesetExtends in class DesignElementHandleparent - handle to the element that this element is to extend. If
null, then this element will no longer extend
another element.ExtendsException - if the parent element is of the wrong type as this element.public final void setExtendsName(java.lang.String name)
throws ExtendsException
DesignElementHandlesetExtendsName in class DesignElementHandlename - the name of the element that this one is to extendExtendsException - if no element exists with the given name, or if the element
is of the wrong type.public void setName(java.lang.String name)
throws NameException
DesignElementHandlenull, then the
name is cleared if this element does not require a name.setName in class DesignElementHandlename - the new nameNameException - if the name is duplicate, or if the name is null
and this element requires a name.public java.lang.String getEventHandlerClass()
DesignElementHandlegetEventHandlerClass in class DesignElementHandleDesignElementHandle.setEventHandlerClass(String)public DesignElementHandle getExtends()
DesignElementHandlegetExtends in class DesignElementHandlenull if this element
does not have a parent, or if the extends name does not resolve
to a valid element.public void setStyle(SharedStyleHandle style) throws StyleException
DesignElementHandlesetStyle in class DesignElementHandlestyle - the handle to the shared style. If null, then the shared style
is cleared.StyleException - if this element does not support a style.DesignElementHandle.getStyle()public void setStyleName(java.lang.String name)
throws StyleException
DesignElementHandlesetStyleName in class DesignElementHandlename - the name of the shared style. If null, then the
shared style name is cleared.StyleException - If the name is not valid, or if this element does not support
a style.DesignElementHandle.getStyle()Copyright © 2014 OpenText Corp. All rights reserved.