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
element
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
module
Fields 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_PROP
Fields 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 TypeMethodDescriptionboolean
Tests 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.boolean
checks whether this style is created by user or predefined by BIRT.Iterator<?>
Returns the iterator for map rules.void
setBackgroundAttachment
(String value) Sets the background attachment.void
setBackgroundHeight
(String height) Sets the height of the background image.void
setBackgroundImage
(String value) Sets the address of the background image.void
setBackgroundImageType
(String type) Sets the type of the background image.void
setBackgroundRepeat
(String value) Sets the repeat pattern for a background image.void
setBackgroundWidth
(String width) Sets the width of the background image.void
setBorderBottomStyle
(String value) Sets the style of the bottom line of the border.void
setBorderLeftStyle
(String value) Sets the style of the left line of the border.void
setBorderRightStyle
(String value) Sets the style of the right line of the border.void
setBorderTopStyle
(String value) Sets the style of the top line of the border.void
setCanShrink
(boolean value) Sets whether the section can shrink if the actual content is smaller than the design size.void
setDateFormat
(String pattern) Sets the pattern of a date time format for a highlight rule.void
setDateFormatCategory
(String pattern) Sets the category of a number format.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.void
setDisplay
(String value) Sets the value that specifies if a top-level element should be a block or in-line element.void
setFontStyle
(String fontStyle) Sets the style of the font.void
setFontVariant
(String fontVariant) Sets the variant of the font.void
setFontWeight
(String fontWeight) Sets the weight of the font.void
Sets the value of height property.void
setHighlightTestExpr
(String value) Deprecated.void
setMapTestExpr
(String value) Deprecated.void
setMasterPage
(String value) Sets the master page name on which to start this section.void
setNumberFormat
(String pattern) Sets the pattern of a number format.void
setNumberFormatCategory
(String category) Sets the category of a number format for a highlight rule.void
setOrphans
(String value) Sets the orphans property.void
setOverflow
(String value) Sets the value of overflow property.void
setPageBreakAfter
(String value) Sets the page break after property for block-level elements.void
setPageBreakBefore
(String value) Sets the page break before property for block-level elements.void
setPageBreakInside
(String value) Sets the page break inside property for block-level elements.void
setShowIfBlank
(boolean value) Sets whether to show this frame even if it is empty, or all its data elements are empty.void
setStringFormat
(String pattern) Sets the pattern of a string format.void
setStringFormatCategory
(String pattern) Sets the category of a string format.void
setTextAlign
(String value) Sets the text align for block-level elements.void
setTextDirection
(String value) Sets the Bidi direction for elements.void
setTextLineThrough
(String value) Sets one 'text-decoration' property to set line-through styles.void
setTextOverline
(String value) Sets one 'text-decoration' property to set overline styles.void
setTextTransform
(String value) Sets the value used to transform the text.void
setTextUnderline
(String value) Sets one 'text-decoration' property to set underline styles.void
setTimeFormat
(String pattern) Sets the pattern of a date time format for a highlight rule.void
setTimeFormatCategory
(String pattern) Sets the category of a number format.void
setVerticalAlign
(String value) Sets the value of the vertical align property for inline elements.void
setWhiteSpace
(String value) Sets the white space property for block elements.void
Sets the widows property.void
Sets the value of width property.boolean
Tests 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, setPropertyMask
Methods 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 inDesignChoiceConstants
and can be one of:- BACKGROUND_ATTACHMENT_SCROLL
- BACKGROUND_ATTACHMENT_FIXED
- Returns:
- the background attachment
-
setBackgroundAttachment
Sets the background attachment. The return value is defined inDesignChoiceConstants
and 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 inDesignChoiceConstants
and 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 inDesignChoiceConstants
and 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 inDesignChoiceConstants
and can be one of: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 style of the bottom line
-
setBorderBottomStyle
Sets the style of the bottom line of the border. The input value is defined inDesignChoiceConstants
and can be one of: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
- 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 inDesignChoiceConstants
and can be one of: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 style of the left line
-
setBorderLeftStyle
Sets the style of the left line of the border. The input value is defined inDesignChoiceConstants
and can be one of: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
- 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 inDesignChoiceConstants
and can be one of: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 style of the right line
-
setBorderRightStyle
Sets the style of the right line of the border. The input value is defined inDesignChoiceConstants
and can be one of: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
- 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 inDesignChoiceConstants
and can be one of: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 style of the top line
-
setBorderTopStyle
Sets the style of the top line of the border. The input value is defined inDesignChoiceConstants
and can be one of: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
- 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:
true
if can shrink, otherwisefalse
- See Also:
-
setCanShrink
Sets whether the section can shrink if the actual content is smaller than the design size.- Parameters:
value
-true
if can shrink,false
not.- 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. Thepattern
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:
pattern
- the category of a string format- Throws:
SemanticException
- ifpattern
is 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. Thepattern
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
- ifcategory
is 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. Thepattern
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
- ifpattern
is 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. Thepattern
can be one of:DesignChoiceConstants.DATE_FORMAT_TYPE_UNFORMATTED
DesignChoiceConstants.DATE_FORMAT_TYPE_GENERAL_DATE
DesignChoiceConstants.DATE_FORMAT_TYPE_LONG_DATE
DesignChoiceConstants.DATE_FORMAT_TYPE_MUDIUM_DATE
DesignChoiceConstants.DATE_FORMAT_TYPE_SHORT_DATE
DesignChoiceConstants.DATE_FORMAT_TYPE_CUSTOM
- Parameters:
pattern
- the category of a date-time format- Throws:
SemanticException
- ifpattern
is 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. Thepattern
can be one of:DesignChoiceConstants.TIME_FORMAT_TYPE_UNFORMATTED
DesignChoiceConstants.TIME_FORMAT_TYPE_LONG_TIME
DesignChoiceConstants.TIME_FORMAT_TYPE_MEDIUM_TIME
DesignChoiceConstants.TIME_FORMAT_TYPE_SHORT_TIME
DesignChoiceConstants.TIME_FORMAT_TYPE_CUSTOM
- Parameters:
pattern
- the category of a date-time format- Throws:
SemanticException
- ifpattern
is 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 inDesignChoiceConstants
and can be one of:DISPLAY_NONE
DISPLAY_INLINE
DISPLAY_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 inDesignChoiceConstants
and can be one of:DISPLAY_NONE
DISPLAY_INLINE
DISPLAY_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_AUTO
PAGE_BREAK_ALWAYS
PAGE_BREAK_AVOID
PAGE_BREAK_LEFT
PAGE_BREAK_RIGHT
PAGE_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_AUTO
PAGE_BREAK_ALWAYS
PAGE_BREAK_AVOID
PAGE_BREAK_LEFT
PAGE_BREAK_RIGHT
PAGE_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_AUTO
PAGE_BREAK_ALWAYS
PAGE_BREAK_AVOID
PAGE_BREAK_LEFT
PAGE_BREAK_RIGHT
PAGE_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_AUTO
PAGE_BREAK_ALWAYS
PAGE_BREAK_AVOID
PAGE_BREAK_LEFT
PAGE_BREAK_RIGHT
PAGE_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_AVOID
PAGEBREAK_INSIDE_AUTO
PAGEBREAK_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_AVOID
PAGEBREAK_INSIDE_AUTO
PAGEBREAK_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:
true
if 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
-true
if show the frame.false
not.- 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_NONE
TEXT_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_NONE
TEXT_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_NONE
TEXT_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_NONE
TEXT_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_NONE
TEXT_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_NONE
TEXT_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_LEFT
TEXT_ALIGN_CENTER
TEXT_ALIGN_RIGHT
TEXT_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_LEFT
TEXT_ALIGN_CENTER
TEXT_ALIGN_RIGHT
TEXT_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_CAPITALIZE
TRANSFORM_UPPERCASE
TRANSFORM_LOWERCASE
TRANSFORM_NONE
- Returns:
- the text transform
-
setTextTransform
Sets the value used to transform the text. The input value is one of constants defined inDesignChoiceConstants
: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.
-
getVerticalAlign
Returns the value of the vertical align property for inline elements. The return value is defined inDesignChoiceConstants
and 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 inDesignChoiceConstants
and 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 inDesignChoiceConstants
and can be one of:WHITE_SPACE_NORMAL
WHITE_SPACE_PRE
WHITE_SPACE_NOWRAP
- Returns:
- the white space
-
setWhiteSpace
Sets the white space property for block elements. The return value is defined inDesignChoiceConstants
and can be one of:WHITE_SPACE_NORMAL
WHITE_SPACE_PRE
WHITE_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 correspondingStructureHandle
that deal with aMapRule
in 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 correspondingHighlightRuleHandle
that 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_LEFT
SECTION_ALIGN_CENTER
SECTION_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_TOP
BACKGROUND_POSITION_CENTER
BACKGROUND_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_THIN
LINE_WIDTH_MEDIUM
LINE_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_THIN
LINE_WIDTH_MEDIUM
LINE_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_THIN
LINE_WIDTH_MEDIUM
LINE_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_THIN
LINE_WIDTH_MEDIUM
LINE_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_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 a string
-
setFontWeight
Sets the weight of the font. The input value is one of constants defined inDesignChoiceConstants
: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
- 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_NORMAL
FONT_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_NORMAL
FONT_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_NORMAL
FONT_STYLE_ITALIC
FONT_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_NORMAL
FONT_STYLE_ITALIC
FONT_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_RTL
BIDI_ORIENTATION_LTR
- Returns:
- the direction value
-
setTextDirection
Sets the Bidi direction for elements. The input value is one of constants defined inDesignChoiceConstants
:BIDI_ORIENTATION_RTL
BIDI_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_URL
IMAGE_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_URL
IMAGE_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 inDesignChoiceConstants
and can be one of:OVERFLOW_AUTO
OVERFLOW_HIDDEN
OVERFLOW_SCROLL
OVERFLOW_VISIBLE
- Returns:
- the value of overflow property.
-
setOverflow
Sets the value of overflow property. The input value is defined inDesignChoiceConstants
and can be one of:OVERFLOW_AUTO
OVERFLOW_HIDDEN
OVERFLOW_SCROLL
OVERFLOW_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
-