Packagecom.yworks.graph.drawing
Classpublic class ShapeNodeStyle
InheritanceShapeNodeStyle Inheritance Object
Implements IShapeNodeStyle

Default implementation of the IShapeNodeStyle interface



Public Properties
 PropertyDefined By
  fill : IFill
The fill for this style
ShapeNodeStyle
  shapeNodeShape : uint
The ShapeNodeShape for this style
ShapeNodeStyle
  stroke : IStroke
The stroke for this style.
ShapeNodeStyle
  styleRenderer : IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
ShapeNodeStyle
Public Methods
 MethodDefined By
  
ShapeNodeStyle(styleRenderer:ShapeNodeStyleRenderer = null, shapeNodeShape:int = -1, stroke:IStroke = null, fill:IFill = null)
Create a new style instance.
ShapeNodeStyle
  
clone():Object
Creates a clone of this instance.
ShapeNodeStyle
  
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.
ShapeNodeStyle
Protected Methods
 MethodDefined By
  
Callback that creates the cloned instance for the clone() method.
ShapeNodeStyle
Property Detail
fillproperty
fill:IFill

The fill for this style


Implementation
    public function get fill():IFill
    public function set fill(value:IFill):void
shapeNodeShapeproperty 
shapeNodeShape:uint

The ShapeNodeShape for this style


Implementation
    public function get shapeNodeShape():uint
    public function set shapeNodeShape(value:uint):void
strokeproperty 
stroke:IStroke

The stroke for this style.


Implementation
    public function get stroke():IStroke
    public function set stroke(value:IStroke):void
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
ShapeNodeStyle()Constructor
public function ShapeNodeStyle(styleRenderer:ShapeNodeStyleRenderer = null, shapeNodeShape:int = -1, stroke:IStroke = null, fill:IFill = null)

Create a new style instance.

Parameters
styleRenderer:ShapeNodeStyleRenderer (default = null) — Custom renderer instance for this style. If null, a default style renderer is used.
 
shapeNodeShape:int (default = -1) — The initial shape for this style. If -1, ShapeNodeShape.RECTANGLE is used.
 
stroke:IStroke (default = null) — The initial stroke for this style. If null, a default stroke is used.
 
fill:IFill (default = null) — The initial fill for this style. If null, a default fill is used.
Method Detail
clone()method
public function clone():Object

Creates a clone of this instance.

Returns
Object — A clone of this instance.
createClone()method 
protected function createClone():ShapeNodeStyle

Callback that creates the cloned instance for the clone() method.

For internal purposes. Implementation should use clone() instead.

Returns
ShapeNodeStyle — A new ShapeNodeStyle 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.