Packagecom.yworks.graph.drawing
Classpublic class TemplateStyleDataContext
InheritanceTemplateStyleDataContext Inheritance Object
Implements ILookup, flash.events.IEventDispatcher

The data context which is used together with a TemplateStyle.

This is the context which is passed to the context property of a component which is used as template for the TemplateStyle.



Public Properties
 PropertyDefined By
  canvas : CanvasComponent
Yields the CanvasComponent.
TemplateStyleDataContext
  displayObjectContext : IDisplayObjectContext
The IDisplayObjectContext this context is created for.
TemplateStyleDataContext
  modelItem : IModelItem
Gets the model item for which this context object has been created for.
TemplateStyleDataContext
  selected : Boolean
Whether the model item associated with this context is selected.
TemplateStyleDataContext
  style : TemplateStyle
Yields the style that is associated with this context instance.
TemplateStyleDataContext
  styleTag : Object
The user tag of the style that is associated with this context instance.
TemplateStyleDataContext
  userTag : Object
The user tag associated with this instance.
TemplateStyleDataContext
Public Methods
 MethodDefined By
  
Creates a new instance.
TemplateStyleDataContext
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void
TemplateStyleDataContext
  
dispatchEvent(event:Event):Boolean
TemplateStyleDataContext
  
hasEventListener(type:String):Boolean
TemplateStyleDataContext
  
lookup(type:Class):Object
TemplateStyleDataContext
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
TemplateStyleDataContext
  
Queries the canvas' graph selection for the selection state of the model item associated with this instance and sets the selected property accordingly.
TemplateStyleDataContext
  
willTrigger(type:String):Boolean
TemplateStyleDataContext
Property Detail
canvasproperty
canvas:CanvasComponent

Yields the CanvasComponent.

This property can be used as the source for data binding.


Implementation
    public function get canvas():CanvasComponent
    public function set canvas(value:CanvasComponent):void
displayObjectContextproperty 
displayObjectContext:IDisplayObjectContext

The IDisplayObjectContext this context is created for.

This property can be used as the source for data binding.


Implementation
    public function get displayObjectContext():IDisplayObjectContext
    public function set displayObjectContext(value:IDisplayObjectContext):void

See also

modelItemproperty 
modelItem:IModelItem

Gets the model item for which this context object has been created for.

This property can be used as the source for data binding.


Implementation
    public function get modelItem():IModelItem
    public function set modelItem(value:IModelItem):void
selectedproperty 
selected:Boolean

Whether the model item associated with this context is selected.

This property can be used as the source for data binding.


Implementation
    public function get selected():Boolean
    public function set selected(value:Boolean):void

See also

styleproperty 
style:TemplateStyle

Yields the style that is associated with this context instance.

This property can be used as the source for data binding.


Implementation
    public function get style():TemplateStyle
    public function set style(value:TemplateStyle):void
styleTagproperty 
styleTag:Object

The user tag of the style that is associated with this context instance.

This property can be used as the source for data binding.


Implementation
    public function get styleTag():Object
    public function set styleTag(value:Object):void

See also

userTagproperty 
userTag:Object

The user tag associated with this instance.

Queries to this property are satisfied by the style's userTagProvider

This property can be used as the source for data binding.


Implementation
    public function get userTag():Object
    public function set userTag(value:Object):void

See also

Constructor Detail
TemplateStyleDataContext()Constructor
public function TemplateStyleDataContext(context:IDisplayObjectContext, modelItem:IModelItem, style:TemplateStyle)

Creates a new instance.

Parameters
context:IDisplayObjectContext — The display object context.
 
modelItem:IModelItem — The modelItem which is bound to that data context.
 
style:TemplateStyle — The style which is bound to that data context.
Method Detail
addEventListener()method
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
weakRef:Boolean (default = false)

dispatchEvent()method 
public function dispatchEvent(event:Event):Boolean

Parameters

event:Event

Returns
Boolean
hasEventListener()method 
public function hasEventListener(type:String):Boolean

Parameters

type:String

Returns
Boolean
lookup()method 
public function lookup(type:Class):Object

Parameters

type:Class

Returns
Object
removeEventListener()method 
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)

updateSelectionState()method 
public function updateSelectionState():void

Queries the canvas' graph selection for the selection state of the model item associated with this instance and sets the selected property accordingly.

willTrigger()method 
public function willTrigger(type:String):Boolean

Parameters

type:String

Returns
Boolean