control-freak-ide/misc/pocs/GoJS/api/symbols/CommandHandler.html
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

3352 lines
172 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>GoJS&reg; CommandHandler Class</title>
<script src="../../assets/js/jquery.min.js"></script>
<script src="../../assets/js/bootstrap.min.js"></script>
<script src="../../assets/js/highlight.js"></script>
<script src="../../assets/js/api.js"></script>
<link href="../../assets/css/bootstrap.min.css" rel="stylesheet" >
<!-- custom CSS after bootstrap -->
<link href="../../assets/css/main.css" rel="stylesheet" type="text/css"/>
<link href="../../assets/css/api.css" rel="stylesheet" type="text/css"/>
<!--<link rel="stylesheet" href="../../assets/css/api.css" type="text/css" media="all" />-->
<link rel="stylesheet" href="../../assets/css/highlight.css" type="text/css" media="all" />
</head>
<body>
<!-- non-fixed navbar -->
<nav id="non-fixed-nav" class="navbar navbar-inverse navbar-top">
<div class="container-fluid">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#navbar">
<a id="toplogo" class="navbar-brand" href="../../index.html">GoJS</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
</div>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="../../index.html">Home</a></li>
<li><a href="../../learn/index.html">Learn</a></li>
<li><a href="../../samples/index.html">Samples</a></li>
<li><a href="../../intro/index.html">Intro</a></li>
<li><a href="../../api/index.html">API</a></li>
<li><a href="https://www.nwoods.com/components/evalform.htm">Register</a></li>
<li><a href="../../doc/download.html">Download</a></li>
<li><a href="https://forum.nwoods.com/c/gojs">Forum</a></li>
<li><a href="https://www.nwoods.com/contact.html" onclick="ga('send','event','Outbound Link','click','contact');">Contact</a></li>
<li class="buy"><a href="https://www.nwoods.com/sales/index.html" onclick="ga('send','event','Outbound Link','click','buy');">Buy</a></li>
<li class="activate"><a href="https://www.nwoods.com/app/activate.aspx?sku=gojs">Activate</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container-fluid">
<!-- ============================== classes index ============================ -->
<div id="navindex" class="col-md-2">
<!-- begin publish.classesIndex -->
<!-- <div><a href="../index.html">GoJS Class Index</a></div> -->
<div class="sidebar-nav">
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#DiagramNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#DiagramNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Diagram Classes</span>
</div>
</div>
<div id="DiagramNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a></li>
<li><a href="../symbols/AnimationManager.html" class="linkConstructor">AnimationManager</a></li>
<li><a href="../symbols/CommandHandler.html" class="linkConstructor">CommandHandler</a></li>
<li><a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a></li>
<li><a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a></li>
<li><a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a></li>
<li><a href="../symbols/Group.html" class="linkConstructor">Group</a></li>
<li><a href="../symbols/InputEvent.html" class="linkConstructor">InputEvent</a></li>
<li><a href="../symbols/Layer.html" class="linkConstructor">Layer</a></li>
<li><a href="../symbols/Link.html" class="linkConstructor">Link</a></li>
<li><a href="../symbols/Node.html" class="linkConstructor">Node</a></li>
<li><a href="../symbols/Overview.html" class="linkConstructor">Overview</a></li>
<li><a href="../symbols/Palette.html" class="linkConstructor">Palette</a></li>
<li><a href="../symbols/Panel.html" class="linkConstructor">Panel</a></li>
<li><a href="../symbols/Part.html" class="linkConstructor">Part</a></li>
<li><a href="../symbols/Picture.html" class="linkConstructor">Picture</a></li>
<li><a href="../symbols/Placeholder.html" class="linkConstructor">Placeholder</a></li>
<li><a href="../symbols/RowColumnDefinition.html" class="linkConstructor">RowColumnDefinition</a></li>
<li><a href="../symbols/Shape.html" class="linkConstructor">Shape</a></li>
<li><a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#GeometryNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#GeometryNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Geometry Classes</span>
</div>
</div>
<div id="GeometryNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Brush.html" class="linkConstructor">Brush</a></li>
<li><a href="../symbols/Geometry.html" class="linkConstructor">Geometry</a></li>
<li><a href="../symbols/Margin.html" class="linkConstructor">Margin</a></li>
<li><a href="../symbols/PathFigure.html" class="linkConstructor">PathFigure</a></li>
<li><a href="../symbols/PathSegment.html" class="linkConstructor">PathSegment</a></li>
<li><a href="../symbols/Point.html" class="linkConstructor">Point</a></li>
<li><a href="../symbols/Rect.html" class="linkConstructor">Rect</a></li>
<li><a href="../symbols/Size.html" class="linkConstructor">Size</a></li>
<li><a href="../symbols/Spot.html" class="linkConstructor">Spot</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#ModelNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ModelNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Model Classes</span>
</div>
</div>
<div id="ModelNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Binding.html" class="linkConstructor">Binding</a></li>
<li><a href="../symbols/ChangedEvent.html" class="linkConstructor">ChangedEvent</a></li>
<li><a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a></li>
<li><a href="../symbols/Model.html" class="linkConstructor">Model</a></li>
<li><a href="../symbols/Transaction.html" class="linkConstructor">Transaction</a></li>
<li><a href="../symbols/TreeModel.html" class="linkConstructor">TreeModel</a></li>
<li><a href="../symbols/UndoManager.html" class="linkConstructor">UndoManager</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#LayoutNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#LayoutNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Layout Classes</span>
</div>
</div>
<div id="LayoutNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/CircularLayout.html" class="linkConstructor">CircularLayout</a></li>
<li><a href="../symbols/ForceDirectedLayout.html" class="linkConstructor">ForceDirectedLayout</a></li>
<li><a href="../symbols/GridLayout.html" class="linkConstructor">GridLayout</a></li>
<li><a href="../symbols/LayeredDigraphLayout.html" class="linkConstructor">LayeredDigraphLayout</a></li>
<li><a href="../symbols/Layout.html" class="linkConstructor">Layout</a></li>
<li><a href="../symbols/LayoutNetwork.html" class="linkConstructor">LayoutNetwork</a></li>
<li><a href="../symbols/TreeLayout.html" class="linkConstructor">TreeLayout</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#ToolNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ToolNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Tool Classes</span>
</div>
</div>
<div id="ToolNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/ActionTool.html" class="linkConstructor">ActionTool</a></li>
<li><a href="../symbols/ClickCreatingTool.html" class="linkConstructor">ClickCreatingTool</a></li>
<li><a href="../symbols/ClickSelectingTool.html" class="linkConstructor">ClickSelectingTool</a></li>
<li><a href="../symbols/ContextMenuTool.html" class="linkConstructor">ContextMenuTool</a></li>
<li><a href="../symbols/DraggingTool.html" class="linkConstructor">DraggingTool</a></li>
<li><a href="../symbols/DragSelectingTool.html" class="linkConstructor">DragSelectingTool</a></li>
<li><a href="../symbols/HTMLInfo.html" class="linkConstructor">HTMLInfo</a></li>
<li><a href="../symbols/LinkingBaseTool.html" class="linkConstructor">LinkingBaseTool</a></li>
<li><a href="../symbols/LinkingTool.html" class="linkConstructor">LinkingTool</a></li>
<li><a href="../symbols/LinkReshapingTool.html" class="linkConstructor">LinkReshapingTool</a></li>
<li><a href="../symbols/PanningTool.html" class="linkConstructor">PanningTool</a></li>
<li><a href="../symbols/RelinkingTool.html" class="linkConstructor">RelinkingTool</a></li>
<li><a href="../symbols/ResizingTool.html" class="linkConstructor">ResizingTool</a></li>
<li><a href="../symbols/RotatingTool.html" class="linkConstructor">RotatingTool</a></li>
<li><a href="../symbols/TextEditingTool.html" class="linkConstructor">TextEditingTool</a></li>
<li><a href="../symbols/Tool.html" class="linkConstructor">Tool</a></li>
<li><a href="../symbols/ToolManager.html" class="linkConstructor">ToolManager</a></li>
</ul>
</div>
</div>
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<div class="navheader-container">
<div class="navheader-collapse" data-toggle="collapse" data-target="#CollectionNavbar">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#CollectionNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<span class="navbar-brand">Collection Classes</span>
</div>
</div>
<div id="CollectionNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
<ul class="classList nav navbar-nav">
<li><a href="../symbols/Iterable.html" class="linkConstructor">Iterable</a></li>
<li><a href="../symbols/Iterator.html" class="linkConstructor">Iterator</a></li>
<li><a href="../symbols/List.html" class="linkConstructor">List</a></li>
<li><a href="../symbols/Map.html" class="linkConstructor">Map</a></li>
<li><a href="../symbols/Set.html" class="linkConstructor">Set</a></li>
</ul>
</div>
</div>
</div> <!-- /class="sidebar-nav -->
<!-- end publish.classesIndex -->
</div>
<div id="contentBody" class="col-md-10">
<!-- ============================== header ================================= -->
<div id="header" class="fineprint mt30">
<b>GoJS</b>&reg; Diagramming Components<br/>version 1.8.5 for JavaScript/HTML<br/>by <a href="https://www.nwoods.com/">Northwoods Software&reg;</a>
</div>
<!-- ============================== class title ============================ -->
<h2 class="classTitle mt30">
Class CommandHandler
</h2>
<!-- ============================== class summary ========================== -->
<span class="hideshowall">
<span class="nodetails"><button id="buttonShow">Show Details</button></span>
<span class="details"><button id="buttonHide">Show Summaries</button></span>
</span>
<p class="classsummary">
The <a href="../symbols/Diagram.html#commandHandler" class="linkProperty">Diagram.commandHandler</a> implements various
commands such as <a href="../symbols/CommandHandler.html#deleteSelection" class="linkMethod">CommandHandler.deleteSelection</a> or <a href="../symbols/CommandHandler.html#redo" class="linkMethod">CommandHandler.redo</a>.
The CommandHandler includes keyboard event handling to interpret
key presses as commands.
<p>
CommandHandlers cannot be shared amongst multiple Diagrams.
<p>
You may define a CommandHandler subclass and override methods.
However you must seriously consider calling the base method in order to get its default behavior.
There may be situations where not calling the base method may cause subtle bugs,
but that depends on the method.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call a base method.
<p>
There is an example custom CommandHandler in the extensions directory: <a href="../../extensions/DrawCommandHandler.js">DrawCommandHandler.js</a>,
which provides alignment commands and additional behaviors for the arrow keys.
<p class="boxread">
For additional discussion, please read the <a href="../../intro/commands.html">Introduction page on Commands</a>.
<h3>Keyboard Shortcuts</h3>
The CommandHandler implements the following command bindings for keyboard input in <a href="../symbols/CommandHandler.html#doKeyDown" class="linkMethod">doKeyDown</a>:
<ul>
<li><code>Ctrl-X</code> & <code>Shift-Del</code> invoke <a href="../symbols/CommandHandler.html#cutSelection" class="linkMethod">cutSelection</a></li>
<li><code>Ctrl-C</code> & <code>Ctrl-Insert</code> invoke <a href="../symbols/CommandHandler.html#copySelection" class="linkMethod">copySelection</a></li>
<li><code>Ctrl-V</code> & <code>Shift-Insert</code> invoke <a href="../symbols/CommandHandler.html#pasteSelection" class="linkMethod">pasteSelection</a></li>
<li><code>Del</code> & <code>Backspace</code> invoke <a href="../symbols/CommandHandler.html#deleteSelection" class="linkMethod">deleteSelection</a></li>
<li><code>Ctrl-A</code> invokes <a href="../symbols/CommandHandler.html#selectAll" class="linkMethod">selectAll</a></li>
<li><code>Ctrl-Z</code> & <code>Alt-Backspace</code> invoke <a href="../symbols/CommandHandler.html#undo" class="linkMethod">undo</a></li>
<li><code>Ctrl-Y</code> & <code>Alt-Shift-Backspace</code> invoke <a href="../symbols/CommandHandler.html#redo" class="linkMethod">redo</a></li>
<li><code>Up</code> & <code>Down</code> & <code>Left</code> & <code>Right</code> (arrow keys) call <a href="../symbols/Diagram.html#scroll" class="linkMethod">Diagram.scroll</a></li>
<li><code>PageUp</code> & <code>PageDown</code> call <a href="../symbols/Diagram.html#scroll" class="linkMethod">Diagram.scroll</a></li>
<li><code>Home</code> & <code>End</code> call <a href="../symbols/Diagram.html#scroll" class="linkMethod">Diagram.scroll</a></li>
<li><code>Space</code> invokes <a href="../symbols/CommandHandler.html#scrollToPart" class="linkMethod">scrollToPart</a></li>
<li><code>Ctrl-- & Keypad--</code> (minus) invoke <a href="../symbols/CommandHandler.html#decreaseZoom" class="linkMethod">decreaseZoom</a></li>
<li><code>Ctrl-+ & Keypad-+</code> (plus) invoke <a href="../symbols/CommandHandler.html#increaseZoom" class="linkMethod">increaseZoom</a></li>
<li><code>Ctrl-0</code> invokes <a href="../symbols/CommandHandler.html#resetZoom" class="linkMethod">resetZoom</a></li>
<li><code>Shift-Z</code> invokes <a href="../symbols/CommandHandler.html#zoomToFit" class="linkMethod">zoomToFit</a>; repeat to return to the original scale and position</li>
<li><code>Ctrl-G</code> invokes <a href="../symbols/CommandHandler.html#groupSelection" class="linkMethod">groupSelection</a></li>
<li><code>Ctrl-Shift-G</code> invokes <a href="../symbols/CommandHandler.html#ungroupSelection" class="linkMethod">ungroupSelection</a></li>
<li><code>F2</code> invokes <a href="../symbols/CommandHandler.html#editTextBlock" class="linkMethod">editTextBlock</a></li>
<li><code>Menu Key</code> invokes <a href="../symbols/CommandHandler.html#showContextMenu" class="linkMethod">showContextMenu</a></li>
<li><code>Esc</code> invokes <a href="../symbols/CommandHandler.html#stopCommand" class="linkMethod">stopCommand</a></li>
</ul>
<p>
On a Macintosh the Command key is used as the modifier instead of the Control key.
</p>
<p>
On touch devices there is a default context menu that shows many commonly-used commands
when you hold a finger down on the diagram.
</p>
</p>
<!-- ============================== constructor summary ==================== -->
<h2 id="constructor" class="summaryCaption"> Constructor <span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the constructor documented in the class CommandHandler.">
<thead>
<tr>
<th scope="col" class="name">Name</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name" >
<div class="name">
CommandHandler()
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>The constructor produces a CommandHandler with the default key bindings.
</div>
</td>
</tr>
</tbody>
</table>
</div><!-- class="table-responsive">-->
<!-- ============================== properties summary ===================== -->
<h2 class="summaryCaption">Properties<span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the properties documented in the class CommandHandler.">
<thead>
<tr>
<th scope="col" class="name">Name, Value Type</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr id="archetypeGroupData" >
<td class="name">
<div class="name">
archetypeGroupData
</div>
<div class="attributes">
<span class="light">{Object}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets a data object that is copied by <a href="../symbols/CommandHandler.html#groupSelection" class="linkMethod">groupSelection</a>
when creating a new Group.<span class="nodetails" id="xproparchetypeGroupData"><a class="morelink" onclick="hst('proparchetypeGroupData')">More...</a></span> <span class="details" id="proparchetypeGroupData">
</span><div class="details" id="dproparchetypeGroupData"><p>
The default value is null.
If you set this to an Object, be sure that <a href="../symbols/GraphLinksModel.html#isGroupForNodeData" class="linkMethod">GraphLinksModel.isGroupForNodeData</a> is true for that object.
Setting this property does not raise any events.</div>
</div>
</td>
</tr>
<tr id="copiesConnectedLinks" >
<td class="name">
<div class="name">
copiesConnectedLinks
</div>
<div class="attributes">
<span class="light">{boolean}</span>
<span class="since" title="since">1.5</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether <a href="../symbols/CommandHandler.html#copySelection" class="linkMethod">copySelection</a> should also copy Links that connect with selected Nodes.<span class="nodetails" id="xpropcopiesConnectedLinks"><a class="morelink" onclick="hst('propcopiesConnectedLinks')">More...</a></span> <span class="details" id="propcopiesConnectedLinks">
The default value is true.
Setting this property does not raise any events.
</span><div class="details" id="dpropcopiesConnectedLinks"><p>
The <a href="../symbols/DraggingTool.html#copiesEffectiveCollection" class="linkProperty">DraggingTool.copiesEffectiveCollection</a> property serves a similar role for the <a href="../symbols/DraggingTool.html" class="linkConstructor">DraggingTool</a>
when the user holds down the control key to modify the drag into a copy operation.</div>
</div>
</td>
</tr>
<tr id="copiesGroupKey" >
<td class="name">
<div class="name">
copiesGroupKey
</div>
<div class="attributes">
<span class="light">{boolean}</span>
<span class="since" title="since">1.3</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether <a href="../symbols/CommandHandler.html#copySelection" class="linkMethod">copySelection</a> and <a href="../symbols/CommandHandler.html#copyToClipboard" class="linkMethod">copyToClipboard</a> copy the node data property
whose value is the containing group data's key.<span class="nodetails" id="xpropcopiesGroupKey"><a class="morelink" onclick="hst('propcopiesGroupKey')">More...</a></span> <span class="details" id="propcopiesGroupKey">
</span><div class="details" id="dpropcopiesGroupKey"><p>
Set this property to true if you want a copy/paste of a node to automatically have the new node be a member of the original group.
Caution: this only has an effect if the Diagram's <a href="../symbols/Diagram.html#model" class="linkProperty">Diagram.model</a> is a <a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a>.
<p>
The default value is false.</div>
</div>
</td>
</tr>
<tr id="copiesParentKey" >
<td class="name">
<div class="name">
copiesParentKey
</div>
<div class="attributes">
<span class="light">{boolean}</span>
<span class="since" title="since">1.3</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether <a href="../symbols/CommandHandler.html#copySelection" class="linkMethod">copySelection</a> and <a href="../symbols/CommandHandler.html#copyToClipboard" class="linkMethod">copyToClipboard</a> copy the node data property
whose value is the tree-parent node data's key.<span class="nodetails" id="xpropcopiesParentKey"><a class="morelink" onclick="hst('propcopiesParentKey')">More...</a></span> <span class="details" id="propcopiesParentKey">
</span><div class="details" id="dpropcopiesParentKey"><p>
Set this property to true if you want a copy/paste of a node to automatically have the new node be a tree-child of the original tree-parent node.
Caution: this only has an effect if the Diagram's <a href="../symbols/Diagram.html#model" class="linkProperty">Diagram.model</a> is a <a href="../symbols/TreeModel.html" class="linkConstructor">TreeModel</a>.
<p>
The default value is false.</div>
</div>
</td>
</tr>
<tr id="copiesTree" >
<td class="name">
<div class="name">
copiesTree
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether <a href="../symbols/CommandHandler.html#copySelection" class="linkMethod">copySelection</a> should also copy subtrees.<span class="nodetails" id="xpropcopiesTree"><a class="morelink" onclick="hst('propcopiesTree')">More...</a></span> <span class="details" id="propcopiesTree">
The default value is false.
Setting this property does not raise any events.
</span><div class="details" id="dpropcopiesTree"><p>
The <a href="../symbols/DraggingTool.html#dragsTree" class="linkProperty">DraggingTool.dragsTree</a> property serves a similar role for the <a href="../symbols/DraggingTool.html" class="linkConstructor">DraggingTool</a>
for both moving and copying operations.</div>
</div>
</td>
</tr>
<tr id="defaultScale" >
<td class="name">
<div class="name">
defaultScale
</div>
<div class="attributes">
<span class="light">{number}</span>
<span class="since" title="since">1.3</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the <a href="../symbols/Diagram.html#scale" class="linkProperty">Diagram.scale</a> set by <a href="../symbols/CommandHandler.html#resetZoom" class="linkMethod">resetZoom</a>.<span class="nodetails" id="xpropdefaultScale"><a class="morelink" onclick="hst('propdefaultScale')">More...</a></span> <span class="details" id="propdefaultScale">
</span><div class="details" id="dpropdefaultScale"><p>
The default value is 1.0.
The value must be a number larger than 0.
Setting this property does not raise any events.</div>
</div>
</td>
</tr>
<tr id="deletesConnectedLinks" >
<td class="name">
<div class="name">
deletesConnectedLinks
</div>
<div class="attributes">
<span class="light">{boolean}</span>
<span class="since" title="since">1.6</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether <a href="../symbols/CommandHandler.html#deleteSelection" class="linkMethod">deleteSelection</a> should also delete links that are connected to nodes that are deleted.<span class="nodetails" id="xpropdeletesConnectedLinks"><a class="morelink" onclick="hst('propdeletesConnectedLinks')">More...</a></span> <span class="details" id="propdeletesConnectedLinks">
The default value is true.
Setting this property does not raise any events.</span>
</div>
</td>
</tr>
<tr id="deletesTree" >
<td class="name">
<div class="name">
deletesTree
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets whether <a href="../symbols/CommandHandler.html#deleteSelection" class="linkMethod">deleteSelection</a> should also delete subtrees.<span class="nodetails" id="xpropdeletesTree"><a class="morelink" onclick="hst('propdeletesTree')">More...</a></span> <span class="details" id="propdeletesTree">
The default value is false.
Setting this property does not raise any events.</span>
</div>
</td>
</tr>
<tr id="diagram" >
<td class="name">
<div class="name">
diagram
</div>
<div class="attributes">
<span class="light">{<a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>This read-only property returns the <a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a> that is using this CommandHandler,
after <a href="../symbols/Diagram.html#commandHandler" class="linkProperty">Diagram.commandHandler</a> has been set to this object.
</div>
</td>
</tr>
<tr id="memberValidation" >
<td class="name">
<div class="name">
memberValidation
</div>
<div class="attributes">
<span class="light">{function(Group, Part):boolean | null}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the predicate that determines whether or not a node may become a member of a group.<span class="nodetails" id="xpropmemberValidation"><a class="morelink" onclick="hst('propmemberValidation')">More...</a></span> <span class="details" id="propmemberValidation">
This predicate is called in addition to any existing group's <a href="../symbols/Group.html#memberValidation" class="linkProperty">Group.memberValidation</a> predicate.
The default predicate is null, which is equivalent to simply returning true.
The predicate may be called passing null as the first argument (the Group) --
this asks whether it is OK to make the second argument (the Part, but not a Link) a top-level Part of the diagram.
<p class="box">
For a more general discussion of validation, see <a href="../../intro/validation.html">Introduction to Validation</a>.
</span><div class="details" id="dpropmemberValidation"><p>
The function, if supplied, must not have any side-effects.</div>
</div>
</td>
</tr>
<tr id="zoomFactor" >
<td class="name">
<div class="name">
zoomFactor
</div>
<div class="attributes">
<span class="light">{number}</span>
<span class="since" title="since">1.1</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp <p> -->
<p>Gets or sets the amount by which <a href="../symbols/CommandHandler.html#decreaseZoom" class="linkMethod">decreaseZoom</a> and <a href="../symbols/CommandHandler.html#increaseZoom" class="linkMethod">increaseZoom</a> change
the <a href="../symbols/Diagram.html#scale" class="linkProperty">Diagram.scale</a>.<span class="nodetails" id="xpropzoomFactor"><a class="morelink" onclick="hst('propzoomFactor')">More...</a></span> <span class="details" id="propzoomFactor">
</span><div class="details" id="dpropzoomFactor"><p>
The default value is 1.05 (5%).
The value must be a number larger than 1.0.
Setting this property does not raise any events.</div>
</div>
</td>
</tr>
</tbody>
</table>
</div><!-- class="table-responsive">-->
<!-- ============================== methods summary ======================== -->
<h2 class="summaryCaption">Method <span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
<div class="table-responsive">
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the methods documented in the class CommandHandler.">
<thead>
<tr>
<th scope="col" class="name">Name, Return Type</th>
<th scope="col" class="description">Description</th>
</tr>
</thead>
<tbody>
<tr id="addTopLevelParts">
<td class="name">
<div class="name">
addTopLevelParts(coll, check)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Make sure all of the unnested <a href="../symbols/Part.html" class="linkConstructor">Part</a>s in the given collection
are removed from any containing <a href="../symbols/Group.html" class="linkConstructor">Group</a>s.<span class="nodetails" id="xmethaddTopLevelParts"><a class="morelink" onclick="hst('methaddTopLevelParts')">More...</a></span> <span class="details" id="methaddTopLevelParts">
</span><div class="details" id="dmethaddTopLevelParts"><p>
This sets <a href="../symbols/Part.html#containingGroup" class="linkProperty">Part.containingGroup</a> to null on each Part that is
not a member of another Part in the argument collection.
If the check argument to this method is supplied and true,
this will call <a href="../symbols/CommandHandler.html#isValidMember" class="linkMethod">isValidMember</a> on each part, passing null as the first argument.
<p>
This functionality is similar to <a href="../symbols/CommandHandler.html#ungroupSelection" class="linkMethod">ungroupSelection</a>,
except that this is not a command (there is no transaction and this does not raise a <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a>)
and the parts are necessarily becoming top-level parts
(whereas ungrouping would add them to the Group containing the Group being ungrouped).
<p>
This function is typically called in a <a href="../symbols/Diagram.html#mouseDrop" class="linkProperty">Diagram.mouseDrop</a> event handler
in order to remove the selected Parts from whatever <a href="../symbols/Group.html" class="linkConstructor">Group</a> they had been in.
<p>
If you want to add Parts to be members of a Group, call <a href="../symbols/Group.html#addMembers" class="linkMethod">Group.addMembers</a>.
If you want to remove Parts completely from a Diagram, call <a href="../symbols/Diagram.html#removeParts" class="linkMethod">Diagram.removeParts</a>.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{Iterable.<Part>}</span> <b>coll</b>
</dt>
<dd>a collection of Parts.</dd>
<dt>
<span class="light fixedFont">{boolean=}</span> <b>check</b>
</dt>
<dd>whether to call <a href="../symbols/CommandHandler.html#isValidMember" class="linkMethod">isValidMember</a> to confirm that changing the Part to be a top-level Part is valid.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> true if all non-Links were changed to be top-level Parts in this Diagram; false if some Parts or Nodes were not able to be added.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canCollapseSubGraph">
<td class="name">
<div class="name">
canCollapseSubGraph(group)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether the user can collapse expanded <a href="../symbols/Group.html" class="linkConstructor">Group</a>s.<span class="nodetails" id="xmethcanCollapseSubGraph"><a class="morelink" onclick="hst('methcanCollapseSubGraph')">More...</a></span> <span class="details" id="methcanCollapseSubGraph">
</span><div class="details" id="dmethcanCollapseSubGraph"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#collapseSubGraph" class="linkMethod">collapseSubGraph</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Group.html" class="linkConstructor">Group</a>=}</span> <b>group</b>
</dt>
<dd>if supplied, ignore the selection and consider collapsing this particular Group.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="canCollapseTree">
<td class="name">
<div class="name">
canCollapseTree(node)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether the user can collapse expanded subtrees of <a href="../symbols/Node.html" class="linkConstructor">Node</a>s.<span class="nodetails" id="xmethcanCollapseTree"><a class="morelink" onclick="hst('methcanCollapseTree')">More...</a></span> <span class="details" id="methcanCollapseTree">
</span><div class="details" id="dmethcanCollapseTree"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#collapseTree" class="linkMethod">collapseTree</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>=}</span> <b>node</b>
</dt>
<dd>if supplied, ignore the selection and consider collapsing this particular Node.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="canCopySelection">
<td class="name">
<div class="name">
canCopySelection()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#copySelection" class="linkMethod">copySelection</a> command.<span class="nodetails" id="xmethcanCopySelection"><a class="morelink" onclick="hst('methcanCopySelection')">More...</a></span> <span class="details" id="methcanCopySelection">
</span><div class="details" id="dmethcanCopySelection"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#copySelection" class="linkMethod">copySelection</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true:
if <a href="../symbols/Diagram.html#allowCopy" class="linkProperty">Diagram.allowCopy</a> is true,
if <a href="../symbols/Diagram.html#allowClipboard" class="linkProperty">Diagram.allowClipboard</a> is true, and
if there are some selected <a href="../symbols/Part.html" class="linkConstructor">Part</a>s.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canCutSelection">
<td class="name">
<div class="name">
canCutSelection()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#cutSelection" class="linkMethod">cutSelection</a> command.<span class="nodetails" id="xmethcanCutSelection"><a class="morelink" onclick="hst('methcanCutSelection')">More...</a></span> <span class="details" id="methcanCutSelection">
</span><div class="details" id="dmethcanCutSelection"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#cutSelection" class="linkMethod">cutSelection</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true:
if the diagram is not <a href="../symbols/Diagram.html#isReadOnly" class="linkProperty">Diagram.isReadOnly</a>,
if <a href="../symbols/Diagram.html#allowCopy" class="linkProperty">Diagram.allowCopy</a> is true,
if <a href="../symbols/Diagram.html#allowDelete" class="linkProperty">Diagram.allowDelete</a> is true,
if <a href="../symbols/Diagram.html#allowClipboard" class="linkProperty">Diagram.allowClipboard</a> is true, and
if there are some selected <a href="../symbols/Part.html" class="linkConstructor">Part</a>s.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canDecreaseZoom">
<td class="name">
<div class="name">
canDecreaseZoom(factor)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#decreaseZoom" class="linkMethod">decreaseZoom</a> command.<span class="nodetails" id="xmethcanDecreaseZoom"><a class="morelink" onclick="hst('methcanDecreaseZoom')">More...</a></span> <span class="details" id="methcanDecreaseZoom">
</span><div class="details" id="dmethcanDecreaseZoom"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#decreaseZoom" class="linkMethod">decreaseZoom</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{number=}</span> <b>factor</b>
</dt>
<dd>This defaults to 1/<a href="../symbols/CommandHandler.html#zoomFactor" class="linkProperty">zoomFactor</a>. The value should be less than one and greater than zero.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true if <a href="../symbols/Diagram.html#allowZoom" class="linkProperty">Diagram.allowZoom</a> is true
and if the new scale is within the range of <a href="../symbols/Diagram.html#minScale" class="linkProperty">Diagram.minScale</a> and <a href="../symbols/Diagram.html#maxScale" class="linkProperty">Diagram.maxScale</a>.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canDeleteSelection">
<td class="name">
<div class="name">
canDeleteSelection()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#deleteSelection" class="linkMethod">deleteSelection</a> command.<span class="nodetails" id="xmethcanDeleteSelection"><a class="morelink" onclick="hst('methcanDeleteSelection')">More...</a></span> <span class="details" id="methcanDeleteSelection">
</span><div class="details" id="dmethcanDeleteSelection"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#deleteSelection" class="linkMethod">deleteSelection</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true:
if the diagram is not <a href="../symbols/Diagram.html#isReadOnly" class="linkProperty">Diagram.isReadOnly</a>,
if <a href="../symbols/Diagram.html#allowDelete" class="linkProperty">Diagram.allowDelete</a> is true, and
if there are some selected <a href="../symbols/Part.html" class="linkConstructor">Part</a>s.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canEditTextBlock">
<td class="name">
<div class="name">
canEditTextBlock(textblock)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#editTextBlock" class="linkMethod">editTextBlock</a> command.<span class="nodetails" id="xmethcanEditTextBlock"><a class="morelink" onclick="hst('methcanEditTextBlock')">More...</a></span> <span class="details" id="methcanEditTextBlock">
</span><div class="details" id="dmethcanEditTextBlock"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#editTextBlock" class="linkMethod">editTextBlock</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a>=}</span> <b>textblock</b>
</dt>
<dd>the <a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a> to consider editing.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true:
if the diagram is not <a href="../symbols/Diagram.html#isReadOnly" class="linkProperty">Diagram.isReadOnly</a>,
if <a href="../symbols/Diagram.html#allowTextEdit" class="linkProperty">Diagram.allowTextEdit</a> is true,
if there is a <a href="../symbols/ToolManager.html#textEditingTool" class="linkProperty">ToolManager.textEditingTool</a>, and
if there is any selected <a href="../symbols/Part.html" class="linkConstructor">Part</a> for which <a href="../symbols/Part.html#canEdit" class="linkMethod">Part.canEdit</a> is true.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canExpandSubGraph">
<td class="name">
<div class="name">
canExpandSubGraph(group)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether the user can expand collapsed <a href="../symbols/Group.html" class="linkConstructor">Group</a>s.<span class="nodetails" id="xmethcanExpandSubGraph"><a class="morelink" onclick="hst('methcanExpandSubGraph')">More...</a></span> <span class="details" id="methcanExpandSubGraph">
</span><div class="details" id="dmethcanExpandSubGraph"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#expandSubGraph" class="linkMethod">expandSubGraph</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Group.html" class="linkConstructor">Group</a>=}</span> <b>group</b>
</dt>
<dd>if supplied, ignore the selection and consider expanding this particular Group.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="canExpandTree">
<td class="name">
<div class="name">
canExpandTree(node)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether the user can expand collapsed subtrees of <a href="../symbols/Node.html" class="linkConstructor">Node</a>s.<span class="nodetails" id="xmethcanExpandTree"><a class="morelink" onclick="hst('methcanExpandTree')">More...</a></span> <span class="details" id="methcanExpandTree">
</span><div class="details" id="dmethcanExpandTree"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#expandTree" class="linkMethod">expandTree</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>=}</span> <b>node</b>
</dt>
<dd>if supplied, ignore the selection and consider expanding this particular Node.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="canGroupSelection">
<td class="name">
<div class="name">
canGroupSelection()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#groupSelection" class="linkMethod">groupSelection</a> command.<span class="nodetails" id="xmethcanGroupSelection"><a class="morelink" onclick="hst('methcanGroupSelection')">More...</a></span> <span class="details" id="methcanGroupSelection">
</span><div class="details" id="dmethcanGroupSelection"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#groupSelection" class="linkMethod">groupSelection</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true:
if the <a href="../symbols/CommandHandler.html#archetypeGroupData" class="linkProperty">archetypeGroupData</a> is not null,
if the diagram is not <a href="../symbols/Diagram.html#isReadOnly" class="linkProperty">Diagram.isReadOnly</a>,
if <a href="../symbols/Diagram.html#allowInsert" class="linkProperty">Diagram.allowInsert</a> is true,
if <a href="../symbols/Diagram.html#allowGroup" class="linkProperty">Diagram.allowGroup</a> is true,
if <a href="../symbols/Diagram.html#model" class="linkProperty">Diagram.model</a> is a <a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a>, and
if there is any selected <a href="../symbols/Part.html" class="linkConstructor">Part</a> that can be <a href="../symbols/Part.html#canGroup" class="linkMethod">Part.canGroup</a>ed.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canIncreaseZoom">
<td class="name">
<div class="name">
canIncreaseZoom(factor)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#increaseZoom" class="linkMethod">increaseZoom</a> command.<span class="nodetails" id="xmethcanIncreaseZoom"><a class="morelink" onclick="hst('methcanIncreaseZoom')">More...</a></span> <span class="details" id="methcanIncreaseZoom">
</span><div class="details" id="dmethcanIncreaseZoom"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#increaseZoom" class="linkMethod">increaseZoom</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{number=}</span> <b>factor</b>
</dt>
<dd>This defaults to <a href="../symbols/CommandHandler.html#zoomFactor" class="linkProperty">zoomFactor</a>. The value should be greater than one.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true if <a href="../symbols/Diagram.html#allowZoom" class="linkProperty">Diagram.allowZoom</a> is true
and if the new scale is within the range of <a href="../symbols/Diagram.html#minScale" class="linkProperty">Diagram.minScale</a> and <a href="../symbols/Diagram.html#maxScale" class="linkProperty">Diagram.maxScale</a>.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canPasteSelection">
<td class="name">
<div class="name">
canPasteSelection()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#pasteSelection" class="linkMethod">pasteSelection</a> command.<span class="nodetails" id="xmethcanPasteSelection"><a class="morelink" onclick="hst('methcanPasteSelection')">More...</a></span> <span class="details" id="methcanPasteSelection">
</span><div class="details" id="dmethcanPasteSelection"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#pasteSelection" class="linkMethod">pasteSelection</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true:
if the diagram is not <a href="../symbols/Diagram.html#isReadOnly" class="linkProperty">Diagram.isReadOnly</a>,
if <a href="../symbols/Diagram.html#allowInsert" class="linkProperty">Diagram.allowInsert</a> is true,
if <a href="../symbols/Diagram.html#allowClipboard" class="linkProperty">Diagram.allowClipboard</a> is true, and
if the clipboard has parts in it.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canRedo">
<td class="name">
<div class="name">
canRedo()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#redo" class="linkMethod">redo</a> command.<span class="nodetails" id="xmethcanRedo"><a class="morelink" onclick="hst('methcanRedo')">More...</a></span> <span class="details" id="methcanRedo">
</span><div class="details" id="dmethcanRedo"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#redo" class="linkMethod">redo</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true:
if the diagram is not <a href="../symbols/Diagram.html#isReadOnly" class="linkProperty">Diagram.isReadOnly</a>,
if <a href="../symbols/Diagram.html#allowUndo" class="linkProperty">Diagram.allowUndo</a> is true, and
if the <a href="../symbols/UndoManager.html#canRedo" class="linkMethod">UndoManager.canRedo</a> predicate returns true.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canResetZoom">
<td class="name">
<div class="name">
canResetZoom(newscale)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#resetZoom" class="linkMethod">resetZoom</a> command.<span class="nodetails" id="xmethcanResetZoom"><a class="morelink" onclick="hst('methcanResetZoom')">More...</a></span> <span class="details" id="methcanResetZoom">
</span><div class="details" id="dmethcanResetZoom"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#resetZoom" class="linkMethod">resetZoom</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{number=}</span> <b>newscale</b>
</dt>
<dd>This defaults to <a href="../symbols/CommandHandler.html#defaultScale" class="linkProperty">defaultScale</a>, which is normally 1.0. The value should be greater than zero.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true if <a href="../symbols/Diagram.html#allowZoom" class="linkProperty">Diagram.allowZoom</a> is true.
and if the new scale is within the range of <a href="../symbols/Diagram.html#minScale" class="linkProperty">Diagram.minScale</a> and <a href="../symbols/Diagram.html#maxScale" class="linkProperty">Diagram.maxScale</a>.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canScrollToPart">
<td class="name">
<div class="name">
canScrollToPart(part)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
<span class="since" title="since">1.6</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#scrollToPart" class="linkMethod">scrollToPart</a> command.<span class="nodetails" id="xmethcanScrollToPart"><a class="morelink" onclick="hst('methcanScrollToPart')">More...</a></span> <span class="details" id="methcanScrollToPart">
This returns false if there is no argument Part and there are no selected Parts.
</span><div class="details" id="dmethcanScrollToPart"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#scrollToPart" class="linkMethod">scrollToPart</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Part.html" class="linkConstructor">Part</a>=}</span> <b>part</b>
</dt>
<dd>This defaults to the first selected Part of <a href="../symbols/Diagram.html#selection" class="linkProperty">Diagram.selection</a></dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true if <a href="../symbols/Diagram.html#allowHorizontalScroll" class="linkProperty">Diagram.allowHorizontalScroll</a> and <a href="../symbols/Diagram.html#allowVerticalScroll" class="linkProperty">Diagram.allowVerticalScroll</a> are true.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canSelectAll">
<td class="name">
<div class="name">
canSelectAll()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#selectAll" class="linkMethod">selectAll</a> command.<span class="nodetails" id="xmethcanSelectAll"><a class="morelink" onclick="hst('methcanSelectAll')">More...</a></span> <span class="details" id="methcanSelectAll">
</span><div class="details" id="dmethcanSelectAll"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#selectAll" class="linkMethod">selectAll</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true if <a href="../symbols/Diagram.html#allowSelect" class="linkProperty">Diagram.allowSelect</a> is true.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canShowContextMenu">
<td class="name">
<div class="name">
canShowContextMenu(obj)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#showContextMenu" class="linkMethod">showContextMenu</a> command.<span class="nodetails" id="xmethcanShowContextMenu"><a class="morelink" onclick="hst('methcanShowContextMenu')">More...</a></span> <span class="details" id="methcanShowContextMenu">
</span><div class="details" id="dmethcanShowContextMenu"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#showContextMenu" class="linkMethod">showContextMenu</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>|<a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a>=}</span> <b>obj</b>
</dt>
<dd>a GraphObject or Diagram with a contextMenu defined.
If none is given, this method will use the first selected object, or else the Diagram.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="canStopCommand">
<td class="name">
<div class="name">
canStopCommand()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether the user may stop the current tool.<span class="nodetails" id="xmethcanStopCommand"><a class="morelink" onclick="hst('methcanStopCommand')">More...</a></span> <span class="details" id="methcanStopCommand">
This just returns true.
</span><div class="details" id="dmethcanStopCommand"><p>
This method may be overridden, but probably should not be overridden.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#stopCommand" class="linkMethod">stopCommand</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> true.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canUndo">
<td class="name">
<div class="name">
canUndo()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#undo" class="linkMethod">undo</a> command.<span class="nodetails" id="xmethcanUndo"><a class="morelink" onclick="hst('methcanUndo')">More...</a></span> <span class="details" id="methcanUndo">
</span><div class="details" id="dmethcanUndo"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#undo" class="linkMethod">undo</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true:
if the diagram is not <a href="../symbols/Diagram.html#isReadOnly" class="linkProperty">Diagram.isReadOnly</a>,
if <a href="../symbols/Diagram.html#allowUndo" class="linkProperty">Diagram.allowUndo</a> is true, and
if the <a href="../symbols/UndoManager.html#canUndo" class="linkMethod">UndoManager.canUndo</a> predicate returns true.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canUngroupSelection">
<td class="name">
<div class="name">
canUngroupSelection(group)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#ungroupSelection" class="linkMethod">ungroupSelection</a> command.<span class="nodetails" id="xmethcanUngroupSelection"><a class="morelink" onclick="hst('methcanUngroupSelection')">More...</a></span> <span class="details" id="methcanUngroupSelection">
</span><div class="details" id="dmethcanUngroupSelection"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#ungroupSelection" class="linkMethod">ungroupSelection</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Group.html" class="linkConstructor">Group</a>=}</span> <b>group</b>
</dt>
<dd>if supplied, ignore the selection and consider ungrouping this particular Group.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true:
if the diagram is not <a href="../symbols/Diagram.html#isReadOnly" class="linkProperty">Diagram.isReadOnly</a>,
if <a href="../symbols/Diagram.html#allowDelete" class="linkProperty">Diagram.allowDelete</a> is true,
if <a href="../symbols/Diagram.html#allowUngroup" class="linkProperty">Diagram.allowUngroup</a> is true,
if <a href="../symbols/Diagram.html#model" class="linkProperty">Diagram.model</a> is a <a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a>, and
if there are any selected <a href="../symbols/Group.html" class="linkConstructor">Group</a>s that are <a href="../symbols/Group.html#ungroupable" class="linkProperty">Group.ungroupable</a>.</dt>
</dl>
</div>
</td>
</tr>
<tr id="canZoomToFit">
<td class="name">
<div class="name">
canZoomToFit()
</div>
<div class="attributes">
<span class="light">{boolean}</span>
<span class="since" title="since">1.1</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate controls whether or not the user can invoke the <a href="../symbols/CommandHandler.html#zoomToFit" class="linkMethod">zoomToFit</a> command.<span class="nodetails" id="xmethcanZoomToFit"><a class="morelink" onclick="hst('methcanZoomToFit')">More...</a></span> <span class="details" id="methcanZoomToFit">
</span><div class="details" id="dmethcanZoomToFit"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
This method must not have any side-effects.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#zoomToFit" class="linkMethod">zoomToFit</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> This returns true if <a href="../symbols/Diagram.html#allowZoom" class="linkProperty">Diagram.allowZoom</a> is true.</dt>
</dl>
</div>
</td>
</tr>
<tr id="collapseSubGraph">
<td class="name">
<div class="name">
collapseSubGraph(group)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command collapses all expanded selected <a href="../symbols/Group.html" class="linkConstructor">Group</a>s.<span class="nodetails" id="xmethcollapseSubGraph"><a class="morelink" onclick="hst('methcollapseSubGraph')">More...</a></span> <span class="details" id="methcollapseSubGraph">
This operation is performed within a "Collapse SubGraph" transaction.
Just before the end of the transaction this raises the "SubGraphCollapsed" <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a>,
with a collection of collapsed <a href="../symbols/Group.html" class="linkConstructor">Group</a>s as the subject.
This currently has no default keyboard shortcut.
</span><div class="details" id="dmethcollapseSubGraph"><p>
This calls <a href="../symbols/Group.html#collapseSubGraph" class="linkMethod">Group.collapseSubGraph</a> to perform the collapse, which will set <a href="../symbols/Group.html#isSubGraphExpanded" class="linkProperty">Group.isSubGraphExpanded</a> to false.
You may want to save the collapsed/expanded state to the model by using a TwoWay <a href="../symbols/Binding.html" class="linkConstructor">Binding</a> on the "isSubGraphExpanded" property of your Groups,
and perhaps also on the <a href="../symbols/Group.html#wasSubGraphExpanded" class="linkProperty">Group.wasSubGraphExpanded</a> property.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canCollapseSubGraph" class="linkMethod">canCollapseSubGraph</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Group.html" class="linkConstructor">Group</a>=}</span> <b>group</b>
</dt>
<dd>if supplied, ignore the selection and collapse this particular Group.</dd>
</dl>
</div>
</td>
</tr>
<tr id="collapseTree">
<td class="name">
<div class="name">
collapseTree(node)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command collapses all expanded selected <a href="../symbols/Node.html" class="linkConstructor">Node</a>s.<span class="nodetails" id="xmethcollapseTree"><a class="morelink" onclick="hst('methcollapseTree')">More...</a></span> <span class="details" id="methcollapseTree">
This operation is performed within a "Collapse Tree" transaction.
Just before the end of the transaction this raises the "TreeCollapsed" <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a>,
with a collection of collapsed <a href="../symbols/Node.html" class="linkConstructor">Node</a>s as the subject.
This currently has no default keyboard shortcut.
</span><div class="details" id="dmethcollapseTree"><p>
This calls <a href="../symbols/Node.html#collapseTree" class="linkMethod">Node.collapseTree</a> to perform the collapse, which will set <a href="../symbols/Node.html#isTreeExpanded" class="linkProperty">Node.isTreeExpanded</a> to false.
You may want to save the collapsed/expanded state to the model by using a TwoWay <a href="../symbols/Binding.html" class="linkConstructor">Binding</a> on the "isTreeExpanded" property of your Nodes,
and perhaps also on the <a href="../symbols/Node.html#wasTreeExpanded" class="linkProperty">Node.wasTreeExpanded</a> property.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canCollapseTree" class="linkMethod">canCollapseTree</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>=}</span> <b>node</b>
</dt>
<dd>if supplied, ignore the selection and collapse this particular Node subtree.</dd>
</dl>
</div>
</td>
</tr>
<tr id="copySelection">
<td class="name">
<div class="name">
copySelection()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command copies the currently selected parts, <a href="../symbols/Diagram.html#selection" class="linkProperty">Diagram.selection</a>, from the <a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a> into the clipboard.<span class="nodetails" id="xmethcopySelection"><a class="morelink" onclick="hst('methcopySelection')">More...</a></span> <span class="details" id="methcopySelection">
This is normally invoked by the <code>Ctrl-C</code> keyboard shortcut.
</span><div class="details" id="dmethcopySelection"><p>
This makes a copy of the current selection by calling <a href="../symbols/CommandHandler.html#copyToClipboard" class="linkMethod">copyToClipboard</a>.
This also raises the "ClipboardChanged" diagram event.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canCopySelection" class="linkMethod">canCopySelection</a></li>
</ul></div>
</div>
</td>
</tr>
<tr id="copyToClipboard">
<td class="name">
<div class="name">
copyToClipboard(coll)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>Make a copy of the given collection of <a href="../symbols/Part.html" class="linkConstructor">Part</a>s
and stores it in a static variable acting as the clipboard.<span class="nodetails" id="xmethcopyToClipboard"><a class="morelink" onclick="hst('methcopyToClipboard')">More...</a></span> <span class="details" id="methcopyToClipboard">
</span><div class="details" id="dmethcopyToClipboard"><p>
The clipboard is initially null.
It can hold a collection of copied <a href="../symbols/Part.html" class="linkConstructor">Part</a>s.
It also remembers the <a href="../symbols/Model.html#dataFormat" class="linkProperty">Model.dataFormat</a> of the diagram
from which the parts were copied.
<p>
This calls <a href="../symbols/Diagram.html#copyParts" class="linkMethod">Diagram.copyParts</a> in order to make a copy of the Parts for the clipboard.
The values of <a href="../symbols/CommandHandler.html#copiesParentKey" class="linkProperty">copiesParentKey</a> and <a href="../symbols/CommandHandler.html#copiesGroupKey" class="linkProperty">copiesGroupKey</a> affect whether
a copied node data remembers its tree parent node (if in a <a href="../symbols/TreeModel.html" class="linkConstructor">TreeModel</a>) or
its containing group (if in a <a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a>).
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#pasteFromClipboard" class="linkMethod">pasteFromClipboard</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{Iterable.<Part>}</span> <b>coll</b>
</dt>
<dd>A collection of <a href="../symbols/Part.html" class="linkConstructor">Part</a>s.
If the value is null, the clipboard is cleared of all data.</dd>
</dl>
</div>
</td>
</tr>
<tr id="cutSelection">
<td class="name">
<div class="name">
cutSelection()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command executes a <a href="../symbols/CommandHandler.html#copySelection" class="linkMethod">copySelection</a> followed by a <a href="../symbols/CommandHandler.html#deleteSelection" class="linkMethod">deleteSelection</a>.<span class="nodetails" id="xmethcutSelection"><a class="morelink" onclick="hst('methcutSelection')">More...</a></span> <span class="details" id="methcutSelection">
This is normally invoked by the <code>Ctrl-X</code> keyboard shortcut.
</span><div class="details" id="dmethcutSelection"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canCutSelection" class="linkMethod">canCutSelection</a></li>
</ul></div>
</div>
</td>
</tr>
<tr id="decreaseZoom">
<td class="name">
<div class="name">
decreaseZoom(factor)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command decreases the <a href="../symbols/Diagram.html#scale" class="linkProperty">Diagram.scale</a> by a given factor.<span class="nodetails" id="xmethdecreaseZoom"><a class="morelink" onclick="hst('methdecreaseZoom')">More...</a></span> <span class="details" id="methdecreaseZoom">
This is normally invoked by the <code>Ctrl--</code> and <code>Keypad--</code> keyboard shortcuts.
</span><div class="details" id="dmethdecreaseZoom"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canDecreaseZoom" class="linkMethod">canDecreaseZoom</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{number=}</span> <b>factor</b>
</dt>
<dd>This defaults to 1/<a href="../symbols/CommandHandler.html#zoomFactor" class="linkProperty">zoomFactor</a>. The value should be less than one and greater than zero.</dd>
</dl>
</div>
</td>
</tr>
<tr id="deleteSelection">
<td class="name">
<div class="name">
deleteSelection()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command deletes the currently selected parts from the diagram.<span class="nodetails" id="xmethdeleteSelection"><a class="morelink" onclick="hst('methdeleteSelection')">More...</a></span> <span class="details" id="methdeleteSelection">
This is normally invoked by the <code>Del</code> keyboard shortcut.
</span><div class="details" id="dmethdeleteSelection"><p>
This will first raise the "SelectionDeleting" <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a>,
then start a "Delete" transaction, call <a href="../symbols/Diagram.html#removeParts" class="linkMethod">Diagram.removeParts</a>,
raise the "SelectionDeleted" diagram event, and finally commit the transaction.
<p>
Because this command changes the selection,
this method also raises the "ChangingSelection" and "ChangedSelection" diagram events.
All changes are performed within a transaction.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canDeleteSelection" class="linkMethod">canDeleteSelection</a></li>
</ul></div>
</div>
</td>
</tr>
<tr id="doKeyDown">
<td class="name">
<div class="name">
doKeyDown()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This is called by tools to handle keyboard commands.<span class="nodetails" id="xmethdoKeyDown"><a class="morelink" onclick="hst('methdoKeyDown')">More...</a></span> <span class="details" id="methdoKeyDown">
For most commands, this calls the "can..." predicate; if that returns true it calls the command method.
If GoJS handles a key-down event as a keyboard command, the underlying event will not bubble.
</span><div class="details" id="dmethdoKeyDown"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.
<p>
There is an example custom CommandHandler in the extensions directory: <a href="../../extensions/DrawCommandHandler.js">DrawCommandHandler.js</a>,
which implements additional behaviors for the arrow keys by overriding this method.
For additional discussion, please read the <a href="../../intro/commands.html">Introduction page on Commands</a>.</div>
</div>
</td>
</tr>
<tr id="doKeyUp">
<td class="name">
<div class="name">
doKeyUp()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This is called by tools to handle keyboard commands.<span class="nodetails" id="xmethdoKeyUp"><a class="morelink" onclick="hst('methdoKeyUp')">More...</a></span> <span class="details" id="methdoKeyUp">
</span><div class="details" id="dmethdoKeyUp"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</div>
</td>
</tr>
<tr id="editTextBlock">
<td class="name">
<div class="name">
editTextBlock(textblock)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command starts in-place editing of a <a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a> in the selected <a href="../symbols/Part.html" class="linkConstructor">Part</a>.<span class="nodetails" id="xmetheditTextBlock"><a class="morelink" onclick="hst('metheditTextBlock')">More...</a></span> <span class="details" id="metheditTextBlock">
This is normally invoked by the <code>F2</code> keyboard shortcut.
</span><div class="details" id="dmetheditTextBlock"><p>
This starts the <a href="../symbols/TextEditingTool.html" class="linkConstructor">TextEditingTool</a> to have the user enter or modify the text string and finally set the <a href="../symbols/TextBlock.html#text" class="linkProperty">TextBlock.text</a>.
You may want to save the new string to the model by using a TwoWay <a href="../symbols/Binding.html" class="linkConstructor">Binding</a> on the "text" property of your TextBlock.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canEditTextBlock" class="linkMethod">canEditTextBlock</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a>=}</span> <b>textblock</b>
</dt>
<dd>the <a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a> to start editing.</dd>
</dl>
</div>
</td>
</tr>
<tr id="expandSubGraph">
<td class="name">
<div class="name">
expandSubGraph(group)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command expands all collapsed selected <a href="../symbols/Group.html" class="linkConstructor">Group</a>s.<span class="nodetails" id="xmethexpandSubGraph"><a class="morelink" onclick="hst('methexpandSubGraph')">More...</a></span> <span class="details" id="methexpandSubGraph">
This operation is performed within an "Expand SubGraph" transaction.
Just before the end of the transaction this raises the "SubGraphExpanded" <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a>,
with a collection of expanded <a href="../symbols/Group.html" class="linkConstructor">Group</a>s as the subject.
This currently has no default keyboard shortcut.
</span><div class="details" id="dmethexpandSubGraph"><p>
This calls <a href="../symbols/Group.html#expandSubGraph" class="linkMethod">Group.expandSubGraph</a> to perform the collapse, which will set <a href="../symbols/Group.html#isSubGraphExpanded" class="linkProperty">Group.isSubGraphExpanded</a> to true.
You may want to save the collapsed/expanded state to the model by using a TwoWay <a href="../symbols/Binding.html" class="linkConstructor">Binding</a> on the "isSubGraphExpanded" property of your Groups,
and perhaps also on the <a href="../symbols/Group.html#wasSubGraphExpanded" class="linkProperty">Group.wasSubGraphExpanded</a> property.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canExpandSubGraph" class="linkMethod">canExpandSubGraph</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Group.html" class="linkConstructor">Group</a>=}</span> <b>group</b>
</dt>
<dd>if supplied, ignore the selection and expand this particular Group.</dd>
</dl>
</div>
</td>
</tr>
<tr id="expandTree">
<td class="name">
<div class="name">
expandTree(node)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command expands all collapsed selected <a href="../symbols/Node.html" class="linkConstructor">Node</a>s.<span class="nodetails" id="xmethexpandTree"><a class="morelink" onclick="hst('methexpandTree')">More...</a></span> <span class="details" id="methexpandTree">
This operation is performed within an "Expand Tree" transaction.
Just before the end of the transaction this raises the "TreeExpanded" <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a>,
with a collection of expanded <a href="../symbols/Node.html" class="linkConstructor">Node</a>s as the subject.
This currently has no default keyboard shortcut.
</span><div class="details" id="dmethexpandTree"><p>
This calls <a href="../symbols/Node.html#expandTree" class="linkMethod">Node.expandTree</a> to perform the expand, which will set <a href="../symbols/Node.html#isTreeExpanded" class="linkProperty">Node.isTreeExpanded</a> to true.
You may want to save the collapsed/expanded state to the model by using a TwoWay <a href="../symbols/Binding.html" class="linkConstructor">Binding</a> on the "isTreeExpanded" property of your Nodes,
and perhaps also on the <a href="../symbols/Node.html#wasTreeExpanded" class="linkProperty">Node.wasTreeExpanded</a> property.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canExpandTree" class="linkMethod">canExpandTree</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Node.html" class="linkConstructor">Node</a>=}</span> <b>node</b>
</dt>
<dd>if supplied, ignore the selection and collapse this particular Node subtree.</dd>
</dl>
</div>
</td>
</tr>
<tr id="followCollapsedPart">
<td class="name">
<div class="name">
followCollapsedPart(part, found)
</div>
<div class="attributes">
<span class="light">{Array}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p><span class="nodetails" id="xmethfollowCollapsedPart"><a class="morelink" onclick="hst('methfollowCollapsedPart')">More...</a></span> <span class="details" id="methfollowCollapsedPart"></span>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Part.html" class="linkConstructor">Part</a>}</span> <b>part</b>
</dt>
<dd></dd>
<dt>
<span class="light fixedFont">{Array}</span> <b>found</b>
</dt>
<dd></dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Array}</span> </dt>
</dl>
</div>
</td>
</tr>
<tr id="groupSelection">
<td class="name">
<div class="name">
groupSelection()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command adds a copy of <a href="../symbols/CommandHandler.html#archetypeGroupData" class="linkProperty">archetypeGroupData</a> to the diagram's model
to create a new <a href="../symbols/Group.html" class="linkConstructor">Group</a> and then adds the selected <a href="../symbols/Part.html" class="linkConstructor">Part</a>s to that new group.<span class="nodetails" id="xmethgroupSelection"><a class="morelink" onclick="hst('methgroupSelection')">More...</a></span> <span class="details" id="methgroupSelection">
This is normally invoked by the <code>Ctrl-G</code> keyboard shortcut.
</span><div class="details" id="dmethgroupSelection"><p>
This creates a new <a href="../symbols/Group.html" class="linkConstructor">Group</a> by adding a copy of the <a href="../symbols/CommandHandler.html#archetypeGroupData" class="linkProperty">archetypeGroupData</a> to the model.
Each of the selected parts for which <a href="../symbols/Part.html#canGroup" class="linkMethod">Part.canGroup</a> is true
and for which <a href="../symbols/CommandHandler.html#isValidMember" class="linkMethod">isValidMember</a> is true
is made a member of that new group.
If all of the selected groupable parts were members of a pre-existing group,
the new group also becomes a member of that pre-existing group,
if <a href="../symbols/CommandHandler.html#isValidMember" class="linkMethod">isValidMember</a> is true for that existing group with the new group.
The new group becomes the only selected part.
This raises the "SelectionGrouped" diagram event.
This method also raises the "ChangingSelection" and "ChangedSelection" diagram events.
All of the changes are performed in a "Group" transaction.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canGroupSelection" class="linkMethod">canGroupSelection</a></li>
</ul></div>
</div>
</td>
</tr>
<tr id="increaseZoom">
<td class="name">
<div class="name">
increaseZoom(factor)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command increases the <a href="../symbols/Diagram.html#scale" class="linkProperty">Diagram.scale</a> by a given factor.<span class="nodetails" id="xmethincreaseZoom"><a class="morelink" onclick="hst('methincreaseZoom')">More...</a></span> <span class="details" id="methincreaseZoom">
This is normally invoked by the <code>Ctrl-+</code> and <code>Keypad-+</code> keyboard shortcuts.
</span><div class="details" id="dmethincreaseZoom"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canIncreaseZoom" class="linkMethod">canIncreaseZoom</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{number=}</span> <b>factor</b>
</dt>
<dd>This defaults to <a href="../symbols/CommandHandler.html#zoomFactor" class="linkProperty">zoomFactor</a>. The value should be greater than one.</dd>
</dl>
</div>
</td>
</tr>
<tr id="isValidMember">
<td class="name">
<div class="name">
isValidMember(group, part)
</div>
<div class="attributes">
<span class="light">{boolean}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This predicate is called to determine whether a Node may be added as a member of a Group.<span class="nodetails" id="xmethisValidMember"><a class="morelink" onclick="hst('methisValidMember')">More...</a></span> <span class="details" id="methisValidMember">
This always checks to make sure no group might become a member of itself, either directly or indirectly.
If the Group has a <a href="../symbols/Group.html#memberValidation" class="linkProperty">Group.memberValidation</a> predicate and if it returns false, this method returns false.
If this CommandHandler has a <a href="../symbols/CommandHandler.html#memberValidation" class="linkProperty">memberValidation</a> predicate and if it returns false, this method returns false.
Otherwise this will return true.
<p class="box">
For a more general discussion of validation, see <a href="../../intro/validation.html">Introduction to Validation</a>.
</span><div class="details" id="dmethisValidMember"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Group.html" class="linkConstructor">Group</a>}</span> <b>group</b>
</dt>
<dd>this may be null if the node is being added as a top-level node.</dd>
<dt>
<span class="light fixedFont">{<a href="../symbols/Part.html" class="linkConstructor">Part</a>}</span> <b>part</b>
</dt>
<dd>a Part, usually a Node, possibly another Group, but not a Link or an Adornment.</dd>
</dl>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{boolean}</span> true if OK to add the node to the group.</dt>
</dl>
</div>
</td>
</tr>
<tr id="pasteFromClipboard">
<td class="name">
<div class="name">
pasteFromClipboard()
</div>
<div class="attributes">
<span class="light">{Set.<Part>}</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>If the clipboard holds a collection of <a href="../symbols/Part.html" class="linkConstructor">Part</a>s,
and if the <a href="../symbols/Model.html#dataFormat" class="linkProperty">Model.dataFormat</a> matches that stored in the clipboard,
this makes a copy of the clipboard's parts and adds the copies to this <a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a>.<span class="nodetails" id="xmethpasteFromClipboard"><a class="morelink" onclick="hst('methpasteFromClipboard')">More...</a></span> <span class="details" id="methpasteFromClipboard">
</span><div class="details" id="dmethpasteFromClipboard"><p>
This calls <a href="../symbols/Diagram.html#copyParts" class="linkMethod">Diagram.copyParts</a> in order to make a copy of the Parts in the clipboard and add them to this diagram.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#copyToClipboard" class="linkMethod">copyToClipboard</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Returns:</dt>
<dt><span class="light fixedFont">{Set.<Part>}</span> a collection of the newly pasted <a href="../symbols/Part.html" class="linkConstructor">Part</a>s,
or an empty Set if there was no data in the clipboard.</dt>
</dl>
</div>
</td>
</tr>
<tr id="pasteSelection">
<td class="name">
<div class="name">
pasteSelection(pos)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command copies the contents of the clipboard into this diagram and makes those new parts the new selection.<span class="nodetails" id="xmethpasteSelection"><a class="morelink" onclick="hst('methpasteSelection')">More...</a></span> <span class="details" id="methpasteSelection">
This is normally invoked by the <code>Ctrl-V</code> keyboard shortcut.
</span><div class="details" id="dmethpasteSelection"><p>
This calls <a href="../symbols/CommandHandler.html#pasteFromClipboard" class="linkMethod">pasteFromClipboard</a> to add copies of <a href="../symbols/Part.html" class="linkConstructor">Part</a>s
into this diagram, and then selects all of the newly created parts.
This also raises the "ClipboardPasted" diagram event.
This method raises the "ChangingSelection" and "ChangedSelection" diagram events.
All of the changes are performed in a transaction.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canPasteSelection" class="linkMethod">canPasteSelection</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Point.html" class="linkConstructor">Point</a>=}</span> <b>pos</b>
</dt>
<dd>Point at which to center the newly pasted parts; if not present the parts are not moved.</dd>
</dl>
</div>
</td>
</tr>
<tr id="redo">
<td class="name">
<div class="name">
redo()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command calls <a href="../symbols/UndoManager.html#redo" class="linkMethod">UndoManager.redo</a>.<span class="nodetails" id="xmethredo"><a class="morelink" onclick="hst('methredo')">More...</a></span> <span class="details" id="methredo">
This is normally invoked by the <code>Ctrl-Y</code> keyboard shortcut.
</span><div class="details" id="dmethredo"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canRedo" class="linkMethod">canRedo</a></li>
</ul></div>
</div>
</td>
</tr>
<tr id="resetZoom">
<td class="name">
<div class="name">
resetZoom(newscale)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command sets the <a href="../symbols/Diagram.html#scale" class="linkProperty">Diagram.scale</a> to a new scale value, by default 1.<span class="nodetails" id="xmethresetZoom"><a class="morelink" onclick="hst('methresetZoom')">More...</a></span> <span class="details" id="methresetZoom">
This is normally invoked by the <code>Ctrl-0</code> keyboard shortcut.
</span><div class="details" id="dmethresetZoom"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canResetZoom" class="linkMethod">canResetZoom</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{number=}</span> <b>newscale</b>
</dt>
<dd>This defaults to <a href="../symbols/CommandHandler.html#defaultScale" class="linkProperty">defaultScale</a>, which is normally 1.0. The value should be greater than zero.</dd>
</dl>
</div>
</td>
</tr>
<tr id="scrollToPart">
<td class="name">
<div class="name">
scrollToPart(part)
</div>
<div class="attributes">
<span class="since" title="since">1.6</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command scrolls the diagram to make a highlighted or selected Part visible in the viewport.<span class="nodetails" id="xmethscrollToPart"><a class="morelink" onclick="hst('methscrollToPart')">More...</a></span> <span class="details" id="methscrollToPart">
Call this command repeatedly to cycle through the <a href="../symbols/Diagram.html#highlighteds" class="linkProperty">Diagram.highlighteds</a> collection,
if there are any Parts in that collection, or else in the <a href="../symbols/Diagram.html#selection" class="linkProperty">Diagram.selection</a> collection,
scrolling to each one in turn by calling <a href="../symbols/Diagram.html#centerRect" class="linkMethod">Diagram.centerRect</a>.
</span><div class="details" id="dmethscrollToPart"><p>
This is normally invoked by the <code>Space</code> keyboard shortcut.
If there is no argument and there is no highlighted or selected Part, this command does nothing.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canScrollToPart" class="linkMethod">canScrollToPart</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Part.html" class="linkConstructor">Part</a>=}</span> <b>part</b>
</dt>
<dd>This defaults to the first highlighted Part of <a href="../symbols/Diagram.html#highlighteds" class="linkProperty">Diagram.highlighteds</a>,
or, if there are no highlighted Parts, the first selected Part.</dd>
</dl>
</div>
</td>
</tr>
<tr id="selectAll">
<td class="name">
<div class="name">
selectAll()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command selects all of the selectable <a href="../symbols/Part.html" class="linkConstructor">Part</a>s in the diagram by setting <a href="../symbols/Part.html#isSelected" class="linkProperty">Part.isSelected</a> to true on each one.<span class="nodetails" id="xmethselectAll"><a class="morelink" onclick="hst('methselectAll')">More...</a></span> <span class="details" id="methselectAll">
This is normally invoked by the <code>Ctrl-A</code> keyboard shortcut.
</span><div class="details" id="dmethselectAll"><p>
This method raises the "ChangingSelection" and "ChangedSelection" diagram events.
This ignores all parts in temporary layers.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canSelectAll" class="linkMethod">canSelectAll</a></li>
</ul></div>
</div>
</td>
</tr>
<tr id="showContextMenu">
<td class="name">
<div class="name">
showContextMenu(obj)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command opens the context menu for a selected Part or given GraphObject, or else for the whole Diagram.<span class="nodetails" id="xmethshowContextMenu"><a class="morelink" onclick="hst('methshowContextMenu')">More...</a></span> <span class="details" id="methshowContextMenu">
This is normally invoked by the <code>Menu</code> keyboard shortcut.
</span><div class="details" id="dmethshowContextMenu"><p>
The given GraphObject must have a <a href="../symbols/GraphObject.html#contextMenu" class="linkProperty">GraphObject.contextMenu</a>
defined in order to show anything.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canShowContextMenu" class="linkMethod">canShowContextMenu</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>|<a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a>=}</span> <b>obj</b>
</dt>
<dd>a GraphObject or Diagram with a contextMenu defined.
If none is given, this method will use the first selected object, or else the Diagram.
The method will simulate a right-button click at the middle of the GraphObject or,
if a Diagram, at the current mouse position if it is in the viewport.</dd>
</dl>
</div>
</td>
</tr>
<tr id="stopCommand">
<td class="name">
<div class="name">
stopCommand()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command cancels the operation of the current tool.<span class="nodetails" id="xmethstopCommand"><a class="morelink" onclick="hst('methstopCommand')">More...</a></span> <span class="details" id="methstopCommand">
This is typically called when the user presses ESCAPE.
</span><div class="details" id="dmethstopCommand"><p>
If the current tool is a <a href="../symbols/ToolManager.html" class="linkConstructor">ToolManager</a>, this clears the diagram's selection.
This then calls <a href="../symbols/Tool.html#doCancel" class="linkMethod">Tool.doCancel</a> on the current tool.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canStopCommand" class="linkMethod">canStopCommand</a></li>
</ul></div>
</div>
</td>
</tr>
<tr id="undo">
<td class="name">
<div class="name">
undo()
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command calls <a href="../symbols/UndoManager.html#undo" class="linkMethod">UndoManager.undo</a>.<span class="nodetails" id="xmethundo"><a class="morelink" onclick="hst('methundo')">More...</a></span> <span class="details" id="methundo">
This is normally invoked by the <code>Ctrl-Z</code> keyboard shortcut.
</span><div class="details" id="dmethundo"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canUndo" class="linkMethod">canUndo</a></li>
</ul></div>
</div>
</td>
</tr>
<tr id="ungroupSelection">
<td class="name">
<div class="name">
ungroupSelection(group)
</div>
<div class="attributes">
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command removes selected groups from the diagram without removing their members from the diagram.<span class="nodetails" id="xmethungroupSelection"><a class="morelink" onclick="hst('methungroupSelection')">More...</a></span> <span class="details" id="methungroupSelection">
This is normally invoked by the <code>Ctrl-Shift-G</code> keyboard shortcut.
</span><div class="details" id="dmethungroupSelection"><p>
For the given group, or if not supplied, each selected <a href="../symbols/Group.html" class="linkConstructor">Group</a> that is <a href="../symbols/Group.html#ungroupable" class="linkProperty">Group.ungroupable</a>,
expand the subgraph and change all of its member parts to be members of the group that the selected group node is in.
(If the selected group is a top-level node, i.e. not a member of any group node, its members become top-level parts too.)
All of those selected groups are deleted.
All of the reparented member parts are selected.
<p>
This raises the "SelectionUngrouped" diagram event.
This method also raises the "ChangingSelection" and "ChangedSelection" diagram events.
All of the changes are performed in an "Ungroup" transaction.
<p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canUngroupSelection" class="linkMethod">canUngroupSelection</a></li>
</ul></div>
<dl class="detailList">
<dt class="heading">Parameters:</dt>
<dt>
<span class="light fixedFont">{<a href="../symbols/Group.html" class="linkConstructor">Group</a>=}</span> <b>group</b>
</dt>
<dd>if supplied, ignore the selection and consider ungrouping this particular Group.</dd>
</dl>
</div>
</td>
</tr>
<tr id="zoomToFit">
<td class="name">
<div class="name">
zoomToFit()
</div>
<div class="attributes">
<span class="since" title="since">1.1</span>
</div>
</td>
<td class="description">
<div class="description">
<!--newp--><p><p>This command changes the <a href="../symbols/Diagram.html#scale" class="linkProperty">Diagram.scale</a> so that the <a href="../symbols/Diagram.html#documentBounds" class="linkProperty">Diagram.documentBounds</a> fits within the viewport.<span class="nodetails" id="xmethzoomToFit"><a class="morelink" onclick="hst('methzoomToFit')">More...</a></span> <span class="details" id="methzoomToFit">
If this command had been called before without any other zooming since then,
the original Diagram scale and position are restored.
This is normally invoked by the <code>Shift-Z</code> keyboard shortcut.
</span><div class="details" id="dmethzoomToFit"><p>
This method may be overridden, but you should consider calling this base method in order to get all of its functionality.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</div>
</p><div class="seealso">See also:
<ul class="seealsolist">
<li><a href="../symbols/CommandHandler.html#canZoomToFit" class="linkMethod">canZoomToFit</a></li>
</ul></div>
</div>
</td>
</tr>
</tbody>
</table>
</div><!-- class="table-responsive">-->
<!-- ============================== events summary ======================== -->
<!-- ============================== fields summary ===================== -->
<!-- ============================== constructor details ==================== -->
</div> <!-- end contentBody -->
</div> <!-- end container-fluid -->
<!-- ============================== footer ================================= -->
<div id="footer" class="fineprint" style="clear:both">
Copyright &copy; 1998-2017 by <a href="https://www.nwoods.com/">Northwoods Software Corporation.</a>
</div>
</body>
</html>