The Diagram#commandHandler implements various commands such as CommandHandler#deleteSelection or CommandHandler#redo. The CommandHandler includes keyboard event handling to interpret key presses as commands.
The constructor produces a CommandHandler with the default key bindings.
Gets or sets a data object that is copied by #groupSelection when creating a new Group.
Gets or sets whether #copySelection should also copy subtrees.
Gets or sets whether #deleteSelection should also delete subtrees.
Gets the Diagram that is using this CommandHandler.
Gets or sets the predicate that determines whether or not a node may become a member of a group.
Gets or sets the amount by which #decreaseZoom and #increaseZoom change the Diagram#scale; default is 1.05.
Make sure all of the unnested Parts in the given collection are removed from any containing Groups.
a collection of Parts.
whether to call #isValidMember to confirm that changing the Part to be a top-level Part is valid.
boolean
This predicate controls whether the user can collapse expanded Groups.
if supplied, ignore the selection and consider collapsing this particular Group.
boolean
This predicate controls whether the user can collapse expanded subtrees of Nodes.
if supplied, ignore the selection and consider collapsing this particular Node.
boolean
This predicate controls whether or not the user can invoke the #copySelection command.
boolean
This predicate controls whether or not the user can invoke the #cutSelection command.
boolean
This predicate controls whether or not the user can invoke the #decreaseZoom command.
This defaults to 1/#zoomFactor. The value should be less than one.
boolean
This predicate controls whether or not the user can invoke the #deleteSelection command.
boolean
This predicate controls whether or not the user can invoke the #editTextBlock command.
the TextBlock to consider editing.
boolean
This predicate controls whether the user can expand collapsed Groups.
if supplied, ignore the selection and consider expanding this particular Group.
boolean
This predicate controls whether the user can expand collapsed subtrees of Nodes.
if supplied, ignore the selection and consider expanding this particular Node.
boolean
This predicate controls whether or not the user can invoke the #groupSelection command.
boolean
This predicate controls whether or not the user can invoke the #increaseZoom command.
This defaults to #zoomFactor. The value should be greater than one.
boolean
This predicate controls whether or not the user can invoke the #pasteSelection command.
boolean
This predicate controls whether or not the user can invoke the #redo command.
boolean
This predicate controls whether or not the user can invoke the #resetZoom command.
This defaults to 1. The value should be greater than zero.
boolean
This predicate controls whether or not the user can invoke the #selectAll command.
boolean
This predicate controls whether the user may stop the current tool.
boolean
This predicate controls whether or not the user can invoke the #undo command.
boolean
This predicate controls whether or not the user can invoke the #ungroupSelection command.
if supplied, ignore the selection and consider ungrouping this particular Group.
boolean
This predicate controls whether or not the user can invoke the #zoomToFit command.
boolean
Collapse all expanded selected Groups.
if supplied, ignore the selection and collapse this particular Group.
any
Collapse all expanded selected Nodes.
if supplied, ignore the selection and collapse this particular Node subtree.
any
Copy the currently selected parts, Diagram#selection, from the Diagram into the clipboard.
any
This makes a copy of the given collection of Parts and stores it in a static variable acting as the clipboard.
A collection of Parts.
any
Execute a #copySelection followed by a #deleteSelection.
any
Decrease the Diagram#scale by a given factor.
This defaults to 1/#zoomFactor. The value should be less than one.
any
Delete the currently selected parts from the diagram.
any
This is called by tools to handle keyboard commands.
any
This is called by tools to handle keyboard commands.
any
Start in-place editing of a TextBlock in the selected Part.
the TextBlock to start editing.
any
Expand all collapsed selected Groups.
if supplied, ignore the selection and expand this particular Group.
any
Expand all collapsed selected Nodes.
if supplied, ignore the selection and collapse this particular Node subtree.
any
Add a copy of #archetypeGroupData and add it to the diagram's model to create a new Group and then add the selected Parts to that new group.
any
Increase the Diagram#scale by a given factor.
This defaults to #zoomFactor. The value should be greater than one.
any
This predicate is called to determine whether a Node may be added as a member of a Group.
this may be null if the node is being added as a top-level node.
a Part, usually a Node, possibly another Group, but not a Link or an Adornment.
boolean
If the clipboard holds a collection of Parts, and if the Model#dataFormat matches that stored in the clipboard, this makes a copy of the clipboard's parts and adds the copies to this Diagram.
Copy the contents of the clipboard into this diagram, and make those new parts the new selection.
Point at which to center the newly pasted parts; if not present the parts are not moved.
any
Call UndoManager#redo.
any
Set the Diagram#scale to a new scale value, by default 1.
This defaults to 1. The value should be greater than zero.
any
Select all of the selectable Parts in the diagram.
any
Cancel the operation of the current tool.
any
Call UndoManager#undo.
any
Remove the group from the diagram without removing its members from the diagram.
if supplied, ignore the selection and consider ungrouping this particular Group.
any
Change the Diagram#scale so that the Diagram#documentBounds fits within the viewport.
any