org.eclipse.birt.report.model.api
Class ExtendedItemHandle

java.lang.Object
  extended byorg.eclipse.birt.report.model.api.DesignElementHandle
      extended byorg.eclipse.birt.report.model.api.ReportElementHandle
          extended byorg.eclipse.birt.report.model.api.ReportItemHandle
              extended byorg.eclipse.birt.report.model.api.ExtendedItemHandle
All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel, org.eclipse.birt.report.model.elements.interfaces.IExtendedItemModel, org.eclipse.birt.report.model.elements.interfaces.IReportItemModel, org.eclipse.birt.report.model.elements.interfaces.IStyledElementModel

public class ExtendedItemHandle
extends ReportItemHandle
implements org.eclipse.birt.report.model.elements.interfaces.IExtendedItemModel

Represents an extended element. An extended item represents a custom element added by the application. Extended items can use user-defined properties, can use scripts, or a combination of the two. Extended items often require user-defined properties.

An extended element has a plug-in property that is a name of a Java class that implements the behavior for the element.

See Also:
ExtendedItem

Field Summary
 
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.IExtendedItemModel
ALT_TEXT_KEY_PROP, ALT_TEXT_PROP, EXTENSION_NAME_PROP, FILTER_PROP
 
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IReportItemModel
BOOKMARK_PROP, BOUND_DATA_COLUMNS_PROP, DATA_SET_PROP, HEIGHT_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
 
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IStyledElementModel
STYLE_PROP
 
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
ExtendedItemHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
          Constructs the handle with the report design and the element it holds.
 
Method Summary
 java.util.Iterator filtersIterator()
          Returns an iterator over filter.
 java.lang.String getAltText()
          Returns the alternate text of this extended item.
 java.lang.String getAltTextKey()
          Returns the resource key of the alternate text of this extended item.
 IElementDefn getDefn()
          Gets the definition of the element.
 java.lang.String getExtensionName()
          Returns the extension name defined by the extended item.
 java.util.List getExtensionPropertyDefinitionList()
           
 java.lang.String getExternalScript()
          Returns the external script defined in the extended element model.
 java.util.List getMethods()
          Returns the methods defined on the extension element definition and the methods defined within the extension model property inside.
 IReportItem getReportItem()
          Returns the interface IReportItem for extension.
 void loadExtendedElement()
          Loads the instance of extended element.
 void setAltText(java.lang.String altText)
          Sets the alt text of this extended item.
 void setAltTextKey(java.lang.String altTextKey)
          Sets the alt text id of this extended item.
 void setExternalScript(java.lang.String theScript)
          Sets the scripts in the extension element model.
 
Methods inherited from class org.eclipse.birt.report.model.api.ReportItemHandle
addColumnBinding, columnBindingsIterator, getBookmark, getColumnBindings, getDataSet, getHeight, getOnCreate, getOnPageBreak, getOnPrepare, getOnRender, getTocExpression, getWidth, getX, getY, paramBindingsIterator, removedUnusedColumnBindings, setBookmark, setDataSet, setHeight, setHeight, setOnCreate, setOnPageBreak, setOnPrepare, setOnRender, setTocExpression, setWidth, setWidth, setX, setX, setY, setY, visibilityRulesIterator
 
Methods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMask
 
Methods inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
addElement, addElement, addListener, addUserPropertyDefn, canContain, canContain, canDrop, canEdit, canTransformToTemplate, clearAllProperties, clearContents, clearProperty, clientsIterator, copy, copyPropertyTo, createTemplateElement, derivedIterator, doSort, drop, dropAndClear, dropUserPropertyDefn, findContentSlot, getBooleanProperty, getChoices, getColorProperty, getContainer, getContainerSlotHandle, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getEventHandlerClass, getExtends, getExternalizedValue, getExternalizedValue, getExternalizedValue, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getID, getIntProperty, getListProperty, getListProperty, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getProperty, getPropertyBinding, getPropertyBindings, getPropertyDefn, getPropertyHandle, getPropertyIterator, getQualifiedName, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, isTemplateParameterValue, isValid, localize, moveTo, removeListener, revertToReportItem, revertToTemplate, semanticCheck, setEventHandlerClass, setExtends, setExtendsElement, setExtendsName, setFloatProperty, setIntProperty, setName, setNumberProperty, setProperties, setProperty, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, showError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedItemHandle

public ExtendedItemHandle(org.eclipse.birt.report.model.core.Module module,
                          org.eclipse.birt.report.model.core.DesignElement element)
Constructs the handle with the report design and the element it holds. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.

Parameters:
module - the module
element - the model representation of the element
Method Detail

getExtensionName

public java.lang.String getExtensionName()
Returns the extension name defined by the extended item.

Returns:
the extension name as a string

getDefn

public IElementDefn getDefn()
Description copied from class: DesignElementHandle
Gets the definition of the element. The definition provides meta-data about the element, such as its type name, list of defined properties, list of slots and so on.

Overrides:
getDefn in class DesignElementHandle
Returns:
the meta-data definition of the element

loadExtendedElement

public void loadExtendedElement()
                         throws ExtendedElementException
Loads the instance of extended element. When the application invokes UI for the extended element, such as listing property values in property sheet, set the value of the extension-defined properties and so other operations, the application must create an instance of the extension element first. The created extended element reads its information cached by the handle and de-serialize the extension model.

Throws:
ExtendedElementException - if the serialized model is invalid

getReportItem

public IReportItem getReportItem()
                          throws ExtendedElementException
Returns the interface IReportItem for extension.

Returns:
the interface IReportItem for extension
Throws:
ExtendedElementException - if the serialized model is invalid

getExtensionPropertyDefinitionList

public java.util.List getExtensionPropertyDefinitionList()

getMethods

public java.util.List getMethods()
Returns the methods defined on the extension element definition and the methods defined within the extension model property inside.

Overrides:
getMethods in class DesignElementHandle
Returns:
the list of methods

filtersIterator

public java.util.Iterator filtersIterator()
Returns an iterator over filter. The iterator returns instances of FilterConditionHandle that represents filter condition object.

Returns:
iterator over filters.
See Also:
FilterCondition

getExternalScript

public java.lang.String getExternalScript()
Returns the external script defined in the extended element model.

Returns:
the script

setExternalScript

public void setExternalScript(java.lang.String theScript)
                       throws SemanticException
Sets the scripts in the extension element model.

Parameters:
theScript - the script to be set
Throws:
SemanticException - if fail to set the scripts

getAltText

public java.lang.String getAltText()
Returns the alternate text of this extended item.

Returns:
the alternate text of the extended item.

getAltTextKey

public java.lang.String getAltTextKey()
Returns the resource key of the alternate text of this extended item.

Returns:
the resource key of the alternate text

setAltText

public void setAltText(java.lang.String altText)
                throws SemanticException
Sets the alt text of this extended item.

Parameters:
altText - the alt text
Throws:
SemanticException - if the property is locked.

setAltTextKey

public void setAltTextKey(java.lang.String altTextKey)
                   throws SemanticException
Sets the alt text id of this extended item.

Parameters:
altTextKey - the alt text id
Throws:
SemanticException - if the property is locked.


Copyright © 2005 Actuate Corp. All rights reserved.