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

public abstract class ReportElementHandle extends DesignElementHandle
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 Details

    • element

      protected org.eclipse.birt.report.model.core.DesignElement element
      The 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 module
      element - 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 class DesignElementHandle
      Returns:
      The attached element. Will be null if the handle is not attached.
    • propertyMaskIterator

      public Iterator 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

      public String getPropertyMask(String propName)
      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 are

      • PROPERTYMASK_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

      public void setPropertyMask(String propName, String maskValue) throws SemanticException
      Sets the mask of the specified property. The mask values are defined in DesignChoiceConstants 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

      public void setDisplayNameKey(String displayNameKey) throws SemanticException
      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

      public String getDisplayNameKey()
      Gets the resource key of the display name.
      Returns:
      the resource key of the display name
    • setDisplayName

      public void setDisplayName(String displayName) throws SemanticException
      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

      public String getDisplayName()
      Gets the display name.
      Returns:
      the display name
    • setCustomXml

      public void setCustomXml(String customXml) throws SemanticException
      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

      public String getCustomXml()
      Gets the custom XML.
      Returns:
      the custom XML
    • setComments

      public void setComments(String theComments) throws SemanticException
      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

      public String getComments()
      Gets the comments of the report element.
      Returns:
      the comments of the report element
    • isValidReferenceForCompoundElement

      @Deprecated public boolean 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. Otherwise false.
    • 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. Otherwise false.