Packagecom.yworks.graph.drawing
Classpublic class LabelStyleInstaller
InheritanceLabelStyleInstaller Inheritance AbstractStyleInstaller Inheritance Object
Implements IModelItemInstaller

A style installer for labels 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
  
LabelStyleInstaller
  
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 ).
LabelStyleInstaller
 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 label in the canvas using the ILabelStyle in the edge's lookup.
LabelStyleInstaller
 Inherited
This implementation does nothing.
AbstractStyleInstaller
Constructor Detail
LabelStyleInstaller()Constructor
public function LabelStyleInstaller()



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 ILabelStyle is available in the lookup of the label.

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 label in the canvas using the ILabelStyle in the edge'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.