ClickSelectingTool class

The ClickSelectingTool selects and deselects Parts when there is a click. It does this by calling Tool#standardMouseSelect. It is also responsible for handling and dispatching click events on GraphObjects by calling Tool#standardMouseClick.

Note that this tool avoids raising click events on objects that are in temporary layers. This is to prevent parts such as selection adornments from interfering with clicking on selected nodes or links. (Adornments are in the "Adornment" Layer, which Layer#isTemporary.) However this means that if you add a GraphObject#click event handler on a GraphObject in an Adornment, it will not be called. You can get it to be called by setting GraphObject#isActionable to true on that object in the adornment.

This tool is a standard mouse-up tool, the ToolManager#clickSelectingTool.

This tool does not utilize any Adornments or tool handles. This tool does not modify the model or conduct any transaction.

An example customization of this tool is shown in the Tree Map sample, where the Tool#standardMouseSelect method is overridden to permit the user to cycle through the chain of containing groups, changing the selection on each click to the next containing group.

If you want to programmatically select a Part, you can set Part#isSelected or call Diagram#select. If you want to know which Part is at a particular point, you can call Diagram#findPartAt.

Implemented types
Available Extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

ClickSelectingTool()
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