Package | com.yworks.graph.drawing |
Class | public class SWFNodeStyle |
Inheritance | SWFNodeStyle Object |
Implements | INodeStyle |
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
Property | Defined 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 |
Method | Defined 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 | ||
Prepares the rendering of an IModelItem in a CanvasComponent by
adding ICanvasObject's to the provided canvas. | SWFNodeStyle |
Method | Defined By | ||
---|---|---|---|
Callback that creates the cloned instance of the style for the clone() method. | SWFNodeStyle |
base64 | property |
base64:String
[write-only] Set the Base64-encoded byte array of the SWF file that should be used as a node representation.
public function set base64(value:String):void
bytes | property |
bytes:ByteArray
Get or set the byte array the represents the SWF file which is used as a node representation.
public function get bytes():ByteArray
public function set bytes(value:ByteArray):void
styleRenderer | property |
styleRenderer:IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
public function get styleRenderer():IStyleRenderer
url | property |
url:String
Get or set an url that points to the SWF file which will be used as a node representation.
public function get url():String
public function set url(value:String):void
SWFNodeStyle | () | Constructor |
public function SWFNodeStyle(bytes:ByteArray = null, styleRenderer:SWFNodeStyleRenderer = null)
Create a new SWFNodeStyle using the given bytes and renderer.
Parametersbytes:ByteArray (default = null ) — The bytes of the SWF file
| |
styleRenderer:SWFNodeStyleRenderer (default = null ) — The renderer that is used for drawing this style.
|
clone | () | method |
public function clone():Object
Creates a clone of this instance.
ReturnsObject — A clone of this instance.
|
createClone | () | method |
protected function createClone():SWFNodeStyle
Callback that creates the cloned instance of the style for the clone() method.
ReturnsSWFNodeStyle |
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.
|