<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxGraphSelectionModel"></a>mxGraphSelectionModel</h1><divclass=CBody><p>Implements the selection model for a graph. Here is a listener that handles all removed selection cells.</p><blockquote><preclass="prettyprint">graph.getSelectionModel().addListener(mxEvent.CHANGE, function(sender, evt)
{
var cells = evt.getProperty('added');
for (var i = 0; i < cells.length; i++)
{
// Handle cells[i]...
}
});</pre></blockquote><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxGraphSelectionModel">mxGraphSelectionModel</a></td><tdclass=SDescription>Implements the selection model for a graph. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraphSelectionModel.Events">Events</a></td><tdclass=SDescription></td></tr><trclass="SEvent SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphSelectionModel.mxEvent.UNDO">mxEvent.UNDO</a></td><tdclass=SDescription>Fires after the selection was changed in <ahref="#mxGraphSelectionModel.changeSelection"class=LFunctionid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">changeSelection</a>. </td></tr><trclass="SEvent SIndent2"><tdclass=SEntry><ahref="#mxGraphSelectionModel.mxEvent.CHANGE">mxEvent.<wbr>CHANGE</a></td><tdclass=SDescription>Fires after the selection changes by executing an <ahref="#mxSelectionChange"class=LClassid=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">mxSelectionChange</a>. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraphSelectionModel.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphSelectionModel.mxGraphSelectionModel"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">mxGraphSelectionModel</a></td><tdclass=SDescription>Constructs a new graph selection model for the given <ahref="mxGraph-js.html#mxGraph"class=LClassid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">mxGraph</a>.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraphSelectionModel.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphSelectionModel.doneResource"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">doneResource</a></td><tdclass=SDescription>Specifies the resource key for the status message after a long operation. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGraphSelectionModel.updatingSelectionResource"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">updatingSelectionResource</a></td><tdclass=SDescription>Specifies the resource key for the status message while the selection is being updated. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphSelectionModel.graph"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">graph</a></td><tdclass=SDescription>Reference to the enclosing <ahref="mxGraph-js.html#mxGraph"class=LClassid=link8onMouseOver="ShowTip(event, 'tt4', 'link8')"onMouseOut="HideTip('tt4')">mxGraph</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGraphSelectionModel.singleSelection"id=link9onMouseOver="ShowTip(event, 'tt8', 'link9')"onMouseOut="HideTip('tt8')">singleSelection</a></td><tdclass=SDescription>Specifies if only one selected item at a time is allowed. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraphSelectionModel.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraphSelectionModel.isSingleSelection"id=link10onMouseOver="ShowTip(event, 'tt9', 'link10')"onMouseOut="HideTip('tt9')">isSingleSelection</a></td><tdclass=SDescription>Returns <ahref="#mxGraphSelectionModel.singleSelection"class=LVariableid=link11onMouseOver="ShowTip(event, 'tt8', 'link11')"onMouseOut="HideTip('tt8')">singleSelection</a> as a boolean.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxGraphSelectionModel.setSingleSelection"id=link12onMouseOver="ShowTip(event, 'tt10', 'link12')"onMouseOut="HideTip('tt10')">setSingleSelection</a></td><tdclass=SDescription>Sets the <a
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.mxEvent.UNDO"></a>mxEvent.UNDO</h3><divclass=CBody><p>Fires after the selection was changed in <ahref="#mxGraphSelectionModel.changeSelection"class=LFunctionid=link38onMouseOver="ShowTip(event, 'tt1', 'link38')"onMouseOut="HideTip('tt1')">changeSelection</a>. The <code>edit</code> property contains the <ahref="../util/mxUndoableEdit-js.html#mxUndoableEdit"class=LClassid=link39onMouseOver="ShowTip(event, 'tt25', 'link39')"onMouseOut="HideTip('tt25')">mxUndoableEdit</a> which contains the <ahref="#mxSelectionChange"class=LClassid=link40onMouseOver="ShowTip(event, 'tt2', 'link40')"onMouseOut="HideTip('tt2')">mxSelectionChange</a>.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.mxEvent.CHANGE"></a>mxEvent.<wbr>CHANGE</h3><divclass=CBody><p>Fires after the selection changes by executing an <ahref="#mxSelectionChange"class=LClassid=link41onMouseOver="ShowTip(event, 'tt2', 'link41')"onMouseOut="HideTip('tt2')">mxSelectionChange</a>. The <code>added</code> and <code>removed</code> properties contain arrays of cells that have been added to or removed from the selection, respectively.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.mxGraphSelectionModel"></a>mxGraphSelectionModel</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxGraphSelectionModel(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new graph selection model for the given <ahref="mxGraph-js.html#mxGraph"class=LClassid=link42onMouseOver="ShowTip(event, 'tt4', 'link42')"onMouseOut="HideTip('tt4')">mxGraph</a>.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>graph</td><tdclass=CDLDescription>Reference to the enclosing <ahref="mxGraph-js.html#mxGraph"class=LClassid=link43onMouseOver="ShowTip(event, 'tt4', 'link43')"onMouseOut="HideTip('tt4')">mxGraph</a>.</td></tr></table></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.doneResource"></a>doneResource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.doneResource</td></tr></table></blockquote><p>Specifies the resource key for the status message after a long operation. If the resource for this key does not exist then the value is used as the status message. Default is ‘done’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.updatingSelectionResource"></a>updatingSelectionResource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.updatingSelectionResource</td></tr></table></blockquote><p>Specifies the resource key for the status message while the selection is being updated. If the resource for this key does not exist then the value is used as the status message. Default is ‘updatingSelection’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.graph"></a>graph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.graph</td></tr></table></blockquote><p>Reference to the enclosing <ahref="mxGraph-js.html#mxGraph"class=LClassid=link44onMouseOver="ShowTip(event, 'tt4', 'link44')"onMouseOut="HideTip('tt4')">mxGraph</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.singleSelection"></a>singleSelection</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.singleSelection</td></tr></table></blockquote><p>Specifies if only one selected item at a time is allowed. Default is false.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.isSingleSelection"></a>isSingleSelection</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.isSingleSelection = function()</td></tr></table></blockquote><p>Returns <ahref="#mxGraphSelectionModel.singleSelection"class=LVariableid=link45onMouseOver="ShowTip(event, 'tt8', 'link45')"onMouseOut="HideTip('tt8')">singleSelection</a> as a boolean.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.setSingleSelection"></a>setSingleSelection</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.setSingleSelection = function(</td><tdclass=PParameternowrap>singleSelection</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the <ahref="#mxGraphSelectionModel.singleSelection"class=LVariableid=link46onMouseOver="ShowTip(event, 'tt8', 'link46')"onMouseOut="HideTip('tt8')">singleSelection</a> flag.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>singleSelection</td><tdclass=CDLDescription>Boolean that specifies the new value for <ahref="#mxGraphSelectionModel.singleSelection"class=LVariableid=link47onMouseOver="ShowTip(event, 'tt8', 'link47')"onMouseOut="HideTip('tt8')">singleSelection</a>.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.isSelected"></a>isSelected</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.isSelected = function(</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link48onMouseOver="ShowTip(event, 'tt12', 'link48')"onMouseOut="HideTip('tt12')">mxCell</a> is selected.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.isEmpty"></a>isEmpty</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.isEmpty = function()</td></tr></table></blockquote><p>Returns true if no cells are currently selected.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.clear"></a>clear</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.clear = function()</td></tr></table></blockquote><p>Clears the selection and fires a <change> event if the selection was not empty.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.setCell"></a>setCell</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.setCell = function(</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Selects the specified <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link49onMouseOver="ShowTip(event, 'tt12', 'link49')"onMouseOut="HideTip('tt12')">mxCell</a> using <ahref="#mxGraphSelectionModel.setCells"class=LFunctionid=link50onMouseOver="ShowTip(event, 'tt16', 'link50')"onMouseOut="HideTip('tt16')">setCells</a>.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link51onMouseOver="ShowTip(event, 'tt12', 'link51')"onMouseOut="HideTip('tt12')">mxCell</a> to be selected.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.setCells"></a>setCells</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.setCells = function(</td><tdclass=PParameternowrap>cells</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Selects the given array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link52onMouseOver="ShowTip(event, 'tt12', 'link52')"onMouseOut="HideTip('tt12')">mxCells</a> and fires a <change> event.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cells</td><tdclass=CDLDescription>Array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link53onMouseOver="ShowTip(event, 'tt12', 'link53')"onMouseOut="HideTip('tt12')">mxCells</a> to be selected.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.getFirstSelectableCell"></a>getFirstSelectableCell</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.getFirstSelectableCell = function(</td><tdclass=PParameternowrap>cells</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the first selectable cell in the given array of cells.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.addCell"></a>addCell</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.addCell = function(</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the given <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link54onMouseOver="ShowTip(event, 'tt12', 'link54')"onMouseOut="HideTip('tt12')">mxCell</a> to the selection and fires a <select> event.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link55onMouseOver="ShowTip(event, 'tt12', 'link55')"onMouseOut="HideTip('tt12')">mxCell</a> to add to the selection.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.addCells"></a>addCells</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.addCells = function(</td><tdclass=PParameternowrap>cells</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the given array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link56onMouseOver="ShowTip(event, 'tt12', 'link56')"onMouseOut="HideTip('tt12')">mxCells</a> to the selection and fires a <select> event.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cells</td><tdclass=CDLDescription>Array of <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link57onMouseOver="ShowTip(event, 'tt12', 'link57')"onMouseOut="HideTip('tt12')">mxCells</a> to add to the selection.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.removeCell"></a>removeCell</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.removeCell = function(</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Removes the specified <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link58onMouseOver="ShowTip(event, 'tt12', 'link58')"onMouseOut="HideTip('tt12')">mxCell</a> from the selection and fires a <select> event for the remaining cells.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link59onMouseOver="ShowTip(event, 'tt12', 'link59')"onMouseOut="HideTip('tt12')">mxCell</a> to remove from the selection.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.changeSelection"></a>changeSelection</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.changeSelection = function(</td><tdclass=PParameternowrap>added,</td></tr><tr><td></td><tdclass=PParameternowrap>removed</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to add the specified <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link60onMouseOver="ShowTip(event, 'tt12', 'link60')"onMouseOut="HideTip('tt12')">mxCell</a> to the selection. No event is fired in this implementation.</p><h4class=CHeading>Paramters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link61onMouseOver="ShowTip(event, 'tt12', 'link61')"onMouseOut="HideTip('tt12')">mxCell</a> to add to the selection.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.cellAdded"></a>cellAdded</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.cellAdded = function(</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to add the specified <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link62onMouseOver="ShowTip(event, 'tt12', 'link62')"onMouseOut="HideTip('tt12')">mxCell</a> to the selection. No event is fired in this implementation.</p><h4class=CHeading>Paramters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link63onMouseOver="ShowTip(event, 'tt12', 'link63')"onMouseOut="HideTip('tt12')">mxCell</a> to add to the selection.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraphSelectionModel.cellRemoved"></a>cellRemoved</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.cellRemoved = function(</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Inner callback to remove the specified <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link64onMouseOver="ShowTip(event, 'tt12', 'link64')"onMouseOut="HideTip('tt12')">mxCell</a> from the selection. No event is fired in this implementation.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link65onMouseOver="ShowTip(event, 'tt12', 'link65')"onMouseOut="HideTip('tt12')">mxCell</a> to remove from the selection.</td></tr></table></div></div></div>
<divclass="CClass"><divclass=CTopic><h2class=CTitle><aname="mxSelectionChange"></a>mxSelectionChange</h2><divclass=CBody><p>Action to change the current root in a view.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SGroup"><tdclass=SEntry><ahref="#mxSelectionChange.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#mxSelectionChange.mxCurrentRootChange">mxCurrentRootChange</a></td><tdclass=SDescription>Constructs a change of the current root in the given view.</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#mxSelectionChange.execute"id=link66onMouseOver="ShowTip(event, 'tt24', 'link66')"onMouseOut="HideTip('tt24')">execute</a></td><tdclass=SDescription>Changes the current root of the view.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSelectionChange.mxCurrentRootChange"></a>mxCurrentRootChange</h3><divclass=CBody><p>Constructs a change of the current root in the given view.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSelectionChange.execute"></a>execute</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSelectionChange.prototype.execute = function()</td></tr></table></blockquote><p>Changes the current root of the view.</p></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.changeSelection = function(</td><tdclass=PParameternowrap>added,</td></tr><tr><td></td><tdclass=PParameternowrap>removed</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Inner callback to add the specified mxCell to the selection. </div></div><divclass=CToolTipid="tt2"><divclass=CClass>Action to change the current root in a view.</div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxGraphSelectionModel(</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new graph selection model for the given mxGraph.</div></div><divclass=CToolTipid="tt4"><divclass=CClass>Extends mxEventSource to implement a graph component for the browser. </div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.doneResource</td></tr></table></blockquote>Specifies the resource key for the status message after a long operation. </div></div><divclass=CToolTipid="tt6"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.updatingSelectionResource</td></tr></table></blockquote>Specifies the resource key for the status message while the selection is being updated. </div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.graph</td></tr></table></blockquote>Reference to the enclosing mxGraph.</div></div><divclass=CToolTipid="tt8"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.singleSelection</td></tr></table></blockquote>Specifies if only one selected item at a time is allowed. </div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.isSingleSelection = function()</td></tr></table></blockquote>Returns singleSelection as a boolean.</div></div><divclass=CToolTipid="tt10"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.setSingleSelection = function(</td><tdclass=PParameternowrap>singleSelection</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Sets the singleSelection flag.</div></div><divclass=CToolTipid="tt11"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxGraphSelectionModel.prototype.isSelected = function(</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns true if the given mxCell is selected.</div></div><divclass=CToolTipid="tt12"><divclass=CClass>Cells are the elements of the graph model. </div></div><divclass=CToolTipid="tt13"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxGraphSelectionModel.prototype.isEmpty = function()</td></tr></table></blockquote>Returns true if no cells are currently selected.</div></div><divclass=CToolTipid="tt14"><divclass=CFunction><blockquot