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

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
All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel, org.eclipse.birt.report.model.elements.interfaces.IReportItemModel, org.eclipse.birt.report.model.elements.interfaces.IStyledElementModel
Direct Known Subclasses:
DataItemHandle, ExtendedItemHandle, FreeFormHandle, GridHandle, ImageHandle, LabelHandle, LineHandle, ListingHandle, RectangleHandle, TextDataHandle, TextItemHandle

public abstract class ReportItemHandle
extends ReportElementHandle
implements org.eclipse.birt.report.model.elements.interfaces.IReportItemModel, org.eclipse.birt.report.model.elements.interfaces.IStyledElementModel

Represents a report item: any element that can appear within a section of the report. Report items have a size and position that are used in some containers. Report items also have a style. Report items can references to the data set to use for itself. Many report items can be the target of hyperlinks. The bookmark property identifies the item location. It also has a set of visibility rules that say when a report item should be hidden. The bindings allow a report item to pass data into its data source. Call DesignElementHandle.getPrivateStyle()( ) to get a handle with getter/setter methods for the style properties.

See Also:
ReportItem

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.IReportItemModel
BOOKMARK_PROP, DATA_SET_PROP, HEIGHT_PROP, ON_CREATE_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
 
Constructor Summary
ReportItemHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
          Constructs the handle for a report item with the given design and element.
 
Method Summary
 java.lang.String getBookmark()
          Returns the bookmark of the report item.
 DataSetHandle getDataSet()
          Returns the data set of the report item.
 DimensionHandle getHeight()
          Gets a handle to deal with the item's height.
 java.lang.String getOnCreate()
          Returns the script executed when the element is created in the Factory.
 java.lang.String getOnPrepare()
          Gets the on-prepare script of the group.
 java.lang.String getOnRender()
          Returns the script executed when the element is prepared for rendering in the Presentation engine.
 java.lang.String getTocExpression()
          Returns the expression evalueated as a table of contents entry for this item.
 DimensionHandle getWidth()
          Gets a handle to deal with the item's width.
 DimensionHandle getX()
          Gets a handle to deal with the item's x (horizontal) position.
 DimensionHandle getY()
          Gets a handle to deal with the item's y (vertical) position.
 java.util.Iterator paramBindingsIterator()
          Returns the iterator for parameter binding list defined on this report item.
 void setBookmark(java.lang.String value)
          Sets the bookmark of the report item.
 void setDataSet(DataSetHandle handle)
          Sets the data set of the report item.
 void setHeight(double dimension)
          Sets the item's height to a value in default units.
 void setHeight(java.lang.String dimension)
          Sets the item's height using a dimension string with optional unit suffix such as "10" or "10pt".
 void setOnCreate(java.lang.String value)
          Sets the script executed when the element is created in the Factory.
 void setOnPrepare(java.lang.String script)
          Sets the on-prepare script of the group element.
 void setOnRender(java.lang.String value)
          Sets the script executed when the element is prepared for rendering in the Presentation engine.
 void setTocExpression(java.lang.String expression)
          Sets a table of contents entry for this item.
 void setWidth(double dimension)
          Sets the item's width to a value in default units.
 void setWidth(java.lang.String dimension)
          Sets the item's width using a dimension string with optional unit suffix such as "10" or "10pt".
 void setX(double dimension)
          Sets the item's x position to a value in default units.
 void setX(java.lang.String dimension)
          Sets the item's x position using a dimension string with optional unit suffix such as "10" or "10pt".
 void setY(double dimension)
          Sets the item's y position to a value in default units.
 void setY(java.lang.String dimension)
          Sets the item's y position using a dimension string with optional unit suffix such as "10" or "10pt".
 java.util.Iterator visibilityRulesIterator()
          Returns visibility rules defined on the report item.
 
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, getDefn, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getEventHandlerClass, getExtends, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getID, getIntProperty, getListProperty, getMethods, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getProperty, getPropertyBinding, 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

ReportItemHandle

public ReportItemHandle(org.eclipse.birt.report.model.core.Module module,
                        org.eclipse.birt.report.model.core.DesignElement element)
Constructs the handle for a report item 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 module
element - the model representation of the element
Method Detail

getDataSet

public DataSetHandle getDataSet()
Returns the data set of the report item.

Returns:
the handle to the data set

setDataSet

public void setDataSet(DataSetHandle handle)
                throws SemanticException
Sets the data set of the report item.

Parameters:
handle - the handle of the data set
Throws:
SemanticException - if the property is locked.

getX

public DimensionHandle getX()
Gets a handle to deal with the item's x (horizontal) position.

Returns:
a DimensionHandle for the item's x position.

getY

public DimensionHandle getY()
Gets a handle to deal with the item's y (vertical) position.

Returns:
a DimensionHandle for the item's y position.

setX

public void setX(java.lang.String dimension)
          throws SemanticException
Sets the item's x position using a dimension string with optional unit suffix such as "10" or "10pt". If no suffix is provided, then the units are assumed to be in the design's default units. Call this method to set a string typed in by the user.

Parameters:
dimension - dimension string with optional unit suffix.
Throws:
SemanticException - if the string is not valid

