Packagecom.yworks.graph.drawing
Classpublic class DelegatingEdgeStyle
InheritanceDelegatingEdgeStyle Inheritance Object
Implements IEdgeStyle, IDelegatingStyle

Abstract implementation of IDelegatingStyle which decorates an IEdgeStyle.

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
  sourceArrow : IArrow
[read-only] This implementation delegates to the wrapped style.
DelegatingEdgeStyle
  styleRenderer : IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
DelegatingEdgeStyle
  targetArrow : IArrow
[read-only] This implementation delegates to the wrapped style.
DelegatingEdgeStyle
  wrapped : IVisualStyle
[read-only] The style which is wrapped by this IDelegatingStyle instance.
DelegatingEdgeStyle
Public Methods
 MethodDefined By
  
Creates a new instance which wraps the given style and uses the given renderer.
DelegatingEdgeStyle
  
clone():Object
Subclasses must override this method to return a clone of their instances.
DelegatingEdgeStyle
  
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.
DelegatingEdgeStyle
Property Detail
sourceArrowproperty
sourceArrow:IArrow  [read-only]

This implementation delegates to the wrapped style. Gets the visual arrow at the source end of edges that use this style.


Implementation
    public function get sourceArrow():IArrow
styleRendererproperty 
styleRenderer:IStyleRenderer  [read-only]

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


Implementation
    public function get styleRenderer():IStyleRenderer
targetArrowproperty 
targetArrow:IArrow  [read-only]

This implementation delegates to the wrapped style. Gets the visual arrow at the target end of edges that use this style.


Implementation
    public function get targetArrow():IArrow
wrappedproperty 
wrapped:IVisualStyle  [read-only]

The style which is wrapped by this IDelegatingStyle instance.


Implementation
    public function get wrapped():IVisualStyle
Constructor Detail
DelegatingEdgeStyle()Constructor
public function DelegatingEdgeStyle(wrapped:IEdgeStyle, 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:IEdgeStyle — 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.