Package org.eclipse.birt.report.model.api

# Class HighlightRuleHandle

java.lang.Object
org.eclipse.birt.report.model.api.ElementDetailHandle
org.eclipse.birt.report.model.api.ValueHandle
org.eclipse.birt.report.model.api.StructureHandle
org.eclipse.birt.report.model.api.StyleRuleHandle
org.eclipse.birt.report.model.api.HighlightRuleHandle

public class HighlightRuleHandle extends StyleRuleHandle
Represents a highlight rule in the highlight property of a style. A highlight rule gives a set of conditional style properties along with a condition for when to apply the properties. A highlight can be defined in either a shared style or a private style.

See Also:
  - `ColorHandle`
  - `DimensionHandle`
  - `FontHandle`
  - `HighlightRule`
  - `DesignChoiceConstants`

## Field Summary

### Fields inherited from class org.eclipse.birt.report.model.api.StructureHandle

`structContext`

### Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle

`elementHandle`

## Constructor Summary

Constructors
Constructor
Description
`HighlightRuleHandle(SimpleValueHandle valueHandle, int index)`
Constructs a highlight rule handle with the given `SimpleValueHandle` and the index of the highlight rule in the highlight.

## Method Summary

Modifier and Type
Method
Description
`ColorHandle`
`getBackgroundColor()`
Returns a handle to work with the background color.
`ColorHandle`
`getBorderBottomColor()`
Returns a handle to work with the border bottom color.
`String`
`getBorderBottomStyle()`
Returns the style of the border bottom line.
`DimensionHandle`
`getBorderBottomWidth()`
Returns a handle to work with the width of the bottom side of the border.
`ColorHandle`
`getBorderLeftColor()`
Returns a handle to work with the border left color.
`String`
`getBorderLeftStyle()`
Returns the style of the border left line.
`DimensionHandle`
`getBorderLeftWidth()`
Returns a handle to work with the width of the left side of the border.
`ColorHandle`
`getBorderRightColor()`
Returns a handle to work with the border right color.
`String`
`getBorderRightStyle()`
Returns the style of the border right line.
`DimensionHandle`
`getBorderRightWidth()`
Returns a handle to work with the width of the right side of the border.
`ColorHandle`
`getBorderTopColor()`
Returns a handle to work with the border top color.
`String`
`getBorderTopStyle()`
Returns the style of the top line of the border.
`DimensionHandle`
`getBorderTopWidth()`
Returns a handle to work with the width of the top side of the border.
`ColorHandle`
`getColor()`
Returns a handle to work with the color property.
`String`
`getDateTimeFormat()`
Returns the pattern of the date-time-format for a highlight rule.
`String`
`getDateTimeFormatCategory()`
Returns the category of the date-time-format for a highlight rule.
`FontHandle`
`getFontFamilyHandle()`
Returns the font family handle of the highlight rule.
`DimensionHandle`
`getFontSize()`
Returns a handle to work with the font size.
`String`
`getFontStyle()`
Returns the font style handle for the style.
`String`
`getFontVariant()`
Returns the font variant in a string.
`String`
`getFontWeight()`
Returns the font weight of the highlight rule.
`DimensionHandle`
`getLineHeight()`
Returns a handle to work with the height of the line.
`String`
`getNumberAlign()`
Returns the value of the number-align member.
`String`
`getNumberFormat()`
Returns the pattern of a number format for a highlight rule.
`String`
`getNumberFormatCategory()`
Returns the category of a number format for a highlight rule.
`String`
`getStringFormat()`
Returns the pattern of a string format for a highlight rule.
`String`
`getStringFormatCategory()`
Returns the category of a string format for a highlight rule.
`StyleHandle`
`getStyle()`
Returns the style that the highlight rule links with.
`String`
`getTestExpression()`
gets the expression for this highlight rule.
`String`
`getTextAlign()`
Returns the value of text align property.
`String`
`getTextDirection()`
Returns the value of Bidi direction property.
`DimensionHandle`
`getTextIndent()`
Gets a handle to deal with the value of the text-indent property.
`String`
`getTextLineThrough()`
Returns the value of the line through property.
`String`
`getTextOverline()`
Returns the value of the overline property.
`String`
`getTextTransform()`
Returns the value of the text transform property.
`String`
`getTextUnderline()`
Returns the value of the underline property.
`void`
`setBorderBottomStyle(String value)`
Sets the style of the border bottom line.
`void`
`setBorderLeftStyle(String value)`
Sets the style of the border left line.
`void`
`setBorderRightStyle(String value)`
Sets the style of the border right line.
`void`
`setBorderTopStyle(String value)`
Sets the style of the top line of the border.
`void`
`setDateTimeFormat(String pattern)`
Sets the pattern of a date time format for a highlight rule.
`void`
`setDateTimeFormatCategory(String pattern)`
Sets the category of a number format for a highlight rule.
`void`
`setFontStyle(String value)`
Sets the font style in a string for the style.
`void`
`setFontVariant(String value)`
Sets the font variant in a string .
`void`
`setFontWeight(String value)`
Sets the font weight in a string for the style.
`void`
`setNumberAlign(String value)`
Sets the value of the number-align member
`void`
`setNumberFormat(String pattern)`
Sets the pattern of a number format for a highlight rule.
`void`
`setNumberFormatCategory(String category)`
Sets the category of a number format for a highlight rule.
`void`
`setStringFormat(String pattern)`
Sets the pattern of a string format for a highlight rule.
`void`
`setStringFormatCategory(String category)`
Sets the category of a string format for a highlight rule.
`void`
`setStyle(StyleHandle style)`
Sets the style property.
`void`
`setStyleName(String styleName)`
Sets the style property.
`void`
`setTestExpression(String expression)`
sets the test expression for this hilghtlight rule.
`void`
`setTextAlign(String value)`
Sets the text align property.
`void`
`setTextDirection(String value)`
Sets the Bidi direction property.
`void`
`setTextLineThrough(String value)`
Sets the text line through property.
`void`
`setTextOverline(String value)`
Sets the text overline property.
`void`
`setTextTransform(String value)`
Sets the text transform property.
`void`
`setTextUnderline(String value)`
Sets the text underline property.

