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

# Class MultiRowItem

java.lang.Object
org.eclipse.birt.report.model.api.extension.MultiRowItem

All Implemented Interfaces:
  `IDesignElement`, `IMultiRowItem`, `IReportElement`, `IReportItem`

public class MultiRowItem extends Object implements IMultiRowItem
Implements of multi row report item. Used for extension multi row items. The constructor in sub class must call super(ExtendedItemHandle).

## Field Summary

### Fields inherited from interface org.eclipse.birt.report.model.api.simpleapi.IReportItem

`constants`

## Constructor Summary

Constructors
Constructor
Description
`MultiRowItem(ExtendedItemHandle item)`
Constructors.

## Method Summary

Modifier and Type
Method
Description
`void`
`addDataBinding(IDataBinding binding)`
Add ComputedColumn.name , expression of IDataBinding are required.
`void`
`addFilterCondition(IFilterCondition condition)`
Adds filter condition.expr of IFilterCondition is required.
`void`
`addHideRule(IHideRule rule)`
Add HideRule
`void`
`addHighlightRule(IHighlightRule rule)`
Adds high light rule.
`void`
`addSortCondition(ISortCondition condition)`
Adds sort condition.key of ISortCondition is required.
`String`
`getBookmark()`
Returns the bookmark of the report item.
`String`
`getComments()`
Gets the comments of the report element.
`String`
`getCustomXml()`
Gets the custom XML.
`String`
`getDataBinding(String bindingName)`
Returns column binding.
`IDataBinding[]`
`getDataBindings()`
Returns array of all column bindings
`String`
`getDisplayName()`
Gets the display name.
`String`
`getDisplayNameKey()`
Gets the resource key of the display name.
`IReportItem`
`getExtensionElement()`
Gets the corresponding extension item that is wrapped by the `MultiRowItem`.
`IFilterCondition[]`
`getFilterConditions()`
Returns all filter conditions
`String`
`getHeight()`
Gets the item's height.
`IHideRule[]`
`getHideRules()`
Returns array of hide rule expression
`IHighlightRule[]`
`getHighlightRules()`
Gets all high light rules.
`String`
`getName()`
Returns the name of this element.
`String`
`getNamedExpression(String name)`
Returns name of user property defined in this element.
`IDesignElement`
`getParent()`
Return the parent of this element
`String`
`getQualifiedName()`
Gets the name of this element.
`IReportDesign`
`getReport()`
Gets the report.
`ISortCondition[]`
`getSortConditions()`
Returns all sort conditions.
`IStyle`
`getStyle()`
Gets design element style.
`String`
`getTocExpression()`
Returns the expression evalueated as a table of contents entry for this item.
`Object`
`getUserProperty(String name)`
Returns user property defined in this element.
`Object`
`getUserPropertyExpression(String name)`
Returns user property as an expression defined in this element.
`String`
`getWidth()`
Gets a the item's width.
`String`
`getX()`
Gets the item's x (horizontal) position.
`String`
`getY()`
Gets the item's y (vertical) position.
`void`
`removeDataBinding(String bindingName)`
Removes special column binding
`void`
`removeDataBindings()`
Removes all column bindings
`void`
`removeFilterCondition(IFilterCondition condition)`
Removes filter condition.
`void`
`removeFilterConditions()`
Removes filter condition.
`void`
`removeHideRule(IHideRule rule)`
Removes all hide rules that matches formatType.
`void`
`removeHideRules()`
Removes all hide rules
`void`
`removeHighlightRule(IHighlightRule rule)`
Removes high light rule.
`void`
`removeHighlightRules()`
Removes all high light rules.
`void`
`removeSortCondition(ISortCondition condition)`
Removes sort condition.
`void`
`removeSortConditions()`
Removes all sort conditions
`void`
`setBookmark(String value)`
Sets the bookmark of the report item.
`void`
`setComments(String theComments)`
Sets the comments of the report element.
`void`
`setCurrentView(IDesignElement viewElement)`
Sets the view to be used.
`void`
`setCustomXml(String customXml)`
Sets the custom XML.
`void`
`setDisplayName(String displayName)`
Sets the display name.
`void`
`setDisplayNameKey(String displayNameKey)`
Sets the resource key of the display name.
`void`
`setHeight(double dimension)`
Sets the item's height to a value in default units.
`void`
`setHeight(String dimension)`
Sets the item's height using a dimension string with optional unit suffix such as "10" or "10pt".
`void`
`setName(String name)`
Sets the name of this element.
`void`
`setNamedExpression(String name, String exp)`
Sets name of user property defined in this element.
`void`
`setTocExpression(String expression)`
Sets a table of contents entry for this item.
`void`
`setUserProperty(String name, Object value, String type)`
Sets user property defined in this element.
`void`
`setUserProperty(String name, String value)`
Sets user property defined in this element.
`void`
`setWidth(double dimension)`
Sets the item's width to a value in default units.
`void`
`setWidth(String dimension)`
Sets the item's width using a dimension string with optional unit suffix such as "10" or "10pt".
`void`
`setX(double dimension)`
Sets the item's x position to a value in default units.
`void`
`setX(String dimension)`
Sets the item's x position using a dimension string with optional unit suffix such as "10" or "10pt".
`void`
`setY(double dimension)`
Sets the item's y position to a value in default units.
`void`
`setY(String dimension)`
Sets the item's y position using a dimension string with optional unit suffix such as "10" or "10pt".

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

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

