Packagecom.yworks.graph.drawing
Classpublic class NodeStyleInstaller
InheritanceNodeStyleInstaller Inheritance AbstractStyleInstaller Inheritance Object
Implements IModelItemInstaller

A style installer for nodes that have a specific IVisualStyle in their lookup.



Public Properties
 PropertyDefined By
 InheritedcanvasGroupProvider : ICanvasGroupProvider
The canvas group provider that will be used for installing the item.
AbstractStyleInstaller
Protected Properties
 PropertyDefined By
 Inherited_EMPTY : Array
An empty Array
AbstractStyleInstaller
Public Methods
 MethodDefined By
  
NodeStyleInstaller
  
canInstall(item:Object, canvas:CanvasComponent):Boolean
[override] Predicate function that determines whether this instance can successfully install the provided item in a subsequent call to install( Object, CanvasComponent ).
NodeStyleInstaller
 Inherited
This implementation does nothing.
AbstractStyleInstaller
  
installItem(item:Object, canvas:CanvasComponent):Array
[override] Central method that performs the installation of the visual representation of a node in the canvas using the INodeStyle in the node's lookup.
NodeStyleInstaller
 Inherited
This implementation does nothing.
AbstractStyleInstaller
Constructor Detail
NodeStyleInstaller()Constructor
public function NodeStyleInstaller()



Method Detail
canInstall()method
override 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 install( Object, CanvasComponent ).

This implementation checks whether the INodeStyle is available in the lookup of the node.

Parameters

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

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

Central method that performs the installation of the visual representation of a node in the canvas using the INodeStyle in the node's lookup.

This implementation calls IVisualStyle.install on the style instance obtained through the lookup.

Parameters

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

Returns
Array — An Array containing all canvas objects this method has added to the canvas component.