Package | com.yworks.graph.drawing |
Class | public class SimpleNodeStyle |
Inheritance | SimpleNodeStyle Object |
Implements | INodeStyle |
paint
implemented in the style.
To use this style, one has to subclass SimpleNodeStyle
and override
the paint method. This style's renderer uses the node's layout rectangle
for hit tests and to determine the bounds and edge intersection.
Property | Defined By | ||
---|---|---|---|
styleRenderer : IStyleRenderer [read-only]
Gets the renderer implementation that has been supplied to
this instance upon creation. | SimpleNodeStyle |
Method | Defined By | ||
---|---|---|---|
Creates a new instance
| SimpleNodeStyle | ||
clone():Object
Returns this instance. | SimpleNodeStyle | ||
Prepares the rendering of an IModelItem in a CanvasComponent by
adding ICanvasObject's to the provided canvas. | SimpleNodeStyle | ||
This style's renderer delegates the rendering to this method. | SimpleNodeStyle |
styleRenderer | property |
styleRenderer:IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
public function get styleRenderer():IStyleRenderer
SimpleNodeStyle | () | Constructor |
public function SimpleNodeStyle()
Creates a new instance
clone | () | method |
public function clone():Object
Returns this instance.
If subclasses implement properties which should be set in the clone, too, this method has to be overridden.
ReturnsObject — this ;
|
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.
|
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.
|
paint | () | method |
public function paint(g:YGraphics, ctx:IPaintContext, node:INode):void
This style's renderer delegates the rendering to this method.
Subclasses have to override this method and implement their own paint
method.
Parameters
g:YGraphics — The graphics to paint to.
| |
ctx:IPaintContext — The paint context.
| |
node:INode — The node to render.
|
IllegalOperationError — if not overridden.
|