Search API
  • Preparing search index...
  • The search index is not available

Class ClickSelectingTool

Extends Tool. 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.

Constructor Summary Details

Name Description
ClickSelectingTool()

You do not normally need to create an instance of this tool because one already exists as the ToolManager.clickSelectingTool.More...

The Tool.name of this tool is "ClickSelecting".

Properties borrowed from class Tool:
diagram, isActive, isEnabled, name, transactionResult

Method Summary Details

Name, Return Type Description
canStart()
{boolean}

This tool can run whenever a click occurs.More...

This method may be overridden. Please read the Introduction page on Extensions for how to override methods and how to call this base method.

Returns:
{boolean}
doMouseUp()

Upon a click, this calls Tool.standardMouseSelect to change the Diagram.selection collection, then calls Tool.standardMouseClick to perform the normal click behaviors, and then stops this tool.

Methods borrowed from class Tool:
cancelWaitAfter, canStartMultiTouch, doActivate, doCancel, doDeactivate, doKeyDown, doKeyUp, doMouseDown, doMouseMove, doMouseWheel, doStart, doStop, doWaitAfter, findToolHandleAt, isBeyondDragSize, standardMouseClick, standardMouseOver, standardMouseSelect, standardMouseWheel, standardPinchZoomMove, standardPinchZoomStart, standardWaitAfter, startTransaction, stopTool, stopTransaction, updateAdornments