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
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.
-
Field Summary
Fields inherited from class org.eclipse.birt.report.model.api.StructureHandle
structContextFields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
elementHandle -
Constructor Summary
ConstructorsConstructorDescriptionHighlightRuleHandle(SimpleValueHandle valueHandle, int index) Constructs a highlight rule handle with the givenSimpleValueHandleand the index of the highlight rule in the highlight. -
Method Summary
Modifier and TypeMethodDescriptionReturns a handle to work with the background color.Returns a handle to work with the border bottom color.Returns the style of the border bottom line.Returns a handle to work with the width of the bottom side of the border.Returns a handle to work with the border left color.Returns the style of the border left line.Returns a handle to work with the width of the left side of the border.Returns a handle to work with the border right color.Returns the style of the border right line.Returns a handle to work with the width of the right side of the border.Returns a handle to work with the border top color.Returns the style of the top line of the border.Returns a handle to work with the width of the top side of the border.getColor()Returns a handle to work with the color property.Returns the pattern of the date-time-format for a highlight rule.Returns the category of the date-time-format for a highlight rule.Returns the font family handle of the highlight rule.Returns a handle to work with the font size.Returns the font style handle for the style.Returns the font variant in a string.Returns the font weight of the highlight rule.Returns a handle to work with the height of the line.Returns the value of the number-align member.Returns the pattern of a number format for a highlight rule.Returns the category of a number format for a highlight rule.Returns the pattern of a string format for a highlight rule.Returns the category of a string format for a highlight rule.getStyle()Returns the style that the highlight rule links with.gets the expression for this highlight rule.Returns the value of text align property.Returns the value of Bidi direction property.Gets a handle to deal with the value of the text-indent property.Returns the value of the line through property.Returns the value of the overline property.Returns the value of the text transform property.Returns the value of the underline property.voidsetBorderBottomStyle(String value) Sets the style of the border bottom line.voidsetBorderLeftStyle(String value) Sets the style of the border left line.voidsetBorderRightStyle(String value) Sets the style of the border right line.voidsetBorderTopStyle(String value) Sets the style of the top line of the border.voidsetDateTimeFormat(String pattern) Sets the pattern of a date time format for a highlight rule.voidsetDateTimeFormatCategory(String pattern) Sets the category of a number format for a highlight rule.voidsetFontStyle(String value) Sets the font style in a string for the style.voidsetFontVariant(String value) Sets the font variant in a string .voidsetFontWeight(String value) Sets the font weight in a string for the style.voidsetNumberAlign(String value) Sets the value of the number-align membervoidsetNumberFormat(String pattern) Sets the pattern of a number format for a highlight rule.voidsetNumberFormatCategory(String category) Sets the category of a number format for a highlight rule.voidsetStringFormat(String pattern) Sets the pattern of a string format for a highlight rule.voidsetStringFormatCategory(String category) Sets the category of a string format for a highlight rule.voidsetStyle(StyleHandle style) Sets the style property.voidsetStyleName(String styleName) Sets the style property.voidsetTestExpression(String expression) sets the test expression for this hilghtlight rule.voidsetTextAlign(String value) Sets the text align property.voidsetTextDirection(String value) Sets the Bidi direction property.voidsetTextLineThrough(String value) Sets the text line through property.voidsetTextOverline(String value) Sets the text overline property.voidsetTextTransform(String value) Sets the text transform property.voidsetTextUnderline(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, setValue2Methods 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, setPropertySilentlyMethods inherited from class org.eclipse.birt.report.model.api.ValueHandle
getReferenceMethods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
getDesign, getElement, getElementHandle, getModule
-
Constructor Details
-
HighlightRuleHandle
Constructs a highlight rule handle with the givenSimpleValueHandleand the index of the highlight rule in the highlight.- Parameters:
valueHandle- handle to a list property or memberindex- index of the structure within the list
-
-
Method Details
-
getColor
Returns a handle to work with the color property.- Returns:
- a ColorHandle to deal with the color.
-
getBackgroundColor
Returns a handle to work with the background color.- Returns:
- a ColorHandle to deal with the background color.
-
getBorderTopColor
Returns a handle to work with the border top color.- Returns:
- a ColorHandle to deal with the border top color.
-
getBorderLeftColor
Returns a handle to work with the border left color.- Returns:
- a ColorHandle to deal with the border left color.
-
getBorderRightColor
Returns a handle to work with the border right color.- Returns:
- a ColorHandle to deal with the border right color.
-
getBorderBottomColor
Returns a handle to work with the border bottom color.- Returns:
- a ColorHandle to deal with the border bottom color.
-
getBorderBottomStyle
Returns the style of the border bottom line. The return value is one of the CSS (pre-defined) values seeDesignChoiceConstants. They are:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Returns:
- the border bottom style
-
setBorderBottomStyle
Sets the style of the border bottom line. The input value is one of the CSS (pre-defined) values seeDesignChoiceConstants.- Parameters:
value- the new border bottom line style- Throws:
SemanticException- if the value is not one of above.- See Also:
-
getBorderLeftStyle
Returns the style of the border left line.- Returns:
- the border left line style
- See Also:
-
setBorderLeftStyle
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:
-
getBorderRightStyle
Returns the style of the border right line.- Returns:
- the border right line style
- See Also:
-
setBorderRightStyle
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:
-
getBorderTopStyle
Returns the style of the top line of the border.- Returns:
- the border top line style
- See Also:
-
setBorderTopStyle
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:
-
getTestExpression
gets the expression for this highlight rule.- Returns:
- the expression value
-
setTestExpression
sets the test expression for this hilghtlight rule.- Parameters:
expression- the expression
-
getTextUnderline
Returns the value of the underline property. The returned value is defined inDesignChoiceConstantsand can be one of:TEXT_UNDERLINE_NONETEXT_UNDERLINE_UNDERLINE
- Returns:
- the value of the underline property
-
setTextUnderline
Sets the text underline property. The input value is defined inDesignChoiceConstantsand can be one of:TEXT_UNDERLINE_NONETEXT_UNDERLINE_UNDERLINE
- Parameters:
value- the new text underline- Throws:
SemanticException- if the value is not one of the above.
-
getTextOverline
Returns the value of the overline property. The returned value is defined inDesignChoiceConstantsand can be one of:TEXT_OVERLINE_NONETEXT_OVERLINE_OVERLINE
- Returns:
- the value of the overline property
-
setTextOverline
Sets the text overline property. The input value is defined inDesignChoiceConstantsand can be one of:TEXT_OVERLINE_NONETEXT_OVERLINE_OVERLINE
- Parameters:
value- the new text overline- Throws:
SemanticException- if the value is not one of the above
-
getTextLineThrough
Returns the value of the line through property. The returned value is defined inDesignChoiceConstantsand can be one of:TEXT_LINE_THROUGH_NONETEXT_LINE_THROUGH_LINE_THROUGH
- Returns:
- the text line through
-
setTextLineThrough
Sets the text line through property. The input value is defined inDesignChoiceConstantsand can be one of:TEXT_LINE_THROUGH_NONETEXT_LINE_THROUGH_LINE_THROUGH
- Parameters:
value- the new text line through- Throws:
SemanticException- if the value is not one of the above.
-
getTextAlign
Returns the value of text align property. The return value is defined inDesignChoiceConstantsand can be one of:TEXT_ALIGN_LEFTTEXT_ALIGN_CENTERTEXT_ALIGN_RIGHTTEXT_ALIGN_JUSTIFY
- Returns:
- the value of text align property
-
setTextAlign
Sets the text align property. The input value is defined inDesignChoiceConstantsand can be one of:TEXT_ALIGN_LEFTTEXT_ALIGN_CENTERTEXT_ALIGN_RIGHTTEXT_ALIGN_JUSTIFY
- Parameters:
value- the new text align value- Throws:
SemanticException- if the value is not one of the above.
-
getTextDirection
Returns the value of Bidi direction property. The return value is defined inDesignChoiceConstantsand can be one of:BIDI_ORIENTATION_LTRBIDI_ORIENTATION_RTL
- Returns:
- the value of Bidi direction property
-
setTextDirection
Sets the Bidi direction property. The input value is defined inDesignChoiceConstantsand can be one of:BIDI_ORIENTATION_LTRBIDI_ORIENTATION_RTL
- Parameters:
value- the new direction value- Throws:
SemanticException- if the value is not one of the above.
-
getTextTransform
Returns the value of the text transform property. The return value is defined inDesignChoiceConstantsand can be one of:TRANSFORM_CAPITALIZETRANSFORM_UPPERCASETRANSFORM_LOWERCASETRANSFORM_NONE
- Returns:
- the value of the transform property
-
setTextTransform
Sets the text transform property. The input value is defined inDesignChoiceConstantsand can be one of:TRANSFORM_CAPITALIZETRANSFORM_UPPERCASETRANSFORM_LOWERCASETRANSFORM_NONE
- Parameters:
value- the new text transform- Throws:
SemanticException- if the value is not one of the above.
-
getTextIndent
Gets a handle to deal with the value of the text-indent property.- Returns:
- a DimensionHandle to deal with the text-indent.
-
getNumberAlign
Returns the value of the number-align member.- Returns:
- the number-align value
-
setNumberAlign
Sets the value of the number-align member- Parameters:
value- the new number-align value.
-
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
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
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
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
Returns a handle to work with the font size.- Returns:
- a aDimensionHandle to deal with the font size.
-
getFontFamilyHandle
Returns the font family handle of the highlight rule.- Returns:
- the font family handle of the highlight rule.
-
getFontWeight
Returns the font weight of the highlight rule. The return value is defined inDesignChoiceConstantsand can be one of:FONT_WEIGHT_NORMALFONT_WEIGHT_BOLDFONT_WEIGHT_BOLDERFONT_WEIGHT_LIGHTERFONT_WEIGHT_100FONT_WEIGHT_200FONT_WEIGHT_300FONT_WEIGHT_400FONT_WEIGHT_500FONT_WEIGHT_600FONT_WEIGHT_700FONT_WEIGHT_800FONT_WEIGHT_900
- Returns:
- the font weight in string.
-
setFontWeight
Sets the font weight in a string for the style. The input value is defined inDesignChoiceConstants.- Parameters:
value- the new font weight- Throws:
SemanticException- if the input value is not one of the above- See Also:
-
getFontVariant
Returns the font variant in a string. The return value is defined inDesignChoiceConstantsand can be one of:FONT_VARIANT_NORMALFONT_VARIANT_SMALL_CAPS
- Returns:
- the font variant in a string.
-
setFontVariant
Sets the font variant in a string . The input value is defined inDesignChoiceConstantsand can be one of:FONT_VARIANT_NORMALFONT_VARIANT_SMALL_CAPS
- Parameters:
value- the new font variant.- Throws:
SemanticException- if the input value is not one of the above
-
getFontStyle
Returns the font style handle for the style. The return value is defined inDesignChoiceConstantsand can be one of:FONT_STYLE_NORMALFONT_STYLE_ITALICFONT_STYLE_OBLIQUE
- Returns:
- the font style in string.
-
setFontStyle
Sets the font style in a string for the style. The input value is defined inDesignChoiceConstantsand can be one of:FONT_STYLE_NORMALFONT_STYLE_ITALICFONT_STYLE_OBLIQUE
- Parameters:
value- the new font style.- Throws:
SemanticException- if the input value is not one of the above
-
getStringFormat
Returns the pattern of a string format for a highlight rule.- Returns:
- the pattern of a string format
-
getStringFormatCategory
Returns the category of a string format for a highlight rule.- Returns:
- the category of a string forma
-
setStringFormat
Sets the pattern of a string format for a highlight rule.- Parameters:
pattern- the pattern of a string forma
-
setStringFormatCategory
Sets the category of a string format for a highlight rule. Thepatterncan be one of:DesignChoiceConstants.STRING_FORMAT_TYPE_UNFORMATTEDDesignChoiceConstants.STRING_FORMAT_TYPE_UPPERCASEDesignChoiceConstants.STRING_FORMAT_TYPE_LOWERCASEDesignChoiceConstants.STRING_FORMAT_TYPE_CUSTOMDesignChoiceConstants.STRING_FORMAT_TYPE_ZIP_CODEDesignChoiceConstants.STRING_FORMAT_TYPE_ZIP_CODE_4DesignChoiceConstants.STRING_FORMAT_TYPE_PHONE_NUMBER-
DesignChoiceConstants.STRING_FORMAT_TYPE_SOCIAL_SECURITY_NUMBER
- Parameters:
category- the category of a string format- Throws:
SemanticException- ifcategoryis not one of the above values.
-
getNumberFormat
Returns the pattern of a number format for a highlight rule.- Returns:
- the pattern of a number format
-
getNumberFormatCategory
Returns the category of a number format for a highlight rule.- Returns:
- the category of a number format
-
setNumberFormat
Sets the pattern of a number format for a highlight rule.- Parameters:
pattern- the pattern of a number format
-
setNumberFormatCategory
Sets the category of a number format for a highlight rule. Thepatterncan be one of:DesignChoiceConstants.NUMBER_FORMAT_TYPE_UNFORMATTEDDesignChoiceConstants.NUMBER_FORMAT_TYPE_GENERAL_NUMBERDesignChoiceConstants.NUMBER_FORMAT_TYPE_CURRENCYDesignChoiceConstants.NUMBER_FORMAT_TYPE_FIXEDDesignChoiceConstants.NUMBER_FORMAT_TYPE_PERCENTDesignChoiceConstants.NUMBER_FORMAT_TYPE_SCIENTIFICDesignChoiceConstants.NUMBER_FORMAT_TYPE_STANDARDDesignChoiceConstants.NUMBER_FORMAT_TYPE_CUSTOM
- Parameters:
category- the category of a number format- Throws:
SemanticException- ifcategoryis not one of the above values.
-
getDateTimeFormat
Returns the pattern of the date-time-format for a highlight rule.- Returns:
- the pattern of the date-time-format
-
getDateTimeFormatCategory
Returns the category of the date-time-format for a highlight rule.- Returns:
- the category of the date-time-format
-
setDateTimeFormat
Sets the pattern of a date time format for a highlight rule.- Parameters:
pattern- the pattern of a date time format
-
setDateTimeFormatCategory
Sets the category of a number format for a highlight rule. Thepatterncan be one of:DesignChoiceConstants.DATETIEM_FORMAT_TYPE_UNFORMATTEDDesignChoiceConstants.DATETIEM_FORMAT_TYPE_GENERAL_DATEDesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_DATEDesignChoiceConstants.DATETIEM_FORMAT_TYPE_MUDIUM_DATEDesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_DATEDesignChoiceConstants.DATETIEM_FORMAT_TYPE_LONG_TIMEDesignChoiceConstants.DATETIEM_FORMAT_TYPE_MEDIUM_TIMEDesignChoiceConstants.DATETIEM_FORMAT_TYPE_SHORT_TIMEDesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM
- Parameters:
pattern- the category of a date-time format- Throws:
SemanticException- ifpatternis not one of the above values.
-
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:
style- the style- Throws:
SemanticException
-
setStyleName
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
Returns the style that the highlight rule links with.- Returns:
- the style
-
getLineHeight
Returns a handle to work with the height of the line.- Returns:
- a DimensionHandle to deal with the height o f the line.
-