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

# Class TOCHandle

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.TOCHandle

public class TOCHandle extends StructureHandle
Represents an "TOC" attached to an element.Obtain an instance of this class by calling the `getTOCHandle` method on the handle of an element that defines an action.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`defaultTOCPrefixName`
Default TOC style's prefix name.

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

`structContext`

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

`elementHandle`

## Constructor Summary

Constructors
Constructor
Description
`TOCHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.MemberRef context)`
Deprecated.
`TOCHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.StructureContext context)`
Construct an handle to deal with the toc structure.

## Method Summary

Modifier and Type
Method
Description
`ColorHandle`
`getBackgroundColor()`
Gets back-ground-color property.
`ColorHandle`
`getBorderBottomColor()`
Gets border-bottom-width property.
`String`
`getBorderBottomStyle()`
Returns the style of the border bottom line.
`DimensionHandle`
`getBorderBottomWidth()`
Gets border-bottom-width property.
`ColorHandle`
`getBorderLeftColor()`
Gets border-left-color property.
`String`
`getBorderLeftStyle()`
Gets border-left-style property.
`DimensionHandle`
`getBorderLeftWidth()`
Gets border-left-width property.
`ColorHandle`
`getBorderRightColor()`
Gets border-right-color property.
`String`
`getBorderRightStyle()`
Gets border-right-style property.
`DimensionHandle`
`getBorderRightWidth()`
Gets border-right-width property.
`ColorHandle`
`getBorderTopColor()`
Gets border-top-color property.
`String`
`getBorderTopStyle()`
Gets border-top-style property.
`DimensionHandle`
`getBorderTopWidth()`
Gets border-top-width property.
`ColorHandle`
`getColor()`
Gets font color property.
`String`
`getDateTimeFormat()`
Gets date time format property.
`String`
`getDateTimeFormatCategory()`
Gets date time format category property.
`String`
`getExpression()`
Gets expression of TOC.
`FontHandle`
`getFontFamily()`
Gets font family property.
`DimensionHandle`
`getFontSize()`
Gets font size property.
`String`
`getFontStyle()`
Returns the font style handle for the style.
`String`
`getFontVariant()`
Returns the font variant in a string.
`String`
`getFontWeight()`
Returns the font weight of the highlight rule.
`String`
`getNumberAlign()`
Gets number align property.
`String`
`getNumberFormat()`
Gets number format property.
`String`
`getNumberFormatCategory()`
Gets number format category property.
`PrivateStyleHandle`
`getPrivateStyle()`
Returns a handle to work with the style properties of toc element.
`String`
`getStringFormat()`
Gets string format property.
`String`
`getStringFormatCategory()`
Returns the category of a string format for a toc.
`String`
`getStyleName()`
Gets style of TOC.
`String`
`getTextAlign()`
Returns the value of text align property.
`String`
`getTextDirection()`
Returns the value of direction property.
`DimensionHandle`
`getTextIndent()`
Gets text indent property.
`String`
`getTextLineThrough()`
Returns the value of the line through property.
`String`
`getTextOverline()`
Returns the value of the overline property.
`String`
`getTextTransform()`
Returns the value of the text transform property.
`String`
`getTextUnderline()`
Returns the value of the underline property.
`void`
`setExpression(String expression)`
Sets expression of TOC.
`void`
`setStyleName(String styleName)`
Sets style of TOC.
`void`
`setTextDirection(String value)`
Sets the Bidi direction property.

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

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

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

`getReference`

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

`getDesign, getElement, getElementHandle, getModule`

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

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

## Field Details

### defaultTOCPrefixName

public static final String defaultTOCPrefixName
Default TOC style's prefix name.

See Also:
  - Constant Field Values

## Constructor Details

### TOCHandle

public TOCHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.StructureContext context)
Construct an handle to deal with the toc structure.

Parameters:
  `element` - the element that defined the action.
  `context` - context to the toc property.

### TOCHandle

@Deprecated public TOCHandle(DesignElementHandle element, org.eclipse.birt.report.model.core.MemberRef context)
Deprecated.
Construct an handle to deal with the toc structure.

Parameters:
  `element` - the element that defined the action.
  `context` - context to the toc property

## Method Details

### getExpression

public String getExpression()
Gets expression of TOC.

Returns:
  expression of TOC.

### setExpression

public void setExpression(String expression) throws SemanticException
Sets expression of TOC.

Parameters:
  `expression` - expression of TOC
Throws:
  `SemanticException` - semantic exception

### getStyleName

public String getStyleName()
Gets style of TOC.

Returns:
  style name of TOC

