Packagecom.yworks.graph.drawing
Classpublic class NodeStyleLabelStyleAdapter
InheritanceNodeStyleLabelStyleAdapter Inheritance Object
Implements ILabelStyle

A label style decorator that uses a node style instance to render the background and a label style instance to render the foreground of a label.



Public Properties
 PropertyDefined By
  labelStyle : ILabelStyle
[read-only] Gets the LabelStyle that is used for rendering the foreground of the label.
NodeStyleLabelStyleAdapter
  nodeStyle : INodeStyle
[read-only] Gets the NodeStyle that is used for rendering the background of the label.
NodeStyleLabelStyleAdapter
  styleRenderer : IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
NodeStyleLabelStyleAdapter
Public Methods
 MethodDefined By
  
Creates a label style that uses the provided node style to render the background and the label style to render the foreground of this style.
NodeStyleLabelStyleAdapter
  
clone():Object
Creates a clone of this instance.
NodeStyleLabelStyleAdapter
  
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.
NodeStyleLabelStyleAdapter
Property Detail
labelStyleproperty
labelStyle:ILabelStyle  [read-only]

Gets the LabelStyle that is used for rendering the foreground of the label.


Implementation
    public function get labelStyle():ILabelStyle
nodeStyleproperty 
nodeStyle:INodeStyle  [read-only]

Gets the NodeStyle that is used for rendering the background of the label.


Implementation
    public function get nodeStyle():INodeStyle
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
NodeStyleLabelStyleAdapter()Constructor
public function NodeStyleLabelStyleAdapter(nodeStyle:INodeStyle, labelStyle:ILabelStyle, adapter:NodeStyleLabelStyleAdapter = null)

Creates a label style that uses the provided node style to render the background and the label style to render the foreground of this style.

Note that the styles will be stored by reference, thus modifying the style will directly affect the rendering of this instance.

Parameters
nodeStyle:INodeStyle — The style to use for rendering the background of the label.
 
labelStyle:ILabelStyle — The style to use for rendering the foreground of the label.
 
adapter:NodeStyleLabelStyleAdapter (default = null) — The adapter to reuse the renderer from (default is null).
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.