Packagecom.yworks.graph.drawing
Classpublic class AbstractStyleInstaller
InheritanceAbstractStyleInstaller Inheritance Object
Implements IModelItemInstaller
Subclasses EdgeStyleInstaller, LabelStyleInstaller, NodeStyleInstaller, PortStyleInstaller

Abstract skeleton class for a style installer.



Public Properties
 PropertyDefined By
  canvasGroupProvider : ICanvasGroupProvider
The canvas group provider that will be used for installing the item.
AbstractStyleInstaller
Protected Properties
 PropertyDefined By
  _EMPTY : Array
An empty Array
AbstractStyleInstaller
Public Methods
 MethodDefined By
  
canInstall(item:Object, canvas:CanvasComponent):Boolean
Predicate function that determines whether this instance can successfully install the provided item in a subsequent call to installItem( Object, canvas ).
AbstractStyleInstaller
  
This implementation does nothing.
AbstractStyleInstaller
  
installItem(item:Object, canvas:CanvasComponent):Array
Central method that performs the installation of an item's visual representation in the canvas.
AbstractStyleInstaller
  
This implementation does nothing.
AbstractStyleInstaller
Property Detail
_EMPTYproperty
protected var _EMPTY:Array

An empty Array

canvasGroupProviderproperty 
canvasGroupProvider:ICanvasGroupProvider

The canvas group provider that will be used for installing the item.


Implementation
    public function get canvasGroupProvider():ICanvasGroupProvider
    public function set canvasGroupProvider(value:ICanvasGroupProvider):void
Method Detail
canInstall()method
public function canInstall(item:Object, canvas:CanvasComponent):Boolean

Predicate function that determines whether this instance can successfully install the provided item in a subsequent call to installItem( Object, canvas ).

This is an abstract method that has to be overridden by child classes.

Predicate function that determines whether this instance can successfully install the provided item in a subsequent call to installItem(Object,CanvasComponent)

Parameters

item:Object — The item to install.
 
canvas:CanvasComponent — The canvas to install the item into.

Returns
Boolean — Whether a call to installItem(Object,CanvasComponent) can be made.
install()method 
public function install(canvas:CanvasComponent):void

This implementation does nothing.

Called by the framework to let this instance initialize for a given canvas.

Parameters

canvas:CanvasComponent — The canvas that will later be used to install items in.

installItem()method 
public function installItem(item:Object, canvas:CanvasComponent):Array

Central method that performs the installation of an item's visual representation in the canvas.

This is an abstract method that has to be overridden by child classes.

This the main method of the interface that performs the installing of an item's visual representation in the canvas.

Parameters

item:Object — The item to install.
 
canvas:CanvasComponent — The canvas to install the item into.

Returns
Array — All canvas objects this method has added to the canvas control.
uninstall()method 
public function uninstall(canvas:CanvasComponent):void

This implementation does nothing.

Called by the framework to let this instance do the clean up for a given canvas that has been initialized in install(CanvasComponent).

Parameters

canvas:CanvasComponent — The canvas that had been used to install items in.