Class DataItemHandle
- java.lang.Object
-
- All Implemented Interfaces:
IReportItemMethodContext,org.eclipse.birt.report.model.elements.interfaces.IDataItemModel,org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel,org.eclipse.birt.report.model.elements.interfaces.IInternalReportItemModel,org.eclipse.birt.report.model.elements.interfaces.IReportItemModel,org.eclipse.birt.report.model.elements.interfaces.IStyledElementModel
public class DataItemHandle extends ReportItemHandle implements org.eclipse.birt.report.model.elements.interfaces.IDataItemModel
Represents a data item element. A data item has an action, value expression and help text.- See Also:
DataItem
-
-
Field Summary
-
Fields inherited from class org.eclipse.birt.report.model.api.ReportItemHandleImpl
DATABINDING_TYPE_DATA, DATABINDING_TYPE_NONE, DATABINDING_TYPE_REPORT_ITEM_REF
-
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.IDataItemModel
ACTION_PROP, HELP_TEXT_KEY_PROP, HELP_TEXT_PROP, RESULT_SET_COLUMN_PROP, VALUE_EXPR_PROP
-
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.IInternalReportItemModel
ACL_EXPRESSION_PROP, ALLOW_EXPORT_PROP, ALTTEXT_KEY_PROP, ALTTEXT_PROP, BOOKMARK_DISPLAY_NAME_PROP, BOOKMARK_PROP, BOUND_DATA_COLUMNS_PROP, CASCADE_ACL_PROP, CUBE_PROP, DATA_BINDING_REF_PROP, DATA_SET_PROP, HEIGHT_PROP, LANGUAGE_PROP, MULTI_VIEWS_PROP, ON_CREATE_METHOD, ON_PAGE_BREAK_METHOD, ON_PREPARE_METHOD, ON_RENDER_METHOD, ORDER_PROP, PARAM_BINDINGS_PROP, PUSH_DOWN_PROP, TAG_TYPE_PROP, THEME_PROP, TOC_PROP, URL_PROP, VISIBILITY_PROP, WIDTH_PROP, X_PROP, Y_PROP, Z_INDEX_PROP
-
Fields inherited from interface org.eclipse.birt.report.model.api.elements.IReportItemMethodContext
ON_CREATE_CONTEXT, ON_PREPARE_CONTEXT, ON_RENDER_CONTEXT
-
-
Constructor Summary
Constructors Constructor Description DataItemHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)Constructs a handle of the data item with the given design and a data item.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Iterator<ActionHandle>actionsIterator()Returns the iterator for action defined on this data item.ActionHandlegetActionHandle()Returns a handle to work with the action property, action is a structure that defines a hyperlink.java.lang.StringgetDistinct()Deprecated.by the drop function of Cell element.java.lang.StringgetDistinctReset()Deprecated.by the drop function of Cell element.java.lang.StringgetHelpText()Returns the help text of this data item.java.lang.StringgetHelpTextKey()Returns the help text resource key of this data item.java.lang.StringgetResultSetColumn()Gets the value of the result set column name property on this data item.java.lang.StringgetResultSetExpression()Looks the column name from the data binding element that is nearest to this data item.java.lang.StringgetValueExpr()Deprecated.As of BIRT version 2.1.0, replaced by getResultSetColumn( )ActionHandlesetAction(Action action)Set an action on the image.voidsetDistinct(java.lang.String distinct)Deprecated.by the drop function of Cell element.voidsetDistinctReset(java.lang.String value)Deprecated.by the drop function of Cell element.voidsetHelpText(java.lang.String value)Sets the help text of this data item.voidsetHelpTextKey(java.lang.String value)Sets the resource key of the help text of this data item.voidsetResultSetColumn(java.lang.String columnName)Sets the value of the column name property.voidsetValueExpr(java.lang.String expr)Deprecated.As of BIRT version 2.1.0, replaced by setResultSetColumn(String columnName)-
Methods inherited from class org.eclipse.birt.report.model.api.ReportItemHandleImpl
addColumnBinding, addTOC, addTOC, addView, allowExport, canAddView, canCascadeACL, cascadeACL, columnBindingsIterator, dropView, findColumnBinding, getACLExpression, getAltTextExpression, getAltTextKey, getAvailableBindings, getAvailableCubeBindingReferenceList, getAvailableDataBindingReferenceList, getAvailableDataBindingReferenceList, getAvailableDataSetBindingReferenceList, getBookmark, getBookmarkDisplayName, getColumnBindings, getCube, getCurrentView, getDataBindingReference, getDataBindingReferenceName, getDataBindingType, getDataSet, getHeight, getLanguage, getMethods, getNamedCubeBindingReferenceList, getNamedDataBindingReferenceList, getNamedDataSetBindingReferenceList, getOnCreate, getOnPageBreak, getOnPrepare, getOnRender, getOrder, getProperty, getTagType, getTheme, getTOC, getTocExpression, getURL, getViewHost, getViews, getWidth, getX, getY, getZIndex, paramBindingsIterator, pushDown, removedColumnBinding, removedColumnBindings, removedUnusedColumnBindings, setACLExpression, setAllowExport, setAltTextExpression, setAltTextKey, setBookmark, setBookmarkDisplayName, setCascadeACL, setCube, setCurrentView, setDataBindingReference, setDataSet, setHeight, setHeight, setLanguage, setOnCreate, setOnPageBreak, setOnPrepare, setOnRender, setOrder, setPushDown, setTagType, setTheme, setThemeName, setTocExpression, setURL, setWidth, setWidth, setX, setX, setY, setY, setZIndex, visibilityRulesIterator
-
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, 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 Detail
-
DataItemHandle
public DataItemHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)Constructs a handle of the data item with the given design and a data item. 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 Detail
-
getActionHandle
public ActionHandle getActionHandle()
Returns a handle to work with the action property, action is a structure that defines a hyperlink.- Returns:
- a handle to the action property, return
nullif the action has not been set on the data item. - See Also:
ActionHandle
-
setAction
public ActionHandle setAction(Action action) throws SemanticException
Set an action on the image.- Parameters:
action- new action to be set on the image, it represents a bookmark link, hyperlink, and drill through etc.- Returns:
- a handle to the action property, return
nullif the action has not been set on the image. - Throws:
SemanticException- if member of the action is not valid.
-
actionsIterator
public java.util.Iterator<ActionHandle> actionsIterator()
Returns the iterator for action defined on this data item.- Returns:
- the iterator for
Actionstructure list defined on this data item
-
getDistinct
@Deprecated public java.lang.String getDistinct()
Deprecated.by the drop function of Cell element.Returns the value of the distinct property.- Returns:
- the distinct value as a string
-
setDistinct
@Deprecated public void setDistinct(java.lang.String distinct) throws SemanticExceptionDeprecated.by the drop function of Cell element.Sets the value of the distinct property. The input value is defined inDesignChoiceConstantsand is one of these:- DISTINCT_ALL
- DISTINCT_REPEAT
- DISTINCT_REPEAT_ON_PAGE
- Parameters:
distinct- the distinct value as a string- Throws:
SemanticException- If the property is locked or the value is not one of the above.
-
getDistinctReset
@Deprecated public java.lang.String getDistinctReset()
Deprecated.by the drop function of Cell element.Returns the value of the distinct-reset property.- Returns:
- the distinct-set value as a string
-
setDistinctReset
@Deprecated public void setDistinctReset(java.lang.String value) throws SemanticExceptionDeprecated.by the drop function of Cell element.Returns the value of the distinct-reset property.- Parameters:
value- the distinct-set value as a string- Throws:
SemanticException- If the property is locked.
-
getValueExpr
@Deprecated public java.lang.String getValueExpr()
Deprecated.As of BIRT version 2.1.0, replaced by getResultSetColumn( )Returns the expression that gives the value that the data item displays.- Returns:
- the value expression
-
setValueExpr
@Deprecated public void setValueExpr(java.lang.String expr) throws SemanticExceptionDeprecated.As of BIRT version 2.1.0, replaced by setResultSetColumn(String columnName)Sets the expression for the value that the data item is to display. This method still can be used. However, if the user uses both this method and setResultSetColumn(String columnName), the result is unexpectable. It is strongly recommended to use ONLY one of two methods.- Parameters:
expr- the expression to set- Throws:
SemanticException- If the property is locked.SemanticException
-
getHelpText
public java.lang.String getHelpText()
Returns the help text of this data item.- Returns:
- the help text
-
setHelpText
public void setHelpText(java.lang.String value) throws SemanticExceptionSets the help text of this data item.- Parameters:
value- the help text- Throws:
SemanticException- if the property is locked.
-
getHelpTextKey
public java.lang.String getHelpTextKey()
Returns the help text resource key of this data item.- Returns:
- the help text key
-
setHelpTextKey
public void setHelpTextKey(java.lang.String value) throws SemanticExceptionSets the resource key of the help text of this data item.- Parameters:
value- the resource key of the help text- Throws:
SemanticException- if the property is locked.
-
getResultSetExpression
public java.lang.String getResultSetExpression()
Looks the column name from the data binding element that is nearest to this data item. Iterate the column name expression list to see if there is a column name is equals with the value of the DataItemHandle.DATA_COLUMN_NAME_PROP on this data item. If yes, return the expression value.- Returns:
- the expression value.
- Throws:
SemanticException
-
getResultSetColumn
public java.lang.String getResultSetColumn()
Gets the value of the result set column name property on this data item.- Returns:
- the value of the property.
-
setResultSetColumn
public void setResultSetColumn(java.lang.String columnName) throws SemanticExceptionSets the value of the column name property.- Parameters:
columnName- the value to set.- Throws:
SemanticException
-
-