org.pentaho.reporting.engine.classic.core
Interface ReportElement

All Superinterfaces:
Cloneable, Serializable
All Known Subinterfaces:
ReportDefinition, RootLevelBand
All Known Implementing Classes:
AbstractReportDefinition, AbstractRootLevelBand, AnchorElement, Band, CrosstabColumnGroup, CrosstabColumnGroupBody, CrosstabGroup, CrosstabOtherGroup, CrosstabOtherGroupBody, CrosstabRowGroup, CrosstabRowGroupBody, CrosstabSummaryFooter, CrosstabSummaryHeader, CrosstabTitleFooter, CrosstabTitleHeader, DetailsFooter, DetailsHeader, DrawableElement, Element, Group, GroupBody, GroupDataBody, GroupFooter, GroupHeader, ImageElement, ItemBand, MasterReport, NoDataBand, PageFooter, PageHeader, RelationalGroup, ReportDefinitionImpl, ReportFooter, ReportHeader, Section, ShapeElement, SubGroupBody, SubReport, TextElement, Watermark

public interface ReportElement
extends Cloneable, Serializable

A structural layout element. ReportElements hold style and attributes and allow to establish references that survive cloning via an ID object.

Author:
Thomas Morgner

Method Summary
 Object getAttribute(String namespace, String name)
           
 Expression getAttributeExpression(String namespace, String name)
          Returns the attribute expression for the given attribute identified by its namespace and attribute name.
 String[] getAttributeExpressionNames(String namespace)
          Returns the names of all attributes for the given namespace that have attribute-expressions assigned.
 String[] getAttributeExpressionNamespaces()
          Returns the namespaces of all attributes that have attribute-expressions assigned.
 String[] getAttributeNames(String name)
           
 String[] getAttributeNamespaces()
           
 ReportAttributeMap getAttributes()
           
 String getId()
           
 ElementMetaData getMetaData()
           
 String getName()
           
 InstanceID getObjectID()
           
 Section getParentSection()
           
 ReportDefinition getReportDefinition()
           
 ElementStyleSheet getStyle()
           
 Expression getStyleExpression(StyleKey property)
           
 Map getStyleExpressions()
           
 Object getTreeLock()
           
 void setAttribute(String namespace, String name, Object value)
          Defines a attribute's static value.
 void setAttributeExpression(String namespace, String name, Expression value)
          Assigns a new attribute expression for the given attribute.
 void setStyleExpression(StyleKey property, Expression function)
           
 

Method Detail

setAttributeExpression

void setAttributeExpression(String namespace,
                            String name,
                            Expression value)
Assigns a new attribute expression for the given attribute. Attributes are identified by the namespace and name. Each attribute can have only one expression assigned. Setting the expression to null clears the expression and will preserve the attribute's static value.

Functions cannot be used as attribute-expressions as attribute- and style-expressions do not receive events and are not guaranteed to be executed unless the element is processed.

Parameters:
namespace - the attribute's namespace.
name - the attribute's name.
value - the expression.

getAttributeExpression

Expression getAttributeExpression(String namespace,
                                  String name)
Returns the attribute expression for the given attribute identified by its namespace and attribute name.

Parameters:
namespace - the attribute's namespace.
name - the attribute's name.
Returns:
the assigned expression or null if the attribute has no expression assigned.

getAttributeExpressionNamespaces

String[] getAttributeExpressionNamespaces()
Returns the namespaces of all attributes that have attribute-expressions assigned.

Returns:
the attribute-namespaces as array.

getAttributeExpressionNames

String[] getAttributeExpressionNames(String namespace)
Returns the names of all attributes for the given namespace that have attribute-expressions assigned.

Parameters:
namespace - the namespace for which the attribute-names should be returned, never null.
Returns:
the known attribute names as array.

setAttribute

void setAttribute(String namespace,
                  String name,
                  Object value)
Defines a attribute's static value. Attributes are identified by the attribute's namespace and the attribute name. Setting a attribute value to null removes the attribute. Attribute values are not checked for type safety.

Parameters:
namespace - the attribute's namespace.
name - the attribute name.
value - the attribute value, or null to remove the attribute.

getAttribute

Object getAttribute(String namespace,
                    String name)

getAttributeNamespaces

String[] getAttributeNamespaces()

getAttributeNames

String[] getAttributeNames(String name)

getAttributes

ReportAttributeMap getAttributes()

getMetaData

ElementMetaData getMetaData()

getParentSection

Section getParentSection()

getStyle

ElementStyleSheet getStyle()

getReportDefinition

ReportDefinition getReportDefinition()

setStyleExpression

void setStyleExpression(StyleKey property,
                        Expression function)

getStyleExpression

Expression getStyleExpression(StyleKey property)

getStyleExpressions

Map getStyleExpressions()

getTreeLock

Object getTreeLock()

getName

String getName()

getId

String getId()

getObjectID

InstanceID getObjectID()