### Methods inherited from class org.eclipse.birt.report.model.api.StyleRuleHandle

`getOperator, getValue1, getValue1ExpressionList, getValue1List, getValue2, setOperator, setValue1, setValue1, setValue2`

### Methods inherited from class org.eclipse.birt.report.model.api.StructureHandle

`drop, getContext, getDefn, getExpressionProperty, getExternalizedValue, getExternalizedValue, getIntProperty, getMember, getProperty, getPropertyDefn, getStringProperty, getStructure, isDesignTime, isLocal, iterator, setDesignTime, setExpressionProperty, setProperty, setPropertySilently`

### Methods inherited from class org.eclipse.birt.report.model.api.ValueHandle

`getReference`

### Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle

`getDesign, getElement, getElementHandle, getModule`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HighlightRuleHandle

public HighlightRuleHandle(SimpleValueHandle valueHandle, int index)
Constructs a highlight rule handle with the given `SimpleValueHandle` and the index of the highlight rule in the highlight.

Parameters:
  `valueHandle` - handle to a list property or member
  `index` - index of the structure within the list

## Method Details

### getColor

public ColorHandle getColor()
Returns a handle to work with the color property.

Returns:
  a ColorHandle to deal with the color.

### getBackgroundColor

public ColorHandle getBackgroundColor()
Returns a handle to work with the background color.

Returns:
  a ColorHandle to deal with the background color.

### getBorderTopColor

public ColorHandle getBorderTopColor()
Returns a handle to work with the border top color.

Returns:
  a ColorHandle to deal with the border top color.

### getBorderLeftColor

public ColorHandle getBorderLeftColor()
Returns a handle to work with the border left color.

Returns:
  a ColorHandle to deal with the border left color.

### getBorderRightColor

public ColorHandle getBorderRightColor()
Returns a handle to work with the border right color.

Returns:
  a ColorHandle to deal with the border right color.

