Packagecom.yworks.canvas.model
Interfacepublic interface IModelItemInstaller
Implementors AbstractStyleInstaller, EdgeStyleInstaller, LabelStyleInstaller, NodeStyleInstaller, PortStyleInstaller

An interface for a class that installs visual representations of items in a canvas control.

This interface is used by ModelManager and the like.



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,CanvasComponent)
IModelItemInstaller
  
Called by the framework to let this instance initialize for a given canvas.
IModelItemInstaller
  
installItem(item:Object, canvas:CanvasComponent):Array
This the main method of the interface that performs the installing of an item's visual representation in the canvas.
IModelItemInstaller
  
Called by the framework to let this instance do the clean up for a given canvas that has been initialized in install(CanvasComponent).
IModelItemInstaller
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,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

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

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

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.