Packagecom.yworks.graph.drawing
Classpublic class BitmapNodeStyle
InheritanceBitmapNodeStyle Inheritance Object
Implements INodeStyle

A node style than can use bitmap images for the visual representation of a node.

Although the DisplayObject displayed by this style could actually also represent a vector image, the default (de)serialization of this style only supports reading and writing of bitmap images using base64 encoding.

See also

com.yworks.graph.drawing.ImageNodeStyle
com.yworks.io.writer.serializer.BitmapNodeStyleSerializer
com.yworks.io.reader.deserializer.BitmapNodeStyleDeserializer


Public Properties
 PropertyDefined By
  fallbackStyle : INodeStyle
The fallback style that is painted until the imageLoader is completely loaded.
BitmapNodeStyle
  image : DisplayObject
The image display object that is used for the associated node.
BitmapNodeStyle
  imageLoader : ImageLoader
An image loader that is loading or has already finished loading the image that is to be displayed by this style.
BitmapNodeStyle
  styleRenderer : IStyleRenderer
[read-only] Gets the renderer implementation that has been supplied to this instance upon creation.
BitmapNodeStyle
Public Methods
 MethodDefined By
  
BitmapNodeStyle(styleRenderer:BitmapNodeStyleRenderer = null, image:DisplayObject = null)
Constructor.
BitmapNodeStyle
  
clone():Object
Creates a clone of this instance.
BitmapNodeStyle
  
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.
BitmapNodeStyle
Protected Methods
 MethodDefined By
  
Callback that creates the cloned instance for the clone() method.
BitmapNodeStyle
Property Detail
fallbackStyleproperty
fallbackStyle:INodeStyle

The fallback style that is painted until the imageLoader is completely loaded.

If the fallback style is null, nothing is painted while the image is loaded.


Implementation
    public function get fallbackStyle():INodeStyle
    public function set fallbackStyle(value:INodeStyle):void
imageproperty 
image:DisplayObject

The image display object that is used for the associated node.


Implementation
    public function get image():DisplayObject
    public function set image(value:DisplayObject):void

See also

imageLoaderproperty 
imageLoader:ImageLoader

An image loader that is loading or has already finished loading the image that is to be displayed by this style.


Implementation
    public function get imageLoader():ImageLoader
    public function set imageLoader(value:ImageLoader):void

See also

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
BitmapNodeStyle()Constructor
public function BitmapNodeStyle(styleRenderer:BitmapNodeStyleRenderer = null, image:DisplayObject = null)

Constructor.

Parameters
styleRenderer:BitmapNodeStyleRenderer (default = null) — the image display object to use for the associated node.

for embedded bitmap images, the image should be a CloneableBitmap instance. Otherwise, printing will not work properly.

 
image:DisplayObject (default = null)
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():BitmapNodeStyle

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

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