### getBorderBottomColor

public ColorHandle getBorderBottomColor()
Returns a handle to work with the border bottom color.

Returns:
  a ColorHandle to deal with the border bottom color.

### getBorderBottomStyle

public String getBorderBottomStyle()
Returns the style of the border bottom line. The return value is one of the CSS (pre-defined) values see `DesignChoiceConstants`. They are:

- `LINE_STYLE_NONE`
- `LINE_STYLE_SOLID`
- `LINE_STYLE_DOTTED`
- `LINE_STYLE_DASHED`
- `LINE_STYLE_DOUBLE`
- `LINE_STYLE_GROOVE`
- `LINE_STYLE_RIDGE`
- `LINE_STYLE_INSET`
- `LINE_STYLE_OUTSET`

Returns:
  the border bottom style

### setBorderBottomStyle

public void setBorderBottomStyle(String value) throws SemanticException
Sets the style of the border bottom line. The input value is one of the CSS (pre-defined) values see `DesignChoiceConstants`.

Parameters:
  `value` - the new border bottom line style
Throws:
  `SemanticException` - if the value is not one of above.
See Also:
  - `getBorderBottomStyle()`

### getBorderLeftStyle

public String getBorderLeftStyle()
Returns the style of the border left line.

Returns:
  the border left line style
See Also:
  - `getBorderBottomStyle()`

### setBorderLeftStyle

public void setBorderLeftStyle(String value) throws SemanticException
Sets the style of the border left line.

Parameters:
  `value` - the new border left line style
Throws:
  `SemanticException` - if the value is not one of above.
See Also:
  - `setBorderBottomStyle(String)`

### getBorderRightStyle

public String getBorderRightStyle()
Returns the style of the border right line.

Returns:
  the border right line style
See Also:
  - `getBorderBottomStyle()`

### setBorderRightStyle

public void setBorderRightStyle(String value) throws SemanticException
Sets the style of the border right line.

Parameters:
  `value` - the new border right line style
Throws:
  `SemanticException` - if the value is not one of above.
See Also:
  - `setBorderBottomStyle(String)`

### getBorderTopStyle

public String getBorderTopStyle()
Returns the style of the top line of the border.

Returns:
  the border top line style
See Also:
  - `getBorderBottomStyle()`

### setBorderTopStyle

public void setBorderTopStyle(String value) throws SemanticException
Sets the style of the top line of the border.

Parameters:
  `value` - the new border top line style
Throws:
  `SemanticException` - if the value is not one of above.
See Also:
  - `setBorderBottomStyle(String)`

### getTestExpression

public String getTestExpression()
gets the expression for this highlight rule.

Returns:
  the expression value

### setTestExpression

public void setTestExpression(String expression)
sets the test expression for this hilghtlight rule.

Parameters:
  `expression` - the expression

### getTextUnderline

public String getTextUnderline()
Returns the value of the underline property. The returned value is defined in `DesignChoiceConstants` and can be one of:

- `TEXT_UNDERLINE_NONE`
- `TEXT_UNDERLINE_UNDERLINE`

Returns:
  the value of the underline property

### setTextUnderline

public void setTextUnderline(String value) throws SemanticException
Sets the text underline property. The input value is defined in `DesignChoiceConstants` and can be one of:

- `TEXT_UNDERLINE_NONE`
- `TEXT_UNDERLINE_UNDERLINE`

Parameters:
  `value` - the new text underline
Throws:
  `SemanticException` - if the value is not one of the above.

### getTextOverline

public String getTextOverline()
Returns the value of the overline property. The returned value is defined in `DesignChoiceConstants` and can be one of:

- `TEXT_OVERLINE_NONE`
- `TEXT_OVERLINE_OVERLINE`

Returns:
  the value of the overline property

### setTextOverline

public void setTextOverline(String value) throws SemanticException
Sets the text overline property. The input value is defined in `DesignChoiceConstants` and can be one of:

- `TEXT_OVERLINE_NONE`
- `TEXT_OVERLINE_OVERLINE`

Parameters:
  `value` - the new text overline
