RelinkingTool$Typings extension

on

Properties

fromHandleArchetype GraphObject?
Gets or sets a small GraphObject that is copied as a relinking handle for the selected link path at the "from" end of the link. By default this is a Shape that is a small blue diamond. Setting this property does not raise any events.
getter/setter pair
handle GraphObject?
Returns the GraphObject that is the tool handle being dragged by the user. This will be contained by an Adornment whose category is "RelinkFrom" or "RelinkTo". Its Adornment#adornedPart is the same as the #originalLink.
getter/setter pair
toHandleArchetype GraphObject?
Gets or sets a small GraphObject that is copied as a relinking handle for the selected link path at the "to" end of the link. By default this is a Shape that is a small blue diamond. Setting this property does not raise any events.
getter/setter pair

Methods

canStart() bool
This tool can run when the diagram allows relinking, the model is modifiable, and there is a relink handle at the mouse-down point.
copyLinkProperties(Link templink, [Link? reallink]) → void
Make a temporary link look and act like the real Link being relinked. By default this method copies many of the routing-oriented properties from the LinkingBaseTool#originalLink to the LinkingBaseTool#temporaryLink.
doActivate() → void
Start the relinking operation.
doDeactivate() → void
Finishing the linking operation stops the transaction, releases the mouse, and resets the cursor.
doMouseUp() → void
A mouse-up ends the relinking operation; if there is a valid #targetPort nearby, this modifies the old link to connect with the target port.
This method is called upon a mouse up when #reconnectLink is not called.
makeAdornment(GraphObject selelt, bool toend) Adornment?
(undocumented) Create and return an Adornment that lets the user grab a handle to reconnect one end of the selected link.
Modify an existing Link to connect to a new node and port.
updateAdornments(Part part) → void
Show an Adornment for each end of the Link that the user may reconnect. The Adornment may have a copy of #fromHandleArchetype and/or #toHandleArchetype.