Package | impression.utilities |
Class | public class LessonMapViewer |
Inheritance | LessonMapViewer ![]() |
Property | Defined By | ||
---|---|---|---|
controller : LessonMapController
The LessonMapController associated with this object. | LessonMapViewer | ||
currentStoryboard : Storyboard [read-only]
The current storyboard. | LessonMapViewer | ||
labelTemplate : String
The template string to use to label the LessonMap objects displayed in the TreeView. | LessonMapViewer | ||
treeView : TreeView [read-only]
The TreeView associated with this object. | LessonMapViewer |
Method | Defined By | ||
---|---|---|---|
Creates a new instance of the LessonMapViewer class. | LessonMapViewer | ||
Returns the TreeNode object of an item. | LessonMapViewer | ||
sbidOf(item:*):String
Returns the sbid of an item. | LessonMapViewer | ||
storyboardOf(item:*):Storyboard
Returns the storyboard of an item. | LessonMapViewer | ||
synchronize():void
Ensures that the selected node of the object's TreeView matches the controller's currentStoryboard. | LessonMapViewer |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when a LessonMap has been loaded into the associated TreeView. | LessonMapViewer | |||
Dispatched when a new node is selected in the associated TreeView. | LessonMapViewer | |||
Dispatched when the object receives a request to select a node. | LessonMapViewer |
controller | property |
controller:LessonMapController
The LessonMapController associated with this object.
When this property is set to a non-null
value, and the controller's map
property
is non-null
, the LessonMapViewer will label the map using the labelTemplate
property value, then invoke the treeView
object's loadXML
method using the controller's
map
.
Note: Do not change the map
property of the controller once it has been passed
to the LessonMapViewer. Changes to the controller's map are not reflected in the LessonMapViewer and
unexpected results may occur. Instead, create a new LessonMapController and pass that object to this property,
or reassociate the existing controller with the viewer by setting the controller
property value
to the existing controller.
public function get controller():LessonMapController
public function set controller(value:LessonMapController):void
See also
currentStoryboard | property |
currentStoryboard:Storyboard
[read-only] The current storyboard.
If controller
is null
, then null
is returned.
public function get currentStoryboard():Storyboard
See also
labelTemplate | property |
labelTemplate:String
The template string to use to label the LessonMap objects displayed in the TreeView.
If controller
is non-null
, the controller's map will be relabeled and
redisplayed when this property is changed.
The default value is LessonMapController.TITLE_OR_SBID
.
public function get labelTemplate():String
public function set labelTemplate(value:String):void
See also
treeView | property |
treeView:TreeView
[read-only] The TreeView associated with this object.
public function get treeView():TreeView
See also
LessonMapViewer | () | Constructor |
public function LessonMapViewer(tvw:TreeView, controller:LessonMapController = null, labelTemplate:String = null)
Creates a new instance of the LessonMapViewer class.
If labelTemplate
is null
, the default value is used.
tvw:TreeView — The TreeView object to be associated with this object.
| |
controller:LessonMapController (default = null ) — The LessonMapController object initially associated with this object.
| |
labelTemplate:String (default = null ) — The template string to use to label the LessonMap objects displayed in the TreeView.
|
ArgumentError tvw — cannot be null (ArgumentError).
|
See also
nodeOf | () | method |
public function nodeOf(item:*):TreeNode
Returns the TreeNode object of an item.
If item
is null
, controller
is null
, or the
controller's map
property is null
, null
is returned.
Parameters
item:* — The item to return the node of.
|
TreeNode — The TreeNode object associated with item . If item does not have
an associated node, null is returned.
|
See also
sbidOf | () | method |
public function sbidOf(item:*):String
Returns the sbid of an item.
Parameters
item:* — Expression identifying the item to return the sbid value of. item can be one of the following types:
|
String — The sbid of the item.
|
See also
storyboardOf | () | method |
public function storyboardOf(item:*):Storyboard
Returns the storyboard of an item.
If item
is null
, the controller
property value is null
, or
the controller's storyboards
property value is null
, then null
is returned.
Otherwise, this method returns the result of invoking the controller's storyboards
object's item()
method with the return value from this object's sbidOf()
method.
Parameters
item:* — Expression identifying the item to return the storyboard of.
|
Storyboard — The storyboard specified by item .
|
See also
synchronize | () | method |
public function synchronize():void
Ensures that the selected node of the object's TreeView matches the controller's currentStoryboard
.
lessonMapViewerLoadComplete | Event |
impression.events.LessonMapViewerEvent
impression.events.LessonMapViewerEvent.LOAD_COMPLETE
Dispatched when a LessonMap has been loaded into the associated TreeView.
This event is dispatched when the associated TreeView object dispatches its load complete event.
The LessonMapViewerEvent.LOAD_COMPLETE constant defines the value of the type property of a lesson map viewer load complete event object. This event has the following properties:Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The object that raised the event. |
reason | Indicates why the event occurred. |
node | The node associated with the event. |
sb | The Storyboard object associated with the selected node. |
See also
lessonMapViewerSelected | Event |
impression.events.LessonMapViewerEvent
impression.events.LessonMapViewerEvent.SELECTED
Dispatched when a new node is selected in the associated TreeView.
This event is dispatched when the associated TreeView object dispatches its selected event.
The LessonMapViewerEvent.SELECTED constant defines the value of the type property of a lesson map viewer selected event object. This event has the following properties:Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The object that raised the event. |
reason | |
node | |
sb | The Storyboard object associated with the selected node. |
See also
lessonMapViewerSelectRequest | Event |
impression.events.LessonMapViewerRequestEvent
impression.events.LessonMapViewerRequestEvent.SELECT_REQUEST
Dispatched when the object receives a request to select a node.
This event is dispatched when the associated TreeView object dispatches its selection request event.
If the reason
property of the event is LessonMapViewerEventReasons.LOAD_COMPLETE
,
the value of the newNode
and newSB
properties will be the value of the
controller's currentStoryboard
property.
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The object that raised the event. |
reason | |
oldNode | |
newNode | |
oldSB | The Storyboard object associated with the currently selected node. |
newSB | The Storyboard object associated with the new node to select. |
See also