Class actuate.viewer.SelectedContent
Description
A container for content selected in the viewer. SelectedContent provides an object to pass to a handler when the user-defined ON_CONTENT_SELECTED event occurs. This object contains an instance of the element selected in the viewer.
Constructor
The SelectedContent object is constructed when an ON_CONTENT_SELECTED event occurs.
Function summary
Table 44‑53 lists actuate.viewer.SelectedContent functions.
Table 44‑53 actuate.viewer.SelectedContent functions
Function
Description
Returns the currently selected table column index number
Returns a copy of the currently selected element
getColumnIndex
Syntax
integer SelectedContent.getColumnIndex( )
Returns the numerical index for the currently selected column. Returns null when the user selects a non-table element.
Returns
Integer.
Example
To retrieve the index of a selected column, use the following code:
var index = selected.getColumnIndex( );
getSelectedElement
Syntax
object SelectedContent.getSelectedElement( )
Returns an instance of the currently selected element. The instance can be one of the following objects:
*actuate.report.Chart
*actuate.report.DataItem
*actuate.report.Label
*actuate.report.Table
*actuate.report.TextItem
To determine the object type, use the Object.getType( ) function. The type strings for the above objects are ''Chart'', ''Data'', ''Label'', ''Table'', or ''Text'', respectively.
Returns
Object. An instance of the currently selected element.
Example
To retrieve and store a label bookmark if a selected element is a label, use the following code:
var selected = selected.getColumnIndex( );
if (selected.getType( ) == "Label"){
var bmark = Object.getBookmark( );
}