## Constructor Details

### MultiRowItem

public MultiRowItem(ExtendedItemHandle item)
Constructors.

Parameters:
  `item` -

## Method Details

### addFilterCondition

public void addFilterCondition(IFilterCondition condition) throws SemanticException
Description copied from interface: `IMultiRowItem`
Adds filter condition.expr of IFilterCondition is required.

Specified by:
  `addFilterCondition` in interface `IMultiRowItem`
Parameters:
  `condition` -
Throws:
  `SemanticException`

### addSortCondition

public void addSortCondition(ISortCondition condition) throws SemanticException
Description copied from interface: `IMultiRowItem`
Adds sort condition.key of ISortCondition is required.

Specified by:
  `addSortCondition` in interface `IMultiRowItem`
Parameters:
  `condition` -
Throws:
  `SemanticException`

### getFilterConditions

public IFilterCondition[] getFilterConditions()
Description copied from interface: `IMultiRowItem`
Returns all filter conditions

Specified by:
  `getFilterConditions` in interface `IMultiRowItem`
Returns:
  all filter conditions

### getSortConditions

public ISortCondition[] getSortConditions()
Description copied from interface: `IMultiRowItem`
Returns all sort conditions.

Specified by:
  `getSortConditions` in interface `IMultiRowItem`
Returns:
  all sort conditions.

### removeFilterCondition

public void removeFilterCondition(IFilterCondition condition) throws SemanticException
Description copied from interface: `IMultiRowItem`
Removes filter condition.

Specified by:
  `removeFilterCondition` in interface `IMultiRowItem`
Parameters:
  `condition` -
Throws:
  `SemanticException`

### removeFilterConditions

public void removeFilterConditions() throws SemanticException
Description copied from interface: `IMultiRowItem`
Removes filter condition.

Specified by:
  `removeFilterConditions` in interface `IMultiRowItem`
Throws:
  `SemanticException`

### removeSortCondition

public void removeSortCondition(ISortCondition condition) throws SemanticException
Description copied from interface: `IMultiRowItem`
Removes sort condition.

Specified by:
  `removeSortCondition` in interface `IMultiRowItem`
Parameters:
  `condition` -
Throws:
  `SemanticException`

### removeSortConditions

public void removeSortConditions() throws SemanticException
Description copied from interface: `IMultiRowItem`
Removes all sort conditions