Throws:
  `SemanticException` - if the value is not one of the above

### getTextLineThrough

public String getTextLineThrough()
Returns the value of the line through property. The returned value is defined in `DesignChoiceConstants` and can be one of:

- `TEXT_LINE_THROUGH_NONE`
- `TEXT_LINE_THROUGH_LINE_THROUGH`

Returns:
  the text line through

### setTextLineThrough

public void setTextLineThrough(String value) throws SemanticException
Sets the text line through property. The input value is defined in `DesignChoiceConstants` and can be one of:

- `TEXT_LINE_THROUGH_NONE`
- `TEXT_LINE_THROUGH_LINE_THROUGH`

Parameters:
  `value` - the new text line through
Throws:
  `SemanticException` - if the value is not one of the above.

### getTextAlign

public String getTextAlign()
Returns the value of text align property. The return value is defined in `DesignChoiceConstants` and can be one of:

- `TEXT_ALIGN_LEFT`
- `TEXT_ALIGN_CENTER`
- `TEXT_ALIGN_RIGHT`
- `TEXT_ALIGN_JUSTIFY`

Returns:
  the value of text align property

### setTextAlign

public void setTextAlign(String value) throws SemanticException
Sets the text align property. The input value is defined in `DesignChoiceConstants` and can be one of:

- `TEXT_ALIGN_LEFT`
- `TEXT_ALIGN_CENTER`
- `TEXT_ALIGN_RIGHT`
- `TEXT_ALIGN_JUSTIFY`

Parameters:
  `value` - the new text align value
Throws:
  `SemanticException` - if the value is not one of the above.

### getTextDirection

public String getTextDirection()
Returns the value of Bidi direction property. The return value is defined in `DesignChoiceConstants` and can be one of:

- `BIDI_ORIENTATION_LTR`
- `BIDI_ORIENTATION_RTL`

Returns:
  the value of Bidi direction property

### setTextDirection

public void setTextDirection(String value) throws SemanticException
Sets the Bidi direction property. The input value is defined in `DesignChoiceConstants` and can be one of:

- `BIDI_ORIENTATION_LTR`
- `BIDI_ORIENTATION_RTL`

Parameters:
  `value` - the new direction value
Throws:
  `SemanticException` - if the value is not one of the above.

### getTextTransform

public String getTextTransform()
Returns the value of the text transform property. The return value is defined in `DesignChoiceConstants` and can be one of:

- `TRANSFORM_CAPITALIZE`
- `TRANSFORM_UPPERCASE`
- `TRANSFORM_LOWERCASE`
- `TRANSFORM_NONE`

Returns:
  the value of the transform property

### setTextTransform

public void setTextTransform(String value) throws SemanticException
Sets the text transform property. The input value is defined in `DesignChoiceConstants` and can be one of:

- `TRANSFORM_CAPITALIZE`
- `TRANSFORM_UPPERCASE`
- `TRANSFORM_LOWERCASE`
- `TRANSFORM_NONE`

Parameters:
  `value` - the new text transform
Throws:
  `SemanticException` - if the value is not one of the above.

### getTextIndent

public DimensionHandle getTextIndent()
Gets a handle to deal with the value of the text-indent property.

Returns:
  a DimensionHandle to deal with the text-indent.

### getNumberAlign

public String getNumberAlign()
Returns the value of the number-align member.

Returns:
  the number-align value

### setNumberAlign

public void setNumberAlign(String value)
Sets the value of the number-align member

Parameters:
  `value` - the new number-align value.

### getBorderTopWidth

public DimensionHandle getBorderTopWidth()
Returns a handle to work with the width of the top side of the border.

Returns:
  a DimensionHandle to deal with the width of the top side of the border.

### getBorderLeftWidth

public DimensionHandle getBorderLeftWidth()
Returns a handle to work with the width of the left side of the border.

Returns:
  a DimensionHandle to deal with the width of the left side of the border.

### getBorderRightWidth

public DimensionHandle getBorderRightWidth()
Returns a handle to work with the width of the right side of the border.

