Packagecom.yworks.graph.drawing
Classpublic class DelegatingNodeStyle
InheritanceDelegatingNodeStyle Inheritance Object
Implements IDelegatingStyle, INodeStyle
Subclasses FilterNodeStyleDecorator

Abstract implementation of IDelegatingStyle which decorates an INodeStyle.

Subclasses must override the constructor to pass an appropriate renderer and the clone() method to create a clone of the subclass's instance.



Public Properties
 PropertyDefined By
  styleRenderer : IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
DelegatingNodeStyle
  wrapped : IVisualStyle
[read-only] The style which is wrapped by this IDelegatingStyle instance.
DelegatingNodeStyle
Protected Properties
 PropertyDefined By
  _wrapped : INodeStyle
The wrapped style
DelegatingNodeStyle
Public Methods
 MethodDefined By
  
Creates a new instance which wraps the given style and uses the given renderer.
DelegatingNodeStyle
  
clone():Object
Subclasses must override this method to return a clone of their instances.
DelegatingNodeStyle
  
install(canvas:CanvasComponent, group:ICanvasObjectGroup, modelItem:IModelItem):Array
Prepares the rendering of an IModelItem in a CanvasComponent by adding ICanvasObject's to the provided canvas.
DelegatingNodeStyle
Property Detail
_wrappedproperty
protected var _wrapped:INodeStyle

The wrapped style

styleRendererproperty 
styleRenderer:IStyleRenderer  [read-only]

Gets the renderer implementation that has been supplied to this instance upon creation.


Implementation
    public function get styleRenderer():IStyleRenderer
wrappedproperty 
wrapped:IVisualStyle  [read-only]

The style which is wrapped by this IDelegatingStyle instance.


Implementation
    public function get wrapped():IVisualStyle
Constructor Detail
DelegatingNodeStyle()Constructor
public function DelegatingNodeStyle(wrapped:INodeStyle, renderer:IStyleRenderer)

Creates a new instance which wraps the given style and uses the given renderer.

Both parameters must not be null

Subclasses have to call this constructor with the wrapped style and the appropriate renderer.

Parameters
wrapped:INodeStyle — The style to wrap.
 
renderer:IStyleRenderer — The renderer to use.
Method Detail
clone()method
public function clone():Object

Subclasses must override this method to return a clone of their instances. Creates a clone of this instance.

Returns
Object — A clone of this instance.
install()method 
public function install(canvas:CanvasComponent, group:ICanvasObjectGroup, modelItem:IModelItem):Array

Prepares the rendering of an IModelItem in a CanvasComponent by adding ICanvasObject's to the provided canvas.

Implementations may add zero or more ICanvasObject instances to the given CanvasComponent. The group parameter can be used as a hint for implementations. They can add their newly created canvas objects to the given group. However they are not obliged to do that.

Parameters

canvas:CanvasComponent — The canvas to install the canvas objects in.
 
group:ICanvasObjectGroup — A hint that tells the implementation where to add the canvas objects.
 
modelItem:IModelItem — The item to install a visual representation for.

Returns
Array — An array of zero or more canvas objects that have been installed in the canvas by this method or null if nothing was installed.