Specified by:
  `removeSortConditions` in interface `IMultiRowItem`
Throws:
  `SemanticException`

### addDataBinding

public void addDataBinding(IDataBinding binding) throws SemanticException
Description copied from interface: `IReportItem`
Add ComputedColumn.name , expression of IDataBinding are required.

Specified by:
  `addDataBinding` in interface `IReportItem`
Parameters:
  `binding` -
Throws:
  `SemanticException`

### addHideRule

public void addHideRule(IHideRule rule) throws SemanticException
Description copied from interface: `IReportItem`
Add HideRule

Specified by:
  `addHideRule` in interface `IReportItem`
Parameters:
  `rule` -
Throws:
  `SemanticException`

### addHighlightRule

public void addHighlightRule(IHighlightRule rule) throws SemanticException
Description copied from interface: `IReportItem`
Adds high light rule.

Specified by:
  `addHighlightRule` in interface `IReportItem`
Parameters:
  `rule` -
Throws:
  `SemanticException`

### getBookmark

public String getBookmark()
Description copied from interface: `IReportItem`
Returns the bookmark of the report item. The bookmark value is evaluated as an expression.

Specified by:
  `getBookmark` in interface `IReportItem`
Returns:
  the book mark as a string

### getDataBinding

public String getDataBinding(String bindingName)
Description copied from interface: `IReportItem`
Returns column binding.

Specified by:
  `getDataBinding` in interface `IReportItem`
Parameters:
  `bindingName` -
Returns:
  column binding expression.

### getDataBindings

public IDataBinding[] getDataBindings()
Description copied from interface: `IReportItem`
Returns array of all column bindings

Specified by:
  `getDataBindings` in interface `IReportItem`
Returns:
  all column bindings

### getHeight

public String getHeight()
Description copied from interface: `IReportItem`
Gets the item's height.

Specified by:
  `getHeight` in interface `IReportItem`
Returns:
  the item's height.

### getHideRules

public IHideRule[] getHideRules()
Description copied from interface: `IReportItem`
Returns array of hide rule expression

Specified by:
  `getHideRules` in interface `IReportItem`
Returns:
  array of hide rule expression

### getHighlightRules

public IHighlightRule[] getHighlightRules()
Description copied from interface: `IReportItem`
Gets all high light rules.

Specified by:
  `getHighlightRules` in interface `IReportItem`
Returns:
  all high light rules

### getTocExpression

public String getTocExpression()
Description copied from interface: `IReportItem`
Returns the expression evalueated as a table of contents entry for this item.

Specified by:
  `getTocExpression` in interface `IReportItem`
Returns:
  the expression evaluated as a table of contents entry for this item
See Also:
  - `IReportItem.setTocExpression(String)`

### getWidth

public String getWidth()
Description copied from interface: `IReportItem`
Gets a the item's width.

Specified by:
  `getWidth` in interface `IReportItem`
Returns:
  a the item's width.

### getX

public String getX()
Description copied from interface: `IReportItem`
Gets the item's x (horizontal) position.

Specified by:
  `getX` in interface `IReportItem`
Returns:
  The item's x position.

### getY

public String getY()
Description copied from interface: `IReportItem`
Gets the item's y (vertical) position.

Specified by:
  `getY` in interface `IReportItem`
Returns:
  The item's y position.

### setX

public void setX(double dimension) throws SemanticException
Description copied from interface: `IReportItem`
Sets the item's x position to a value in default units. The default unit may be defined by the property in BIRT or the application unit defined in the design session.

Specified by:
  `setX` in interface `IReportItem`
Parameters:
  `dimension` - the new value in application units.
Throws:
  `SemanticException` - if the property is locked.

### setX

public void setX(String dimension) throws SemanticException
Description copied from interface: `IReportItem`
Sets the item's x position using a dimension string with optional unit suffix such as "10" or "10pt". If no suffix is provided, then the units are assumed to be in the design's default units. Call this method to set a string typed in by the user.

