Packagecom.yworks.graph.drawing
Classpublic class SWFNodeStyle
InheritanceSWFNodeStyle Inheritance Object
Implements INodeStyle
Deprecated Since 1.7: Please Use ImageNodeStyle

A node style that allows to use SWF movies as node visualizations.

The SWF that should be used as the node representation can be provided either using an url or using a raw or Base64-encoded ByteArray.

The ByteArray of an embedded SWF can be used as follows:

     [Embed(source="resources/source.swf")]
     public var swfClass:Class;
        ...
     var swfInstance:Object = new swf();
     var style:SWFNodeStyle = new SWFNodeStyle(swfInstance.movieClipData);
     

See also

com.yworks.io.graphml.writer.serializer.SWFNodeStyleSerializer
com.yworks.io.graphml.reader.deserializer.SWFNodeStyleDeserializer


Public Properties
 PropertyDefined By
  base64 : String
[write-only] Set the Base64-encoded byte array of the SWF file that should be used as a node representation.
SWFNodeStyle
  bytes : ByteArray
Get or set the byte array the represents the SWF file which is used as a node representation.
SWFNodeStyle
  styleRenderer : IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
SWFNodeStyle
  url : String
Get or set an url that points to the SWF file which will be used as a node representation.
SWFNodeStyle
Public Methods
 MethodDefined By
  
SWFNodeStyle(bytes:ByteArray = null, styleRenderer:SWFNodeStyleRenderer = null)
Create a new SWFNodeStyle using the given bytes and renderer.
SWFNodeStyle
  
clone():Object
Creates a clone of this instance.
SWFNodeStyle
  
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.
SWFNodeStyle
Protected Methods
 MethodDefined By
  
Callback that creates the cloned instance of the style for the clone() method.
SWFNodeStyle
Property Detail
base64property
base64:String  [write-only]

Set the Base64-encoded byte array of the SWF file that should be used as a node representation.


Implementation
    public function set base64(value:String):void
bytesproperty 
bytes:ByteArray

Get or set the byte array the represents the SWF file which is used as a node representation.


Implementation
    public function get bytes():ByteArray
    public function set bytes(value:ByteArray):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
urlproperty 
url:String

Get or set an url that points to the SWF file which will be used as a node representation.


Implementation
    public function get url():String
    public function set url(value:String):void
Constructor Detail
SWFNodeStyle()Constructor
public function SWFNodeStyle(bytes:ByteArray = null, styleRenderer:SWFNodeStyleRenderer = null)

Create a new SWFNodeStyle using the given bytes and renderer.

Parameters
bytes:ByteArray (default = null) — The bytes of the SWF file
 
styleRenderer:SWFNodeStyleRenderer (default = null) — The renderer that is used for drawing this style.
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():SWFNodeStyle

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

Returns
SWFNodeStyle
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.