setX

public void setX(double dimension)
          throws SemanticException
Sets the item's x position to a value in default units. The default unit may be defined by the property in BIRT or the application unit defined in the design session.

Parameters:
dimension - the new value in application units.
Throws:
SemanticException - if the property is locked.

setY

public void setY(java.lang.String dimension)
          throws SemanticException
Sets the item's y position using a dimension string with optional unit suffix such as "10" or "10pt". If no suffix is provided, then the units are assumed to be in the design's default units. Call this method to set a string typed in by the user.

Parameters:
dimension - dimension string with optional unit suffix.
Throws:
SemanticException - if the string is not valid

setY

public void setY(double dimension)
          throws SemanticException
Sets the item's y position to a value in default units. The default unit may be defined by the property in BIRT or the application unit defined in the design session.

Parameters:
dimension - the new value in application units.
Throws:
SemanticException - if the property is locked.

setHeight

public void setHeight(java.lang.String dimension)
               throws SemanticException
Sets the item's height using a dimension string with optional unit suffix such as "10" or "10pt". If no suffix is provided, then the units are assumed to be in the design's default units. Call this method to set a string typed in by the user.

Parameters:
dimension - dimension string with optional unit suffix.
Throws:
SemanticException - if the string is not valid

setHeight

public void setHeight(double dimension)
               throws SemanticException
Sets the item's height to a value in default units. The default unit may be defined by the property in BIRT or the application unit defined in the design session.

Parameters:
dimension - the new value in application units.
Throws:
SemanticException - if the property is locked.

setWidth

public void setWidth(java.lang.String dimension)
              throws SemanticException
Sets the item's width using a dimension string with optional unit suffix such as "10" or "10pt". If no suffix is provided, then the units are assumed to be in the design's default units. Call this method to set a string typed in by the user.

Parameters:
dimension - dimension string with optional unit suffix.
Throws:
SemanticException - if the string is not valid

setWidth

public void setWidth(double dimension)
              throws SemanticException
Sets the item's width to a value in default units. The default unit may be defined by the property in BIRT or the application unit defined in the design session.

Parameters:
dimension - the new value in application units.
Throws:
SemanticException - if the property is locked.

getWidth

public DimensionHandle getWidth()
Gets a handle to deal with the item's width.

Returns:
a DimensionHandle for the item's width.

getHeight

public DimensionHandle getHeight()
Gets a handle to deal with the item's height.

Returns:
a DimensionHandle for the item's height.

getBookmark

public java.lang.String getBookmark()
Returns the bookmark of the report item.

Returns:
the book mark as a string

setBookmark

public void setBookmark(java.lang.String value)
                 throws SemanticException
Sets the bookmark of the report item.

Parameters:
value - the property value to be set.
Throws:
SemanticException - if the property is locked.

visibilityRulesIterator

public java.util.Iterator visibilityRulesIterator()
Returns visibility rules defined on the report item. The element in the iterator is the corresponding StructureHandle that deal with a Hide in the list.

Returns:
the iterator for visibility rules defined on this report item.
See Also:
HideRule

getOnCreate

public java.lang.String getOnCreate()
Returns the script executed when the element is created in the Factory. Called after the item is created, but before the item is saved to the report document file.

Returns:
the script that executes

setOnCreate

public void setOnCreate(java.lang.String value)
                 throws SemanticException
Sets the script executed when the element is created in the Factory. Called after the item is created, but before the item is saved to the report document file.

Parameters:
value - the script to set
Throws:
SemanticException - if the property is locked.

getOnRender

public java.lang.String getOnRender()
Returns the script executed when the element is prepared for rendering in the Presentation engine.

Returns:
the script that executes

setOnRender

public void setOnRender(java.lang.String value)
                 throws SemanticException
Sets the script executed when the element is prepared for rendering in the Presentation engine.

Parameters:
value - the script to set
Throws:
SemanticException - if the property is locked.

paramBindingsIterator

public java.util.Iterator paramBindingsIterator()
Returns the iterator for parameter binding list defined on this report item. The element in the iterator is the corresponding StructureHandle that deal with a ParamBinding in the list.

Returns:
the iterator for parameter binding structure list defined on this data set.
See Also:
ParamBinding

setTocExpression

public void setTocExpression(java.lang.String expression)
                      throws SemanticException
Sets a table of contents entry for this item. The TOC property defines an expression that returns a string that is to appear in the Table of Contents for this item or its container.

Parameters:
expression - the expression that returns a string
Throws:
SemanticException - if the TOC property is locked by the property mask.
See Also:
getTocExpression()

getTocExpression

public java.lang.String getTocExpression()
Returns the expression evalueated as a table of contents entry for this item.

Returns:
the expression evaluated as a table of contents entry for this item
See Also:
setTocExpression(String)

getOnPrepare

public java.lang.String 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

setOnPrepare

public void setOnPrepare(java.lang.String script)
                  throws SemanticException
Sets the on-prepare script of the group element.

Parameters:
script - the script to set
Throws:
SemanticException - if the method is locked.
See Also:
getOnPrepare()


Copyright © 2005 Actuate Corp. All rights reserved.