Specified by:
  `setX` in interface `IReportItem`
Parameters:
  `dimension` - dimension string with optional unit suffix.
Throws:
  `SemanticException` - if the string is not valid

### setY

public void setY(double dimension) throws SemanticException
Description copied from interface: `IReportItem`
Sets the item's y position to a value in default units. The default unit may be defined by the property in BIRT or the application unit defined in the design session.

Specified by:
  `setY` in interface `IReportItem`
Parameters:
  `dimension` - the new value in application units.
Throws:
  `SemanticException` - if the property is locked.

### setY

public void setY(String dimension) throws SemanticException
Description copied from interface: `IReportItem`
Sets the item's y position using a dimension string with optional unit suffix such as "10" or "10pt". If no suffix is provided, then the units are assumed to be in the design's default units. Call this method to set a string typed in by the user.

Specified by:
  `setY` in interface `IReportItem`
Parameters:
  `dimension` - dimension string with optional unit suffix.
Throws:
  `SemanticException` - if the string is not valid

### removeDataBinding

public void removeDataBinding(String bindingName) throws SemanticException
Description copied from interface: `IReportItem`
Removes special column binding

Specified by:
  `removeDataBinding` in interface `IReportItem`
Parameters:
  `bindingName` -
Throws:
  `SemanticException`

### removeDataBindings

public void removeDataBindings() throws SemanticException
Description copied from interface: `IReportItem`
Removes all column bindings

Specified by:
  `removeDataBindings` in interface `IReportItem`
Throws:
  `SemanticException`

### removeHideRule

public void removeHideRule(IHideRule rule) throws SemanticException
Description copied from interface: `IReportItem`
Removes all hide rules that matches formatType.

Specified by:
  `removeHideRule` in interface `IReportItem`
Parameters:
  `rule` -
Throws:
  `SemanticException`

### removeHideRules

public void removeHideRules() throws SemanticException
Description copied from interface: `IReportItem`
Removes all hide rules

Specified by:
  `removeHideRules` in interface `IReportItem`
Throws:
  `SemanticException`

### removeHighlightRule

public void removeHighlightRule(IHighlightRule rule) throws SemanticException
Description copied from interface: `IReportItem`
Removes high light rule.

Specified by:
  `removeHighlightRule` in interface `IReportItem`
Parameters:
  `rule` -
Throws:
  `SemanticException`

### removeHighlightRules

public void removeHighlightRules() throws SemanticException
Description copied from interface: `IReportItem`
Removes all high light rules.

Specified by:
  `removeHighlightRules` in interface `IReportItem`
Throws:
  `SemanticException`

### setBookmark

public void setBookmark(String value) throws SemanticException
Description copied from interface: `IReportItem`
Sets the bookmark of the report item. The bookmark value is evaluated as an expression. If you want the bookmark to be the string "bookmark", you need to use setBookmark("\"bookmark\""); If bookmark is a JavaScript variable, use setBookmark("bookmark");

Specified by:
  `setBookmark` in interface `IReportItem`
Parameters:
  `value` - the bookmark expression
Throws:
  `SemanticException` - if the property is locked.

### setHeight

public void setHeight(double dimension) throws SemanticException
Description copied from interface: `IReportItem`
Sets the item's height to a value in default units. The default unit may be defined by the property in BIRT or the application unit defined in the design session.

Specified by:
  `setHeight` in interface `IReportItem`
Parameters:
  `dimension` - the new value in application units.
Throws:
  `SemanticException` - if the property is locked.

### setHeight

public void setHeight(String dimension) throws SemanticException
Description copied from interface: `IReportItem`
Sets the item's height using a dimension string with optional unit suffix such as "10" or "10pt". If no suffix is provided, then the units are assumed to be in the design's default units. Call this method to set a string typed in by the user.

Specified by:
  `setHeight` in interface `IReportItem`