Returns:
  DimensionHandle to deal with the width of the right side of the border.

### getBorderBottomWidth

public DimensionHandle getBorderBottomWidth()
Returns a handle to work with the width of the bottom side of the border.

Returns:
  a DimensionHandle to deal with the width of the bottom side of the border.

### getFontSize

public DimensionHandle getFontSize()
Returns a handle to work with the font size.

Returns:
  a aDimensionHandle to deal with the font size.

### getFontFamilyHandle

public FontHandle getFontFamilyHandle()
Returns the font family handle of the highlight rule.

Returns:
  the font family handle of the highlight rule.

### getFontWeight

public String getFontWeight()
Returns the font weight of the highlight rule. The return value is defined in `DesignChoiceConstants` and can be one of:

- `FONT_WEIGHT_NORMAL`
- `FONT_WEIGHT_BOLD`
- `FONT_WEIGHT_BOLDER`
- `FONT_WEIGHT_LIGHTER`
- `FONT_WEIGHT_100`
- `FONT_WEIGHT_200`
- `FONT_WEIGHT_300`
- `FONT_WEIGHT_400`
- `FONT_WEIGHT_500`
- `FONT_WEIGHT_600`
- `FONT_WEIGHT_700`
- `FONT_WEIGHT_800`
- `FONT_WEIGHT_900`

Returns:
  the font weight in string.

### setFontWeight

public void setFontWeight(String value) throws SemanticException
Sets the font weight in a string for the style. The input value is defined in `DesignChoiceConstants`.

Parameters:
  `value` - the new font weight
Throws:
  `SemanticException` - if the input value is not one of the above
See Also:
  - `getFontWeight()`

### getFontVariant

public String getFontVariant()
Returns the font variant in a string. The return value is defined in `DesignChoiceConstants` and can be one of:

- `FONT_VARIANT_NORMAL`
- `FONT_VARIANT_SMALL_CAPS`

Returns:
  the font variant in a string.

### setFontVariant

public void setFontVariant(String value) throws SemanticException
Sets the font variant in a string . The input value is defined in `DesignChoiceConstants` and can be one of:

- `FONT_VARIANT_NORMAL`
- `FONT_VARIANT_SMALL_CAPS`

Parameters:
  `value` - the new font variant.
Throws:
  `SemanticException` - if the input value is not one of the above

### getFontStyle

public String getFontStyle()
Returns the font style handle for the style. The return value is defined in `DesignChoiceConstants` and can be one of:

- `FONT_STYLE_NORMAL`
- `FONT_STYLE_ITALIC`
- `FONT_STYLE_OBLIQUE`

Returns:
  the font style in string.

### setFontStyle

public void setFontStyle(String value) throws SemanticException
Sets the font style in a string for the style. The input value is defined in `DesignChoiceConstants` and can be one of:

- `FONT_STYLE_NORMAL`
- `FONT_STYLE_ITALIC`
- `FONT_STYLE_OBLIQUE`

Parameters:
  `value` - the new font style.
Throws:
  `SemanticException` - if the input value is not one of the above

### getStringFormat

public String getStringFormat()
Returns the pattern of a string format for a highlight rule.

Returns:
  the pattern of a string format

### getStringFormatCategory

public String getStringFormatCategory()
Returns the category of a string format for a highlight rule.

Returns:
  the category of a string forma

### setStringFormat

public void setStringFormat(String pattern)
Sets the pattern of a string format for a highlight rule.

Parameters:
  `pattern` - the pattern of a string forma

### setStringFormatCategory

public void setStringFormatCategory(String category) throws SemanticException
Sets the category of a string format for a highlight rule. The `pattern` can be one of:

- `DesignChoiceConstants.STRING_FORMAT_TYPE_UNFORMATTED`
- `DesignChoiceConstants.STRING_FORMAT_TYPE_UPPERCASE`
- `DesignChoiceConstants.STRING_FORMAT_TYPE_LOWERCASE`
- `DesignChoiceConstants.STRING_FORMAT_TYPE_CUSTOM`
- `DesignChoiceConstants.STRING_FORMAT_TYPE_ZIP_CODE`
- `DesignChoiceConstants.STRING_FORMAT_TYPE_ZIP_CODE_4`
- `DesignChoiceConstants.STRING_FORMAT_TYPE_PHONE_NUMBER`
- `DesignChoiceConstants.STRING_FORMAT_TYPE_SOCIAL_SECURITY_NUMBER`

