Interface IReportItem
- All Superinterfaces:
IDesignElement
,IReportElement
- All Known Subinterfaces:
IAutoText
,IDataItem
,IDynamicText
,IGrid
,IImage
,ILabel
,IList
,IListing
,ITable
,ITextItem
Represents a the design of a report item in the scripting environment
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.eclipse.birt.report.model.api.simpleapi.ScriptConstants
Property to handle script constants -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataBinding
(IDataBinding binding) Add ComputedColumn.name , expression of IDataBinding are required.void
addHideRule
(IHideRule rule) Add HideRulevoid
Adds high light rule.Returns the bookmark of the report item.getDataBinding
(String bindingName) Returns column binding.Returns array of all column bindingsGets the item's height.Returns array of hide rule expressionGets all high light rules.Returns the expression evalueated as a table of contents entry for this item.getWidth()
Gets a the item's width.getX()
Gets the item's x (horizontal) position.getY()
Gets the item's y (vertical) position.void
removeDataBinding
(String bindingName) Removes special column bindingvoid
Removes all column bindingsvoid
removeHideRule
(IHideRule rule) Removes all hide rules that matches formatType.void
Removes all hide rulesvoid
Removes high light rule.void
Removes all high light rules.void
setBookmark
(String value) Sets the bookmark of the report item.void
setCurrentView
(IDesignElement viewElement) Sets the view to be used.void
setHeight
(double dimension) Sets the item's height to a value in default units.void
Sets the item's height using a dimension string with optional unit suffix such as "10" or "10pt".void
setTocExpression
(String expression) Sets a table of contents entry for this item.void
setWidth
(double dimension) Sets the item's width to a value in default units.void
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
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
Sets the item's y position using a dimension string with optional unit suffix such as "10" or "10pt".Methods inherited from interface org.eclipse.birt.report.engine.api.script.element.IDesignElement
getNamedExpression, getParent, getQualifiedName, getReport, getStyle, getUserProperty, getUserPropertyExpression, setNamedExpression, setUserProperty, setUserProperty
Methods inherited from interface org.eclipse.birt.report.engine.api.script.element.IReportElement
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getName, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setName
-
Field Details
-
constants
static final org.eclipse.birt.report.model.api.simpleapi.ScriptConstants constantsProperty to handle script constants
-
-
Method Details
-
getX
String getX()Gets the item's x (horizontal) position.- Returns:
- The item's x position.
-
getY
String getY()Gets the item's y (vertical) position.- Returns:
- The item's y position.
-
setX
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.- Parameters:
dimension
- dimension string with optional unit suffix.- Throws:
ScriptException
- if the string is not valid
-
setX
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.- Parameters:
dimension
- the new value in application units.- Throws:
ScriptException
- if the property is locked.
-
setY
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.- Parameters:
dimension
- dimension string with optional unit suffix.- Throws:
ScriptException
- if the string is not valid
-
setY
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.- Parameters:
dimension
- the new value in application units.- Throws:
ScriptException
- if the property is locked.
-
setHeight
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.- Parameters:
dimension
- dimension string with optional unit suffix.- Throws:
ScriptException
- if the string is not valid
-
setHeight
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.- Parameters:
dimension
- the new value in application units.- Throws:
ScriptException
- if the property is locked.
-
setWidth
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.- Parameters:
dimension
- dimension string with optional unit suffix.- Throws:
ScriptException
- if the string is not valid
-
setWidth
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.- Parameters:
dimension
- the new value in application units.- Throws:
ScriptException
- if the property is locked.
-
getWidth
String getWidth()Gets a the item's width.- Returns:
- a the item's width.
-
getHeight
String getHeight()Gets the item's height.- Returns:
- the item's height.
-
getBookmark
String getBookmark()Returns the bookmark of the report item. The bookmark value is evaluated as an expression.- Returns:
- the book mark as a string
-
setBookmark
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");- Parameters:
value
- the bookmark expression- Throws:
ScriptException
- if the property is locked.
-
setTocExpression
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.- Parameters:
expression
- the expression that returns a string- Throws:
ScriptException
- if the TOC property is locked by the property mask.- See Also:
-
getTocExpression
String getTocExpression()Returns the expression evalueated as a table of contents entry for this item.- Returns:
- the expression evaluated as a table of contents entry for this item
- See Also:
-
getDataBindings
IDataBinding[] getDataBindings()Returns array of all column bindings- Returns:
- all column bindings
-
getDataBinding
Returns column binding.- Parameters:
bindingName
-- Returns:
- column binding expression.
-
removeDataBinding
Removes special column binding- Parameters:
bindingName
-- Throws:
ScriptException
-
removeDataBindings
Removes all column bindings- Throws:
ScriptException
-
addDataBinding
Add ComputedColumn.name , expression of IDataBinding are required.- Parameters:
binding
-- Throws:
ScriptException
-
getHighlightRules
IHighlightRule[] getHighlightRules()Gets all high light rules.- Returns:
- all high light rules
-
addHighlightRule
Adds high light rule.- Parameters:
rule
-- Throws:
ScriptException
-
removeHighlightRules
Removes all high light rules.- Throws:
ScriptException
-
removeHighlightRule
Removes high light rule.- Parameters:
rule
-- Throws:
ScriptException
-
removeHideRule
Removes all hide rules that matches formatType.- Parameters:
rule
-- Throws:
ScriptException
-
removeHideRules
Removes all hide rules- Throws:
ScriptException
-
getHideRules
IHideRule[] getHideRules()Returns array of hide rule expression- Returns:
- array of hide rule expression
-
addHideRule
Add HideRule- Parameters:
rule
-- Throws:
ScriptException
-
setCurrentView
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.- Parameters:
viewElement
- the view element, must not bethis
. Can benull
.- Throws:
ScriptException
- if the given element resides in the other elements.
-