java.lang.Object
org.eclipse.birt.report.model.core.Structure
org.eclipse.birt.report.model.core.PropertyStructure
org.eclipse.birt.report.model.api.elements.structures.StyleRule
org.eclipse.birt.report.model.api.elements.structures.HighlightRule
All Implemented Interfaces:
Cloneable, IStructure, org.eclipse.birt.report.model.core.IPropertySet

public class HighlightRule extends StyleRule
Represents a highlight rule that says how a data item should appear based on the value within it. All highlight rules are driven by a value expression defined on the style. Each rule has an expression that matches a set of values, and a set of font and border instructions for how to format the data item when the rule "fires."
  • Field Details

  • Constructor Details

    • HighlightRule

      public HighlightRule()
      Default Constructor.
    • HighlightRule

      public HighlightRule(String op, String v1, String v2, String testExpre)
      Constructs the highlight rule with an operator and its arguments.
      Parameters:
      op - the supported operator. One of the internal choice values identified in the meta-data dictionary
      v1 - the comparison value expressions for operators that take one or two arguments (equals, like, between)
      v2 - the second comparison value for operators that take two arguments (between)
      testExpre - the expression to check
  • Method Details

    • getStructName

      public String getStructName()
      Description copied from interface: IStructure
      Returns the name of the structure definition. The name is the one used to define the structure in the meta-data dictionary.
      Returns:
      the internal name of the structure a defined in the meta-data dictionary.
    • getDefn

      public IStructureDefn getDefn()
      Description copied from class: org.eclipse.birt.report.model.core.Structure
      Gets the structure definition by the name of this structure.
      Specified by:
      getDefn in interface IStructure
      Overrides:
      getDefn in class org.eclipse.birt.report.model.core.Structure
      Returns:
      structure definition.
    • handle

      public StructureHandle handle(SimpleValueHandle valueHandle, int index)
      Description copied from class: org.eclipse.birt.report.model.core.Structure
      Creates the specific handle of this structure. This handle is always created.
      Specified by:
      handle in class org.eclipse.birt.report.model.core.Structure
      Parameters:
      valueHandle - the value handle of this structure list property this structure is in
      index - the position of this structure in structure list
      Returns:
      the handle of this structure.
    • getIntrinsicProperty

      protected Object getIntrinsicProperty(String propName)
      Description copied from class: org.eclipse.birt.report.model.core.Structure
      Returns the value of a structure property represented as a member variable.
      Overrides:
      getIntrinsicProperty in class StyleRule
      Parameters:
      propName - name of the property
      Returns:
      the value of the property, or null if the property is not set
    • setIntrinsicProperty

      protected void setIntrinsicProperty(String propName, Object value)
      Description copied from class: org.eclipse.birt.report.model.core.Structure
      Sets the value of of a structure property represented as a member variable.
      Overrides:
      setIntrinsicProperty in class StyleRule
      Parameters:
      propName - the name of the property to set
      value - the property value
    • getProperty

      public Object getProperty(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.metadata.PropertyDefn propDefn)
      Description copied from interface: org.eclipse.birt.report.model.core.IPropertySet
      Gets the value of a property. An assertion occurs if the member name is not valid.
      Specified by:
      getProperty in interface org.eclipse.birt.report.model.core.IPropertySet
      Overrides:
      getProperty in class org.eclipse.birt.report.model.core.Structure
      Parameters:
      module - the module
      propDefn - definition of the property to get
      Returns:
      value of the item as an object, or null if the item is not set or is not found.
    • setStyle

      public void setStyle(StyleHandle styleElement)
      Sets the style property. If it is a valid style and highlight rule has no local values, values on the style are returned.
      Parameters:
      styleElement - the style
    • getStyle

      public StyleHandle getStyle()
      Returns the style that the highlight rule links with.
      Returns:
      the style