Packagecom.yworks.canvas
Classpublic class TagChangedInvalidator
InheritanceTagChangedInvalidator Inheritance Object

A support class that can be used to automatically trigger repaints when the value of a model item's userObject changes.

The register() method will register an ITagChangedListener with the graph that is shown in the graph canvas.

When the graph property of the provided graph canvas changes, the listener will be removed from the previous graph, and a new listener will be registered with the new graph.

See also

com.yworks.support.ITagOwner
com.yworks.graph.model.ITagChangedListener
com.yworks.ui.GraphCanvasComponent.invalidateItem()


Public Methods
 MethodDefined By
  
Creates a new instance that the will register/deregister the ITagChangedListener with the graph shown in the provided canvas.
TagChangedInvalidator
  
deregister():void
If register() has been called before, the registered listener is removed from the graph.
TagChangedInvalidator
  
register():void
Register an ITagChangedListener with the graph shown in the canvas that has been provided upon initialization.
TagChangedInvalidator
Constructor Detail
TagChangedInvalidator()Constructor
public function TagChangedInvalidator(graphCanvas:GraphCanvasComponent)

Creates a new instance that the will register/deregister the ITagChangedListener with the graph shown in the provided canvas.

Parameters
graphCanvas:GraphCanvasComponent — The graph canvas that visualizes the model items that should be automatically updated on userObject changes.
Method Detail
deregister()method
public function deregister():void

If register() has been called before, the registered listener is removed from the graph.

register()method 
public function register():void

Register an ITagChangedListener with the graph shown in the canvas that has been provided upon initialization.

When the graph property of the provided graph canvas changes, the listener will be removed from the previous graph, and a new listener will be registered with the new graph.