Packagecom.yworks.graph.drawing
Classpublic class PortStyleInstaller
InheritancePortStyleInstaller Inheritance AbstractStyleInstaller Inheritance Object
Implements IModelItemInstaller

A style installer for ports 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
  
PortStyleInstaller
  
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 ).
PortStyleInstaller
 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 port in the canvas using the IPortStyle in the node's lookup.
PortStyleInstaller
 Inherited
This implementation does nothing.
AbstractStyleInstaller
Constructor Detail
PortStyleInstaller()Constructor
public function PortStyleInstaller()



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 IPortStyle is available in the lookup of the port.

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 port in the canvas using the IPortStyle 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.