Packagecom.yworks.graph.drawing
Classpublic class SimplePortStyle
InheritanceSimplePortStyle Inheritance AbstractStyle Inheritance Object
Implements IPortStyle

A simple port style



Public Properties
 PropertyDefined By
  radius : Number
The radius of the port.
SimplePortStyle
  stroke : IStroke
The stroke, the port is drawn with.
SimplePortStyle
  styleRenderer : IStyleRenderer
[override] [read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
SimplePortStyle
Public Methods
 MethodDefined By
  
SimplePortStyle(styleRenderer:IStyleRenderer = null)
Creates a new instance.
SimplePortStyle
  
clone():Object
[override] Creates a clone of this instance.
SimplePortStyle
  
install(canvas:CanvasComponent, group:ICanvasObjectGroup, modelItem:IModelItem):Array
[override] Prepares the rendering of an IModelItem in a CanvasComponent by adding ICanvasObject's to the provided canvas.
SimplePortStyle
Protected Methods
 MethodDefined By
  
The default Stroke, that is used to draw the ports.
SimplePortStyle
Property Detail
radiusproperty
radius:Number

The radius of the port.


Implementation
    public function get radius():Number
    public function set radius(value:Number):void
strokeproperty 
stroke:IStroke

The stroke, the port is drawn with.


Implementation
    public function get stroke():IStroke
    public function set stroke(value:IStroke):void
styleRendererproperty 
styleRenderer:IStyleRenderer  [read-only] [override]

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


Implementation
    public function get styleRenderer():IStyleRenderer
Constructor Detail
SimplePortStyle()Constructor
public function SimplePortStyle(styleRenderer:IStyleRenderer = null)

Creates a new instance.

Parameters
styleRenderer:IStyleRenderer (default = null) — A custom style renderer. If none is provided, a new instance of SimplePortStyleRenderer will be used.
Method Detail
clone()method
override public function clone():Object

Creates a clone of this instance.

Returns
Object — A clone of this instance.
createDefaultStroke()method 
protected function createDefaultStroke():IStroke

The default Stroke, that is used to draw the ports. A black line with width = 1

Returns
IStroke — The default Stroke
install()method 
override 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.