Packagecom.yworks.graph.drawing
Classpublic class ComponentNodeStyle
InheritanceComponentNodeStyle Inheritance Object
Implements INodeStyle
Deprecated: Please Use TemplateNodeStyle

A node style that uses arbitrary Flex DisplayObjects to visualize nodes.

The default clone implementation will not copy any state information. To control how the component is cloned, either override cloneComponent() or use a component that implements ICloneable.

For proper (de)serialization of the component's state, corresponding ISerializer and IDeserializer implementations have to be registered with the GraphMLIOHandler.



Public Properties
 PropertyDefined By
  component : UIComponent
The component that is used as a node visualization.
ComponentNodeStyle
  styleRenderer : IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
ComponentNodeStyle
Public Methods
 MethodDefined By
  
ComponentNodeStyle(component:UIComponent = null, renderer:ComponentNodeStyleRenderer = null)
Creates a new instance using the given component and renderer.
ComponentNodeStyle
  
clone():Object
Creates a clone of this instance.
ComponentNodeStyle
  
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.
ComponentNodeStyle
Protected Methods
 MethodDefined By
  
cloneComponent():UIComponent
Clone the component that is used as the node visualization.
ComponentNodeStyle
  
Create a clone of this style instance.
ComponentNodeStyle
Property Detail
componentproperty
component:UIComponent

The component that is used as a node visualization.

Any UIComponent can be used as the component. The component can be implemented using MXML or ActionScript.


Implementation
    public function get component():UIComponent
    public function set component(value:UIComponent):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
ComponentNodeStyle()Constructor
public function ComponentNodeStyle(component:UIComponent = null, renderer:ComponentNodeStyleRenderer = null)

Creates a new instance using the given component and renderer.

Parameters
component:UIComponent (default = null)
 
renderer:ComponentNodeStyleRenderer (default = null)
Method Detail
clone()method
public function clone():Object

Creates a clone of this instance.

Returns
Object — A clone of this instance.

See also

cloneComponent()method 
protected function cloneComponent():UIComponent

Clone the component that is used as the node visualization.

clone() uses this callback to create the cloned component that is used for the cloned style instance.

Returns
UIComponent — a clone of the component.

See also

createClone()method 
protected function createClone():ComponentNodeStyle

Create a clone of this style instance.

clone() uses this callback to create the cloned instance before any state information is transfered.

Returns
ComponentNodeStyle — a cloned instance of this style

See also

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.