Class HighlightRule
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
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringName of this structure within the meta-data dictionary.static final StringThe style member.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.eclipse.birt.report.model.api.elements.structures.StyleRule
IS_DESIGN_TIME_MEMBER, isDesignTime, operator, OPERATOR_MEMBER, TEST_EXPR_MEMBER, testExpression, value1, VALUE1_MEMBER, value2, VALUE2_MEMBERFields inherited from class org.eclipse.birt.report.model.core.PropertyStructure
propValues -
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor.HighlightRule(String op, String v1, String v2, String testExpre) Constructs the highlight rule with an operator and its arguments. -
Method Summary
Modifier and TypeMethodDescriptiongetDefn()Gets the structure definition by the name of this structure.protected ObjectgetIntrinsicProperty(String propName) Returns the value of a structure property represented as a member variable.getProperty(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.metadata.PropertyDefn propDefn) Gets the value of a property.Returns the name of the structure definition.getStyle()Returns the style that the highlight rule links with.handle(SimpleValueHandle valueHandle, int index) Creates the specific handle of this structure.protected voidsetIntrinsicProperty(String propName, Object value) Sets the value of of a structure property represented as a member variable.voidsetStyle(StyleHandle styleElement) Sets the style property.Methods inherited from class org.eclipse.birt.report.model.api.elements.structures.StyleRule
getOperator, getTestExpression, getValue1, getValue1ExpressionList, getValue1List, getValue2, isDesignTime, setDesignTime, setOperator, setTestExpression, setValue1, setValue1, setValue2Methods inherited from class org.eclipse.birt.report.model.core.PropertyStructure
clone, getLocalProperty, getLocalProperty, setPropertyMethods inherited from class org.eclipse.birt.report.model.core.Structure
checkStringMember, copy, equals, getCompatibleValue, getContext, getElement, getExpressionProperty, getHandle, getHandle, getMemberDefn, getObjectDefn, getProperty, getReferencableProperty, getStringProperty, isReferencable, setContext, setExpressionProperty, setProperty, setupContext, updateReference, validate
-
Field Details
-
BORDER_TOP_STYLE_MEMBER
- See Also:
-
BORDER_TOP_WIDTH_MEMBER
- See Also:
-
BORDER_TOP_COLOR_MEMBER
- See Also:
-
BORDER_LEFT_STYLE_MEMBER
- See Also:
-
BORDER_LEFT_WIDTH_MEMBER
- See Also:
-
BORDER_LEFT_COLOR_MEMBER
- See Also:
-
BORDER_BOTTOM_STYLE_MEMBER
- See Also:
-
BORDER_BOTTOM_WIDTH_MEMBER
- See Also:
-
BORDER_BOTTOM_COLOR_MEMBER
- See Also:
-
BORDER_RIGHT_STYLE_MEMBER
- See Also:
-
BORDER_RIGHT_WIDTH_MEMBER
- See Also:
-
BORDER_RIGHT_COLOR_MEMBER
- See Also:
-
BACKGROUND_COLOR_MEMBER
- See Also:
-
BACKGROUND_IMAGE_MEMBER
- See Also:
-
DATE_TIME_FORMAT_MEMBER
- See Also:
-
NUMBER_FORMAT_MEMBER
- See Also:
-
NUMBER_ALIGN_MEMBER
- See Also:
-
STRING_FORMAT_MEMBER
- See Also:
-
FONT_FAMILY_MEMBER
- See Also:
-
FONT_SIZE_MEMBER
- See Also:
-
FONT_STYLE_MEMBER
- See Also:
-
FONT_WEIGHT_MEMBER
- See Also:
-
FONT_VARIANT_MEMBER
- See Also:
-
COLOR_MEMBER
- See Also:
-
TEXT_UNDERLINE_MEMBER
- See Also:
-
TEXT_OVERLINE_MEMBER
- See Also:
-
TEXT_LINE_THROUGH_MEMBER
- See Also:
-
TEXT_ALIGN_MEMBER
- See Also:
-
TEXT_TRANSFORM_MEMBER
- See Also:
-
TEXT_INDENT_MEMBER
- See Also:
-
TEXT_DIRECTION_MEMBER
- See Also:
-
PADDING_TOP_MEMBER
- See Also:
-
PADDING_LEFT_MEMBER
- See Also:
-
PADDING_BOTTOM_MEMBER
- See Also:
-
PADDING_RIGHT_MEMBER
- See Also:
-
BACKGROUND_REPEAT_MEMBER
- See Also:
-
LINE_HEIGHT_MEMBER
- See Also:
-
STRUCTURE_NAME
Name of this structure within the meta-data dictionary.- See Also:
-
STYLE_MEMBER
The style member.- See Also:
-
-
Constructor Details
-
HighlightRule
public HighlightRule()Default Constructor. -
HighlightRule
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 dictionaryv1- 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
Description copied from interface:IStructureReturns 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
Description copied from class:org.eclipse.birt.report.model.core.StructureGets the structure definition by the name of this structure.- Specified by:
getDefnin interfaceIStructure- Overrides:
getDefnin classorg.eclipse.birt.report.model.core.Structure- Returns:
- structure definition.
-
handle
Description copied from class:org.eclipse.birt.report.model.core.StructureCreates the specific handle of this structure. This handle is always created.- Specified by:
handlein classorg.eclipse.birt.report.model.core.Structure- Parameters:
valueHandle- the value handle of this structure list property this structure is inindex- the position of this structure in structure list- Returns:
- the handle of this structure.
-
getIntrinsicProperty
Description copied from class:org.eclipse.birt.report.model.core.StructureReturns the value of a structure property represented as a member variable.- Overrides:
getIntrinsicPropertyin classStyleRule- Parameters:
propName- name of the property- Returns:
- the value of the property, or null if the property is not set
-
setIntrinsicProperty
Description copied from class:org.eclipse.birt.report.model.core.StructureSets the value of of a structure property represented as a member variable.- Overrides:
setIntrinsicPropertyin classStyleRule- Parameters:
propName- the name of the property to setvalue- 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.IPropertySetGets the value of a property. An assertion occurs if the member name is not valid.- Specified by:
getPropertyin interfaceorg.eclipse.birt.report.model.core.IPropertySet- Overrides:
getPropertyin classorg.eclipse.birt.report.model.core.Structure- Parameters:
module- the modulepropDefn- 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
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
Returns the style that the highlight rule links with.- Returns:
- the style
-