### setStyleName

public void setStyleName(String styleName) throws SemanticException
Sets style of TOC.

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

### getPrivateStyle

public PrivateStyleHandle getPrivateStyle()
Returns a handle to work with the style properties of toc element. Use a style handle to work with the specific getter/setter methods for each style property. The style handle is not necessary to work with style properties generically.

Note a key difference between this method and the `getStyle( )` method. This method returns a handle to the this element. The `getStyle( )` method returns a handle to the shared style, if any, that this element references.

Returns:
  a style handle to work with the style properties of this element. Returns `null` if this element does not have style properties.

### getBorderTopStyle

public String getBorderTopStyle()
Gets border-top-style property.

Returns:
  border-top-style property

### getBorderTopWidth

public DimensionHandle getBorderTopWidth()
Gets border-top-width property.

Returns:
  border-top-width property

### getBorderTopColor

public ColorHandle getBorderTopColor()
Gets border-top-color property.

Returns:
  border-top-color property

### getBorderLeftStyle

public String getBorderLeftStyle()
Gets border-left-style property.

Returns:
  border-left-style property

### getBorderLeftWidth

public DimensionHandle getBorderLeftWidth()
Gets border-left-width property.

Returns:
  border-left-width property

### getBorderLeftColor

public ColorHandle getBorderLeftColor()
Gets border-left-color property.

Returns:
  border-left-color property

### getBorderBottomStyle

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

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

Returns:
  the border bottom style

### getBorderBottomWidth

public DimensionHandle getBorderBottomWidth()
Gets border-bottom-width property.

Returns:
  border-bottom-width property

### getBorderBottomColor

public ColorHandle getBorderBottomColor()
Gets border-bottom-width property.

Returns:
  border-bottom-width property

### getBorderRightStyle

public String getBorderRightStyle()
Gets border-right-style property.

Returns:
  border-right-style property

### getBorderRightWidth

public DimensionHandle getBorderRightWidth()
Gets border-right-width property.

Returns:
  border-right-width property

### getBorderRightColor

public ColorHandle getBorderRightColor()
Gets border-right-color property.

Returns:
  border-right-color property

### getBackgroundColor

public ColorHandle getBackgroundColor()
Gets back-ground-color property.

Returns:
  back-ground-color property

### getDateTimeFormat

public String getDateTimeFormat()
Gets date time format property.

Returns:
  date time format property

### getDateTimeFormatCategory

public String getDateTimeFormatCategory()
Gets date time format category property.

Returns:
  date time format category property

### getNumberFormat

public String getNumberFormat()
Gets number format property.

Returns:
  number format property

### getNumberFormatCategory

public String getNumberFormatCategory()
Gets number format category property.

Returns:
  number format category property

### getNumberAlign

public String getNumberAlign()
Gets number align property.

Returns:
  number align property

### getStringFormat

public String getStringFormat()
Gets string format property.

Returns:
  string format property

### getStringFormatCategory

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

Returns:
  the category of a string format

### getFontFamily

public FontHandle getFontFamily()
Gets font family property.

Returns:
  font family property

### getFontSize

public DimensionHandle getFontSize()
Gets font size property.

Returns:
  font size property

### getFontStyle

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

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

Returns:
  the font style in string.

### getFontWeight

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

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

Returns:
  the font weight in string.

### getFontVariant

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

- `FONT_VARIANT_NORMAL`
- `FONT_VARIANT_SMALL_CAPS`

Returns:
  the font variant in a string.

### getColor

public ColorHandle getColor()
Gets font color property.

Returns:
  font color property

### getTextUnderline

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

- `TEXT_UNDERLINE_NONE`
- `TEXT_UNDERLINE_UNDERLINE`

Returns:
  the value of the underline property

### getTextOverline

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

- `TEXT_OVERLINE_NONE`
- `TEXT_OVERLINE_OVERLINE`

Returns:
  the value of the overline property

### getTextLineThrough

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

- `TEXT_LINE_THROUGH_NONE`
- `TEXT_LINE_THROUGH_LINE_THROUGH`

Returns:
  the text line through

### getTextAlign

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

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

Returns:
  the value of text align property

### getTextDirection

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

- `BIDI_DIRECTION_LTR`
- `BIDI_DIRECTION_RTL`

Returns:
  the value of direction property

### setTextDirection

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

- `BIDI_DIRECTION_LTR`
- `BIDI_DIRECTION_RTL`

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

### getTextIndent

public DimensionHandle getTextIndent()
Gets text indent property.

Returns:
  text indent property

### getTextTransform

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

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

Returns:
  the value of the transform property