maxGraph/docs/js-api/files/editor/mxEditor-js.html

406 lines
217 KiB
HTML
Raw Normal View History

2012-05-21 20:32:26 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><title>mxEditor</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version 1.5 -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
2013-07-12 07:09:46 +00:00
<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="mxEditor"></a>mxEditor</h1><div class=CBody><p>Extends <a href="../util/mxEventSource-js.html#mxEventSource" class=LClass id=link182 onMouseOver="ShowTip(event, 'tt1', 'link182')" onMouseOut="HideTip('tt1')">mxEventSource</a> to implement a application wrapper for a graph that adds <a href="#mxEditor.actions" class=LVariable id=link183 onMouseOver="ShowTip(event, 'tt2', 'link183')" onMouseOut="HideTip('tt2')">actions</a>, I/O using <a href="../io/mxCodec-js.html#mxCodec" class=LClass id=link184 onMouseOver="ShowTip(event, 'tt3', 'link184')" onMouseOut="HideTip('tt3')">mxCodec</a>, auto-layout using <a href="../view/mxLayoutManager-js.html#mxLayoutManager" class=LClass >mxLayoutManager</a>, command history using <a href="#mxEditor.undoManager" class=LVariable id=link185 onMouseOver="ShowTip(event, 'tt4', 'link185')" onMouseOut="HideTip('tt4')">undoManager</a>, and standard dialogs and widgets, eg. properties, help, outline, toolbar, and popupmenu.&nbsp; It also adds <a href="#mxEditor.templates" class=LVariable id=link186 onMouseOver="ShowTip(event, 'tt38', 'link186')" onMouseOut="HideTip('tt38')">templates</a> to be used as cells in toolbars, auto-validation using the &lt;validation&gt; flag, attribute cycling using <a href="#mxEditor.cycleAttributeValues" class=LVariable id=link187 onMouseOver="ShowTip(event, 'tt56', 'link187')" onMouseOut="HideTip('tt56')">cycleAttributeValues</a>, higher-level events such as &lt;root&gt;, and backend integration using <a href="#mxEditor.urlPost" class=LVariable id=link188 onMouseOver="ShowTip(event, 'tt46', 'link188')" onMouseOut="HideTip('tt46')">urlPost</a>, <a href="#mxEditor.urlImage" class=LVariable id=link189 onMouseOver="ShowTip(event, 'tt47', 'link189')" onMouseOut="HideTip('tt47')">urlImage</a>, <a href="#mxEditor.urlInit" class=LVariable id=link190 onMouseOver="ShowTip(event, 'tt48', 'link190')" onMouseOut="HideTip('tt48')">urlInit</a>, <a href="#mxEditor.urlNotify" class=LVariable id=link191 onMouseOver="ShowTip(event, 'tt49', 'link191')" onMouseOut="HideTip('tt49')">urlNotify</a> and <a href="#mxEditor.urlPoll" class=LVariable id=link192 onMouseOver="ShowTip(event, 'tt50', 'link192')" onMouseOut="HideTip('tt50')">urlPoll</a>.</p><h4 class=CHeading>Actions</h4><p>Actions are functions stored in the <a href="#mxEditor.actions" class=LVariable id=link193 onMouseOver="ShowTip(event, 'tt2', 'link193')" onMouseOut="HideTip('tt2')">actions</a> array under their names.&nbsp; The functions take the <a href="#mxEditor.mxEditor" class=LFunction id=link194 onMouseOver="ShowTip(event, 'tt9', 'link194')" onMouseOut="HideTip('tt9')">mxEditor</a> as the first, and an optional <a href="../model/mxCell-js.html#mxCell" class=LClass id=link195 onMouseOver="ShowTip(event, 'tt130', 'link195')" onMouseOut="HideTip('tt130')">mxCell</a> as the second argument and are invoked using <a href="#mxEditor.execute" class=LFunction id=link196 onMouseOver="ShowTip(event, 'tt82', 'link196')" onMouseOut="HideTip('tt82')">execute</a>.&nbsp; Any additional arguments passed to execute are passed on to the action as-is.</p><p>A list of built-in actions is available in the <a href="#mxEditor.addActions" class=LFunction id=link197 onMouseOver="ShowTip(event, 'tt76', 'link197')" onMouseOut="HideTip('tt76')">addActions</a> description.</p><h4 class=CHeading>Read/write Diagrams</h4><p>To read a diagram from an XML string, for example from a textfield within the page, the following code is used:</p><blockquote><pre class="prettyprint">var doc = mxUtils.parseXML(xmlString);
2012-05-21 20:32:26 +00:00
var node = doc.documentElement;
2013-07-12 07:09:46 +00:00
editor.readGraphModel(node);</pre></blockquote><p>For reading a diagram from a remote location, use the <a href="#mxEditor.open" class=LFunction id=link198 onMouseOver="ShowTip(event, 'tt5', 'link198')" onMouseOut="HideTip('tt5')">open</a> method.</p><p>To save diagrams in XML on a server, you can set the <a href="#mxEditor.urlPost" class=LVariable id=link199 onMouseOver="ShowTip(event, 'tt46', 'link199')" onMouseOut="HideTip('tt46')">urlPost</a> variable.&nbsp; This variable will be used in <a href="#mxEditor.getUrlPost" class=LFunction id=link200 onMouseOver="ShowTip(event, 'tt113', 'link200')" onMouseOut="HideTip('tt113')">getUrlPost</a> to construct a URL for the post request that is issued in the <a href="#mxEditor.save" class=LFunction id=link201 onMouseOver="ShowTip(event, 'tt6', 'link201')" onMouseOut="HideTip('tt6')">save</a> method.&nbsp; The post request contains the XML representation of the diagram as returned by <a href="#mxEditor.writeGraphModel" class=LFunction id=link202 onMouseOver="ShowTip(event, 'tt112', 'link202')" onMouseOut="HideTip('tt112')">writeGraphModel</a> in the xml parameter.</p><p>On the server side, the post request is processed using standard technologies such as Java Servlets, CGI, .NET or ASP.</p><p>Here are some examples of processing a post request in various languages.</p><ul><li>Java: URLDecoder.decode(request.getParameter(&ldquo;xml&rdquo;), &ldquo;UTF-8&rdquo;).replace(&ldquo;\n&rdquo;, &ldquo;&amp;#xa;&rdquo;)</li></ul><p>Note that the linefeeds should only be replaced if the XML is processed in Java, for example when creating an image, but not if the XML is passed back to the client-side.</p><ul><li>.NET: HttpUtility.UrlDecode(context.Request.Params[&ldquo;xml&rdquo;])</li><li>PHP: urldecode($_POST[&ldquo;xml&rdquo;])</li></ul><h4 class=CHeading>Creating images</h4><p>A backend (Java, PHP or C#) is required for creating images.&nbsp; The distribution contains an example for each backend (ImageHandler.java, ImageHandler.cs and graph.php).&nbsp; More information about using a backend to create images can be found in the readme.html files.&nbsp; Note that the preview is implemented using VML/SVG in the browser and does not require a backend.&nbsp; The backend is only required to creates images (bitmaps).</p><h4 class=CHeading>Special characters</h4><p>Note There are five characters that should always appear in XML content as escapes, so that they do not interact with the syntax of the markup.&nbsp; These are part of the language for all documents based on XML and for HTML.</p><ul><li>&amp;lt; (&lt;)</li><li>&amp;gt; (&gt;)</li><li>&amp;amp; (&amp;)</li><li>&amp;quot; (&ldquo;)</li><li>&amp;apos; (&lsquo;)</li></ul><p>Although it is part of the XML language, &amp;apos; is not defined in HTML.&nbsp; For this reason the XHTML specification recommends instead the use of &amp;#39; if text may be passed to a HTML user agent.</p><p>If you are having problems with special characters on the server-side then you may want to try the <a href="#mxEditor.escapePostData" class=LVariable id=link203 onMouseOver="ShowTip(event, 'tt45', 'link203')" onMouseOut="HideTip('tt45')">escapePostData</a> flag.</p><p>For converting decimal escape sequences inside strings, a user has provided us with the following function:</p><blockquote><pre class="prettyprint">function html2js(text)
2012-05-21 20:32:26 +00:00
{
var entitySearch = /&amp;#[0-9]+;/;
var entity;
while (entity = entitySearch.exec(text))
{
var charCode = entity[0].substring(2, entity[0].length -1);
text = text.substring(0, entity.index)
+ String.fromCharCode(charCode)
+ text.substring(entity.index + entity[0].length);
}
return text;
}</pre></blockquote><p>Otherwise try using hex escape sequences and the built-in unescape function for converting such strings.</p><h4 class=CHeading>Local Files</h4><p>For saving and opening local files, no standardized method exists that works across all browsers.&nbsp; The recommended way of dealing with local files is to create a backend that streams the XML data back to the browser (echo) as an attachment so that a Save-dialog is displayed on the client-side and the file can be saved to the local disk.</p><p>For example, in PHP the code that does this looks as follows.</p><blockquote><pre class="prettyprint">$xml = stripslashes($_POST[&quot;xml&quot;]);
header(&quot;Content-Disposition: attachment; filename=\&quot;diagram.xml\&quot;&quot;);
2013-07-12 07:09:46 +00:00
echo($xml);</pre></blockquote><p>To open a local file, the file should be uploaded via a form in the browser and then opened from the server in the editor.</p><h4 class=CHeading>Cell Properties</h4><p>The properties displayed in the properties dialog are the attributes and values of the cell&rsquo;s user object, which is an XML node.&nbsp; The XML node is defined in the templates section of the config file.</p><p>The templates are stored in <a href="#mxEditor.templates" class=LVariable id=link204 onMouseOver="ShowTip(event, 'tt38', 'link204')" onMouseOut="HideTip('tt38')">mxEditor.templates</a> and contain cells which are cloned at insertion time to create new vertices by use of drag and drop from the toolbar.&nbsp; Each entry in the toolbar for adding a new vertex must refer to an existing template.</p><p>In the following example, the task node is a business object and only the mxCell node and its mxGeometry child contain graph information:</p><blockquote><pre class="prettyprint">&lt;Task label=&quot;Task&quot; description=&quot;&quot;&gt;
2012-05-21 20:32:26 +00:00
&lt;mxCell vertex=&quot;true&quot;&gt;
&lt;mxGeometry as=&quot;geometry&quot; width=&quot;72&quot; height=&quot;32&quot;/&gt;
&lt;/mxCell&gt;
2013-07-12 07:09:46 +00:00
&lt;/Task&gt;</pre></blockquote><p>The idea is that the XML representation is inverse from the in-memory representation: The outer XML node is the user object and the inner node is the cell.&nbsp; This means the user object of the cell is the Task node with no children for the above example:</p><blockquote><pre class="prettyprint">&lt;Task label=&quot;Task&quot; description=&quot;&quot;/&gt;</pre></blockquote><p>The Task node can have any tag name, attributes and child nodes.&nbsp; The <a href="../io/mxCodec-js.html#mxCodec" class=LClass id=link205 onMouseOver="ShowTip(event, 'tt3', 'link205')" onMouseOut="HideTip('tt3')">mxCodec</a> will use the XML hierarchy as the user object, while removing the &ldquo;known annotations&rdquo;, such as the mxCell node.&nbsp; At save-time the cell data will be &ldquo;merged&rdquo; back into the user object.&nbsp; The user object is only modified via the properties dialog during the lifecycle of the cell.</p><p>In the default implementation of <a href="#mxEditor.createProperties" class=LFunction id=link206 onMouseOver="ShowTip(event, 'tt119', 'link206')" onMouseOut="HideTip('tt119')">createProperties</a>, the user object&rsquo;s attributes are put into a form for editing.&nbsp; Attributes are changed using the <a href="../model/mxGraphModel-js.html#mxCellAttributeChange" class=LClass id=link207 onMouseOver="ShowTip(event, 'tt131', 'link207')" onMouseOut="HideTip('tt131')">mxCellAttributeChange</a> action in the model.&nbsp; The dialog can be replaced by overriding the <a href="#mxEditor.createProperties" class=LFunction id=link208 onMouseOver="ShowTip(event, 'tt119', 'link208')" onMouseOut="HideTip('tt119')">createProperties</a> hook or by replacing the showProperties action in <a href="#mxEditor.actions" class=LVariable id=link209 onMouseOver="ShowTip(event, 'tt2', 'link209')" onMouseOut="HideTip('tt2')">actions</a>.&nbsp; Alternatively, the entry in the config file&rsquo;s popupmenu section can be modified to invoke a different action.</p><p>If you want to displey the properties dialog on a doubleclick, you can set <a href="#mxEditor.dblClickAction" class=LVariable id=link210 onMouseOver="ShowTip(event, 'tt33', 'link210')" onMouseOut="HideTip('tt33')">mxEditor.dblClickAction</a> to showProperties as follows:</p><blockquote><pre class="prettyprint">editor.dblClickAction = 'showProperties';</pre></blockquote><h4 class=CHeading>Popupmenu and Toolbar</h4><p>The toolbar and popupmenu are typically configured using the respective sections in the config file, that is, the popupmenu is defined as follows:</p><blockquote><pre class="prettyprint">&lt;mxEditor&gt;
2012-05-21 20:32:26 +00:00
&lt;mxDefaultPopupMenu as=&quot;popupHandler&quot;&gt;
&lt;add as=&quot;cut&quot; action=&quot;cut&quot; icon=&quot;images/cut.gif&quot;/&gt;
2013-07-12 07:09:46 +00:00
...</pre></blockquote><p>New entries can be added to the toolbar by inserting an add-node into the above configuration.&nbsp; Existing entries may be removed and changed by modifying or removing the respective entries in the configuration.&nbsp; The configuration is read by the <a href="../io/mxDefaultPopupMenuCodec-js.html#mxDefaultPopupMenuCodec" class=LClass id=link211 onMouseOver="ShowTip(event, 'tt132', 'link211')" onMouseOut="HideTip('tt132')">mxDefaultPopupMenuCodec</a>, the format of the configuration is explained in &lt;mxDefaultPopupMenu.decode&gt;.</p><p>The toolbar is defined in the mxDefaultToolbar section.&nbsp; Items can be added and removed in this section.</p><blockquote><pre class="prettyprint">&lt;mxEditor&gt;
2012-05-21 20:32:26 +00:00
&lt;mxDefaultToolbar&gt;
&lt;add as=&quot;save&quot; action=&quot;save&quot; icon=&quot;images/save.gif&quot;/&gt;
&lt;add as=&quot;Swimlane&quot; template=&quot;swimlane&quot; icon=&quot;images/swimlane.gif&quot;/&gt;
2013-07-12 07:09:46 +00:00
...</pre></blockquote><p>The format of the configuration is described in <a href="../io/mxDefaultToolbarCodec-js.html#mxDefaultToolbarCodec.decode" class=LFunction id=link212 onMouseOver="ShowTip(event, 'tt133', 'link212')" onMouseOut="HideTip('tt133')">mxDefaultToolbarCodec.decode</a>.</p><h4 class=CHeading>Ids</h4><p>For the IDs, there is an implicit behaviour in <a href="../io/mxCodec-js.html#mxCodec" class=LClass id=link213 onMouseOver="ShowTip(event, 'tt3', 'link213')" onMouseOut="HideTip('tt3')">mxCodec</a>: It moves the Id from the cell to the user object at encoding time and vice versa at decoding time.&nbsp; For example, if the Task node from above has an id attribute, then the <a href="../model/mxCell-js.html#mxCell.id" class=LVariable id=link214 onMouseOver="ShowTip(event, 'tt134', 'link214')" onMouseOut="HideTip('tt134')">mxCell.id</a> of the corresponding cell will have this value.&nbsp; If there is no Id collision in the model, then the cell may be retrieved using this Id with the <a href="../model/mxGraphModel-js.html#mxGraphModel.getCell" class=LFunction id=link215 onMouseOver="ShowTip(event, 'tt135', 'link215')" onMouseOut="HideTip('tt135')">mxGraphModel.getCell</a> function.&nbsp; If there is a collision, a new Id will be created for the cell using <a href="../model/mxGraphModel-js.html#mxGraphModel.createId" class=LFunction id=link216 onMouseOver="ShowTip(event, 'tt136', 'link216')" onMouseOut="HideTip('tt136')">mxGraphModel.createId</a>.&nbsp; At encoding time, this new Id will replace the value previously stored under the id attribute in the Task node.</p><p>See <a href="../io/mxEditorCodec-js.html#mxEditorCodec" class=LClass id=link217 onMouseOver="ShowTip(event, 'tt137', 'link217')" onMouseOut="HideTip('tt137')">mxEditorCodec</a>, <a href="../io/mxDefaultToolbarCodec-js.html#mxDefaultToolbarCodec" class=LClass id=link218 onMouseOver="ShowTip(event, 'tt138', 'link218')" onMouseOut="HideTip('tt138')">mxDefaultToolbarCodec</a> and <a href="../io/mxDefaultPopupMenuCodec-js.html#mxDefaultPopupMenuCodec" class=LClass id=link219 onMouseOver="ShowTip(event, 'tt132', 'link219')" onMouseOut="HideTip('tt132')">mxDefaultPopupMenuCodec</a> for information about configuring the editor and user interface.</p><h4 class=CHeading>Programmatically inserting cells</h4><p>For inserting a new cell, say, by clicking a button in the document, the following code can be used.&nbsp; This requires an reference to the editor.</p><blockquote><pre class="prettyprint">var userObject = new Object();
2012-05-21 20:32:26 +00:00
var parent = editor.graph.getDefaultParent();
var model = editor.graph.model;
model.beginUpdate();
try
{
editor.graph.insertVertex(parent, null, userObject, 20, 20, 80, 30);
}
finally
{
model.endUpdate();
}</pre></blockquote><p>If a template cell from the config file should be inserted, then a clone of the template can be created as follows.&nbsp; The clone is then inserted using the add function instead of addVertex.</p><blockquote><pre class="prettyprint">var template = editor.templates['task'];
2013-07-12 07:09:46 +00:00
var clone = editor.graph.model.cloneCell(template);</pre></blockquote><h4 class=CHeading>Resources</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>resources/editor</td><td class=CDLDescription>Language resources for mxEditor</td></tr></table><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#mxEditor" >mxEditor</a></td><td class=SDescription>Extends <a href="../util/mxEventSource-js.html#mxEventSource" class=LClass id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">mxEventSource</a> to implement a application wrapper for a graph that adds <a href="#mxEditor.actions" class=LVariable id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">actions</a>, I/O using <a href="../io/mxCodec-js.html#mxCodec" class=LClass id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">mxCodec</a>, auto-layout using <a href="../view/mxLayoutManager-js.html#mxLayoutManager" class=LClass >mxLayoutManager</a>, command history using <a href="#mxEditor.undoManager" class=LVariable id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">undoManager</a>, and standard dialogs and widgets, eg. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#mxEditor.onInit" >onInit</a></td><td class=SDescription>Called from within the constructor. </td></tr><tr class="SCookie SIndent1"><td class=SEntry><a href="#mxgraph=seen" >mxgraph=seen</a></td><td class=SDescription>Set when the editor is started. </td></tr><tr class="SEvent SIndent1 SMarked"><td class=SEntry><a href="#mxEditor.mxEvent.OPEN" >mxEvent.OPEN</a></td><td class=SDescription>Fires after a file was opened in <a href="#mxEditor.open" class=LFunction id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">open</a>. </td></tr><tr class="SEvent SIndent1"><td class=SEntry><a href="#mxEditor.mxEvent.SAVE" >mxEvent.SAVE</a></td><td class=SDescription>Fires after the current file was saved in <a href="#mxEditor.save" class=LFunction id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">save</a>. </td></tr><tr class="SEvent SIndent1 SMarked"><td class=SEntry><a href="#mxEditor.mxEvent.POST" >mxEvent.POST</a></td><td class=SDescription>Fires if a successful response was received in <a href="#mxEditor.postDiagram" class=LFunction id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">postDiagram</a>. </td></tr><tr class="SEvent SIndent1"><td class=SEntry><a href="#mxEditor.mxEvent.ROOT" >mxEvent.ROOT</a></td><td class=SDescription>Fires when the current root has changed, or when the title of the current root has changed. </td></tr><tr class="SEvent SIndent1 SMarked"><td class=SEntry><a href="#mxEditor.mxEvent.SESSION" >mxEvent.<wbr>SESSION</a></td><td class=SDescription>Fires when anything in the session has changed. </td></tr><tr class="SEvent SIndent1"><td class=SEntry><a href="#mxEditor.mxEvent.BEFORE_ADD_VERTEX" >mxEvent.<wbr>BEFORE_ADD_VERTEX</a></td><td class=SDescription>Fires before a vertex is added in <a href="#mxEditor.addVertex" class=LFunction id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">addVertex</a>. </td></tr><tr class="SEvent SIndent1 SMarked"><td class=SEntry><a href="#mxEditor.mxEvent.ADD_VERTEX" >mxEvent.<wbr>ADD_VERTEX</a></td><td class=SDescription>Fires between begin- and endUpdate in <a href="#mxEditor.addVertex" class=LFunction id=link9 onMouseOver="ShowTip(event, 'tt8', 'link9')" onMouseOut="HideTip('tt8')">addVertex</a>. </td></tr><tr class="SEvent SIndent1"><td class=SEntry><a href="#mxEditor.mxEvent.AFTER_ADD_VERTEX" >mxEvent.<wbr>AFTER_ADD_VERTEX</a></td><td class=SDescription>Fires after a vertex was inserted and selected in <a href="#mxEditor.addVertex" class=LFunction id=link10 onMouseOver="ShowTip(event, 'tt8', 'link10')" onMouseOut="HideTip('
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.onInit"></a>onInit</h3><div class=CBody><p>Called from within the constructor.&nbsp; In the callback, &ldquo;this&rdquo; refers to the editor instance.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CCookie"><div class=CTopic><h3 class=CTitle><a name="mxgraph=seen"></a>mxgraph=seen</h3><div class=CBody><p>Set when the editor is started.&nbsp; Never expires.&nbsp; Use <a href="#mxEditor.resetFirstTime" class=LFunction id=link220 onMouseOver="ShowTip(event, 'tt79', 'link220')" onMouseOut="HideTip('tt79')">resetFirstTime</a> to reset this cookie.&nbsp; This cookie only exists if <a href="#mxEditor.onInit" class=LFunction id=link221 onMouseOver="ShowTip(event, 'tt139', 'link221')" onMouseOut="HideTip('tt139')">onInit</a> is implemented.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxEditor.mxEvent.OPEN"></a>mxEvent.OPEN</h3><div class=CBody><p>Fires after a file was opened in <a href="#mxEditor.open" class=LFunction id=link222 onMouseOver="ShowTip(event, 'tt5', 'link222')" onMouseOut="HideTip('tt5')">open</a>.&nbsp; The &lt;code&gt;filename&lt;/code&gt; property contains the filename that was used.&nbsp; The same value is also available in <a href="#mxEditor.filename" class=LVariable id=link223 onMouseOver="ShowTip(event, 'tt43', 'link223')" onMouseOut="HideTip('tt43')">filename</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxEditor.mxEvent.SAVE"></a>mxEvent.SAVE</h3><div class=CBody><p>Fires after the current file was saved in <a href="#mxEditor.save" class=LFunction id=link224 onMouseOver="ShowTip(event, 'tt6', 'link224')" onMouseOut="HideTip('tt6')">save</a>.&nbsp; The &lt;code&gt;url&lt;/code&gt; property contains the URL that was used for saving.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxEditor.mxEvent.POST"></a>mxEvent.POST</h3><div class=CBody><p>Fires if a successful response was received in <a href="#mxEditor.postDiagram" class=LFunction id=link225 onMouseOver="ShowTip(event, 'tt7', 'link225')" onMouseOut="HideTip('tt7')">postDiagram</a>.&nbsp; The &lt;code&gt;request&lt;/code&gt; property contains the <a href="../util/mxXmlRequest-js.html#mxXmlRequest" class=LClass id=link226 onMouseOver="ShowTip(event, 'tt140', 'link226')" onMouseOut="HideTip('tt140')">mxXmlRequest</a>, the &lt;code&gt;url&lt;/code&gt; and &lt;code&gt;data&lt;/code&gt; properties contain the URL and the data that were used in the post request.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxEditor.mxEvent.ROOT"></a>mxEvent.ROOT</h3><div class=CBody><p>Fires when the current root has changed, or when the title of the current root has changed.&nbsp; This event has no properties.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxEditor.mxEvent.SESSION"></a>mxEvent.<wbr>SESSION</h3><div class=CBody><p>Fires when anything in the session has changed.&nbsp; The &lt;code&gt;session&lt;/code&gt; property contains the respective <a href="../util/mxSession-js.html#mxSession" class=LClass id=link227 onMouseOver="ShowTip(event, 'tt26', 'link227')" onMouseOut="HideTip('tt26')">mxSession</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxEditor.mxEvent.BEFORE_ADD_VERTEX"></a>mxEvent.<wbr>BEFORE_ADD_VERTEX</h3><div class=CBody><p>Fires before a vertex is added in <a href="#mxEditor.addVertex" class=LFunction id=link228 onMouseOver="ShowTip(event, 'tt8', 'link228')" onMouseOut="HideTip('tt8')">addVertex</a>.&nbsp; The &lt;code&gt;vertex&lt;/code&gt; property contains the new vertex and the &lt;code&gt;parent&lt;/code&gt; property contains its parent.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxEditor.mxEvent.ADD_VERTEX"></a>mxEvent.<wbr>ADD_VERTEX</h3><div class=CBody><p>Fires between begin- and endUpdate in <a href="#mxEditor.addVertex" class=LFunction id=link229 onMouseOver="ShowTip(event, 'tt8', 'link229')" onMouseOut="HideTip('tt8')">addVertex</a>.&nbsp; The &lt;code&gt;vertex&lt;/code&gt; property contains the vertex that is being inserted.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxEditor.mxEvent.AFTER_ADD_VERTEX"></a>mxEvent.<wbr>AFTER_ADD_VERTEX</h3><div class=CBody><p>Fires after a vertex was inserted and selected in <a href="#mxEditor.addVertex" class=LFunction id=link230 onMouseOver="ShowTip(event, 'tt8', 'link230')" onMouseOut="HideTip('tt8')">addVertex</a>.&nbsp; The &lt;code&gt;vertex&lt;/code&gt; property contains the new vertex.</p><h4 class=CHeading>Example</h4><p>For starting an in-place edit after a new vertex has been added to the graph, the following code can be used.</p><blockquote><pre class="prettyprint">editor.addListener(mxEvent.AFTER_ADD_VERTEX, function(sender, evt)
2012-05-21 20:32:26 +00:00
{
var vertex = evt.getProperty('vertex');
if (editor.graph.isCellEditable(vertex))
{
editor.graph.startEditingAtCell(vertex);
}
});</pre></blockquote></div></div></div>
<div class="CEvent"><div class=CTopic><h3 class=CTitle><a name="mxEditor.mxEvent.ESCAPE"></a>mxEvent.<wbr>ESCAPE</h3><div class=CBody><p>Fires when the escape key is pressed.&nbsp; The &lt;code&gt;event&lt;/code&gt; property contains the key event.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.mxEditor"></a>mxEditor</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxEditor(</td><td class=PParameter nowrap>config</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new editor.&nbsp; This function invokes the <a href="#mxEditor.onInit" class=LFunction id=link231 onMouseOver="ShowTip(event, 'tt139', 'link231')" onMouseOut="HideTip('tt139')">onInit</a> callback upon completion.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">var config = mxUtils.load('config/diagrameditor.xml').getDocumentElement();
2012-05-21 20:32:26 +00:00
var editor = new mxEditor(config);</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>config</td><td class=CDLDescription>Optional XML node that contains the configuration.</td></tr></table></div></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxEditor.Controls_and_Handlers"></a>Controls and Handlers</h3></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.askZoomResource"></a>askZoomResource</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.askZoomResource</td></tr></table></blockquote><p>Specifies the resource key for the zoom dialog.&nbsp; If the resource for this key does not exist then the value is used as the error message.&nbsp; Default is &lsquo;askZoom&rsquo;.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.lastSavedResource"></a>lastSavedResource</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.lastSavedResource</td></tr></table></blockquote><p>Specifies the resource key for the last saved info.&nbsp; If the resource for this key does not exist then the value is used as the error message.&nbsp; Default is &lsquo;lastSaved&rsquo;.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.currentFileResource"></a>currentFileResource</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.currentFileResource</td></tr></table></blockquote><p>Specifies the resource key for the current file info.&nbsp; If the resource for this key does not exist then the value is used as the error message.&nbsp; Default is &lsquo;lastSaved&rsquo;.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.propertiesResource"></a>propertiesResource</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.propertiesResource</td></tr></table></blockquote><p>Specifies the resource key for the properties window title.&nbsp; If the resource for this key does not exist then the value is used as the error message.&nbsp; Default is &lsquo;properties&rsquo;.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.tasksResource"></a>tasksResource</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.tasksResource</td></tr></table></blockquote><p>Specifies the resource key for the tasks window title.&nbsp; If the resource for this key does not exist then the value is used as the error message.&nbsp; Default is &lsquo;tasks&rsquo;.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.helpResource"></a>helpResource</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.helpResource</td></tr></table></blockquote><p>Specifies the resource key for the help window title.&nbsp; If the resource for this key does not exist then the value is used as the error message.&nbsp; Default is &lsquo;help&rsquo;.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.outlineResource"></a>outlineResource</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.outlineResource</td></tr></table></blockquote><p>Specifies the resource key for the outline window title.&nbsp; If the resource for this key does not exist then the value is used as the error message.&nbsp; Default is &lsquo;outline&rsquo;.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.outline"></a>outline</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.outline</td></tr></table></blockquote><p>Reference to the <a href="../util/mxWindow-js.html#mxWindow" class=LClass id=link232 onMouseOver="ShowTip(event, 'tt18', 'link232')" onMouseOut="HideTip('tt18')">mxWindow</a> that contains the outline.&nbsp; The <a href="../view/mxOutline-js.html#mxOutline" class=LClass id=link233 onMouseOver="ShowTip(event, 'tt141', 'link233')" onMouseOut="HideTip('tt141')">mxOutline</a> is stored in outline.outline.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.graph"></a>graph</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.graph</td></tr></table></blockquote><p>Holds a <a href="../view/mxGraph-js.html#mxGraph" class=LClass id=link234 onMouseOver="ShowTip(event, 'tt20', 'link234')" onMouseOut="HideTip('tt20')">mxGraph</a> for displaying the diagram.&nbsp; The graph is created in <a href="#mxEditor.setGraphContainer" class=LFunction id=link235 onMouseOver="ShowTip(event, 'tt22', 'link235')" onMouseOut="HideTip('tt22')">setGraphContainer</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.graphRenderHint"></a>graphRenderHint</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.graphRenderHint</td></tr></table></blockquote><p>Holds the render hint used for creating the graph in <a href="#mxEditor.setGraphContainer" class=LFunction id=link236 onMouseOver="ShowTip(event, 'tt22', 'link236')" onMouseOut="HideTip('tt22')">setGraphContainer</a>.&nbsp; See <a href="../view/mxGraph-js.html#mxGraph" class=LClass id=link237 onMouseOver="ShowTip(event, 'tt20', 'link237')" onMouseOut="HideTip('tt20')">mxGraph</a>.&nbsp; Default is null.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.toolbar"></a>toolbar</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.toolbar</td></tr></table></blockquote><p>Holds a <a href="mxDefaultToolbar-js.html#mxDefaultToolbar" class=LClass id=link238 onMouseOver="ShowTip(event, 'tt24', 'link238')" onMouseOut="HideTip('tt24')">mxDefaultToolbar</a> for displaying the toolbar.&nbsp; The toolbar is created in <a href="#mxEditor.setToolbarContainer" class=LFunction id=link239 onMouseOver="ShowTip(event, 'tt98', 'link239')" onMouseOut="HideTip('tt98')">setToolbarContainer</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.session"></a>session</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.session</td></tr></table></blockquote><p>Holds a <a href="../util/mxSession-js.html#mxSession" class=LClass id=link240 onMouseOver="ShowTip(event, 'tt26', 'link240')" onMouseOut="HideTip('tt26')">mxSession</a> instance associated with this editor.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.status"></a>status</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.status</td></tr></table></blockquote><p>DOM container that holds the statusbar.&nbsp; Default is null.&nbsp; Use <a href="#mxEditor.setStatusContainer" class=LFunction id=link241 onMouseOver="ShowTip(event, 'tt99', 'link241')" onMouseOut="HideTip('tt99')">setStatusContainer</a> to set this value.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.popupHandler"></a>popupHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.popupHandler</td></tr></table></blockquote><p>Holds a <a href="mxDefaultPopupMenu-js.html#mxDefaultPopupMenu" class=LClass id=link242 onMouseOver="ShowTip(event, 'tt29', 'link242')" onMouseOut="HideTip('tt29')">mxDefaultPopupMenu</a> for displaying popupmenus.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.undoManager"></a>undoManager</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.undoManager</td></tr></table></blockquote><p>Holds an <a href="../util/mxUndoManager-js.html#mxUndoManager" class=LClass id=link243 onMouseOver="ShowTip(event, 'tt30', 'link243')" onMouseOut="HideTip('tt30')">mxUndoManager</a> for the command history.</p></div></div></div>
2012-08-26 10:10:08 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.keyHandler"></a>keyHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.keyHandler</td></tr></table></blockquote><p>Holds a <a href="mxDefaultKeyHandler-js.html#mxDefaultKeyHandler" class=LClass id=link244 onMouseOver="ShowTip(event, 'tt32', 'link244')" onMouseOut="HideTip('tt32')">mxDefaultKeyHandler</a> for handling keyboard events.&nbsp; The handler is created in <a href="#mxEditor.setGraphContainer" class=LFunction id=link245 onMouseOver="ShowTip(event, 'tt22', 'link245')" onMouseOut="HideTip('tt22')">setGraphContainer</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxEditor.Actions_and_Options"></a>Actions and Options</h3></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.actions"></a>actions</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.actions</td></tr></table></blockquote><p>Maps from actionnames to actions, which are functions taking the editor and the cell as arguments.&nbsp; Use <a href="#mxEditor.addAction" class=LFunction id=link246 onMouseOver="ShowTip(event, 'tt81', 'link246')" onMouseOut="HideTip('tt81')">addAction</a> to add or replace an action and <a href="#mxEditor.execute" class=LFunction id=link247 onMouseOver="ShowTip(event, 'tt82', 'link247')" onMouseOut="HideTip('tt82')">execute</a> to execute an action by name, passing the cell to be operated upon as the second argument.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.dblClickAction"></a>dblClickAction</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.dblClickAction</td></tr></table></blockquote><p>Specifies the name of the action to be executed when a cell is double clicked.&nbsp; Default is edit.</p><p>To handle a singleclick, use the following code.</p><blockquote><pre class="prettyprint">editor.graph.addListener(mxEvent.CLICK, function(sender, evt)
{
var e = evt.getProperty('event');
var cell = evt.getProperty('cell');
if (cell != null &amp;&amp; !e.isConsumed())
{
// Do something useful with cell...
e.consume();
}
});</pre></blockquote></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.swimlaneRequired"></a>swimlaneRequired</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.swimlaneRequired</td></tr></table></blockquote><p>Specifies if new cells must be inserted into an existing swimlane.&nbsp; Otherwise, cells that are not swimlanes can be inserted as top-level cells.&nbsp; Default is false.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.disableContextMenu"></a>disableContextMenu</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.disableContextMenu</td></tr></table></blockquote><p>Specifies if the context menu should be disabled in the graph container.&nbsp; Default is true.</p></div></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxEditor.Templates"></a>Templates</h3></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.insertFunction"></a>insertFunction</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.insertFunction</td></tr></table></blockquote><p>Specifies the function to be used for inserting new cells into the graph.&nbsp; This is assigned from the <a href="mxDefaultToolbar-js.html#mxDefaultToolbar" class=LClass id=link248 onMouseOver="ShowTip(event, 'tt24', 'link248')" onMouseOut="HideTip('tt24')">mxDefaultToolbar</a> if a vertex-tool is clicked.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.forcedInserting"></a>forcedInserting</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.forcedInserting</td></tr></table></blockquote><p>Specifies if a new cell should be inserted on a single click even using <a href="#mxEditor.insertFunction" class=LVariable id=link249 onMouseOver="ShowTip(event, 'tt36', 'link249')" onMouseOut="HideTip('tt36')">insertFunction</a> if there is a cell under the mousepointer, otherwise the cell under the mousepointer is selected.&nbsp; Default is false.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.templates"></a>templates</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.templates</td></tr></table></blockquote><p>Maps from names to protoype cells to be used in the toolbar for inserting new cells into the diagram.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.defaultEdge"></a>defaultEdge</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.defaultEdge</td></tr></table></blockquote><p>Prototype edge cell that is used for creating new edges.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.defaultEdgeStyle"></a>defaultEdgeStyle</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.defaultEdgeStyle</td></tr></table></blockquote><p>Specifies the edge style to be returned in <a href="#mxEditor.getEdgeStyle" class=LFunction id=link250 onMouseOver="ShowTip(event, 'tt41', 'link250')" onMouseOut="HideTip('tt41')">getEdgeStyle</a>.&nbsp; Default is null.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.defaultGroup"></a>defaultGroup</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.defaultGroup</td></tr></table></blockquote><p>Prototype group cell that is used for creating new groups.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.graphRenderHint"></a>graphRenderHint</h3><div class=CBody><p>Default size for the border of new groups.&nbsp; If null, then then <a href="../view/mxGraph-js.html#mxGraph.gridSize" class=LVariable id=link251 onMouseOver="ShowTip(event, 'tt142', 'link251')" onMouseOut="HideTip('tt142')">mxGraph.gridSize</a> is used.&nbsp; Default is null.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxEditor.Backend_Integration"></a>Backend Integration</h3></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.filename"></a>filename</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.filename</td></tr></table></blockquote><p>Contains the URL of the last opened file as a string.&nbsp; Default is null.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.lineFeed"></a>lineFeed</h3><div class=CBody><p>Character to be used for encoding linefeeds in <a href="#mxEditor.save" class=LFunction id=link252 onMouseOver="ShowTip(event, 'tt6', 'link252')" onMouseOut="HideTip('tt6')">save</a>.&nbsp; Default is &lsquo;&amp;#xa;&rsquo;.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.postParameterName"></a>postParameterName</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.postParameterName</td></tr></table></blockquote><p>Specifies if the name of the post parameter that contains the diagram data in a post request to the server.&nbsp; Default is xml.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.escapePostData"></a>escapePostData</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.escapePostData</td></tr></table></blockquote><p>Specifies if the data in the post request for saving a diagram should be converted using encodeURIComponent.&nbsp; Default is true.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.urlPost"></a>urlPost</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.urlPost</td></tr></table></blockquote><p>Specifies the URL to be used for posting the diagram to a backend in <a href="#mxEditor.save" class=LFunction id=link253 onMouseOver="ShowTip(event, 'tt6', 'link253')" onMouseOut="HideTip('tt6')">save</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.urlImage"></a>urlImage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.urlImage</td></tr></table></blockquote><p>Specifies the URL to be used for creating a bitmap of the graph in the image action.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.urlInit"></a>urlInit</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.urlInit</td></tr></table></blockquote><p>Specifies the URL to be used for initializing the session.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.urlNotify"></a>urlNotify</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.urlNotify</td></tr></table></blockquote><p>Specifies the URL to be used for notifying the backend in the session.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.urlPoll"></a>urlPoll</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.urlPoll</td></tr></table></blockquote><p>Specifies the URL to be used for polling in the session.</p></div></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxEditor.Autolayout"></a>Autolayout</h3></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.horizontalFlow"></a>horizontalFlow</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.horizontalFlow</td></tr></table></blockquote><p>Specifies the direction of the flow in the diagram.&nbsp; This is used in the layout algorithms.&nbsp; Default is false, ie. vertical flow.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.layoutDiagram"></a>layoutDiagram</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.layoutDiagram</td></tr></table></blockquote><p>Specifies if the top-level elements in the diagram should be layed out using a vertical or horizontal stack depending on the setting of <a href="#mxEditor.horizontalFlow" class=LVariable id=link254 onMouseOver="ShowTip(event, 'tt51', 'link254')" onMouseOut="HideTip('tt51')">horizontalFlow</a>.&nbsp; The spacing between the swimlanes is specified by <a href="#mxEditor.swimlaneSpacing" class=LVariable id=link255 onMouseOver="ShowTip(event, 'tt53', 'link255')" onMouseOut="HideTip('tt53')">swimlaneSpacing</a>.&nbsp; Default is false.</p><p>If the top-level elements are swimlanes, then the intra-swimlane layout is activated by the <a href="#mxEditor.layoutSwimlanes" class=LVariable id=link256 onMouseOver="ShowTip(event, 'tt55', 'link256')" onMouseOut="HideTip('tt55')">layoutSwimlanes</a> switch.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.swimlaneSpacing"></a>swimlaneSpacing</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.swimlaneSpacing</td></tr></table></blockquote><p>Specifies the spacing between swimlanes if automatic layout is turned on in <a href="#mxEditor.layoutDiagram" class=LVariable id=link257 onMouseOver="ShowTip(event, 'tt52', 'link257')" onMouseOut="HideTip('tt52')">layoutDiagram</a>.&nbsp; Default is 0.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.maintainSwimlanes"></a>maintainSwimlanes</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.maintainSwimlanes</td></tr></table></blockquote><p>Specifies if the swimlanes should be kept at the same width or height depending on the setting of <a href="#mxEditor.horizontalFlow" class=LVariable id=link258 onMouseOver="ShowTip(event, 'tt51', 'link258')" onMouseOut="HideTip('tt51')">horizontalFlow</a>.&nbsp; Default is false.</p><p>For horizontal flows, all swimlanes have the same height and for vertical flows, all swimlanes have the same width.&nbsp; Furthermore, the swimlanes are automatically &ldquo;stacked&rdquo; if <a href="#mxEditor.layoutDiagram" class=LVariable id=link259 onMouseOver="ShowTip(event, 'tt52', 'link259')" onMouseOut="HideTip('tt52')">layoutDiagram</a> is true.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.layoutSwimlanes"></a>layoutSwimlanes</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.layoutSwimlanes</td></tr></table></blockquote><p>Specifies if the children of swimlanes should be layed out, either vertically or horizontally depending on <a href="#mxEditor.horizontalFlow" class=LVariable id=link260 onMouseOver="ShowTip(event, 'tt51', 'link260')" onMouseOut="HideTip('tt51')">horizontalFlow</a>.&nbsp; Default is false.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxEditor.Attribute_Cycling"></a>Attribute Cycling</h3></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.cycleAttributeValues"></a>cycleAttributeValues</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.cycleAttributeValues</td></tr></table></blockquote><p>Specifies the attribute values to be cycled when inserting new swimlanes.&nbsp; Default is an empty array.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.cycleAttributeIndex"></a>cycleAttributeIndex</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.cycleAttributeIndex</td></tr></table></blockquote><p>Index of the last consumed attribute index.&nbsp; If a new swimlane is inserted, then the <a href="#mxEditor.cycleAttributeValues" class=LVariable id=link261 onMouseOver="ShowTip(event, 'tt56', 'link261')" onMouseOut="HideTip('tt56')">cycleAttributeValues</a> at this index will be used as the value for <a href="#mxEditor.cycleAttributeName" class=LVariable id=link262 onMouseOver="ShowTip(event, 'tt58', 'link262')" onMouseOut="HideTip('tt58')">cycleAttributeName</a>.&nbsp; Default is 0.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.cycleAttributeName"></a>cycleAttributeName</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.cycleAttributeName</td></tr></table></blockquote><p>Name of the attribute to be assigned a <a href="#mxEditor.cycleAttributeValues" class=LVariable id=link263 onMouseOver="ShowTip(event, 'tt56', 'link263')" onMouseOut="HideTip('tt56')">cycleAttributeValues</a> when inserting new swimlanes.&nbsp; Default is fillColor.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxEditor.Windows"></a>Windows</h3></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.tasks"></a>tasks</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.tasks</td></tr></table></blockquote><p>Holds the <a href="../util/mxWindow-js.html#mxWindow" class=LClass id=link264 onMouseOver="ShowTip(event, 'tt18', 'link264')" onMouseOut="HideTip('tt18')">mxWindow</a> created in <a href="#mxEditor.showTasks" class=LFunction id=link265 onMouseOver="ShowTip(event, 'tt60', 'link265')" onMouseOut="HideTip('tt60')">showTasks</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.tasksWindowImage"></a>tasksWindowImage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.tasksWindowImage</td></tr></table></blockquote><p>Icon for the tasks window.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.tasksTop"></a>tasksTop</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.tasksTop</td></tr></table></blockquote><p>Specifies the top coordinate of the tasks window in pixels.&nbsp; Default is 20.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.help"></a>help</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.help</td></tr></table></blockquote><p>Holds the <a href="../util/mxWindow-js.html#mxWindow" class=LClass id=link266 onMouseOver="ShowTip(event, 'tt18', 'link266')" onMouseOut="HideTip('tt18')">mxWindow</a> created in <a href="#mxEditor.showHelp" class=LFunction id=link267 onMouseOver="ShowTip(event, 'tt64', 'link267')" onMouseOut="HideTip('tt64')">showHelp</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.helpWindowImage"></a>helpWindowImage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.helpWindowImage</td></tr></table></blockquote><p>Icon for the help window.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.urlHelp"></a>urlHelp</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.urlHelp</td></tr></table></blockquote><p>Specifies the URL to be used for the contents of the Online Help window.&nbsp; This is usually specified in the resources file under urlHelp for language-specific online help support.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.helpWidth"></a>helpWidth</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.helpWidth</td></tr></table></blockquote><p>Specifies the width of the help window in pixels.&nbsp; Default is 300.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.helpWidth"></a>helpWidth</h3><div class=CBody><p>Specifies the width of the help window in pixels.&nbsp; Default is 260.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.propertiesWidth"></a>propertiesWidth</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.propertiesWidth</td></tr></table></blockquote><p>Specifies the width of the properties window in pixels.&nbsp; Default is 240.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.propertiesHeight"></a>propertiesHeight</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.propertiesHeight</td></tr></table></blockquote><p>Specifies the height of the properties window in pixels.&nbsp; If no height is specified then the window will be automatically sized to fit its contents.&nbsp; Default is null.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.movePropertiesDialog"></a>movePropertiesDialog</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.movePropertiesDialog</td></tr></table></blockquote><p>Specifies if the properties dialog should be automatically moved near the cell it is displayed for, otherwise the dialog is not moved.&nbsp; This value is only taken into account if the dialog is already visible.&nbsp; Default is false.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.validating"></a>validating</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.validating</td></tr></table></blockquote><p>Specifies if <a href="../view/mxGraph-js.html#mxGraph.validateGraph" class=LFunction id=link268 onMouseOver="ShowTip(event, 'tt72', 'link268')" onMouseOut="HideTip('tt72')">mxGraph.validateGraph</a> should automatically be invoked after each change.&nbsp; Default is false.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxEditor.modified"></a>modified</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.modified</td></tr></table></blockquote><p>True if the graph has been modified since it was last saved.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.isModified"></a>isModified</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.isModified = function ()</td></tr></table></blockquote><p>Returns <a href="#mxEditor.modified" class=LVariable id=link269 onMouseOver="ShowTip(event, 'tt73', 'link269')" onMouseOut="HideTip('tt73')">modified</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.setModified"></a>setModified</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.setModified = function (</td><td class=PParameter nowrap>value</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets <a href="#mxEditor.modified" class=LVariable id=link270 onMouseOver="ShowTip(event, 'tt73', 'link270')" onMouseOut="HideTip('tt73')">modified</a> to the specified boolean value.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.addActions"></a>addActions</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.addActions = function ()</td></tr></table></blockquote><p>Adds the built-in actions to the editor instance.</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>save</td><td class=CDLDescription>Saves the graph using <a href="#mxEditor.urlPost" class=LVariable id=link271 onMouseOver="ShowTip(event, 'tt46', 'link271')" onMouseOut="HideTip('tt46')">urlPost</a>.</td></tr><tr><td class=CDLEntry>print</td><td class=CDLDescription>Shows the graph in a new print preview window.</td></tr><tr><td class=CDLEntry>show</td><td class=CDLDescription>Shows the graph in a new window.</td></tr><tr><td class=CDLEntry>exportImage</td><td class=CDLDescription>Shows the graph as a bitmap image using <a href="#mxEditor.getUrlImage" class=LFunction id=link272 onMouseOver="ShowTip(event, 'tt114', 'link272')" onMouseOut="HideTip('tt114')">getUrlImage</a>.</td></tr><tr><td class=CDLEntry>refresh</td><td class=CDLDescription>Refreshes the graph&rsquo;s display.</td></tr><tr><td class=CDLEntry>cut</td><td class=CDLDescription>Copies the current selection into the clipboard and removes it from the graph.</td></tr><tr><td class=CDLEntry>copy</td><td class=CDLDescription>Copies the current selection into the clipboard.</td></tr><tr><td class=CDLEntry>paste</td><td class=CDLDescription>Pastes the clipboard into the graph.</td></tr><tr><td class=CDLEntry>delete</td><td class=CDLDescription>Removes the current selection from the graph.</td></tr><tr><td class=CDLEntry>group</td><td class=CDLDescription>Puts the current selection into a new group.</td></tr><tr><td class=CDLEntry>ungroup</td><td class=CDLDescription>Removes the selected groups and selects the children.</td></tr><tr><td class=CDLEntry>undo</td><td class=CDLDescription>Undoes the last change on the graph model.</td></tr><tr><td class=CDLEntry>redo</td><td class=CDLDescription>Redoes the last change on the graph model.</td></tr><tr><td class=CDLEntry>zoom</td><td class=CDLDescription>Sets the zoom via a dialog.</td></tr><tr><td class=CDLEntry>zoomIn</td><td class=CDLDescription>Zooms into the graph.</td></tr><tr><td class=CDLEntry>zoomOut</td><td class=CDLDescription>Zooms out of the graph</td></tr><tr><td class=CDLEntry>actualSize</td><td class=CDLDescription>Resets the scale and translation on the graph.</td></tr><tr><td class=CDLEntry>fit</td><td class=CDLDescription>Changes the scale so that the graph fits into the window.</td></tr><tr><td class=CDLEntry>showProperties</td><td class=CDLDescription>Shows the properties dialog.</td></tr><tr><td class=CDLEntry>selectAll</td><td class=CDLDescription>Selects all cells.</td></tr><tr><td class=CDLEntry>selectNone</td><td class=CDLDescription>Clears the selection.</td></tr><tr><td class=CDLEntry>selectVertices</td><td class=CDLDescription>Selects all vertices. selectEdges = Selects all edges.</td></tr><tr><td class=CDLEntry>edit</td><td class=CDLDescription>Starts editing the current selection cell.</td></tr><tr><td class=CDLEntry>enterGroup</td><td class=CDLDescription>Drills down into the current selection cell.</td></tr><tr><td class=CDLEntry>exitGroup</td><td class=CDLDescription>Moves up in the drilling hierachy</td></tr><tr><td class=CDLEntry>home</td><td class=CDLDescription>Moves to the topmost parent in the drilling hierarchy</td></tr><tr><td class=CDLEntry>selectPrevious</td><td class=CDLDescription>Selects the previous cell.</td></tr><tr><td class=CDLEntry>selectNext</td><td class=CDLDescription>Selects the next cell.</td></tr><tr><td class=CDLEntry>selectParent</td><td class=CDLDescription>Selects the parent of the selection cell.</td></tr><tr><td class=CDLEntry>selectChild</td><td class=CDLDescription>Selects the first child of the selection cell.</td></tr><tr><td class=CDLEntry>collapse</td><td class=CDLDescription>Collapses the currently selected cells.</td></
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createSession"></a>createSession</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.createSession = function ()</td></tr></table></blockquote><p>Creates and returns and <a href="../util/mxSession-js.html#mxSession" class=LClass id=link273 onMouseOver="ShowTip(event, 'tt26', 'link273')" onMouseOut="HideTip('tt26')">mxSession</a> using <a href="#mxEditor.urlInit" class=LVariable id=link274 onMouseOver="ShowTip(event, 'tt48', 'link274')" onMouseOut="HideTip('tt48')">urlInit</a>, <a href="#mxEditor.urlPoll" class=LVariable id=link275 onMouseOver="ShowTip(event, 'tt50', 'link275')" onMouseOut="HideTip('tt50')">urlPoll</a> and <a href="#mxEditor.urlNotify" class=LVariable id=link276 onMouseOver="ShowTip(event, 'tt49', 'link276')" onMouseOut="HideTip('tt49')">urlNotify</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.configure"></a>configure</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.configure = function (</td><td class=PParameter nowrap>node</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Configures the editor using the specified node.&nbsp; To load the configuration from a given URL the following code can be used to obtain the XML node.</p><blockquote><pre class="prettyprint">var node = mxUtils.load(url).getDocumentElement();</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>node</td><td class=CDLDescription>XML node that contains the configuration.</td></tr></table></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.resetFirstTime"></a>resetFirstTime</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.resetFirstTime = function ()</td></tr></table></blockquote><p>Resets the cookie that is used to remember if the editor has already been used.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.resetHistory"></a>resetHistory</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.resetHistory = function ()</td></tr></table></blockquote><p>Resets the command history, modified state and counters.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.addAction"></a>addAction</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.addAction = function (</td><td class=PParameter nowrap>actionname,</td></tr><tr><td></td><td class=PParameter nowrap>funct</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Binds the specified actionname to the specified function.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>actionname</td><td class=CDLDescription>String that specifies the name of the action to be added.</td></tr><tr><td class=CDLEntry>funct</td><td class=CDLDescription>Function that implements the new action.&nbsp; The first argument of the function is the editor it is used with, the second argument is the cell it operates upon.</td></tr></table><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">editor.addAction('test', function(editor, cell)
{
mxUtils.alert(&quot;test &quot;+cell);
});</pre></blockquote></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.execute"></a>execute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.execute = function (</td><td class=PParameter nowrap>actionname,</td></tr><tr><td></td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Executes the function with the given name in <a href="#mxEditor.actions" class=LVariable id=link277 onMouseOver="ShowTip(event, 'tt2', 'link277')" onMouseOut="HideTip('tt2')">actions</a> passing the editor instance and given cell as the first and second argument.&nbsp; All additional arguments are passed to the action as well.&nbsp; This method contains a try-catch block and displays an error message if an action causes an exception.&nbsp; The exception is re-thrown after the error message was displayed.</p><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">editor.execute(&quot;showProperties&quot;, cell);</pre></blockquote></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.addTemplate"></a>addTemplate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.addTemplate = function (</td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PParameter nowrap>template</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the specified template under the given name in <a href="#mxEditor.templates" class=LVariable id=link278 onMouseOver="ShowTip(event, 'tt38', 'link278')" onMouseOut="HideTip('tt38')">templates</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.getTemplate"></a>getTemplate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.getTemplate = function (</td><td class=PParameter nowrap>name</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the template for the given name.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createGraph"></a>createGraph</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.createGraph = function ()</td></tr></table></blockquote><p>Creates the <a href="#mxEditor.graph" class=LVariable id=link279 onMouseOver="ShowTip(event, 'tt19', 'link279')" onMouseOut="HideTip('tt19')">graph</a> for the editor.&nbsp; The graph is created with no container and is initialized from <a href="#mxEditor.setGraphContainer" class=LFunction id=link280 onMouseOver="ShowTip(event, 'tt22', 'link280')" onMouseOut="HideTip('tt22')">setGraphContainer</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createSwimlaneManager"></a>createSwimlaneManager</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.createSwimlaneManager = function (</td><td class=PParameter nowrap>graph</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the graph&rsquo;s container using <a href="../view/mxGraph-js.html#mxGraph.init" class=LFunction id=link281 onMouseOver="ShowTip(event, 'tt87', 'link281')" onMouseOut="HideTip('tt87')">mxGraph.init</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createLayoutManager"></a>createLayoutManager</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.createLayoutManager = function (</td><td class=PParameter nowrap>graph</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a layout manager for the swimlane and diagram layouts, that is, the locally defined inter- and intraswimlane layouts.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.setGraphContainer"></a>setGraphContainer</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.setGraphContainer = function (</td><td class=PParameter nowrap>container</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the graph&rsquo;s container using <a href="../view/mxGraph-js.html#mxGraph.init" class=LFunction id=link282 onMouseOver="ShowTip(event, 'tt87', 'link282')" onMouseOut="HideTip('tt87')">mxGraph.init</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.installDblClickHandler"></a>installDblClickHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.installDblClickHandler = function (</td><td class=PParameter nowrap>graph</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Overrides <a href="../view/mxGraph-js.html#mxGraph.dblClick" class=LFunction id=link283 onMouseOver="ShowTip(event, 'tt90', 'link283')" onMouseOut="HideTip('tt90')">mxGraph.dblClick</a> to invoke <a href="#mxEditor.dblClickAction" class=LVariable id=link284 onMouseOver="ShowTip(event, 'tt33', 'link284')" onMouseOut="HideTip('tt33')">dblClickAction</a> on a cell and reset the selection tool in the toolbar.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.installUndoHandler"></a>installUndoHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.installUndoHandler = function (</td><td class=PParameter nowrap>graph</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the <a href="#mxEditor.undoManager" class=LVariable id=link285 onMouseOver="ShowTip(event, 'tt4', 'link285')" onMouseOut="HideTip('tt4')">undoManager</a> to the graph model and the view.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.installDrillHandler"></a>installDrillHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.installDrillHandler = function (</td><td class=PParameter nowrap>graph</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Installs listeners for dispatching the &lt;root&gt; event.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.installChangeHandler"></a>installChangeHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.installChangeHandler = function (</td><td class=PParameter nowrap>graph</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Installs the listeners required to automatically validate the graph.&nbsp; On each change of the root, this implementation fires a &lt;root&gt; event.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.installInsertHandler"></a>installInsertHandler</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.installInsertHandler = function (</td><td class=PParameter nowrap>graph</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Installs the handler for invoking <a href="#mxEditor.insertFunction" class=LVariable id=link286 onMouseOver="ShowTip(event, 'tt36', 'link286')" onMouseOut="HideTip('tt36')">insertFunction</a> if one is defined.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createDiagramLayout"></a>createDiagramLayout</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.createDiagramLayout = function ()</td></tr></table></blockquote><p>Creates the layout instance used to layout the swimlanes in the diagram.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createSwimlaneLayout"></a>createSwimlaneLayout</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.createSwimlaneLayout = function ()</td></tr></table></blockquote><p>Creates the layout instance used to layout the children of each swimlane.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createToolbar"></a>createToolbar</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.createToolbar = function ()</td></tr></table></blockquote><p>Creates the <a href="#mxEditor.toolbar" class=LVariable id=link287 onMouseOver="ShowTip(event, 'tt23', 'link287')" onMouseOut="HideTip('tt23')">toolbar</a> with no container.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.setToolbarContainer"></a>setToolbarContainer</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.setToolbarContainer = function (</td><td class=PParameter nowrap>container</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Initializes the toolbar for the given container.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.setStatusContainer"></a>setStatusContainer</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.setStatusContainer = function (</td><td class=PParameter nowrap>container</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates the <a href="#mxEditor.status" class=LVariable id=link288 onMouseOver="ShowTip(event, 'tt27', 'link288')" onMouseOut="HideTip('tt27')">status</a> using the specified container.</p><p>This implementation adds listeners in the editor to display the last saved time and the current filename in the status bar.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>container</td><td class=CDLDescription>DOM node that will contain the statusbar.</td></tr></table></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.setStatus"></a>setStatus</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.setStatus = function (</td><td class=PParameter nowrap>message</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Display the specified message in the status bar.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>message</td><td class=CDLDescription>String the specified the message to be displayed.</td></tr></table></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.setTitleContainer"></a>setTitleContainer</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.setTitleContainer = function (</td><td class=PParameter nowrap>container</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a listener to update the inner HTML of the specified DOM node with the value of <a href="#mxEditor.getTitle" class=LFunction id=link289 onMouseOver="ShowTip(event, 'tt102', 'link289')" onMouseOut="HideTip('tt102')">getTitle</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>container</td><td class=CDLDescription>DOM node that will contain the title.</td></tr></table></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.treeLayout"></a>treeLayout</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.treeLayout = function (</td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>horizontal</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Executes a vertical or horizontal compact tree layout using the specified cell as an argument.&nbsp; The cell may either be a group or the root of a tree.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cell</td><td class=CDLDescription><a href="../model/mxCell-js.html#mxCell" class=LClass id=link290 onMouseOver="ShowTip(event, 'tt130', 'link290')" onMouseOut="HideTip('tt130')">mxCell</a> to use in the compact tree layout.</td></tr><tr><td class=CDLEntry>horizontal</td><td class=CDLDescription>Optional boolean to specify the tree&rsquo;s orientation.&nbsp; Default is true.</td></tr></table></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.getTitle"></a>getTitle</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.getTitle = function ()</td></tr></table></blockquote><p>Returns the string value for the current root of the diagram.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.getRootTitle"></a>getRootTitle</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.getRootTitle = function ()</td></tr></table></blockquote><p>Returns the string value of the root cell in <a href="../view/mxGraph-js.html#mxGraph.model" class=LVariable id=link291 onMouseOver="ShowTip(event, 'tt105', 'link291')" onMouseOut="HideTip('tt105')">mxGraph.model</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.undo"></a>undo</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.undo = function ()</td></tr></table></blockquote><p>Undo the last change in <a href="#mxEditor.graph" class=LVariable id=link292 onMouseOver="ShowTip(event, 'tt19', 'link292')" onMouseOut="HideTip('tt19')">graph</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.redo"></a>redo</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.redo = function ()</td></tr></table></blockquote><p>Redo the last change in <a href="#mxEditor.graph" class=LVariable id=link293 onMouseOver="ShowTip(event, 'tt19', 'link293')" onMouseOut="HideTip('tt19')">graph</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.groupCells"></a>groupCells</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.groupCells = function ()</td></tr></table></blockquote><p>Invokes <a href="#mxEditor.createGroup" class=LFunction id=link294 onMouseOver="ShowTip(event, 'tt109', 'link294')" onMouseOut="HideTip('tt109')">createGroup</a> to create a new group cell and the invokes <a href="../view/mxGraph-js.html#mxGraph.groupCells" class=LFunction id=link295 onMouseOver="ShowTip(event, 'tt110', 'link295')" onMouseOut="HideTip('tt110')">mxGraph.groupCells</a>, using the grid size of the graph as the spacing in the group&rsquo;s content area.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createGroup"></a>createGroup</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.createGroup = function ()</td></tr></table></blockquote><p>Creates and returns a clone of <a href="#mxEditor.defaultGroup" class=LVariable id=link296 onMouseOver="ShowTip(event, 'tt42', 'link296')" onMouseOut="HideTip('tt42')">defaultGroup</a> to be used as a new group cell in &lt;group&gt;.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.open"></a>open</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.open = function (</td><td class=PParameter nowrap>filename</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Opens the specified file synchronously and parses it using <a href="#mxEditor.readGraphModel" class=LFunction id=link297 onMouseOver="ShowTip(event, 'tt111', 'link297')" onMouseOut="HideTip('tt111')">readGraphModel</a>.&nbsp; It updates <a href="#mxEditor.filename" class=LVariable id=link298 onMouseOver="ShowTip(event, 'tt43', 'link298')" onMouseOut="HideTip('tt43')">filename</a> and fires an <a href="#mxEditor.open" class=LFunction id=link299 onMouseOver="ShowTip(event, 'tt5', 'link299')" onMouseOut="HideTip('tt5')">open</a>-event after the file has been opened.&nbsp; Exceptions should be handled as follows:</p><blockquote><pre class="prettyprint">try
2012-05-21 20:32:26 +00:00
{
editor.open(filename);
}
catch (e)
{
mxUtils.error('Cannot open ' + filename +
': ' + e.message, 280, true);
}</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>filename</td><td class=CDLDescription>URL of the file to be opened.</td></tr></table></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.readGraphModel"></a>readGraphModel</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.readGraphModel = function (</td><td class=PParameter nowrap>node</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Reads the specified XML node into the existing graph model and resets the command history and modified state.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.save"></a>save</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.save = function (</td><td class=PParameter nowrap>url,</td></tr><tr><td></td><td class=PParameter nowrap>linefeed</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Posts the string returned by <a href="#mxEditor.writeGraphModel" class=LFunction id=link300 onMouseOver="ShowTip(event, 'tt112', 'link300')" onMouseOut="HideTip('tt112')">writeGraphModel</a> to the given URL or the URL returned by <a href="#mxEditor.getUrlPost" class=LFunction id=link301 onMouseOver="ShowTip(event, 'tt113', 'link301')" onMouseOut="HideTip('tt113')">getUrlPost</a>.&nbsp; The actual posting is carried out by <a href="#mxEditor.postDiagram" class=LFunction id=link302 onMouseOver="ShowTip(event, 'tt7', 'link302')" onMouseOut="HideTip('tt7')">postDiagram</a>.&nbsp; If the URL is null then the resulting XML will be displayed using <a href="../util/mxUtils-js.html#mxUtils.popup" class=LFunction id=link303 onMouseOver="ShowTip(event, 'tt143', 'link303')" onMouseOut="HideTip('tt143')">mxUtils.popup</a>.&nbsp; Exceptions should be handled as follows:</p><blockquote><pre class="prettyprint">try
2012-05-21 20:32:26 +00:00
{
editor.save();
}
catch (e)
{
mxUtils.error('Cannot save : ' + e.message, 280, true);
}</pre></blockquote></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.postDiagram"></a>postDiagram</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.postDiagram = function (</td><td class=PParameter nowrap>url,</td></tr><tr><td></td><td class=PParameter nowrap>data</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook for subclassers to override the posting of a diagram represented by the given node to the given URL.&nbsp; This fires an asynchronous &lt;post&gt; event if the diagram has been posted.</p><h4 class=CHeading>Example</h4><p>To replace the diagram with the diagram in the response, use the following code.</p><blockquote><pre class="prettyprint">editor.addListener(mxEvent.POST, function(sender, evt)
{
// Process response (replace diagram)
var req = evt.getProperty('request');
var root = req.getDocumentElement();
editor.graph.readGraphModel(root)
});</pre></blockquote></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.writeGraphModel"></a>writeGraphModel</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.writeGraphModel = function (</td><td class=PParameter nowrap>linefeed</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook to create the string representation of the diagram.&nbsp; The default implementation uses an <a href="../io/mxCodec-js.html#mxCodec" class=LClass id=link304 onMouseOver="ShowTip(event, 'tt3', 'link304')" onMouseOut="HideTip('tt3')">mxCodec</a> to encode the graph model as follows:</p><blockquote><pre class="prettyprint">var enc = new mxCodec();
2012-05-21 20:32:26 +00:00
var node = enc.encode(this.graph.getModel());
return mxUtils.getXml(node, this.linefeed);</pre></blockquote><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>linefeed</td><td class=CDLDescription>Optional character to be used as the linefeed.&nbsp; Default is &lt;linefeed&gt;.</td></tr></table></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.getUrlPost"></a>getUrlPost</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.getUrlPost = function ()</td></tr></table></blockquote><p>Returns the URL to post the diagram to.&nbsp; This is used in <a href="#mxEditor.save" class=LFunction id=link305 onMouseOver="ShowTip(event, 'tt6', 'link305')" onMouseOut="HideTip('tt6')">save</a>.&nbsp; The default implementation returns <a href="#mxEditor.urlPost" class=LVariable id=link306 onMouseOver="ShowTip(event, 'tt46', 'link306')" onMouseOut="HideTip('tt46')">urlPost</a>, adding &lt;code&gt;?draft=true&lt;/code&gt;.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.getUrlImage"></a>getUrlImage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.getUrlImage = function ()</td></tr></table></blockquote><p>Returns the URL to create the image with.&nbsp; This is typically the URL of a backend which accepts an XML representation of a graph view to create an image.&nbsp; The function is used in the image action to create an image.&nbsp; This implementation returns <a href="#mxEditor.urlImage" class=LVariable id=link307 onMouseOver="ShowTip(event, 'tt47', 'link307')" onMouseOut="HideTip('tt47')">urlImage</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.connect"></a>connect</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.connect = function (</td><td class=PParameter nowrap>urlInit,</td></tr><tr><td></td><td class=PParameter nowrap>urlPoll,</td></tr><tr><td></td><td class=PParameter nowrap>urlNotify,</td></tr><tr><td></td><td class=PParameter nowrap>onChange</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and returns a session for the specified parameters, installing the onChange function as a change listener for the session.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.swapStyles"></a>swapStyles</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.swapStyles = function (</td><td class=PParameter nowrap>first,</td></tr><tr><td></td><td class=PParameter nowrap>second</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Swaps the styles for the given names in the graph&rsquo;s stylesheet and refreshes the graph.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.showProperties"></a>showProperties</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.showProperties = function (</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and shows the properties dialog for the given cell.&nbsp; The content area of the dialog is created using <a href="#mxEditor.createProperties" class=LFunction id=link308 onMouseOver="ShowTip(event, 'tt119', 'link308')" onMouseOut="HideTip('tt119')">createProperties</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.isPropertiesVisible"></a>isPropertiesVisible</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.isPropertiesVisible = function ()</td></tr></table></blockquote><p>Returns true if the properties dialog is currently visible.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createProperties"></a>createProperties</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.createProperties = function (</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and returns the DOM node that represents the contents of the properties dialog for the given cell.&nbsp; This implementation works for user objects that are XML nodes and display all the node attributes in a form.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.hideProperties"></a>hideProperties</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.hideProperties = function ()</td></tr></table></blockquote><p>Hides the properties dialog.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.showTasks"></a>showTasks</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.showTasks = function ()</td></tr></table></blockquote><p>Shows the tasks window.&nbsp; The tasks window is created using <a href="#mxEditor.createTasks" class=LFunction id=link309 onMouseOver="ShowTip(event, 'tt122', 'link309')" onMouseOut="HideTip('tt122')">createTasks</a>.&nbsp; The default width of the window is 200 pixels, the y-coordinate of the location can be specifies in <a href="#mxEditor.tasksTop" class=LVariable id=link310 onMouseOver="ShowTip(event, 'tt62', 'link310')" onMouseOut="HideTip('tt62')">tasksTop</a> and the x-coordinate is right aligned with a 20 pixel offset from the right border.&nbsp; To change the location of the tasks window, the following code can be used:</p><blockquote><pre class="prettyprint">var oldShowTasks = mxEditor.prototype.showTasks;
2012-05-21 20:32:26 +00:00
mxEditor.prototype.showTasks = function()
{
oldShowTasks.apply(this, arguments); // &quot;supercall&quot;
if (this.tasks != null)
{
this.tasks.setLocation(10, 10);
}
};</pre></blockquote></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.refreshTasks"></a>refreshTasks</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.refreshTasks = function (</td><td class=PParameter nowrap>div</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Updates the contents of the tasks window using <a href="#mxEditor.createTasks" class=LFunction id=link311 onMouseOver="ShowTip(event, 'tt122', 'link311')" onMouseOut="HideTip('tt122')">createTasks</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createTasks"></a>createTasks</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.createTasks = function (</td><td class=PParameter nowrap>div</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Updates the contents of the given DOM node to display the tasks associated with the current editor state.&nbsp; This is invoked whenever there is a possible change of state in the editor.&nbsp; Default implementation is empty.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.showHelp"></a>showHelp</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.showHelp = function (</td><td class=PParameter nowrap>tasks</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Shows the help window.&nbsp; If the help window does not exist then it is created using an iframe pointing to the resource for the &lt;code&gt;urlHelp&lt;/code&gt; key or <a href="#mxEditor.urlHelp" class=LVariable id=link312 onMouseOver="ShowTip(event, 'tt66', 'link312')" onMouseOut="HideTip('tt66')">urlHelp</a> if the resource is undefined.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.showOutline"></a>showOutline</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.showOutline = function ()</td></tr></table></blockquote><p>Shows the outline window.&nbsp; If the window does not exist, then it is created using an <a href="../view/mxOutline-js.html#mxOutline" class=LClass id=link313 onMouseOver="ShowTip(event, 'tt141', 'link313')" onMouseOut="HideTip('tt141')">mxOutline</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.setMode"></a>setMode</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.setMode = function(</td><td class=PParameter nowrap>modename</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Puts the graph into the specified mode.&nbsp; The following modenames are supported:</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>select</td><td class=CDLDescription>Selects using the left mouse button, new connections are disabled.</td></tr><tr><td class=CDLEntry>connect</td><td class=CDLDescription>Selects using the left mouse button or creates new connections if mouse over cell hotspot.&nbsp; See <a href="../handler/mxConnectionHandler-js.html#mxConnectionHandler" class=LClass id=link314 onMouseOver="ShowTip(event, 'tt144', 'link314')" onMouseOut="HideTip('tt144')">mxConnectionHandler</a>.</td></tr><tr><td class=CDLEntry>pan</td><td class=CDLDescription>Pans using the left mouse button, new connections are disabled.</td></tr></table></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createPopupMenu"></a>createPopupMenu</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.createPopupMenu = function (</td><td class=PParameter nowrap>menu,</td></tr><tr><td></td><td class=PParameter nowrap>cell,</td></tr><tr><td></td><td class=PParameter nowrap>evt</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Uses <a href="#mxEditor.popupHandler" class=LVariable id=link315 onMouseOver="ShowTip(event, 'tt28', 'link315')" onMouseOut="HideTip('tt28')">popupHandler</a> to create the menu in the graph&rsquo;s panning handler.&nbsp; The redirection is setup in <a href="#mxEditor.setToolbarContainer" class=LFunction id=link316 onMouseOver="ShowTip(event, 'tt98', 'link316')" onMouseOut="HideTip('tt98')">setToolbarContainer</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.createEdge"></a>createEdge</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.createEdge = function (</td><td class=PParameter nowrap>source,</td></tr><tr><td></td><td class=PParameter nowrap>target</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Uses <a href="#mxEditor.defaultEdge" class=LVariable id=link317 onMouseOver="ShowTip(event, 'tt39', 'link317')" onMouseOut="HideTip('tt39')">defaultEdge</a> as the prototype for creating new edges in the connection handler of the graph.&nbsp; The style of the edge will be overridden with the value returned by <a href="#mxEditor.getEdgeStyle" class=LFunction id=link318 onMouseOver="ShowTip(event, 'tt41', 'link318')" onMouseOut="HideTip('tt41')">getEdgeStyle</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.getEdgeStyle"></a>getEdgeStyle</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.getEdgeStyle = function ()</td></tr></table></blockquote><p>Returns a string identifying the style of new edges.&nbsp; The function is used in <a href="#mxEditor.createEdge" class=LFunction id=link319 onMouseOver="ShowTip(event, 'tt126', 'link319')" onMouseOut="HideTip('tt126')">createEdge</a> when new edges are created in the graph.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.consumeCycleAttribute"></a>consumeCycleAttribute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.consumeCycleAttribute = function (</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the next attribute in <a href="#mxEditor.cycleAttributeValues" class=LVariable id=link320 onMouseOver="ShowTip(event, 'tt56', 'link320')" onMouseOut="HideTip('tt56')">cycleAttributeValues</a> or null, if not attribute should be used in the specified cell.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.cycleAttribute"></a>cycleAttribute</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.cycleAttribute = function (</td><td class=PParameter nowrap>cell</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Uses the returned value from <a href="#mxEditor.consumeCycleAttribute" class=LFunction id=link321 onMouseOver="ShowTip(event, 'tt127', 'link321')" onMouseOut="HideTip('tt127')">consumeCycleAttribute</a> as the value for the <a href="#mxEditor.cycleAttributeName" class=LVariable id=link322 onMouseOver="ShowTip(event, 'tt58', 'link322')" onMouseOut="HideTip('tt58')">cycleAttributeName</a> key in the given cell&rsquo;s style.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.addVertex"></a>addVertex</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.addVertex = function (</td><td class=PParameter nowrap>parent,</td></tr><tr><td></td><td class=PParameter nowrap>vertex,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the given vertex as a child of parent at the specified x and y coordinate and fires an <a href="#mxEditor.addVertex" class=LFunction id=link323 onMouseOver="ShowTip(event, 'tt8', 'link323')" onMouseOut="HideTip('tt8')">addVertex</a> event.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxEditor.destroy"></a>destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.destroy = function ()</td></tr></table></blockquote><p>Removes the editor and all its associated resources.&nbsp; This does not normally need to be called, it is called automatically when the window unloads.</p></div></div></div>
</div><!--Content-->
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
2014-01-08 16:23:20 +00:00
<div id=Menu><div class=MEntry><div class=MFile><a href="../index-txt.html">API Specification</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Editor</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="mxDefaultKeyHandler-js.html">mxDefaultKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="mxDefaultPopupMenu-js.html">mxDefaultPopupMenu</a></div></div><div class=MEntry><div class=MFile><a href="mxDefaultToolbar-js.html">mxDefaultToolbar</a></div></div><div class=MEntry><div class=MFile id=MSelected>mxEditor</div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Handler</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../handler/mxCellHighlight-js.html">mxCellHighlight</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellMarker-js.html">mxCellMarker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellTracker-js.html">mxCellTracker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConnectionHandler-js.html">mxConnectionHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConstraintHandler-js.html">mxConstraintHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeHandler-js.html">mxEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeSegmentHandler-js.html">mxEdgeSegmentHandler.js</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxElbowEdgeHandler-js.html">mxElbowEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxGraphHandler-js.html">mxGraphHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxKeyHandler-js.html">mxKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxPanningHandler-js.html">mxPanningHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxPopupMenuHandler-js.html">mxPanningHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxRubberband-js.html">mxRubberband</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxSelectionCellsHandler-js.html">mxSelectionCellsHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxTooltipHandler-js.html">mxTooltipHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxVertexHandler-js.html">mxVertexHandler</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Io</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../io/mxCellCodec-js.html">mxCellCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxChildChangeCodec-js.html">mxChildChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodec-js.html">mxCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodecRegistry-js.html">mxCodecRegistry</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultKeyHandlerCodec-js.html">mxDefaultKeyHandlerCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultPopupMenuCodec-js.html">mxDefaultPopupMenuCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultToolbarCodec-js.html">mxDefaultToolbarCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxEditorCodec-js.html">mxEditorCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGenericChangeCodec-js.html">mxGenericChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphCodec-js.html">mxGraphCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphViewCodec-js.html">mxGraphViewCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxModelCodec-js.html">mxModelCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io
2012-05-21 20:32:26 +00:00
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Cookies">Cookies</option><option value="Events">Events</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([1], 13);// --></script></div><!--Menu-->
<!--START_ND_TOOLTIPS-->
2013-07-12 07:09:46 +00:00
<div class=CToolTip id="tt1"><div class=CClass>Base class for objects that dispatch named events. </div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.actions</td></tr></table></blockquote>Maps from actionnames to actions, which are functions taking the editor and the cell as arguments. </div></div><div class=CToolTip id="tt3"><div class=CClass>XML codec for JavaScript object graphs. </div></div><div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.undoManager</td></tr></table></blockquote>Holds an mxUndoManager for the command history.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.open = function (</td><td class=PParameter nowrap>filename</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Opens the specified file synchronously and parses it using readGraphModel. </div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.save = function (</td><td class=PParameter nowrap>url,</td></tr><tr><td></td><td class=PParameter nowrap>linefeed</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Posts the string returned by writeGraphModel to the given URL or the URL returned by getUrlPost. </div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.postDiagram = function (</td><td class=PParameter nowrap>url,</td></tr><tr><td></td><td class=PParameter nowrap>data</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Hook for subclassers to override the posting of a diagram represented by the given node to the given URL. </div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxEditor.prototype.addVertex = function (</td><td class=PParameter nowrap>parent,</td></tr><tr><td></td><td class=PParameter nowrap>vertex,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Adds the given vertex as a child of parent at the specified x and y coordinate and fires an addVertex event.</div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxEditor(</td><td class=PParameter nowrap>config</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new editor. </div></div><div class=CToolTip id="tt10"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.askZoomResource</td></tr></table></blockquote>Specifies the resource key for the zoom dialog. </div></div><div class=CToolTip id="tt11"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxEditor.prototype.lastSavedResource</td></tr></table></blockquote>Specifies the resource key for the last saved info. </div></div><div class=CToolTip id="tt12"><div class=CVariable><blockquote><tabl
2012-05-21 20:32:26 +00:00
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>