LinkReshapingTool$Typings extension

on

Properties

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

This read-only property returns the Link that is being routed manually.
getter/setter pair
handle GraphObject?

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Returns the GraphObject that is the tool handle being dragged by the user. This will be contained by an Adornment whose category is "LinkReshaping". Its Adornment#adornedPart is the same as the #adornedLink. This is normally set by #doActivate, remembering the result of the call to Tool#findToolHandleAt.
getter/setter pair
handleArchetype GraphObject?

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Gets or sets a small GraphObject that is copied as a reshape handle at each movable point in the selected link's route. By default this is a Shape that is a small blue rectangle. Setting this property does not raise any events.
getter/setter pair
midHandleArchetype GraphObject?

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Gets or sets a small GraphObject that is copied as a resegment handle at each mid-point in the selected Link's route. By default this is a Shape that is a small blue diamond. Setting this property does not raise any events.
getter/setter pair
originalPoint Point

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

This read-only property returns the Point that was the original location of the handle that is being dragged to reshape the Link.
getter/setter pair
originalPoints List<Point>

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

This read-only property returns the List of Points that was the original route of the Link that is being reshaped. This List should not be modified; its value is indeterminate until a reshaping has been activated.
getter/setter pair

Methods

canStart() bool

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

This tool may run when there is a mouse-down event on a reshape handle.
computeReshape(Point p) Point

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

This is called by #doMouseMove and #doMouseUp to limit the input point before calling #reshape.
doActivate() → void

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Start reshaping, if #findToolHandleAt finds a reshape handle at the mouse down point.
doCancel() → void

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Restore the link route to be the original points and stop this tool.
doDeactivate() → void

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

This stops the current reshaping operation with the link route shaped the way it is.
doMouseMove() → void

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Call #reshape with a new point determined by the mouse to change the route of the #adornedLink.
doMouseUp() → void

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Reshape the route with a point based on the most recent mouse point by calling #reshape, and then raise a "LinkReshaped" DiagramEvent before stopping this tool.
getResegmentingPoint() Point

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

(undocumented) If the handle clicked during activation was a resegment handle, return the point at which to start a new segment. By default this returns the center of the handle that was clicked. Please read the Introduction page on Extensions for how to override methods and how to call this base method.
getReshapingBehavior(GraphObject obj) EnumValue

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Get the permitted reshaping behavior for a particular reshape handle.
makeAdornment(GraphObject pathshape) Adornment?

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

(undocumented) @expose @param {GraphObject} pathshape @return {Adornment}
makeHandle(GraphObject pathshape, num idx) GraphObject?

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

(undocumented) Create and return a GraphObject that the user can "grab" to relink the selected Link. By default this returns a copy of #handleArchetype, a Shape that is a small blue rectangle. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @expose @param {GraphObject} pathshape the GraphObject path of the link being reshaped. @param {number} idx the index of the route point to be moved. @return {GraphObject}
makeResegmentHandle(GraphObject pathshape, num idx) GraphObject?

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

(undocumented) Create and return a GraphObject that the user can "grab" to add a segment to the selected Link. By default this returns a copy of #midHandleArchetype, a Shape that is a small blue diamond. Please read the Introduction page on Extensions for how to override methods and how to call this base method. @expose @param {GraphObject} pathshape the GraphObject path of the link being reshaped. @param {number} idx the index of the route point to be moved. @return {GraphObject}
reshape(Point newPoint) → void

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Change the route of the #adornedLink by moving the point corresponding to the current #handle to be at the given Point. This is called by #doMouseMove and #doMouseUp with the result of calling #computeReshape to constrain the input point.
setReshapingBehavior(GraphObject obj, EnumValue behavior) → void

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Set the permitted reshaping behavior for a particular reshape handle.
stopTransaction() bool

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

This calls the super Tool#stopTransaction method, and if the result is true, attempts to optimize the transaction by removing all changes except the first and last by calling Transaction#optimize.
updateAdornments(Part part) → void

Available on LinkReshapingTool, provided by the LinkReshapingTool$Typings extension

Show an Adornment with reshape handles at each of the interesting points of the link's route, if the link is selected and visible and if Part#canReshape is true.