The ResizingTool is used to interactively change the size of a GraphObject in the selected Part or Node. This tool does not operate on Links.
You do not normally need to create an instance of this tool because one already exists as the ToolManager#resizingTool, which you can modify.
Gets the GraphObject that is being resized.
Gets or sets the width and height multiples with which the user must resize.
Gets the Diagram that owns this tool and for which this tool is handling input events.
Gets the GraphObject that is the tool handle being dragged by the user.
Gets or sets a small GraphObject that is copied as a resizing handle for the selected part.
Gets or sets whether this tool is started and is actively doing something.
Gets or sets whether this tool can be started by a mouse event.
Gets or sets whether the ResizingTool snaps object sizes to the diagram's background grid during the resize.
Gets or sets the maximum size to which the user can resize.
Gets or sets the minimum size to which the user can resize.
Gets or sets the name of this tool.
Gets the Size that was the original value of the GraphObject#desiredSize of the element that is being resized.
Gets the Point that was the original value of the Part#location of the Part that is being resized.
Gets or sets the name of the transaction to be committed by #stopTransaction; if null, the transaction will be rolled back.
This tool may run when there is a mouse-down event on a resize handle, the diagram is not read-only and it allows resizing, the left mouse button is being used, and this tool's adornment's resize handle is at the current mouse point.
boolean
This is called to cancel any running "WaitAfter" timer.
any
The size should be a multiple of the value returned by this method.
The effective maximum resizing size is the minimum of the #maxSize and the #adornedObject's GraphObject#maxSize.
The effective minimum resizing size is the maximum of #minSize and the #adornedObject's GraphObject#minSize.
Given a Spot in the original bounds of the object being resized and a new Point, compute the new Rect.
a Point in local coordinates.
the alignment spot of the handle being dragged.
the result of the call to #computeMinSize.
the result of the call to #computeMaxSize.
the result of the call to #computeCellSize.
true if the new size may change the aspect ratio from that of the natural bounds of the #adornedObject.
Capture the mouse, remember the object's original bounds, and start a transaction.\
any
Restore the original GraphObject's size.
any
Stop the current transaction and release the mouse.
any
The diagram will call this method upon a key down event.
any
The diagram will call this method upon a key up event.
any
The diagram will call this method upon a mouse down event.
any
Call #resize with a new size determined by the current mouse point.
any
Call #resize with the final bounds based on the most recent mouse point, commit the transaction, and raise the "PartResized" DiagramEvent.
any
The diagram will call this method as the mouse wheel is rotated.
any
This method is called by the diagram when this tool becomes the current tool; you should not call this method.
any
This method is called by the diagram when this tool stops being the current tool; you should not call this method.
any
This is called a certain delay after a call to #standardWaitAfter if there has not been any call to #cancelWaitAfter.
any
This convenience function finds the front-most GraphObject that is at a given point and that is part of an Adornment that is of a given category.
a Point in document coordinates.
the required Part#category of the Adornment.
Return true when the last mouse point is far enough away from the first mouse down point to constitute a drag operation instead of just a potential click.
Point in view coordinates, defaults to Diagram#firstInput's InputEvent#viewPoint.
Point in view coordinates, defaults to Diagram#lastInput's InputEvent#viewPoint.
boolean
Change the size of the selected part's Part#resizeObject to have the given bounds.
any
Implement the standard behavior for mouse clicks, searching for and calling click handler functions on GraphObjects or on Diagram, and raising the corresponding DiagramEvent.
An optional custom navigation function to find target objects.
An optional custom predicate
any
Implement the standard behavior for mouse enter, over, and leave events, where the mouse is moving but no button is pressed.
any
Implement the standard behavior for selecting parts with the mouse, depending on the control and shift modifier keys.
any
Implement the standard behavior for mouse wheel events.
any
This is called to start a new timer to call #doWaitAfter after a given delay.
in milliseconds
any
Call Diagram#startTransaction with the given transaction name.
a description of the transaction
boolean
If the Diagram#currentTool is this tool, stop this tool and start the Diagram#defaultTool by making it be the new current tool.
any
If #transactionResult is null, call Diagram#rollbackTransaction, otherwise call Diagram#commitTransaction.
boolean
Show an Adornment with the resize handles at points along the edge of the bounds of the selected Part's Part#resizeObject.
any