Packagecom.yworks.graph.drawing
Classpublic class AbstractStyle
InheritanceAbstractStyle Inheritance Object
Implements IVisualStyle
Subclasses AbstractEdgeStyle, SimplePortStyle

Abstract base class for visual style implementations.



Public Properties
 PropertyDefined By
  styleRenderer : IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
AbstractStyle
Public Methods
 MethodDefined By
  
Constructor sets the style renderer.
AbstractStyle
  
clone():Object
Creates a clone of this instance.
AbstractStyle
  
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.
AbstractStyle
Property Detail
styleRendererproperty
styleRenderer:IStyleRenderer  [read-only]

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


Implementation
    public function get styleRenderer():IStyleRenderer
Constructor Detail
AbstractStyle()Constructor
public function AbstractStyle(styleRenderer:IStyleRenderer)

Constructor sets the style renderer.

Parameters
styleRenderer:IStyleRenderer — the style renderer
Method Detail
clone()method
public function clone():Object

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.