Parameters:
  `dimension` - dimension string with optional unit suffix.
Throws:
  `SemanticException` - if the string is not valid

### setTocExpression

public void setTocExpression(String expression) throws SemanticException
Description copied from interface: `IReportItem`
Sets a table of contents entry for this item. The TOC property defines an expression that returns a string that is to appear in the Table of Contents for this item or its container.

Specified by:
  `setTocExpression` in interface `IReportItem`
Parameters:
  `expression` - the expression that returns a string
Throws:
  `SemanticException` - if the TOC property is locked by the property mask.
See Also:
  - `IReportItem.getTocExpression()`

### setWidth

public void setWidth(double dimension) throws SemanticException
Description copied from interface: `IReportItem`
Sets the item's width to a value in default units. The default unit may be defined by the property in BIRT or the application unit defined in the design session.

Specified by:
  `setWidth` in interface `IReportItem`
Parameters:
  `dimension` - the new value in application units.
Throws:
  `SemanticException` - if the property is locked.

### setWidth

public void setWidth(String dimension) throws SemanticException
Description copied from interface: `IReportItem`
Sets the item's width using a dimension string with optional unit suffix such as "10" or "10pt". If no suffix is provided, then the units are assumed to be in the design's default units. Call this method to set a string typed in by the user.

Specified by:
  `setWidth` in interface `IReportItem`
Parameters:
  `dimension` - dimension string with optional unit suffix.
Throws:
  `SemanticException` - if the string is not valid

### getComments

public String getComments()
Description copied from interface: `IReportElement`
Gets the comments of the report element.

Specified by:
  `getComments` in interface `IReportElement`
Returns:
  the comments of the report element

### getCustomXml

public String getCustomXml()
Description copied from interface: `IReportElement`
Gets the custom XML.

Specified by:
  `getCustomXml` in interface `IReportElement`
Returns:
  the custom XML

### getDisplayName

public String getDisplayName()
Description copied from interface: `IReportElement`
Gets the display name.

Specified by:
  `getDisplayName` in interface `IReportElement`
Returns:
  the display name

### getDisplayNameKey

public String getDisplayNameKey()
Description copied from interface: `IReportElement`
Gets the resource key of the display name.

Specified by:
  `getDisplayNameKey` in interface `IReportElement`
Returns:
  the resource key of the display name

### getName

public String getName()
Description copied from interface: `IReportElement`
Returns the name of this element. Returns `null` if the element does not have a name. Many elements do not require a name. The name does not inherit. If this element does not have a name, it will not inherit the name of its parent element.

Specified by:
  `getName` in interface `IReportElement`
Returns:
  the element name, or null if the name is not set

### setComments

public void setComments(String theComments) throws SemanticException
Description copied from interface: `IReportElement`
Sets the comments of the report element.

Specified by:
  `setComments` in interface `IReportElement`
Parameters:
  `theComments` - the comments to set
Throws:
  `SemanticException` - if the comments property is locked or not defined on this element.

### setCustomXml

public void setCustomXml(String customXml) throws SemanticException
Description copied from interface: `IReportElement`
Sets the custom XML.

Specified by:
  `setCustomXml` in interface `IReportElement`
Parameters:
  `customXml` - the custom XML to set
Throws:
  `SemanticException` - if the custom XML is locked or not defined on this element.

### setDisplayName

public void setDisplayName(String displayName) throws SemanticException
Description copied from interface: `IReportElement`
Sets the display name.

Specified by:
  `setDisplayName` in interface `IReportElement`
Parameters:
  `displayName` - the display name
Throws:
  `SemanticException` - if the display name property is locked or not defined on this element.

### setDisplayNameKey

public void setDisplayNameKey(String displayNameKey) throws SemanticException
Description copied from interface: `IReportElement`
Sets the resource key of the display name.

Specified by:
  `setDisplayNameKey` in interface `IReportElement`
