Base
Base
The Scene
class represents one distinct visual state which is represented visually by one or more visual elements.
Scenes are not needed to implement visualization views
. However, their use simplifies their implementation in many use cases.
Scenes have a map of visual variables, vars
whose values are inherited from parent to child scenes.
To create scenes, most View
implementations can simply use the [scene.Base.buildScenesFlat] method. This method creates one parent scene having one child scene per row of the model's data set. In child scenes, for each visual role there will be a correspondingly named variable having the value of the visual role.
For handling user interaction, the scene instances' createFilter
method provides an easy way to create a filter that selects the data from which the scene was generated based on its distinguishing field values. This filter can then be passed to a data action
such as Select
or Execute
.
When communicating with external parties, field values must be used and visual variable values are not generally meaningful. The invert
method allows directly obtaining the distinguishing field values that are associated with a scene.
Extends
Constructor
Name | Description |
---|---|
new Base(parent, view) Static | Creates a scene instance. |
Members
Name | Description |
---|---|
base : Protected | If a method has been overridden, then the base method provides access to the overridden method. |
children : | Gets the array of child scenes. |
index : | Gets the child index of this scene, if it has a parent, or |
parent : | Gets the parent scene, if any, or |
root : | Gets the root scene of the tree that this scene belongs to. |
view : | Gets the associated visualization view. |
Methods
Name | Description |
---|---|
buildScenesFlat(view) : pentaho.visual.scene.Base Static | Builds a flat, single-level scene tree according to the data and visual roles of the model of a given view. |
createFilter() : pentaho.data.filter.Abstract | Creates a filter that selects the data represented by this scene. |
extend(source, keyArgs) : Object | Extend an object with the properties of another. |
invert(keyArgs) : Object.< | Gets a data cells map which corresponds to the values of visual role variables of this scene. |
Constructor Details
new Base(parent, view) Static | |||||||||
---|---|---|---|---|---|---|---|---|---|
Creates a scene instance. Source: javascript/web/pentaho/visual/scene/Base.js, line 64
|
Members Details
base: Protected |
---|
If a method has been overridden, then the base method provides access to the overridden method. Can also be called from within a constructor function. Source: javascript/web/pentaho/lang/Base.js, line 299 Inherited From: pentaho.lang.Base#base |
children: |
---|
Gets the array of child scenes. The returned array cannot be modified directly. Source: javascript/web/pentaho/visual/scene/Base.js, line 110 |
index: |
---|
Gets the child index of this scene, if it has a parent, or Source: javascript/web/pentaho/visual/scene/Base.js, line 100 |
parent: |
---|
Gets the parent scene, if any, or Source: javascript/web/pentaho/visual/scene/Base.js, line 92 |
root: |
---|
Gets the root scene of the tree that this scene belongs to. Source: javascript/web/pentaho/visual/scene/Base.js, line 118 |
view: |
---|
Gets the associated visualization view. Source: javascript/web/pentaho/visual/scene/Base.js, line 128 |
Methods Details
buildScenesFlat(view) : pentaho.visual.scene.Base Static | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Builds a flat, single-level scene tree according to the data and visual roles of the model of a given view. This method creates one parent scene having one child scene per row of the Source: javascript/web/pentaho/visual/scene/Base.js, line 199
|
createFilter() : pentaho.data.filter.Abstract | ||||
---|---|---|---|---|
Creates a filter that selects the data represented by this scene. This method provides an easy way to create a filter that selects the data that this scene visually represents based on its distinguishing field values. This filter can then be passed to a In certain circumstances, the returned value may be Source: javascript/web/pentaho/visual/scene/Base.js, line 164
|
extend(source, keyArgs) : Object | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Extend an object with the properties of another. Methods that are overridden are accessible through This object is extended, but its class doesn't change. Source: javascript/web/pentaho/lang/Base.js, line 1037 Inherited From: pentaho.lang.Base#extend
|
invert(keyArgs) : Object.< | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets a data cells map which corresponds to the values of visual role variables of this scene. When communicating with external parties, field values must be used and visual variable values are not generally meaningful. Use this method to obtain the distinguishing field values represented by this scene. Source: javascript/web/pentaho/visual/scene/Base.js, line 183
See also: pentaho.visual.scene.util.invertVars |