Parameters:
  `category` - the category of a string format
Throws:
  `SemanticException` - if `category` is not one of the above values.

### getNumberFormat

public String getNumberFormat()
Returns the pattern of a number format for a highlight rule.

Returns:
  the pattern of a number format

### getNumberFormatCategory

public String getNumberFormatCategory()
Returns the category of a number format for a highlight rule.

Returns:
  the category of a number format

### setNumberFormat

public void setNumberFormat(String pattern)
Sets the pattern of a number format for a highlight rule.

Parameters:
  `pattern` - the pattern of a number format

### setNumberFormatCategory

public void setNumberFormatCategory(String category) throws SemanticException
Sets the category of a number format for a highlight rule. The `pattern` can be one of:

- `DesignChoiceConstants.NUMBER_FORMAT_TYPE_UNFORMATTED`
- `DesignChoiceConstants.NUMBER_FORMAT_TYPE_GENERAL_NUMBER`
- `DesignChoiceConstants.NUMBER_FORMAT_TYPE_CURRENCY`
- `DesignChoiceConstants.NUMBER_FORMAT_TYPE_FIXED`
- `DesignChoiceConstants.NUMBER_FORMAT_TYPE_PERCENT`
- `DesignChoiceConstants.NUMBER_FORMAT_TYPE_SCIENTIFIC`
- `DesignChoiceConstants.NUMBER_FORMAT_TYPE_STANDARD`
- `DesignChoiceConstants.NUMBER_FORMAT_TYPE_CUSTOM`

Parameters:
  `category` - the category of a number format
Throws:
  `SemanticException` - if `category` is not one of the above values.

### getDateTimeFormat

public String getDateTimeFormat()
Returns the pattern of the date-time-format for a highlight rule.

Returns:
  the pattern of the date-time-format

### getDateTimeFormatCategory

public String getDateTimeFormatCategory()
Returns the category of the date-time-format for a highlight rule.

Returns:
  the category of the date-time-format

### setDateTimeFormat

public void setDateTimeFormat(String pattern)
Sets the pattern of a date time format for a highlight rule.

Parameters:
  `pattern` - the pattern of a date time format

### setDateTimeFormatCategory

public void setDateTimeFormatCategory(String pattern) throws SemanticException
Sets the category of a number format for a highlight rule. The `pattern` can be one of:

- `DesignChoiceConstants.DATETIEM_FORMAT_TYPE_UNFORMATTED`
- `DesignChoiceConstants.DATETIEM_FORMAT_TYPE_GENERAL_DATE`
- `DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_DATE`
- `DesignChoiceConstants.DATETIEM_FORMAT_TYPE_MUDIUM_DATE`
- `DesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_DATE`
- `DesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_TIME`
- `DesignChoiceConstants.DATETIEM_FORMAT_TYPE_MEDIUM_TIME`
- `DesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_TIME`
- `DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM`

Parameters:
  `pattern` - the category of a date-time format
Throws:
  `SemanticException` - if `pattern` is not one of the above values.

### setStyle

public void setStyle(StyleHandle style) throws SemanticException
Sets the style property. If it is a valid style and highlight rule has no local values, values on the style are returned.

Parameters:
  `style` - the style
Throws:
  `SemanticException`

### setStyleName

public void setStyleName(String styleName) throws SemanticException
Sets the style property. If it is a valid style and highlight rule has no local values, values on the style are returned.

Parameters:
  `styleName` - the style name
Throws:
  `SemanticException`

### getStyle

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

Returns:
  the style

### getLineHeight

public DimensionHandle getLineHeight()
Returns a handle to work with the height of the line.

Returns:
  a DimensionHandle to deal with the height o f the line.