RelinkingTool class

The RelinkingTool allows the user to reconnect an existing Link if the Link#relinkableTo and/or Link#relinkableFrom properties are true.

For a general discussion of validation, see Introduction to Validation.

By default an instance of this tool is installed as a mouse-down tool in the Diagram#toolManager as the ToolManager#relinkingTool.

This tool makes use of two Adornments, each including a relink handle (potentially one for each end of the link), shown when a link is selected.

This tool conducts a transaction while the tool is active. A successful relinking will result in a "LinkRelinked" DiagramEvent and a "Relinking" transaction.

If you want to programmatically start a new user's relinking of a Link, you can set the #handle property to the specific "RelinkFrom" or "RelinkTo" handle and then start and activate the tool.

  var tool = myDiagram.toolManager.relinkingTool;
  tool.originalLink = ...;   // specify which Link to have the user reconnect
  tool.isForwards = true;    // specify which end of the Link to reconnect
  myDiagram.currentTool = tool;  // starts the RelinkingTool
  tool.doActivate();             // activates the RelinkingTool
Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

RelinkingTool()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited