Packagecom.yworks.canvas
Interfacepublic interface ICanvasObject

This is the interface implemented by the basic building blocks of a canvas object tree in a CanvasComponent.

The interface is not meant to be implemented by application programmers. Instead, instances implementing this interface can be retrieved from the factory methods in the graph canvas component.



Public Properties
 PropertyDefined By
  descriptor : ICanvasObjectDescriptor
Gets or sets the descriptor instance that interprets the userObject during rendering, hit testing, and bounds calculation.
ICanvasObject
  dirty : Boolean
Gets or sets whether the canvas object is dirty and should be repainted.
ICanvasObject
  group : ICanvasObjectGroup
Gets or sets the parent group of this instance.
ICanvasObject
  next : ICanvasObject
[read-only] Gets the next item in the list of rendered items that is owned by this element's group.
ICanvasObject
  previous : ICanvasObject
[read-only] Gets the previous item in the list of rendered items that is owned by this element's group.
ICanvasObject
  userObject : Object
Gets or sets the user object associated with this instance.
ICanvasObject
  visible : Boolean
Gets or sets the visibility state of this instance.
ICanvasObject
Public Methods
 MethodDefined By
  
Moves this instance exactly behind the reference item in the referenced item's group rendering list, so that it will be painted directly on top of the given reference.
ICanvasObject
  
Moves this instance exactly before the reference item in the referenced item's group rendering list, so that it will be painted directly behind the given reference.
ICanvasObject
  
Moves this instance one step closer to the beginning of the group rendering list, so that it will be painted behind its current predecessor.
ICanvasObject
  
Moves this instance one step closer to the end of the group rendering list, so that it will be painted on top of its current successor.
ICanvasObject
  
remove():void
Removes this item from the canvas object tree it currently belongs to.
ICanvasObject
  
Moves this instance to the beginning of the group rendering list, so that it will be painted behind all other items in the same group.
ICanvasObject
  
Moves this instance to the end of the group rendering list, so that it will be painted in front of all other items in the same group.
ICanvasObject
Property Detail
descriptorproperty
descriptor:ICanvasObjectDescriptor

Gets or sets the descriptor instance that interprets the userObject during rendering, hit testing, and bounds calculation.


Implementation
    public function get descriptor():ICanvasObjectDescriptor
    public function set descriptor(value:ICanvasObjectDescriptor):void
dirtyproperty 
dirty:Boolean

Gets or sets whether the canvas object is dirty and should be repainted.


Implementation
    public function get dirty():Boolean
    public function set dirty(value:Boolean):void
groupproperty 
group:ICanvasObjectGroup

Gets or sets the parent group of this instance.


Implementation
    public function get group():ICanvasObjectGroup
    public function set group(value:ICanvasObjectGroup):void
nextproperty 
next:ICanvasObject  [read-only]

Gets the next item in the list of rendered items that is owned by this element's group.


Implementation
    public function get next():ICanvasObject
previousproperty 
previous:ICanvasObject  [read-only]

Gets the previous item in the list of rendered items that is owned by this element's group.


Implementation
    public function get previous():ICanvasObject
userObjectproperty 
userObject:Object

Gets or sets the user object associated with this instance.

The user object will be used by the descriptor during rendering, hit testing, and bounds calculation.


Implementation
    public function get userObject():Object
    public function set userObject(value:Object):void
visibleproperty 
visible:Boolean

Gets or sets the visibility state of this instance.

If an ICanvasObject is not visible, it will not be considered for hit tests.


Implementation
    public function get visible():Boolean
    public function set visible(value:Boolean):void
Method Detail
after()method
public function after(reference:ICanvasObject):ICanvasObject

Moves this instance exactly behind the reference item in the referenced item's group rendering list, so that it will be painted directly on top of the given reference.

Observe that this instance will change into the referenced item's group if needed.

Parameters

reference:ICanvasObject — The item this instance is to moved behind.

Returns
ICanvasObjectthis so that calls can be chained.
before()method 
public function before(reference:ICanvasObject):ICanvasObject

Moves this instance exactly before the reference item in the referenced item's group rendering list, so that it will be painted directly behind the given reference.

Observe that this instance will change into the referenced item's group if needed.

Parameters

reference:ICanvasObject — the item this instance is to moved before.

Returns
ICanvasObjectthis so that calls can be chained.
lower()method 
public function lower():ICanvasObject

Moves this instance one step closer to the beginning of the group rendering list, so that it will be painted behind its current predecessor.

Returns
ICanvasObjectthis so that calls can be chained.
raise()method 
public function raise():ICanvasObject

Moves this instance one step closer to the end of the group rendering list, so that it will be painted on top of its current successor.

Returns
ICanvasObjectthis so that calls can be chained.
remove()method 
public function remove():void

Removes this item from the canvas object tree it currently belongs to.

toBack()method 
public function toBack():ICanvasObject

Moves this instance to the beginning of the group rendering list, so that it will be painted behind all other items in the same group.

Returns
ICanvasObjectthis so that calls can be chained.
toFront()method 
public function toFront():ICanvasObject

Moves this instance to the end of the group rendering list, so that it will be painted in front of all other items in the same group.

Returns
ICanvasObjectthis so that calls can be chained.