Package | com.yworks.canvas |
Class | public class CanvasObjectDependencyManager |
Inheritance | CanvasObjectDependencyManager Object |
CanvasComponent
are dirty.
See also
Property | Defined By | ||
---|---|---|---|
graph : IGraph [write-only]
Sets the graph that is managed by this instance. | CanvasObjectDependencyManager | ||
maxDirtyItems : uint
The maximal number of dirty items this manager keeps track of. | CanvasObjectDependencyManager |
Method | Defined By | ||
---|---|---|---|
Creates an instance that manages dirty canvas objects for the
given CanvasComponent
| CanvasObjectDependencyManager | ||
addDependency(fromItem:Object, toItem:Object):void
Add a dependency from fromItem to toItem. | CanvasObjectDependencyManager | ||
invalidateSelection():void
Invalidates all items that are contained in the current
selection model of the GraphCanvasComponent and all items
that depend on the selected items. | CanvasObjectDependencyManager | ||
removeDependency(fromItem:Object, toItem:Object):void | CanvasObjectDependencyManager | ||
reset():void
Reset the invalidation status. | CanvasObjectDependencyManager | ||
setDirty(item:Object):void
Sets the dirty flag of the canvas objects that correspond to this
model item. | CanvasObjectDependencyManager | ||
updateGraphItems():void
Updates all items of the graph by calling onGraphStructureChanged
for each item of the graph. | CanvasObjectDependencyManager |
Method | Defined By | ||
---|---|---|---|
Callback that is invoked when the graph property changes. | CanvasObjectDependencyManager | ||
onGraphStructureChanged(evt:GraphEvent):void
Callback that is invoked when the structure of the graph
managed by this instance changes. | CanvasObjectDependencyManager |
graph | property |
graph:IGraph
[write-only] Sets the graph that is managed by this instance.
public function set graph(value:IGraph):void
maxDirtyItems | property |
maxDirtyItems:uint
The maximal number of dirty items this manager keeps track of. If this number is exceeded, all display objects will be repainted on the next paint event.
The default value is 60;
.
public function get maxDirtyItems():uint
public function set maxDirtyItems(value:uint):void
CanvasObjectDependencyManager | () | Constructor |
public function CanvasObjectDependencyManager(canvas:CanvasComponent)
Creates an instance that manages dirty canvas objects for the
given CanvasComponent
canvas:CanvasComponent |
addDependency | () | method |
public function addDependency(fromItem:Object, toItem:Object):void
Add a dependency from fromItem
to toItem
.
If fromItem
is set dirty, the manager will set toItem
dirty as well.
Parameters
fromItem:Object — An item that is represented in the canvas object tree by one or more ICanvasObjects .
| |
toItem:Object — An item that is represented in the canvas object tree by one or more ICanvasObjects .
|
invalidateSelection | () | method |
public function invalidateSelection():void
Invalidates all items that are contained in the current selection model of the GraphCanvasComponent and all items that depend on the selected items.
onCanvasGraphChanged | () | method |
protected function onCanvasGraphChanged(oldGraph:IGraph, newGraph:IGraph):void
Callback that is invoked when the graph
property changes.
Parameters
oldGraph:IGraph — the old value of the graph property.
| |
newGraph:IGraph — the actual value of the graph property.
|
onGraphStructureChanged | () | method |
protected function onGraphStructureChanged(evt:GraphEvent):void
Callback that is invoked when the structure of the graph managed by this instance changes.
The default implementation adds dependencies for newly created graph items in order to invalidate all canvas objects that depend on the visual apparance of these items when they set dirty.
Parameters
evt:GraphEvent |
See also
removeDependency | () | method |
public function removeDependency(fromItem:Object, toItem:Object):void
Parameters
fromItem:Object | |
toItem:Object |
reset | () | method |
public function reset():void
Reset the invalidation status.
setDirty | () | method |
public function setDirty(item:Object):void
Sets the dirty flag of the canvas objects that correspond to this model item. In addition, all canvas objects that correspond to items that depend on the given item will be set dirty.
If no dependency information is found for the given item, the whole canvas object tree will be set dirty.
Parameters
item:Object — An item that is represented in the canvas object tree by one or more ICanvasObjects .
|
updateGraphItems | () | method |
public function updateGraphItems():void
Updates all items of the graph
by calling onGraphStructureChanged
for each item of the graph
.