Class StyleHandle
- All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel,org.eclipse.birt.report.model.elements.interfaces.IStyleModel
- Direct Known Subclasses:
PrivateStyleHandle,SharedStyleHandle
A style includes a collection of properties such as font face name, font color, fill color and so on. A property is simply a (name, value) pair. The name identifies the property, and the value is what has been set for the property: "red" or "Arial" or "10 pt." A property value can be blank, meaning that the user has not specified anything for that property.
Each style has a highlight. Each highlight rule has a condition and a set of formatting options to apply if the rule is true. BIRT evaluates each rule in term, and applies the first one that evaluates to true. As a result, the rules need not be mutually exclusive, and the order of the rules matters.
Each style has a map. The map has a condition and a set of rules. A map rule transforms a value in the input into a different value for display. It works best for fields with a limited set of values, such as converting "Y" to "Yes" and "N" to "No". Mappings with many rules are better handled in the data access layer. Another common use of mapping is to convert a null value into a display value, such as "No Data."
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
elementFields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
moduleFields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
COMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NEW_HANDLER_ON_EACH_EVENT_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROPFields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IStyleModel
BACKGROUND_ATTACHMENT_PROP, BACKGROUND_COLOR_PROP, BACKGROUND_IMAGE_PROP, BACKGROUND_IMAGE_TYPE_PROP, BACKGROUND_POSITION_X_PROP, BACKGROUND_POSITION_Y_PROP, BACKGROUND_REPEAT_PROP, BACKGROUND_SIZE_HEIGHT, BACKGROUND_SIZE_WIDTH, BORDER_ANTIDIAGONAL_COLOR_PROP, BORDER_ANTIDIAGONAL_NUMBER_PROP, BORDER_ANTIDIAGONAL_STYLE_PROP, BORDER_ANTIDIAGONAL_WIDTH_PROP, BORDER_BOTTOM_COLOR_PROP, BORDER_BOTTOM_STYLE_PROP, BORDER_BOTTOM_WIDTH_PROP, BORDER_DIAGONAL_COLOR_PROP, BORDER_DIAGONAL_NUMBER_PROP, BORDER_DIAGONAL_STYLE_PROP, BORDER_DIAGONAL_WIDTH_PROP, BORDER_LEFT_COLOR_PROP, BORDER_LEFT_STYLE_PROP, BORDER_LEFT_WIDTH_PROP, BORDER_RIGHT_COLOR_PROP, BORDER_RIGHT_STYLE_PROP, BORDER_RIGHT_WIDTH_PROP, BORDER_TOP_COLOR_PROP, BORDER_TOP_STYLE_PROP, BORDER_TOP_WIDTH_PROP, CAN_SHRINK_PROP, COLOR_PROP, DATE_FORMAT_PROP, DATE_TIME_FORMAT_PROP, DISPLAY_PROP, FONT_FAMILY_PROP, FONT_SIZE_PROP, FONT_STYLE_PROP, FONT_VARIANT_PROP, FONT_WEIGHT_PROP, HEIGHT_PROP, HIGHLIGHT_RULES_PROP, LETTER_SPACING_PROP, LINE_HEIGHT_PROP, MAP_RULES_PROP, MARGIN_BOTTOM_PROP, MARGIN_LEFT_PROP, MARGIN_RIGHT_PROP, MARGIN_TOP_PROP, MASTER_PAGE_PROP, NUMBER_ALIGN_PROP, NUMBER_FORMAT_PROP, ORPHANS_PROP, OVERFLOW_PROP, PADDING_BOTTOM_PROP, PADDING_LEFT_PROP, PADDING_RIGHT_PROP, PADDING_TOP_PROP, PAGE_BREAK_AFTER_PROP, PAGE_BREAK_BEFORE_PROP, PAGE_BREAK_INSIDE_PROP, SHOW_IF_BLANK_PROP, STRING_FORMAT_PROP, TEXT_ALIGN_PROP, TEXT_DIRECTION_PROP, TEXT_INDENT_PROP, TEXT_LINE_THROUGH_PROP, TEXT_OVERLINE_PROP, TEXT_TRANSFORM_PROP, TEXT_UNDERLINE_PROP, TIME_FORMAT_PROP, VERTICAL_ALIGN_PROP, WHITE_SPACE_PROP, WIDOWS_PROP, WIDTH_PROP, WORD_SPACING_PROP -
Constructor Summary
ConstructorsConstructorDescriptionStyleHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructs a style handle with the given design and the element.. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests whether the section can shrink if the actual content is smaller than the design size.Returns a background attachment as a string.Gets a color handle to deal with the background color.Get the height of the background image.Returns the address of the background image.Returns the type of the background image.Gets a dimension handle to deal with the x position for the background.Gets a dimension handle to deal with the y position for the background.Returns the pattern of the repeat for a background image.Get the width of the background image.Gets a color handle to deal with the color of the bottom side of the border.Returns the style of the bottom line of the border.Gets a dimension handle to deal with the width of the bottom side of the border.Gets a color handle to deal with the color of the left side of the border.Returns the style of the left line of the border.Gets a dimension handle to deal with the width of the left side of the border.Gets a color handle to deal with the color of the right side of the border.Returns the style of the right line of the border.Gets a dimension handle to deal with the width of the right side of the border.Gets a color handle to deal with the color of the top side of the border.Returns the style of the top line of the border.Gets a dimension handle to deal with the width of the top side of the border.getColor()Gets a color handle to deal with the font color.Returns the pattern of the date-format.Returns the category of the date-format.Returns the pattern of the date-time-format.Returns the category of the date-time-format.Returns the value that specifies if a top-level element should be a block or in-line element.Returns the font handle to deal with the font family.Gets a dimension handle to deal with the font size.Returns the style of the font.Returns the variant of the font.Returns the weight of the font.Returns the value of height property.Deprecated.Gets a dimension handle to deal with the spacing between individual letters.Gets a dimension handle to deal with the height of a line.Deprecated.Gets a handle to deal with the margin of the bottom side.Gets a handle to deal with the margin of the left side.Gets a handle to deal with the margin of the right side.Gets a handle to deal with the margin of the top side.Returns the name of the master page on which to start this section.Returns the pattern of a number format for a IStyleModel.Returns the category of a number format for a IStyleModel.Returns the value of orphans.Returns the value of overflow property.Gets a dimension handle to deal with the padding of the bottom side.Gets a dimension handle to deal with the padding of the left side.Gets a dimension handle to deal with the padding of the right side.Gets a dimension handle to deal with the padding of the top side.Returns the page break after property for block-level elements.Returns the page break before property for block-level elements.Returns the page break inside property for block-level elements.Returns the pattern of a string format.Returns the category of a string format.Returns the text align for block-level elements.Returns the Bidi direction for elements.Gets a dimension handle to deal with the text indent.Returns one 'text-decoration' property to set line-through styles.Returns one 'text-decoration' property to set overline styles.Returns the value to transform the text.Returns one 'text-decoration' property to set underline styles.Returns the pattern of the time-format.Returns the category of the time-format.Returns the value of the vertical align property for inline elements.Returns the white space for block elements.Returns the value of widows.getWidth()Returns the value of width property.Gets a dimension handle to deal with the spacing between two words.Returns the iterator of highlight rules.booleanchecks whether this style is created by user or predefined by BIRT.Iterator<?>Returns the iterator for map rules.voidsetBackgroundAttachment(String value) Sets the background attachment.voidsetBackgroundHeight(String height) Sets the height of the background image.voidsetBackgroundImage(String value) Sets the address of the background image.voidsetBackgroundImageType(String type) Sets the type of the background image.voidsetBackgroundRepeat(String value) Sets the repeat pattern for a background image.voidsetBackgroundWidth(String width) Sets the width of the background image.voidsetBorderBottomStyle(String value) Sets the style of the bottom line of the border.voidsetBorderLeftStyle(String value) Sets the style of the left line of the border.voidsetBorderRightStyle(String value) Sets the style of the right line of the border.voidsetBorderTopStyle(String value) Sets the style of the top line of the border.voidsetCanShrink(boolean value) Sets whether the section can shrink if the actual content is smaller than the design size.voidsetDateFormat(String pattern) Sets the pattern of a date time format for a highlight rule.voidsetDateFormatCategory(String pattern) Sets the category of a number format.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.voidsetDisplay(String value) Sets the value that specifies if a top-level element should be a block or in-line element.voidsetFontStyle(String fontStyle) Sets the style of the font.voidsetFontVariant(String fontVariant) Sets the variant of the font.voidsetFontWeight(String fontWeight) Sets the weight of the font.voidSets the value of height property.voidsetHighlightTestExpr(String value) Deprecated.voidsetMapTestExpr(String value) Deprecated.voidsetMasterPage(String value) Sets the master page name on which to start this section.voidsetNumberFormat(String pattern) Sets the pattern of a number format.voidsetNumberFormatCategory(String category) Sets the category of a number format for a highlight rule.voidsetOrphans(String value) Sets the orphans property.voidsetOverflow(String value) Sets the value of overflow property.voidsetPageBreakAfter(String value) Sets the page break after property for block-level elements.voidsetPageBreakBefore(String value) Sets the page break before property for block-level elements.voidsetPageBreakInside(String value) Sets the page break inside property for block-level elements.voidsetShowIfBlank(boolean value) Sets whether to show this frame even if it is empty, or all its data elements are empty.voidsetStringFormat(String pattern) Sets the pattern of a string format.voidsetStringFormatCategory(String pattern) Sets the category of a string format.voidsetTextAlign(String value) Sets the text align for block-level elements.voidsetTextDirection(String value) Sets the Bidi direction for elements.voidsetTextLineThrough(String value) Sets one 'text-decoration' property to set line-through styles.voidsetTextOverline(String value) Sets one 'text-decoration' property to set overline styles.voidsetTextTransform(String value) Sets the value used to transform the text.voidsetTextUnderline(String value) Sets one 'text-decoration' property to set underline styles.voidsetTimeFormat(String pattern) Sets the pattern of a date time format for a highlight rule.voidsetTimeFormatCategory(String pattern) Sets the category of a number format.voidsetVerticalAlign(String value) Sets the value of the vertical align property for inline elements.voidsetWhiteSpace(String value) Sets the white space property for block elements.voidSets the widows property.voidSets the value of width property.booleanTests whether to show this frame even if it is empty, or all its data elements are empty.Methods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMaskMethods inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
add, add, addElement, addElement, addListener, addUserPropertyDefn, cachePropertyHandles, canContain, canContain, canContain, canContain, canDrop, canEdit, canTransformToTemplate, clearAllProperties, clearContents, clearProperty, clientsIterator, copy, copyPropertyTo, createTemplateElement, derivedIterator, doSort, drop, drop, drop, dropAndClear, dropAndClear, dropAndClear, dropUserPropertyDefn, findContentSlot, getBooleanProperty, getChoices, getColorProperty, getContainer, getContainerPropertyHandle, getContainerSlotHandle, getContent, getContentCount, getContents, getDefn, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getEventHandlerClass, getExpressionProperty, getExtends, getExternalizedValue, getExternalizedValue, getExternalizedValue, getFactoryElementHandle, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getMethods, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getProperty, getPropertyBinding, getPropertyBindingExpression, getPropertyBindings, getPropertyDefn, getPropertyHandle, getPropertyIterator, getQualifiedName, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, initializeSlotHandles, isDirectionRTL, isInTemplateParameter, isTemplateParameterValue, isValid, localize, move, move, moveTo, moveTo, moveTo, moveTo, newHandlerOnEachEvent, paste, paste, paste, paste, removeListener, revertToReportItem, revertToTemplate, semanticCheck, setBooleanProperty, setEncryption, setEventHandlerClass, setExpressionProperty, setExtends, setExtendsElement, setExtendsName, setFloatProperty, setIntProperty, setName, setNewHandlerOnEachEvent, setNumberProperty, setProperties, setProperty, setPropertyBinding, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, shift, showError, slotsIterator
-
Constructor Details
-
StyleHandle
public StyleHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructs a style handle with the given design and the 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 moduleelement- the model representation of the element
-
-
Method Details
-
getBackgroundAttachment
Returns a background attachment as a string. The return value is defined inDesignChoiceConstantsand can be one of:- BACKGROUND_ATTACHMENT_SCROLL
- BACKGROUND_ATTACHMENT_FIXED
- Returns:
- the background attachment
-
setBackgroundAttachment
Sets the background attachment. The return value is defined inDesignChoiceConstantsand can be one of:- BACKGROUND_ATTACHMENT_SCROLL
- BACKGROUND_ATTACHMENT_FIXED
- Parameters:
value- the new background attachment- Throws:
SemanticException- if the value is not one of the above.
-
getBackgroundImage
Returns the address of the background image.- Returns:
- the address of the background image as a string
-
setBackgroundImage
Sets the address of the background image. The value is a URL as a string.- Parameters:
value- the new background image address- Throws:
SemanticException- if the property is locked
-
getBackgroundRepeat
Returns the pattern of the repeat for a background image. The return value is defined inDesignChoiceConstantsand can be one of:- BACKGROUND_REPEAT_REPEAT
- BACKGROUND_REPEAT_REPEAT_X
- BACKGROUND_REPEAT_REPEAT_Y
- BACKGROUND_REPEAT_NO_REPEAT
- Returns:
- the repeat pattern
-
setBackgroundRepeat
Sets the repeat pattern for a background image. The input value is defined inDesignChoiceConstantsand can be one of:- BACKGROUND_REPEAT_REPEAT
- BACKGROUND_REPEAT_REPEAT_X
- BACKGROUND_REPEAT_REPEAT_Y
- BACKGROUND_REPEAT_NO_REPEAT
- Parameters:
value- the new repeat pattern- Throws:
SemanticException- if the value is not one of the above.
-
getBorderBottomStyle
Returns the style of the bottom line of the border. The return value is defined inDesignChoiceConstantsand can be one of:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Returns:
- the style of the bottom line
-
setBorderBottomStyle
Sets the style of the bottom line of the border. The input value is defined inDesignChoiceConstantsand can be one of:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Parameters:
value- the new style of the bottom line- Throws:
SemanticException- if the value is not one of the above.
-
getBorderLeftStyle
Returns the style of the left line of the border. The return value is defined inDesignChoiceConstantsand can be one of:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Returns:
- the style of the left line
-
setBorderLeftStyle
Sets the style of the left line of the border. The input value is defined inDesignChoiceConstantsand can be one of:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Parameters:
value- the new style of the left line- Throws:
SemanticException- if the value is not one of the above.
-
getBorderRightStyle
Returns the style of the right line of the border. The return value is defined inDesignChoiceConstantsand can be one of:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Returns:
- the style of the right line
-
setBorderRightStyle
Sets the style of the right line of the border. The input value is defined inDesignChoiceConstantsand can be one of:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Parameters:
value- the new style of the right line- Throws:
SemanticException- if the value is not one of the above.
-
getBorderTopStyle
Returns the style of the top line of the border. The return value is defined inDesignChoiceConstantsand can be one of:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Returns:
- the style of the top line
-
setBorderTopStyle
Sets the style of the top line of the border. The input value is defined inDesignChoiceConstantsand can be one of:LINE_STYLE_NONELINE_STYLE_SOLIDLINE_STYLE_DOTTEDLINE_STYLE_DASHEDLINE_STYLE_DOUBLELINE_STYLE_GROOVELINE_STYLE_RIDGELINE_STYLE_INSETLINE_STYLE_OUTSET
- Parameters:
value- the new style of the right line- Throws:
SemanticException- if the value is not one of the above.
-
canShrink
public boolean canShrink()Tests whether the section can shrink if the actual content is smaller than the design size.- Returns:
trueif can shrink, otherwisefalse- See Also:
-
setCanShrink
Sets whether the section can shrink if the actual content is smaller than the design size.- Parameters:
value-trueif can shrink,falsenot.- Throws:
SemanticException- if the property is locked- See Also:
-
getStringFormat
Returns the pattern of a string format.- Returns:
- the pattern of a string format
-
getStringFormatCategory
Returns the category of a string format.- Returns:
- the category of a string format
-
setStringFormat
Sets the pattern of a string format.- Parameters:
pattern- the pattern of a string forma- Throws:
SemanticException- if the property is locked
-
setStringFormatCategory
Sets the category of a string format. 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:
pattern- the category of a string format- Throws:
SemanticException- ifpatternis not one of the above values.
-
getNumberFormat
Returns the pattern of a number format for a IStyleModel.- Returns:
- the pattern of a number format
-
getNumberFormatCategory
Returns the category of a number format for a IStyleModel.- Returns:
- the category of a number format
-
setNumberFormat
Sets the pattern of a number format.- Parameters:
pattern- the pattern of a number format- Throws:
SemanticException- if the property is locked
-
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.
-
getDateFormat
Returns the pattern of the date-format.- Returns:
- the pattern of the date-format
-
getDateFormatCategory
Returns the category of the date-format.- Returns:
- the category of the date-format
-
getTimeFormat
Returns the pattern of the time-format.- Returns:
- the pattern of the time-format
-
getTimeFormatCategory
Returns the category of the time-format.- Returns:
- the category of the time-format
-
getDateTimeFormat
Returns the pattern of the date-time-format.- Returns:
- the pattern of the date-time-format
-
getDateTimeFormatCategory
Returns the category of the date-time-format.- 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- Throws:
SemanticException- if the property is locked
-
setDateTimeFormatCategory
Sets the category of a number format. 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.
-
setDateFormat
Sets the pattern of a date time format for a highlight rule.- Parameters:
pattern- the pattern of a date time format- Throws:
SemanticException- if the property is locked
-
setDateFormatCategory
Sets the category of a number format. Thepatterncan be one of:DesignChoiceConstants.DATE_FORMAT_TYPE_UNFORMATTEDDesignChoiceConstants.DATE_FORMAT_TYPE_GENERAL_DATEDesignChoiceConstants.DATE_FORMAT_TYPE_LONG_DATEDesignChoiceConstants.DATE_FORMAT_TYPE_MUDIUM_DATEDesignChoiceConstants.DATE_FORMAT_TYPE_SHORT_DATEDesignChoiceConstants.DATE_FORMAT_TYPE_CUSTOM
- Parameters:
pattern- the category of a date-time format- Throws:
SemanticException- ifpatternis not one of the above values.
-
setTimeFormat
Sets the pattern of a date time format for a highlight rule.- Parameters:
pattern- the pattern of a date time format- Throws:
SemanticException- if the property is locked
-
setTimeFormatCategory
Sets the category of a number format. Thepatterncan be one of:DesignChoiceConstants.TIME_FORMAT_TYPE_UNFORMATTEDDesignChoiceConstants.TIME_FORMAT_TYPE_LONG_TIMEDesignChoiceConstants.TIME_FORMAT_TYPE_MEDIUM_TIMEDesignChoiceConstants.TIME_FORMAT_TYPE_SHORT_TIMEDesignChoiceConstants.TIME_FORMAT_TYPE_CUSTOM
- Parameters:
pattern- the category of a date-time format- Throws:
SemanticException- ifpatternis not one of the above values.
-
getDisplay
Returns the value that specifies if a top-level element should be a block or in-line element. The input value is defined inDesignChoiceConstantsand can be one of:DISPLAY_NONEDISPLAY_INLINEDISPLAY_BLOCK
- Returns:
- the display value as a string
-
setDisplay
Sets the value that specifies if a top-level element should be a block or in-line element. The input value is defined inDesignChoiceConstantsand can be one of:DISPLAY_NONEDISPLAY_INLINEDISPLAY_BLOCK
- Parameters:
value- the new display value- Throws:
SemanticException- if the value is not one of the above.
-
getMasterPage
Returns the name of the master page on which to start this section.- Returns:
- the master page name
- See Also:
-
setMasterPage
Sets the master page name on which to start this section. If blank, the normal page sequence is used. If defined, the section starts on a new page, and the master page is the one defined here. The subsequent pages are those defined by the report's page sequence.- Parameters:
value- the new master page name- Throws:
SemanticException- if the property is locked- See Also:
-
getOrphans
Returns the value of orphans. The return value is either an integer as as string or one of constants defined inDesignChoiceConstants:ORPHANS_INHERIT
- Returns:
- the orphans property
- See Also:
-
setOrphans
Sets the orphans property. A orphan occurs if the first line of a multi-line paragraph appears on its own at the bottom of a page due to a page break. The input value is either an integer as as string or one of constants defined inDesignChoiceConstants:ORPHANS_INHERIT
- Parameters:
value- the new orphans property- Throws:
SemanticException- if the value is not an integer or one of the above constants.- See Also:
-
getPageBreakAfter
Returns the page break after property for block-level elements. The return value is one of constants defined inDesignChoiceConstants:PAGE_BREAK_AUTOPAGE_BREAK_ALWAYSPAGE_BREAK_AVOIDPAGE_BREAK_LEFTPAGE_BREAK_RIGHTPAGE_BREAK_INHERIT
- Returns:
- the page break after property
-
setPageBreakAfter
Sets the page break after property for block-level elements. The input value is one of constants defined inDesignChoiceConstants:PAGE_BREAK_AUTOPAGE_BREAK_ALWAYSPAGE_BREAK_AVOIDPAGE_BREAK_LEFTPAGE_BREAK_RIGHTPAGE_BREAK_INHERIT
- Parameters:
value- the new page break after property- Throws:
SemanticException- if the value is not pre-defined.
-
getPageBreakBefore
Returns the page break before property for block-level elements. The return value is one of constants defined inDesignChoiceConstants:PAGE_BREAK_AUTOPAGE_BREAK_ALWAYSPAGE_BREAK_AVOIDPAGE_BREAK_LEFTPAGE_BREAK_RIGHTPAGE_BREAK_INHERIT
- Returns:
- the page break before property
-
setPageBreakBefore
Sets the page break before property for block-level elements. The return value is one of constants defined inDesignChoiceConstants:PAGE_BREAK_AUTOPAGE_BREAK_ALWAYSPAGE_BREAK_AVOIDPAGE_BREAK_LEFTPAGE_BREAK_RIGHTPAGE_BREAK_INHERIT
- Parameters:
value- the new page break before property- Throws:
SemanticException- if the value is not one of the above.
-
getPageBreakInside
Returns the page break inside property for block-level elements. The return value is one of constants defined inDesignChoiceConstants:PAGEBREAK_INSIDE_AVOIDPAGEBREAK_INSIDE_AUTOPAGEBREAK_INSIDE_INHERIT
- Returns:
- the page break inside property
-
setPageBreakInside
Sets the page break inside property for block-level elements. The input value is one of constants defined inDesignChoiceConstants:PAGEBREAK_INSIDE_AVOIDPAGEBREAK_INSIDE_AUTOPAGEBREAK_INSIDE_INHERIT
- Parameters:
value- the new page break inside property- Throws:
SemanticException- if the value is not one of the above.
-
showIfBlank
public boolean showIfBlank()Tests whether to show this frame even if it is empty, or all its data elements are empty. Iffalse, the section is automatically hidden when empty.- Returns:
trueif show-if-blank, otherwisefalse- See Also:
-
setShowIfBlank
Sets whether to show this frame even if it is empty, or all its data elements are empty.- Parameters:
value-trueif show the frame.falsenot.- Throws:
SemanticException- if the property is locked- See Also:
-
getTextUnderline
Returns one 'text-decoration' property to set underline styles. The return value is one of constants defined inDesignChoiceConstants:TEXT_UNDERLINE_NONETEXT_UNDERLINE_UNDERLINE
- Returns:
- the text underline value
-
setTextUnderline
Sets one 'text-decoration' property to set underline styles. The input value is one of constants defined inDesignChoiceConstants:TEXT_UNDERLINE_NONETEXT_UNDERLINE_UNDERLINE
- Parameters:
value- the new text underline- Throws:
SemanticException- if the value is not pre-defined.
-
getTextOverline
Returns one 'text-decoration' property to set overline styles. The return value is one of constants defined inDesignChoiceConstants:TEXT_OVERLINE_NONETEXT_OVERLINE_OVERLINE
- Returns:
- the text overline value
-
setTextOverline
Sets one 'text-decoration' property to set overline styles. The input value is one of constants defined inDesignChoiceConstants:TEXT_OVERLINE_NONETEXT_OVERLINE_OVERLINE
- Parameters:
value- the new text overline value- Throws:
SemanticException- if the value is not one of the above.
-
getTextLineThrough
Returns one 'text-decoration' property to set line-through styles. The return value is one of constants defined inDesignChoiceConstants:TEXT_LINE_THROUGH_NONETEXT_LINE_THROUGH_LINE_THROUGH
- Returns:
- the text line-through value
-
setTextLineThrough
Sets one 'text-decoration' property to set line-through styles. The input value is one of constants defined inDesignChoiceConstants:TEXT_LINE_THROUGH_NONETEXT_LINE_THROUGH_LINE_THROUGH
- Parameters:
value- the new text line-through value- Throws:
SemanticException- if the value is not one of the above.
-
getTextAlign
Returns the text align for block-level elements. The return value is one of constants defined inDesignChoiceConstants:TEXT_ALIGN_LEFTTEXT_ALIGN_CENTERTEXT_ALIGN_RIGHTTEXT_ALIGN_JUSTIFY
- Returns:
- the text align value
-
setTextAlign
Sets the text align for block-level elements. The input value is one of constants defined inDesignChoiceConstants:TEXT_ALIGN_LEFTTEXT_ALIGN_CENTERTEXT_ALIGN_RIGHTTEXT_ALIGN_JUSTIFY
- Parameters:
value- the new text align- Throws:
SemanticException- if the value is not one of the above.
-
getTextTransform
Returns the value to transform the text. The return value is one of constants defined inDesignChoiceConstants:TRANSFORM_CAPITALIZETRANSFORM_UPPERCASETRANSFORM_LOWERCASETRANSFORM_NONE
- Returns:
- the text transform
-
setTextTransform
Sets the value used to transform the text. The input value is one of constants defined inDesignChoiceConstants:TRANSFORM_CAPITALIZETRANSFORM_UPPERCASETRANSFORM_LOWERCASETRANSFORM_NONE
- Parameters:
value- the new text transform- Throws:
SemanticException- if the value is not one of the above.
-
getVerticalAlign
Returns the value of the vertical align property for inline elements. The return value is defined inDesignChoiceConstantsand can be one of:- VERTICAL_ALIGN_BASELINE
- VERTICAL_ALIGN_SUB
- VERTICAL_ALIGN_SUPER
- VERTICAL_ALIGN_TOP
- VERTICAL_ALIGN_TEXT_TOP
- VERTICAL_ALIGN_MIDDLE
- VERTICAL_ALIGN_BOTTOM
- VERTICAL_ALIGN_TEXT_BOTTOM
- Returns:
- the value of the vertical align property
-
setVerticalAlign
Sets the value of the vertical align property for inline elements. The input value is defined inDesignChoiceConstantsand can be one of:- VERTICAL_ALIGN_BASELINE
- VERTICAL_ALIGN_SUB
- VERTICAL_ALIGN_SUPER
- VERTICAL_ALIGN_TOP
- VERTICAL_ALIGN_TEXT_TOP
- VERTICAL_ALIGN_MIDDLE
- VERTICAL_ALIGN_BOTTOM
- VERTICAL_ALIGN_TEXT_BOTTOM
- Parameters:
value- the new vertical align- Throws:
SemanticException- if the value is not one of the above.
-
getWhiteSpace
Returns the white space for block elements. The return value is defined inDesignChoiceConstantsand can be one of:WHITE_SPACE_NORMALWHITE_SPACE_PREWHITE_SPACE_NOWRAP
- Returns:
- the white space
-
setWhiteSpace
Sets the white space property for block elements. The return value is defined inDesignChoiceConstantsand can be one of:WHITE_SPACE_NORMALWHITE_SPACE_PREWHITE_SPACE_NOWRAP
- Parameters:
value- the new white space- Throws:
SemanticException- if the value is not one of the above.
-
getWidows
Returns the value of widows. The return value is either an integer as as string or one of constants defined inDesignChoiceConstants:WIDOWS_INHERIT
- Returns:
- the widows property
- See Also:
-
setWidows
Sets the widows property. A 'widow' occurs when the last line of a multi-line paragraph appears on its own at the top of a page due to a page break. The input value is either an integer as as string or one of constants defined inDesignChoiceConstants:WIDOWS_INHERIT
- Parameters:
value- the new windows property- Throws:
SemanticException- if the value is not an integer or one of the above constants.- See Also:
-
getMapTestExpr
Deprecated.Returns the test expression for the map.- Returns:
- the map test expression
-
setMapTestExpr
Deprecated.Sets the test expression for the map.- Parameters:
value- the value of new map test expression- Throws:
SemanticException- if the expression is invalid.
-
mapRulesIterator
Returns the iterator for map rules. The element in the iterator is the correspondingStructureHandlethat deal with aMapRulein the list.- Returns:
- the iterator of map rule structure list
-
getHighlightTestExpr
Deprecated.Returns the test expression for the highlight.- Returns:
- the highlight test expression
-
setHighlightTestExpr
Deprecated.Sets the highlight test expression.- Parameters:
value- the value of new highlight test expression- Throws:
SemanticException- if the expression is invalid.
-
highlightRulesIterator
Returns the iterator of highlight rules. The element in the iterator is the correspondingHighlightRuleHandlethat deal with aHighRule.- Returns:
- the iterator of highlight rule structure list
-
getColor
Gets a color handle to deal with the font color.- Returns:
- a ColorHandle to for the font color
-
getBackgroundColor
Gets a color handle to deal with the background color.- Returns:
- a ColorHandle for the background color.
-
getBorderTopColor
Gets a color handle to deal with the color of the top side of the border.- Returns:
- a ColorHandle to for the color of the top side of the border
-
getBorderLeftColor
Gets a color handle to deal with the color of the left side of the border.- Returns:
- a ColorHandle to for the color of the left side of the border
-
getBorderRightColor
Gets a color handle to deal with the color of the right side of the border.- Returns:
- a ColorHandle to for the color of the right side of the border
-
getBorderBottomColor
Gets a color handle to deal with the color of the bottom side of the border.- Returns:
- a ColorHandle to for the color of the bottom side of the border
-
getBackGroundPositionX
Gets a dimension handle to deal with the x position for the background. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:SECTION_ALIGN_LEFTSECTION_ALIGN_CENTERSECTION_ALIGN_RIGHT
- Returns:
- a DimensionHandle for the x position
-
getBackGroundPositionY
Gets a dimension handle to deal with the y position for the background. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:BACKGROUND_POSITION_TOPBACKGROUND_POSITION_CENTERBACKGROUND_POSITION_BOTTOM
- Returns:
- a DimensionHandle for the y position
-
getLetterSpacing
Gets a dimension handle to deal with the spacing between individual letters. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:NORMAL_NORMAL
- Returns:
- a DimensionHandle for the spacing between individual letters
-
getLineHeight
Gets a dimension handle to deal with the height of a line. Implies spacing between lines. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:NORMAL_NORMAL
- Returns:
- a DimensionHandle for the line height.
-
getTextIndent
Gets a dimension handle to deal with the text indent.- Returns:
- a DimensionHandle for the text indent.
-
getWordSpacing
Gets a dimension handle to deal with the spacing between two words. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:NORMAL_NORMAL
- Returns:
- a DimensionHandle to deal with the spacing among words.
-
getBorderTopWidth
Gets a dimension handle to deal with the width of the top side of the border. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:LINE_WIDTH_THINLINE_WIDTH_MEDIUMLINE_WIDTH_THICK
- Returns:
- a DimensionHandle for the width of the top side of the border
-
getBorderLeftWidth
Gets a dimension handle to deal with the width of the left side of the border. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:LINE_WIDTH_THINLINE_WIDTH_MEDIUMLINE_WIDTH_THICK
- Returns:
- a DimensionHandle for the width of the left side of the border
-
getBorderRightWidth
Gets a dimension handle to deal with the width of the right side of the border. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:LINE_WIDTH_THINLINE_WIDTH_MEDIUMLINE_WIDTH_THICK
- Returns:
- a DimensionHandle for the width of the right side of the border
-
getBorderBottomWidth
Gets a dimension handle to deal with the width of the bottom side of the border. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:LINE_WIDTH_THINLINE_WIDTH_MEDIUMLINE_WIDTH_THICK
- Returns:
- a DimensionHandle for the width of the bottom side of the border
-
getMarginTop
Gets a handle to deal with the margin of the top side. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:MARGIN_AUTO
- Returns:
- a DimensionHandle for the margin of the top side
-
getMarginRight
Gets a handle to deal with the margin of the right side. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:MARGIN_AUTO
- Returns:
- a DimensionHandle for the margin of the right side
-
getMarginLeft
Gets a handle to deal with the margin of the left side. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:MARGIN_AUTO
- Returns:
- a DimensionHandle for the margin of the left side
-
getMarginBottom
Gets a handle to deal with the margin of the bottom side. Besides the dimension value, the dimension handle may return one of constants defined inDesignChoiceConstatns:MARGIN_AUTO
- Returns:
- a DimensionHandle for the margin of the bottom side
-
getPaddingTop
Gets a dimension handle to deal with the padding of the top side.- Returns:
- a DimensionHandle for the padding of the top side
-
getPaddingRight
Gets a dimension handle to deal with the padding of the right side.- Returns:
- a DimensionHandle for the padding of the right side
-
getPaddingLeft
Gets a dimension handle to deal with the padding of the left side.- Returns:
- a DimensionHandle for the padding of the left side
-
getPaddingBottom
Gets a dimension handle to deal with the padding of the bottom side.- Returns:
- a DimensionHandle for the padding of the bottom side
-
getFontSize
Gets a dimension handle to deal with the font size.- Returns:
- a DimensionHandle for the font size.
-
getFontFamilyHandle
Returns the font handle to deal with the font family.- Returns:
- a FontHandle for the font family.
- See Also:
-
getFontWeight
Returns the weight of the font. The return value is one of constants defined inDesignChoiceConstants: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 a string
-
setFontWeight
Sets the weight of the font. The input value is one of constants defined inDesignChoiceConstants: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
- Parameters:
fontWeight- the new font weight- Throws:
SemanticException- if the input value is not one of the above.
-
getFontVariant
Returns the variant of the font. The return value is one of constants defined inDesignChoiceConstants:FONT_VARIANT_NORMALFONT_VARIANT_SMALL_CAPS
- Returns:
- the font variant in a string.
-
setFontVariant
Sets the variant of the font. The input value is one of constants defined inDesignChoiceConstants:FONT_VARIANT_NORMALFONT_VARIANT_SMALL_CAPS
- Parameters:
fontVariant- the new font variant.- Throws:
SemanticException- if the input value is not one of the above.
-
getFontStyle
Returns the style of the font. The return value is one of constants defined inDesignChoiceConstants:FONT_STYLE_NORMALFONT_STYLE_ITALICFONT_STYLE_OBLIQUE
- Returns:
- the font style in string.
-
setFontStyle
Sets the style of the font. The input value is one of constants defined inDesignChoiceConstants:FONT_STYLE_NORMALFONT_STYLE_ITALICFONT_STYLE_OBLIQUE
- Parameters:
fontStyle- the new font IStyleModel.- Throws:
SemanticException- if the input value is not one of the above.
-
isPredefined
public boolean isPredefined()checks whether this style is created by user or predefined by BIRT.- Returns:
- True if is predefined, false if not.
-
getTextDirection
Returns the Bidi direction for elements. The return value is one of constants defined inDesignChoiceConstants:BIDI_ORIENTATION_RTLBIDI_ORIENTATION_LTR
- Returns:
- the direction value
-
setTextDirection
Sets the Bidi direction for elements. The input value is one of constants defined inDesignChoiceConstants:BIDI_ORIENTATION_RTLBIDI_ORIENTATION_LTR
- Parameters:
value- the new direction- Throws:
SemanticException- if the value is not one of the above.
-
getBackgroundHeight
Get the height of the background image.- Returns:
- a DimensionHandle for the background size height.
-
setBackgroundHeight
Sets the height of the background image.- Parameters:
height- the new width of the background image- Throws:
SemanticException- if the given type is not defined
-
getBackgroundWidth
Get the width of the background image.- Returns:
- a DimensionHandle for the background size width.
-
setBackgroundWidth
Sets the width of the background image.- Parameters:
width- the new width of the background image- Throws:
SemanticException- if the given type is not defined
-
getBackgroundImageType
Returns the type of the background image. The method may return one of constants defined inDesignChoiceConstants:IMAGE_REF_TYPE_URLIMAGE_REF_TYPE_EMBED
- Returns:
- the type of the background image as a string
-
setBackgroundImageType
Sets the type of the background image. The value should be one of constants defined inDesignChoiceConstants:IMAGE_REF_TYPE_URLIMAGE_REF_TYPE_EMBED
- Parameters:
type- the new type of the background image- Throws:
SemanticException- if the given type is not defined
-
getOverflow
Returns the value of overflow property. The return value is defined inDesignChoiceConstantsand can be one of:OVERFLOW_AUTOOVERFLOW_HIDDENOVERFLOW_SCROLLOVERFLOW_VISIBLE
- Returns:
- the value of overflow property.
-
setOverflow
Sets the value of overflow property. The input value is defined inDesignChoiceConstantsand can be one of:OVERFLOW_AUTOOVERFLOW_HIDDENOVERFLOW_SCROLLOVERFLOW_VISIBLE
- Parameters:
value- the new overflow value- Throws:
SemanticException
-
getHeight
Returns the value of height property.- Returns:
- the value of height property.
-
setHeight
Sets the value of height property.- Parameters:
height- the new height value- Throws:
SemanticException
-
getWidth
Returns the value of width property.- Returns:
- the value of width property.
-
setWidth
Sets the value of width property.- Parameters:
width- the new width value- Throws:
SemanticException
-