Parameters:
  `displayNameKey` - the resource key of the display name
Throws:
  `SemanticException` - if the display name resource-key property is locked or not defined on this element.

### setName

public void setName(String name) throws SemanticException
Description copied from interface: `IReportElement`
Sets the name of this element. If the name is `null`, then the name is cleared if this element does not require a name.

Specified by:
  `setName` in interface `IReportElement`
Parameters:
  `name` - the new name
Throws:
  `SemanticException` - if the name is duplicate, or if the name is `null` and this element requires a name.

### getNamedExpression

public String getNamedExpression(String name)
Description copied from interface: `IDesignElement`
Returns name of user property defined in this element.

Specified by:
  `getNamedExpression` in interface `IDesignElement`
Parameters:
  `name` -
Returns:
  name of user property

### getParent

public IDesignElement getParent()
Description copied from interface: `IDesignElement`
Return the parent of this element

Specified by:
  `getParent` in interface `IDesignElement`
Returns:
  the parent

### getQualifiedName

public String getQualifiedName()
Description copied from interface: `IDesignElement`
Gets the name of this element. The returned element name will be the same as `getName()`, plus the namespace of the module that the elment is contained, if any. If the element is existed in the current module,this method and `getName()` will return identical results.

Specified by:
  `getQualifiedName` in interface `IDesignElement`
Returns:
  the qualified name of thie element.

### getStyle

public IStyle getStyle()
Description copied from interface: `IDesignElement`
Gets design element style.

Specified by:
  `getStyle` in interface `IDesignElement`
Returns:
  style

### getUserProperty

public Object getUserProperty(String name)
Description copied from interface: `IDesignElement`
Returns user property defined in this element.

Specified by:
  `getUserProperty` in interface `IDesignElement`
Parameters:
  `name` -
Returns:
  user property

### setNamedExpression

public void setNamedExpression(String name, String exp) throws SemanticException
Description copied from interface: `IDesignElement`
Sets name of user property defined in this element.

Specified by:
  `setNamedExpression` in interface `IDesignElement`
Parameters:
  `name` - name of user property
  `exp` - name expression
Throws:
  `SemanticException`

### setUserProperty

public void setUserProperty(String name, Object value, String type) throws SemanticException
Description copied from interface: `IDesignElement`
Sets user property defined in this element.

Specified by:
  `setUserProperty` in interface `IDesignElement`
Parameters:
  `name` -
  `value` -
  `type` -
Throws:
  `SemanticException`

### setUserProperty

public void setUserProperty(String name, String value) throws SemanticException
Description copied from interface: `IDesignElement`
Sets user property defined in this element.

Specified by:
  `setUserProperty` in interface `IDesignElement`
Parameters:
  `name` -
  `value` -
Throws:
  `SemanticException`

### setCurrentView

public void setCurrentView(IDesignElement viewElement) throws SemanticException
Description copied from interface: `IReportItem`
Sets the view to be used. If the given element is not in the multiple view, it will be added and set as the active view.

Specified by:
  `setCurrentView` in interface `IReportItem`
Parameters:
  `viewElement` - the view element, must not be `this`. Can be `null`.
Throws:
  `SemanticException` - if the given element resides in the other elements.

### getReport

public IReportDesign getReport()
Description copied from interface: `IDesignElement`
Gets the report.

Specified by:
  `getReport` in interface `IDesignElement`
Returns:
  the report

### getExtensionElement

public IReportItem getExtensionElement()
Gets the corresponding extension item that is wrapped by the `MultiRowItem`.

Returns:
  the corresponding extension item in `simpleapi.IReportItem`

### getUserPropertyExpression

public Object getUserPropertyExpression(String name)
Description copied from interface: `IDesignElement`
Returns user property as an expression defined in this element.

Specified by:
  `getUserPropertyExpression` in interface `IDesignElement`
Parameters:
  `name` - the user property name
Returns:
  user property as an expression