<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxEditor"></a>mxEditor</h1><divclass=CBody><p>Extends <ahref="../util/mxEventSource-js.html#mxEventSource"class=LClassid=link171onMouseOver="ShowTip(event, 'tt1', 'link171')"onMouseOut="HideTip('tt1')">mxEventSource</a> to implement a application wrapper for a graph that adds <ahref="#mxEditor.actions"class=LVariableid=link172onMouseOver="ShowTip(event, 'tt2', 'link172')"onMouseOut="HideTip('tt2')">actions</a>, I/O using <ahref="../io/mxCodec-js.html#mxCodec"class=LClassid=link173onMouseOver="ShowTip(event, 'tt3', 'link173')"onMouseOut="HideTip('tt3')">mxCodec</a>, auto-layout using <ahref="../view/mxLayoutManager-js.html#mxLayoutManager"class=LClass>mxLayoutManager</a>, command history using <ahref="#mxEditor.undoManager"class=LVariableid=link174onMouseOver="ShowTip(event, 'tt4', 'link174')"onMouseOut="HideTip('tt4')">undoManager</a>, and standard dialogs and widgets, eg. properties, help, outline, toolbar, and popupmenu. It also adds <ahref="#mxEditor.templates"class=LVariableid=link175onMouseOver="ShowTip(event, 'tt36', 'link175')"onMouseOut="HideTip('tt36')">templates</a> to be used as cells in toolbars, auto-validation using the <validation> flag, attribute cycling using <ahref="#mxEditor.cycleAttributeValues"class=LVariableid=link176onMouseOver="ShowTip(event, 'tt51', 'link176')"onMouseOut="HideTip('tt51')">cycleAttributeValues</a>, higher-level events such as <root>, and backend integration using <ahref="#mxEditor.urlPost"class=LVariableid=link177onMouseOver="ShowTip(event, 'tt44', 'link177')"onMouseOut="HideTip('tt44')">urlPost</a> and <ahref="#mxEditor.urlImage"class=LVariableid=link178onMouseOver="ShowTip(event, 'tt45', 'link178')"onMouseOut="HideTip('tt45')">urlImage</a>.</p><h4class=CHeading>Actions</h4><p>Actions are functions stored in the <ahref="#mxEditor.actions"class=LVariableid=link179onMouseOver="ShowTip(event, 'tt2', 'link179')"onMouseOut="HideTip('tt2')">actions</a> array under their names. The functions take the <ahref="#mxEditor.mxEditor"class=LFunctionid=link180onMouseOver="ShowTip(event, 'tt9', 'link180')"onMouseOut="HideTip('tt9')">mxEditor</a> as the first, and an optional <ahref="../model/mxCell-js.html#mxCell"class=LClassid=link181onMouseOver="ShowTip(event, 'tt123', 'link181')"onMouseOut="HideTip('tt123')">mxCell</a> as the second argument and are invoked using <ahref="#mxEditor.execute"class=LFunctionid=link182onMouseOver="ShowTip(event, 'tt76', 'link182')"onMouseOut="HideTip('tt76')">execute</a>. 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 <ahref="#mxEditor.addActions"class=LFunctionid=link183onMouseOver="ShowTip(event, 'tt71', 'link183')"onMouseOut="HideTip('tt71')">addActions</a> description.</p><h4class=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><preclass="prettyprint">var doc = mxUtils.parseXML(xmlString);
editor.readGraphModel(node);</pre></blockquote><p>For reading a diagram from a remote location, use the <ahref="#mxEditor.open"class=LFunctionid=link184onMouseOver="ShowTip(event, 'tt5', 'link184')"onMouseOut="HideTip('tt5')">open</a> method.</p><p>To save diagrams in XML on a server, you can set the <ahref="#mxEditor.urlPost"class=LVariableid=link185onMouseOver="ShowTip(event, 'tt44', 'link185')"onMouseOut="HideTip('tt44')">urlPost</a> variable. This variable will be used in <ahref="#mxEditor.getUrlPost"class=LFunctionid=link186onMouseOver="ShowTip(event, 'tt107', 'link186')"onMouseOut="HideTip('tt107')">getUrlPost</a> to construct a URL for the post request that is issued in the <ahref="#mxEditor.save"class=LFunctionid=link187onMouseOver="ShowTip(event, 'tt6', 'link187')"onMouseOut="HideTip('tt6')">save</a> method. The post request contains the XML representation of the diagram as returned by <ahref="#mxEditor.writeGraphModel"class=LFunctionid=link188onMouseOver="ShowTip(event, 'tt106', 'link188')"onMouseOut="HideTip('tt106')">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(“xml”), “UTF-8”).replace(“\n”, “&#xa;”)</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[“xml”])</li><li>PHP: urldecode($_POST[“xml”])</li></ul><h4class=CHeading>Creating images</h4><p>A backend (Java, PHP or C#) is required for creating images. The distribution contains an example for each backend (ImageHandler.java, ImageHandler.cs and graph.php). More information about using a backend to create images can be found in the readme.html files. Note that the preview is implemented using VML/SVG in the browser and does not require a backend. The backend is only required to creates images (bitmaps).</p><h4class=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. These are part of the language for all documents based on XML and for HTML.</p><ul><li>&lt; (<)</li><li>&gt; (>)</li><li>&amp; (&)</li><li>&quot; (“)</li><li>&apos; (‘)</li></ul><p>Although it is part of the XML language, &apos; is not defined in HTML. For this reason the XHTML specification recommends instead the use of &#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 <ahref="#mxEditor.escapePostData"class=LVariableid=link189onMouseOver="ShowTip(event, 'tt43', 'link189')"onMouseOut="HideTip('tt43')">escapePostData</a> flag.</p><p>For converting decimal escape sequences inside strings, a user has provided us with the following function:</p><blockquote><preclass="prettyprint">function html2js(text)
}</pre></blockquote><p>Otherwise try using hex escape sequences and the built-in unescape function for converting such strings.</p><h4class=CHeading>Local Files</h4><p>For saving and opening local files, no standardized method exists that works across all browsers. 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><preclass="prettyprint">$xml = stripslashes($_POST["xml"]);
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><h4class=CHeading>Cell Properties</h4><p>The properties displayed in the properties dialog are the attributes and values of the cell’s user object, which is an XML node. The XML node is defined in the templates section of the config file.</p><p>The templates are stored in <ahref="#mxEditor.templates"class=LVariableid=link190onMouseOver="ShowTip(event, 'tt36', 'link190')"onMouseOut="HideTip('tt36')">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. 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><preclass="prettyprint"><Task label="Task" description="">
</Task></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. This means the user object of the cell is the Task node with no children for the above example:</p><blockquote><preclass="prettyprint"><Task label="Task" description=""/></pre></blockquote><p>The Task node can have any tag name, attributes and child nodes. The <ahref="../io/mxCodec-js.html#mxCodec"class=LClassid=link191onMouseOver="ShowTip(event, 'tt3', 'link191')"onMouseOut="HideTip('tt3')">mxCodec</a> will use the XML hierarchy as the user object, while removing the “known annotations”, such as the mxCell node. At save-time the cell data will be “merged” back into the user object. The user object is only modified via the properties dialog during the lifecycle of the cell.</p><p>In the default implementation of <ahref="#mxEditor.createProperties"class=LFunctionid=link192onMouseOver="ShowTip(event, 'tt112', 'link192')"onMouseOut="HideTip('tt112')">createProperties</a>, the user object’s attributes are put into a form for editing. Attributes are changed using the <ahref="../model/mxGraphModel-js.html#mxCellAttributeChange"class=LClassid=link193onMouseOver="ShowTip(event, 'tt124', 'link193')"onMouseOut="HideTip('tt124')">mxCellAttributeChange</a> action in the model. The dialog can be replaced by overriding the <ahref="#mxEditor.createProperties"class=LFunctionid=link194onMouseOver="ShowTip(event, 'tt112', 'link194')"onMouseOut="HideTip('tt112')">createProperties</a> hook or by replacing the showProperties action in <ahref="#mxEditor.actions"class=LVariableid=link195onMouseOver="ShowTip(event, 'tt2', 'link195')"onMouseOut="HideTip('tt2')">actions</a>. Alternatively, the entry in the config file’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 <ahref="#mxEditor.dblClickAction"class=LVariableid=link196onMouseOver="ShowTip(event, 'tt31', 'link196')"onMouseOut="HideTip('tt31')">mxEditor.dblClickAction</a> to showProperties as follows:</p><blockquote><preclass="prettyprint">editor.dblClickAction = 'showProperties';</pre></blockquote><h4class=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><preclass="prettyprint"><mxEditor>
...</pre></blockquote><p>New entries can be added to the toolbar by inserting an add-node into the above configuration. Existing entries may be removed and changed by modifying or removing the respective entries in the configuration. The configuration is read by the <ahref="../io/mxDefaultPopupMenuCodec-js.html#mxDefaultPopupMenuCodec"class=LClassid=link197onMouseOver="ShowTip(event, 'tt125', 'link197')"onMouseOut="HideTip('tt125')">mxDefaultPopupMenuCodec</a>, the format of the configuration is explained in <mxDefaultPopupMenu.decode>.</p><p>The toolbar is defined in the mxDefaultToolbar section. Items can be added and removed in this section.</p><blockquote><preclass="prettyprint"><mxEditor>
...</pre></blockquote><p>The format of the configuration is described in <ahref="../io/mxDefaultToolbarCodec-js.html#mxDefaultToolbarCodec.decode"class=LFunctionid=link198onMouseOver="ShowTip(event, 'tt126', 'link198')"onMouseOut="HideTip('tt126')">mxDefaultToolbarCodec.decode</a>.</p><h4class=CHeading>Ids</h4><p>For the IDs, there is an implicit behaviour in <ahref="../io/mxCodec-js.html#mxCodec"class=LClassid=link199onMouseOver="ShowTip(event, 'tt3', 'link199')"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. For example, if the Task node from above has an id attribute, then the <ahref="../model/mxCell-js.html#mxCell.id"class=LVariableid=link200onMouseOver="ShowTip(event, 'tt127', 'link200')"onMouseOut="HideTip('tt127')">mxCell.id</a> of the corresponding cell will have this value. If there is no Id collision in the model, then the cell may be retrieved using this Id with the <ahref="../model/mxGraphModel-js.html#mxGraphModel.getCell"class=LFunctionid=link201onMouseOver="ShowTip(event, 'tt128', 'link201')"onMouseOut="HideTip('tt128')">mxGraphModel.getCell</a> function. If there is a collision, a new Id will be created for the cell using <ahref="../model/mxGraphModel-js.html#mxGraphModel.createId"class=LFunctionid=link202onMouseOver="ShowTip(event, 'tt129', 'link202')"onMouseOut="HideTip('tt129')">mxGraphModel.createId</a>. At encoding time, this new Id will replace the value previously stored under the id attribute in the Task node.</p><p>See <ahref="../io/mxEditorCodec-js.html#mxEditorCodec"class=LClassid=link203onMouseOver="ShowTip(event, 'tt130', 'link203')"onMouseOut="HideTip('tt130')">mxEditorCodec</a>, <ahref="../io/mxDefaultToolbarCodec-js.html#mxDefaultToolbarCodec"class=LClassid=link204onMouseOver="ShowTip(event, 'tt131', 'link204')"onMouseOut="HideTip('tt131')">mxDefaultToolbarCodec</a> and <ahref="../io/mxDefaultPopupMenuCodec-js.html#mxDefaultPopupMenuCodec"class=LClassid=link205onMouseOver="ShowTip(event, 'tt125', 'link205')"onMouseOut="HideTip('tt125')">mxDefaultPopupMenuCodec</a> for information about configuring the editor and user interface.</p><h4class=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. This requires an reference to the editor.</p><blockquote><preclass="prettyprint">var userObject = new Object();
}</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. The clone is then inserted using the add function instead of addVertex.</p><blockquote><preclass="prettyprint">var template = editor.templates['task'];
var clone = editor.graph.model.cloneCell(template);</pre></blockquote><h4class=CHeading>Resources</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>resources/editor</td><tdclass=CDLDescription>Language resources for mxEditor</td></tr></table><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxEditor">mxEditor</a></td><tdclass=SDescription>Extends <ahref="../util/mxEventSource-js.html#mxEventSource"class=LClassid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxEventSource</a> to implement a application wrapper for a graph that adds <ahref="#mxEditor.actions"class=LVariableid=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">actions</a>, I/O using <ahref="../io/mxCodec-js.html#mxCodec"class=LClassid=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">mxCodec</a>, auto-layout using <ahref="../view/mxLayoutManager-js.html#mxLayoutManager"class=LClass>mxLayoutManager</a>, command history using <ahref="#mxEditor.undoManager"class=LVariableid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">undoManager</a>, and standard dialogs and widgets, eg. </td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#mxEditor.onInit">onInit</a></td><tdclass=SDescription>Called from within the constructor. </td></tr><trclass="SCookie SIndent1"><tdclass=SEntry><ahref="#mxgraph=seen">mxgraph=seen</a></td><tdclass=SDescription>Set when the editor is started. </td></tr><trclass="SEvent SIndent1 SMarked"><tdclass=SEntry><ahref="#mxEditor.mxEvent.OPEN">mxEvent.OPEN</a></td><tdclass=SDescription>Fires after a file was opened in <ahref="#mxEditor.open"class=LFunctionid=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">open</a>. </td></tr><trclass="SEvent SIndent1"><tdclass=SEntry><ahref="#mxEditor.mxEvent.SAVE">mxEvent.SAVE</a></td><tdclass=SDescription>Fires after the current file was saved in <ahref="#mxEditor.save"class=LFunctionid=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">save</a>. </td></tr><trclass="SEvent SIndent1 SMarked"><tdclass=SEntry><ahref="#mxEditor.mxEvent.POST">mxEvent.POST</a></td><tdclass=SDescription>Fires if a successful response was received in <ahref="#mxEditor.postDiagram"class=LFunctionid=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">postDiagram</a>. </td></tr><trclass="SEvent SIndent1"><tdclass=SEntry><ahref="#mxEditor.mxEvent.ROOT">mxEvent.ROOT</a></td><tdclass=SDescription>Fires when the current root has changed, or when the title of the current root has changed. </td></tr><trclass="SEvent SIndent1 SMarked"><tdclass=SEntry><ahref="#mxEditor.mxEvent.BEFORE_ADD_VERTEX">mxEvent.<wbr>BEFORE_ADD_VERTEX</a></td><tdclass=SDescription>Fires before a vertex is added in <ahref="#mxEditor.addVertex"class=LFunctionid=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">addVertex</a>. </td></tr><trclass="SEvent SIndent1"><tdclass=SEntry><ahref="#mxEditor.mxEvent.ADD_VERTEX">mxEvent.<wbr>ADD_VERTEX</a></td><tdclass=SDescription>Fires between begin- and endUpdate in <ahref="#mxEditor.addVertex"class=LFunctionid=link9onMouseOver="ShowTip(event, 'tt8', 'link9')"onMouseOut="HideTip('tt8')">addVertex</a>. </td></tr><trclass="SEvent SIndent1 SMarked"><tdclass=SEntry><ahref="#mxEditor.mxEvent.AFTER_ADD_VERTEX">mxEvent.<wbr>AFTER_ADD_VERTEX</a></td><tdclass=SDescription>Fires after a vertex was inserted and selected in <ahref="#mxEditor.addVertex"class=LFunctionid=link10onMouseOver="ShowTip(event, 'tt8', 'link10')"onMouseOut="HideTip('tt8')">addVertex</a>. </td></tr><trclass="SEvent SIndent1"><tdclass=SEntry><ahref="#mxEditor.mxEvent.ESCAPE">mxEvent.<wbr>ESCAPE</a></td><tdclass=SDescription>Fires when the escape key is
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.onInit"></a>onInit</h3><divclass=CBody><p>Called from within the constructor. In the callback, “this” refers to the editor instance.</p></div></div></div>
<divclass="CCookie"><divclass=CTopic><h3class=CTitle><aname="mxgraph=seen"></a>mxgraph=seen</h3><divclass=CBody><p>Set when the editor is started. Never expires. Use <ahref="#mxEditor.resetFirstTime"class=LFunctionid=link206onMouseOver="ShowTip(event, 'tt73', 'link206')"onMouseOut="HideTip('tt73')">resetFirstTime</a> to reset this cookie. This cookie only exists if <ahref="#mxEditor.onInit"class=LFunctionid=link207onMouseOver="ShowTip(event, 'tt132', 'link207')"onMouseOut="HideTip('tt132')">onInit</a> is implemented.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxEditor.mxEvent.OPEN"></a>mxEvent.OPEN</h3><divclass=CBody><p>Fires after a file was opened in <ahref="#mxEditor.open"class=LFunctionid=link208onMouseOver="ShowTip(event, 'tt5', 'link208')"onMouseOut="HideTip('tt5')">open</a>. The <code>filename</code> property contains the filename that was used. The same value is also available in <ahref="#mxEditor.filename"class=LVariableid=link209onMouseOver="ShowTip(event, 'tt41', 'link209')"onMouseOut="HideTip('tt41')">filename</a>.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxEditor.mxEvent.SAVE"></a>mxEvent.SAVE</h3><divclass=CBody><p>Fires after the current file was saved in <ahref="#mxEditor.save"class=LFunctionid=link210onMouseOver="ShowTip(event, 'tt6', 'link210')"onMouseOut="HideTip('tt6')">save</a>. The <code>url</code> property contains the URL that was used for saving.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxEditor.mxEvent.POST"></a>mxEvent.POST</h3><divclass=CBody><p>Fires if a successful response was received in <ahref="#mxEditor.postDiagram"class=LFunctionid=link211onMouseOver="ShowTip(event, 'tt7', 'link211')"onMouseOut="HideTip('tt7')">postDiagram</a>. The <code>request</code> property contains the <ahref="../util/mxXmlRequest-js.html#mxXmlRequest"class=LClassid=link212onMouseOver="ShowTip(event, 'tt133', 'link212')"onMouseOut="HideTip('tt133')">mxXmlRequest</a>, the <code>url</code> and <code>data</code> properties contain the URL and the data that were used in the post request.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxEditor.mxEvent.ROOT"></a>mxEvent.ROOT</h3><divclass=CBody><p>Fires when the current root has changed, or when the title of the current root has changed. This event has no properties.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxEditor.mxEvent.BEFORE_ADD_VERTEX"></a>mxEvent.<wbr>BEFORE_ADD_VERTEX</h3><divclass=CBody><p>Fires before a vertex is added in <ahref="#mxEditor.addVertex"class=LFunctionid=link213onMouseOver="ShowTip(event, 'tt8', 'link213')"onMouseOut="HideTip('tt8')">addVertex</a>. The <code>vertex</code> property contains the new vertex and the <code>parent</code> property contains its parent.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxEditor.mxEvent.ADD_VERTEX"></a>mxEvent.<wbr>ADD_VERTEX</h3><divclass=CBody><p>Fires between begin- and endUpdate in <ahref="#mxEditor.addVertex"class=LFunctionid=link214onMouseOver="ShowTip(event, 'tt8', 'link214')"onMouseOut="HideTip('tt8')">addVertex</a>. The <code>vertex</code> property contains the vertex that is being inserted.</p></div></div></div>
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxEditor.mxEvent.AFTER_ADD_VERTEX"></a>mxEvent.<wbr>AFTER_ADD_VERTEX</h3><divclass=CBody><p>Fires after a vertex was inserted and selected in <ahref="#mxEditor.addVertex"class=LFunctionid=link215onMouseOver="ShowTip(event, 'tt8', 'link215')"onMouseOut="HideTip('tt8')">addVertex</a>. The <code>vertex</code> property contains the new vertex.</p><h4class=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><preclass="prettyprint">editor.addListener(mxEvent.AFTER_ADD_VERTEX, function(sender, evt)
<divclass="CEvent"><divclass=CTopic><h3class=CTitle><aname="mxEditor.mxEvent.ESCAPE"></a>mxEvent.<wbr>ESCAPE</h3><divclass=CBody><p>Fires when the escape key is pressed. The <code>event</code> property contains the key event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.mxEditor"></a>mxEditor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxEditor(</td><tdclass=PParameternowrap>config</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new editor. This function invokes the <ahref="#mxEditor.onInit"class=LFunctionid=link216onMouseOver="ShowTip(event, 'tt132', 'link216')"onMouseOut="HideTip('tt132')">onInit</a> callback upon completion.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">var config = mxUtils.load('config/diagrameditor.xml').getDocumentElement();
var editor = new mxEditor(config);</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>config</td><tdclass=CDLDescription>Optional XML node that contains the configuration.</td></tr></table></div></div></div>
<divclass="CGroup"><divclass=CTopic><h3class=CTitle><aname="mxEditor.Controls_and_Handlers"></a>Controls and Handlers</h3></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.askZoomResource"></a>askZoomResource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.askZoomResource</td></tr></table></blockquote><p>Specifies the resource key for the zoom dialog. If the resource for this key does not exist then the value is used as the error message. Default is ‘askZoom’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.lastSavedResource"></a>lastSavedResource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.lastSavedResource</td></tr></table></blockquote><p>Specifies the resource key for the last saved info. If the resource for this key does not exist then the value is used as the error message. Default is ‘lastSaved’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.currentFileResource"></a>currentFileResource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.currentFileResource</td></tr></table></blockquote><p>Specifies the resource key for the current file info. If the resource for this key does not exist then the value is used as the error message. Default is ‘lastSaved’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.propertiesResource"></a>propertiesResource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.propertiesResource</td></tr></table></blockquote><p>Specifies the resource key for the properties window title. If the resource for this key does not exist then the value is used as the error message. Default is ‘properties’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.tasksResource"></a>tasksResource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.tasksResource</td></tr></table></blockquote><p>Specifies the resource key for the tasks window title. If the resource for this key does not exist then the value is used as the error message. Default is ‘tasks’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.helpResource"></a>helpResource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.helpResource</td></tr></table></blockquote><p>Specifies the resource key for the help window title. If the resource for this key does not exist then the value is used as the error message. Default is ‘help’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.outlineResource"></a>outlineResource</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.outlineResource</td></tr></table></blockquote><p>Specifies the resource key for the outline window title. If the resource for this key does not exist then the value is used as the error message. Default is ‘outline’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.outline"></a>outline</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.outline</td></tr></table></blockquote><p>Reference to the <ahref="../util/mxWindow-js.html#mxWindow"class=LClassid=link217onMouseOver="ShowTip(event, 'tt18', 'link217')"onMouseOut="HideTip('tt18')">mxWindow</a> that contains the outline. The <ahref="../view/mxOutline-js.html#mxOutline"class=LClassid=link218onMouseOver="ShowTip(event, 'tt134', 'link218')"onMouseOut="HideTip('tt134')">mxOutline</a> is stored in outline.outline.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.graph"></a>graph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.graph</td></tr></table></blockquote><p>Holds a <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link219onMouseOver="ShowTip(event, 'tt20', 'link219')"onMouseOut="HideTip('tt20')">mxGraph</a> for displaying the diagram. The graph is created in <ahref="#mxEditor.setGraphContainer"class=LFunctionid=link220onMouseOver="ShowTip(event, 'tt22', 'link220')"onMouseOut="HideTip('tt22')">setGraphContainer</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.graphRenderHint"></a>graphRenderHint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.graphRenderHint</td></tr></table></blockquote><p>Holds the render hint used for creating the graph in <ahref="#mxEditor.setGraphContainer"class=LFunctionid=link221onMouseOver="ShowTip(event, 'tt22', 'link221')"onMouseOut="HideTip('tt22')">setGraphContainer</a>. See <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link222onMouseOver="ShowTip(event, 'tt20', 'link222')"onMouseOut="HideTip('tt20')">mxGraph</a>. Default is null.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.toolbar"></a>toolbar</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.toolbar</td></tr></table></blockquote><p>Holds a <ahref="mxDefaultToolbar-js.html#mxDefaultToolbar"class=LClassid=link223onMouseOver="ShowTip(event, 'tt24', 'link223')"onMouseOut="HideTip('tt24')">mxDefaultToolbar</a> for displaying the toolbar. The toolbar is created in <ahref="#mxEditor.setToolbarContainer"class=LFunctionid=link224onMouseOver="ShowTip(event, 'tt92', 'link224')"onMouseOut="HideTip('tt92')">setToolbarContainer</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.status"></a>status</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.status</td></tr></table></blockquote><p>DOM container that holds the statusbar. Default is null. Use <ahref="#mxEditor.setStatusContainer"class=LFunctionid=link225onMouseOver="ShowTip(event, 'tt93', 'link225')"onMouseOut="HideTip('tt93')">setStatusContainer</a> to set this value.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.popupHandler"></a>popupHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.popupHandler</td></tr></table></blockquote><p>Holds a <ahref="mxDefaultPopupMenu-js.html#mxDefaultPopupMenu"class=LClassid=link226onMouseOver="ShowTip(event, 'tt27', 'link226')"onMouseOut="HideTip('tt27')">mxDefaultPopupMenu</a> for displaying popupmenus.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.undoManager"></a>undoManager</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.undoManager</td></tr></table></blockquote><p>Holds an <ahref="../util/mxUndoManager-js.html#mxUndoManager"class=LClassid=link227onMouseOver="ShowTip(event, 'tt28', 'link227')"onMouseOut="HideTip('tt28')">mxUndoManager</a> for the command history.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.keyHandler"></a>keyHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.keyHandler</td></tr></table></blockquote><p>Holds a <ahref="mxDefaultKeyHandler-js.html#mxDefaultKeyHandler"class=LClassid=link228onMouseOver="ShowTip(event, 'tt30', 'link228')"onMouseOut="HideTip('tt30')">mxDefaultKeyHandler</a> for handling keyboard events. The handler is created in <ahref="#mxEditor.setGraphContainer"class=LFunctionid=link229onMouseOver="ShowTip(event, 'tt22', 'link229')"onMouseOut="HideTip('tt22')">setGraphContainer</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.actions"></a>actions</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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. Use <ahref="#mxEditor.addAction"class=LFunctionid=link230onMouseOver="ShowTip(event, 'tt75', 'link230')"onMouseOut="HideTip('tt75')">addAction</a> to add or replace an action and <ahref="#mxEditor.execute"class=LFunctionid=link231onMouseOver="ShowTip(event, 'tt76', 'link231')"onMouseOut="HideTip('tt76')">execute</a> to execute an action by name, passing the cell to be operated upon as the second argument.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.dblClickAction"></a>dblClickAction</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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. Default is edit.</p><p>To handle a singleclick, use the following code.</p><blockquote><preclass="prettyprint">editor.graph.addListener(mxEvent.CLICK, function(sender, evt)
{
var e = evt.getProperty('event');
var cell = evt.getProperty('cell');
if (cell != null && !e.isConsumed())
{
// Do something useful with cell...
e.consume();
}
});</pre></blockquote></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.swimlaneRequired"></a>swimlaneRequired</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.swimlaneRequired</td></tr></table></blockquote><p>Specifies if new cells must be inserted into an existing swimlane. Otherwise, cells that are not swimlanes can be inserted as top-level cells. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.disableContextMenu"></a>disableContextMenu</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.disableContextMenu</td></tr></table></blockquote><p>Specifies if the context menu should be disabled in the graph container. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.insertFunction"></a>insertFunction</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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. This is assigned from the <ahref="mxDefaultToolbar-js.html#mxDefaultToolbar"class=LClassid=link232onMouseOver="ShowTip(event, 'tt24', 'link232')"onMouseOut="HideTip('tt24')">mxDefaultToolbar</a> if a vertex-tool is clicked.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.forcedInserting"></a>forcedInserting</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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 <ahref="#mxEditor.insertFunction"class=LVariableid=link233onMouseOver="ShowTip(event, 'tt34', 'link233')"onMouseOut="HideTip('tt34')">insertFunction</a> if there is a cell under the mousepointer, otherwise the cell under the mousepointer is selected. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.templates"></a>templates</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.defaultEdge"></a>defaultEdge</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.defaultEdgeStyle"></a>defaultEdgeStyle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.defaultEdgeStyle</td></tr></table></blockquote><p>Specifies the edge style to be returned in <ahref="#mxEditor.getEdgeStyle"class=LFunctionid=link234onMouseOver="ShowTip(event, 'tt39', 'link234')"onMouseOut="HideTip('tt39')">getEdgeStyle</a>. Default is null.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.defaultGroup"></a>defaultGroup</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.graphRenderHint"></a>graphRenderHint</h3><divclass=CBody><p>Default size for the border of new groups. If null, then then <ahref="../view/mxGraph-js.html#mxGraph.gridSize"class=LVariableid=link235onMouseOver="ShowTip(event, 'tt135', 'link235')"onMouseOut="HideTip('tt135')">mxGraph.gridSize</a> is used. Default is null.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.filename"></a>filename</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.filename</td></tr></table></blockquote><p>Contains the URL of the last opened file as a string. Default is null.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.lineFeed"></a>lineFeed</h3><divclass=CBody><p>Character to be used for encoding linefeeds in <ahref="#mxEditor.save"class=LFunctionid=link236onMouseOver="ShowTip(event, 'tt6', 'link236')"onMouseOut="HideTip('tt6')">save</a>. Default is ‘&#xa;’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.postParameterName"></a>postParameterName</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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. Default is xml.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.escapePostData"></a>escapePostData</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.urlPost"></a>urlPost</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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 <ahref="#mxEditor.save"class=LFunctionid=link237onMouseOver="ShowTip(event, 'tt6', 'link237')"onMouseOut="HideTip('tt6')">save</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.urlImage"></a>urlImage</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.horizontalFlow"></a>horizontalFlow</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.horizontalFlow</td></tr></table></blockquote><p>Specifies the direction of the flow in the diagram. This is used in the layout algorithms. Default is false, ie. vertical flow.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.layoutDiagram"></a>layoutDiagram</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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 <ahref="#mxEditor.horizontalFlow"class=LVariableid=link238onMouseOver="ShowTip(event, 'tt46', 'link238')"onMouseOut="HideTip('tt46')">horizontalFlow</a>. The spacing between the swimlanes is specified by <ahref="#mxEditor.swimlaneSpacing"class=LVariableid=link239onMouseOver="ShowTip(event, 'tt48', 'link239')"onMouseOut="HideTip('tt48')">swimlaneSpacing</a>. Default is false.</p><p>If the top-level elements are swimlanes, then the intra-swimlane layout is activated by the <ahref="#mxEditor.layoutSwimlanes"class=LVariableid=link240onMouseOver="ShowTip(event, 'tt50', 'link240')"onMouseOut="HideTip('tt50')">layoutSwimlanes</a> switch.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.swimlaneSpacing"></a>swimlaneSpacing</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.swimlaneSpacing</td></tr></table></blockquote><p>Specifies the spacing between swimlanes if automatic layout is turned on in <ahref="#mxEditor.layoutDiagram"class=LVariableid=link241onMouseOver="ShowTip(event, 'tt47', 'link241')"onMouseOut="HideTip('tt47')">layoutDiagram</a>. Default is 0.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.maintainSwimlanes"></a>maintainSwimlanes</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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 <ahref="#mxEditor.horizontalFlow"class=LVariableid=link242onMouseOver="ShowTip(event, 'tt46', 'link242')"onMouseOut="HideTip('tt46')">horizontalFlow</a>. Default is false.</p><p>For horizontal flows, all swimlanes have the same height and for vertical flows, all swimlanes have the same width. Furthermore, the swimlanes are automatically “stacked” if <ahref="#mxEditor.layoutDiagram"class=LVariableid=link243onMouseOver="ShowTip(event, 'tt47', 'link243')"onMouseOut="HideTip('tt47')">layoutDiagram</a> is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.layoutSwimlanes"></a>layoutSwimlanes</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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 <ahref="#mxEditor.horizontalFlow"class=LVariableid=link244onMouseOver="ShowTip(event, 'tt46', 'link244')"onMouseOut="HideTip('tt46')">horizontalFlow</a>. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.cycleAttributeValues"></a>cycleAttributeValues</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.cycleAttributeValues</td></tr></table></blockquote><p>Specifies the attribute values to be cycled when inserting new swimlanes. Default is an empty array.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.cycleAttributeIndex"></a>cycleAttributeIndex</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.cycleAttributeIndex</td></tr></table></blockquote><p>Index of the last consumed attribute index. If a new swimlane is inserted, then the <ahref="#mxEditor.cycleAttributeValues"class=LVariableid=link245onMouseOver="ShowTip(event, 'tt51', 'link245')"onMouseOut="HideTip('tt51')">cycleAttributeValues</a> at this index will be used as the value for <ahref="#mxEditor.cycleAttributeName"class=LVariableid=link246onMouseOver="ShowTip(event, 'tt53', 'link246')"onMouseOut="HideTip('tt53')">cycleAttributeName</a>. Default is 0.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.cycleAttributeName"></a>cycleAttributeName</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.cycleAttributeName</td></tr></table></blockquote><p>Name of the attribute to be assigned a <ahref="#mxEditor.cycleAttributeValues"class=LVariableid=link247onMouseOver="ShowTip(event, 'tt51', 'link247')"onMouseOut="HideTip('tt51')">cycleAttributeValues</a> when inserting new swimlanes. Default is fillColor.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.tasks"></a>tasks</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.tasks</td></tr></table></blockquote><p>Holds the <ahref="../util/mxWindow-js.html#mxWindow"class=LClassid=link248onMouseOver="ShowTip(event, 'tt18', 'link248')"onMouseOut="HideTip('tt18')">mxWindow</a> created in <ahref="#mxEditor.showTasks"class=LFunctionid=link249onMouseOver="ShowTip(event, 'tt55', 'link249')"onMouseOut="HideTip('tt55')">showTasks</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.tasksWindowImage"></a>tasksWindowImage</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.tasksWindowImage</td></tr></table></blockquote><p>Icon for the tasks window.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.tasksTop"></a>tasksTop</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.tasksTop</td></tr></table></blockquote><p>Specifies the top coordinate of the tasks window in pixels. Default is 20.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.help"></a>help</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.help</td></tr></table></blockquote><p>Holds the <ahref="../util/mxWindow-js.html#mxWindow"class=LClassid=link250onMouseOver="ShowTip(event, 'tt18', 'link250')"onMouseOut="HideTip('tt18')">mxWindow</a> created in <ahref="#mxEditor.showHelp"class=LFunctionid=link251onMouseOver="ShowTip(event, 'tt59', 'link251')"onMouseOut="HideTip('tt59')">showHelp</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.helpWindowImage"></a>helpWindowImage</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.helpWindowImage</td></tr></table></blockquote><p>Icon for the help window.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.urlHelp"></a>urlHelp</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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. This is usually specified in the resources file under urlHelp for language-specific online help support.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.helpWidth"></a>helpWidth</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.helpWidth</td></tr></table></blockquote><p>Specifies the width of the help window in pixels. Default is 300.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.helpWidth"></a>helpWidth</h3><divclass=CBody><p>Specifies the width of the help window in pixels. Default is 260.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.propertiesWidth"></a>propertiesWidth</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.propertiesWidth</td></tr></table></blockquote><p>Specifies the width of the properties window in pixels. Default is 240.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.propertiesHeight"></a>propertiesHeight</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.propertiesHeight</td></tr></table></blockquote><p>Specifies the height of the properties window in pixels. If no height is specified then the window will be automatically sized to fit its contents. Default is null.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.movePropertiesDialog"></a>movePropertiesDialog</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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. This value is only taken into account if the dialog is already visible. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.validating"></a>validating</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.validating</td></tr></table></blockquote><p>Specifies if <ahref="../view/mxGraph-js.html#mxGraph.validateGraph"class=LFunctionid=link252onMouseOver="ShowTip(event, 'tt67', 'link252')"onMouseOut="HideTip('tt67')">mxGraph.validateGraph</a> should automatically be invoked after each change. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxEditor.modified"></a>modified</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.setModified"></a>setModified</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.setModified = function (</td><tdclass=PParameternowrap>value</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets <ahref="#mxEditor.modified"class=LVariableid=link254onMouseOver="ShowTip(event, 'tt68', 'link254')"onMouseOut="HideTip('tt68')">modified</a> to the specified boolean value.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.addActions"></a>addActions</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.addActions = function ()</td></tr></table></blockquote><p>Adds the built-in actions to the editor instance.</p><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>save</td><tdclass=CDLDescription>Saves the graph using <ahref="#mxEditor.urlPost"class=LVariableid=link255onMouseOver="ShowTip(event, 'tt44', 'link255')"onMouseOut="HideTip('tt44')">urlPost</a>.</td></tr><tr><tdclass=CDLEntry>print</td><tdclass=CDLDescription>Shows the graph in a new print preview window.</td></tr><tr><tdclass=CDLEntry>show</td><tdclass=CDLDescription>Shows the graph in a new window.</td></tr><tr><tdclass=CDLEntry>exportImage</td><tdclass=CDLDescription>Shows the graph as a bitmap image using <ahref="#mxEditor.getUrlImage"class=LFunctionid=link256onMouseOver="ShowTip(event, 'tt108', 'link256')"onMouseOut="HideTip('tt108')">getUrlImage</a>.</td></tr><tr><tdclass=CDLEntry>refresh</td><tdclass=CDLDescription>Refreshes the graph’s display.</td></tr><tr><tdclass=CDLEntry>cut</td><tdclass=CDLDescription>Copies the current selection into the clipboard and removes it from the graph.</td></tr><tr><tdclass=CDLEntry>copy</td><tdclass=CDLDescription>Copies the current selection into the clipboard.</td></tr><tr><tdclass=CDLEntry>paste</td><tdclass=CDLDescription>Pastes the clipboard into the graph.</td></tr><tr><tdclass=CDLEntry>delete</td><tdclass=CDLDescription>Removes the current selection from the graph.</td></tr><tr><tdclass=CDLEntry>group</td><tdclass=CDLDescription>Puts the current selection into a new group.</td></tr><tr><tdclass=CDLEntry>ungroup</td><tdclass=CDLDescription>Removes the selected groups and selects the children.</td></tr><tr><tdclass=CDLEntry>undo</td><tdclass=CDLDescription>Undoes the last change on the graph model.</td></tr><tr><tdclass=CDLEntry>redo</td><tdclass=CDLDescription>Redoes the last change on the graph model.</td></tr><tr><tdclass=CDLEntry>zoom</td><tdclass=CDLDescription>Sets the zoom via a dialog.</td></tr><tr><tdclass=CDLEntry>zoomIn</td><tdclass=CDLDescription>Zooms into the graph.</td></tr><tr><tdclass=CDLEntry>zoomOut</td><tdclass=CDLDescription>Zooms out of the graph</td></tr><tr><tdclass=CDLEntry>actualSize</td><tdclass=CDLDescription>Resets the scale and translation on the graph.</td></tr><tr><tdclass=CDLEntry>fit</td><tdclass=CDLDescription>Changes the scale so that the graph fits into the window.</td></tr><tr><tdclass=CDLEntry>showProperties</td><tdclass=CDLDescription>Shows the properties dialog.</td></tr><tr><tdclass=CDLEntry>selectAll</td><tdclass=CDLDescription>Selects all cells.</td></tr><tr><tdclass=CDLEntry>selectNone</td><tdclass=CDLDescription>Clears the selection.</td></tr><tr><tdclass=CDLEntry>selectVertices</td><tdclass=CDLDescription>Selects all vertices. selectEdges = Selects all edges.</td></tr><tr><tdclass=CDLEntry>edit</td><tdclass=CDLDescription>Starts editing the current selection cell.</td></tr><tr><tdclass=CDLEntry>enterGroup</td><tdclass=CDLDescription>Drills down into the current selection cell.</td></tr><tr><tdclass=CDLEntry>exitGroup</td><tdclass=CDLDescription>Moves up in the drilling hierachy</td></tr><tr><tdclass=CDLEntry>home</td><tdclass=CDLDescription>Moves to the topmost parent in the drilling hierarchy</td></tr><tr><tdclass=CDLEntry>selectPrevious</td><tdclass=CDLDescription>Selects the previous cell.</td></tr><tr><tdclass=CDLEntry>selectNext</td><tdclass=CDLDescription>Selects the next cell.</td></tr><tr><tdclass=CDLEntry>selectParent</td><tdclass=CDLDescription>Selects the parent of the selection cell.</td></tr><tr><tdclass=CDLEntry>selectChild</td><tdclass=CDLDescription>Selects the first child of the selection cell.</td></tr><tr><tdclass=CDLEntry>collapse</td><tdclass=CDLDescription>Collapses the currently selected cells.</td></
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.configure"></a>configure</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.configure = function (</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Configures the editor using the specified node. To load the configuration from a given URL the following code can be used to obtain the XML node.</p><blockquote><preclass="prettyprint">var node = mxUtils.load(url).getDocumentElement();</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>node</td><tdclass=CDLDescription>XML node that contains the configuration.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.resetFirstTime"></a>resetFirstTime</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.resetHistory"></a>resetHistory</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.addAction"></a>addAction</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.addAction = function (</td><tdclass=PParameternowrap>actionname,</td></tr><tr><td></td><tdclass=PParameternowrap>funct</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Binds the specified actionname to the specified function.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>actionname</td><tdclass=CDLDescription>String that specifies the name of the action to be added.</td></tr><tr><tdclass=CDLEntry>funct</td><tdclass=CDLDescription>Function that implements the new action. 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><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">editor.addAction('test', function(editor, cell)
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.execute"></a>execute</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.execute = function (</td><tdclass=PParameternowrap>actionname,</td></tr><tr><td></td><tdclass=PParameternowrap>cell,</td></tr><tr><td></td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Executes the function with the given name in <ahref="#mxEditor.actions"class=LVariableid=link257onMouseOver="ShowTip(event, 'tt2', 'link257')"onMouseOut="HideTip('tt2')">actions</a> passing the editor instance and given cell as the first and second argument. All additional arguments are passed to the action as well. This method contains a try-catch block and displays an error message if an action causes an exception. The exception is re-thrown after the error message was displayed.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">editor.execute("showProperties", cell);</pre></blockquote></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.addTemplate"></a>addTemplate</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.addTemplate = function (</td><tdclass=PParameternowrap>name,</td></tr><tr><td></td><tdclass=PParameternowrap>template</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the specified template under the given name in <ahref="#mxEditor.templates"class=LVariableid=link258onMouseOver="ShowTip(event, 'tt36', 'link258')"onMouseOut="HideTip('tt36')">templates</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.getTemplate"></a>getTemplate</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.getTemplate = function (</td><tdclass=PParameternowrap>name</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the template for the given name.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createGraph"></a>createGraph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.createGraph = function ()</td></tr></table></blockquote><p>Creates the <ahref="#mxEditor.graph"class=LVariableid=link259onMouseOver="ShowTip(event, 'tt19', 'link259')"onMouseOut="HideTip('tt19')">graph</a> for the editor. The graph is created with no container and is initialized from <ahref="#mxEditor.setGraphContainer"class=LFunctionid=link260onMouseOver="ShowTip(event, 'tt22', 'link260')"onMouseOut="HideTip('tt22')">setGraphContainer</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createSwimlaneManager"></a>createSwimlaneManager</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.createSwimlaneManager = function (</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the graph’s container using <ahref="../view/mxGraph-js.html#mxGraph.init"class=LFunctionid=link261onMouseOver="ShowTip(event, 'tt81', 'link261')"onMouseOut="HideTip('tt81')">mxGraph.init</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createLayoutManager"></a>createLayoutManager</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.createLayoutManager = function (</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</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>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.setGraphContainer"></a>setGraphContainer</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.setGraphContainer = function (</td><tdclass=PParameternowrap>container</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the graph’s container using <ahref="../view/mxGraph-js.html#mxGraph.init"class=LFunctionid=link262onMouseOver="ShowTip(event, 'tt81', 'link262')"onMouseOut="HideTip('tt81')">mxGraph.init</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.installDblClickHandler"></a>installDblClickHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.installDblClickHandler = function (</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Overrides <ahref="../view/mxGraph-js.html#mxGraph.dblClick"class=LFunctionid=link263onMouseOver="ShowTip(event, 'tt84', 'link263')"onMouseOut="HideTip('tt84')">mxGraph.dblClick</a> to invoke <ahref="#mxEditor.dblClickAction"class=LVariableid=link264onMouseOver="ShowTip(event, 'tt31', 'link264')"onMouseOut="HideTip('tt31')">dblClickAction</a> on a cell and reset the selection tool in the toolbar.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.installUndoHandler"></a>installUndoHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.installUndoHandler = function (</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the <ahref="#mxEditor.undoManager"class=LVariableid=link265onMouseOver="ShowTip(event, 'tt4', 'link265')"onMouseOut="HideTip('tt4')">undoManager</a> to the graph model and the view.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.installDrillHandler"></a>installDrillHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.installDrillHandler = function (</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Installs listeners for dispatching the <root> event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.installChangeHandler"></a>installChangeHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.installChangeHandler = function (</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Installs the listeners required to automatically validate the graph. On each change of the root, this implementation fires a <root> event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.installInsertHandler"></a>installInsertHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.installInsertHandler = function (</td><tdclass=PParameternowrap>graph</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Installs the handler for invoking <ahref="#mxEditor.insertFunction"class=LVariableid=link266onMouseOver="ShowTip(event, 'tt34', 'link266')"onMouseOut="HideTip('tt34')">insertFunction</a> if one is defined.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createDiagramLayout"></a>createDiagramLayout</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createSwimlaneLayout"></a>createSwimlaneLayout</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createToolbar"></a>createToolbar</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.createToolbar = function ()</td></tr></table></blockquote><p>Creates the <ahref="#mxEditor.toolbar"class=LVariableid=link267onMouseOver="ShowTip(event, 'tt23', 'link267')"onMouseOut="HideTip('tt23')">toolbar</a> with no container.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.setToolbarContainer"></a>setToolbarContainer</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.setToolbarContainer = function (</td><tdclass=PParameternowrap>container</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Initializes the toolbar for the given container.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.setStatusContainer"></a>setStatusContainer</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.setStatusContainer = function (</td><tdclass=PParameternowrap>container</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates the <ahref="#mxEditor.status"class=LVariableid=link268onMouseOver="ShowTip(event, 'tt25', 'link268')"onMouseOut="HideTip('tt25')">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><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>container</td><tdclass=CDLDescription>DOM node that will contain the statusbar.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.setStatus"></a>setStatus</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.setStatus = function (</td><tdclass=PParameternowrap>message</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Display the specified message in the status bar.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>message</td><tdclass=CDLDescription>String the specified the message to be displayed.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.setTitleContainer"></a>setTitleContainer</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.setTitleContainer = function (</td><tdclass=PParameternowrap>container</td><tdclass=PAfterParametersnowrap>)</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 <ahref="#mxEditor.getTitle"class=LFunctionid=link269onMouseOver="ShowTip(event, 'tt96', 'link269')"onMouseOut="HideTip('tt96')">getTitle</a>.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>container</td><tdclass=CDLDescription>DOM node that will contain the title.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.treeLayout"></a>treeLayout</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.treeLayout = function (</td><tdclass=PParameternowrap>cell,</td></tr><tr><td></td><tdclass=PParameternowrap>horizontal</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Executes a vertical or horizontal compact tree layout using the specified cell as an argument. The cell may either be a group or the root of a tree.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-js.html#mxCell"class=LClassid=link270onMouseOver="ShowTip(event, 'tt123', 'link270')"onMouseOut="HideTip('tt123')">mxCell</a> to use in the compact tree layout.</td></tr><tr><tdclass=CDLEntry>horizontal</td><tdclass=CDLDescription>Optional boolean to specify the tree’s orientation. Default is true.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.getTitle"></a>getTitle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.getRootTitle"></a>getRootTitle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.getRootTitle = function ()</td></tr></table></blockquote><p>Returns the string value of the root cell in <ahref="../view/mxGraph-js.html#mxGraph.model"class=LVariableid=link271onMouseOver="ShowTip(event, 'tt99', 'link271')"onMouseOut="HideTip('tt99')">mxGraph.model</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.undo"></a>undo</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.undo = function ()</td></tr></table></blockquote><p>Undo the last change in <ahref="#mxEditor.graph"class=LVariableid=link272onMouseOver="ShowTip(event, 'tt19', 'link272')"onMouseOut="HideTip('tt19')">graph</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.redo"></a>redo</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.redo = function ()</td></tr></table></blockquote><p>Redo the last change in <ahref="#mxEditor.graph"class=LVariableid=link273onMouseOver="ShowTip(event, 'tt19', 'link273')"onMouseOut="HideTip('tt19')">graph</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.groupCells"></a>groupCells</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.groupCells = function ()</td></tr></table></blockquote><p>Invokes <ahref="#mxEditor.createGroup"class=LFunctionid=link274onMouseOver="ShowTip(event, 'tt103', 'link274')"onMouseOut="HideTip('tt103')">createGroup</a> to create a new group cell and the invokes <ahref="../view/mxGraph-js.html#mxGraph.groupCells"class=LFunctionid=link275onMouseOver="ShowTip(event, 'tt104', 'link275')"onMouseOut="HideTip('tt104')">mxGraph.groupCells</a>, using the grid size of the graph as the spacing in the group’s content area.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createGroup"></a>createGroup</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.createGroup = function ()</td></tr></table></blockquote><p>Creates and returns a clone of <ahref="#mxEditor.defaultGroup"class=LVariableid=link276onMouseOver="ShowTip(event, 'tt40', 'link276')"onMouseOut="HideTip('tt40')">defaultGroup</a> to be used as a new group cell in <group>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.open"></a>open</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.open = function (</td><tdclass=PParameternowrap>filename</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Opens the specified file synchronously and parses it using <ahref="#mxEditor.readGraphModel"class=LFunctionid=link277onMouseOver="ShowTip(event, 'tt105', 'link277')"onMouseOut="HideTip('tt105')">readGraphModel</a>. It updates <ahref="#mxEditor.filename"class=LVariableid=link278onMouseOver="ShowTip(event, 'tt41', 'link278')"onMouseOut="HideTip('tt41')">filename</a> and fires an <ahref="#mxEditor.open"class=LFunctionid=link279onMouseOver="ShowTip(event, 'tt5', 'link279')"onMouseOut="HideTip('tt5')">open</a>-event after the file has been opened. Exceptions should be handled as follows:</p><blockquote><preclass="prettyprint">try
}</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>filename</td><tdclass=CDLDescription>URL of the file to be opened.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.readGraphModel"></a>readGraphModel</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.readGraphModel = function (</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</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>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.save"></a>save</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.save = function (</td><tdclass=PParameternowrap>url,</td></tr><tr><td></td><tdclass=PParameternowrap>linefeed</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Posts the string returned by <ahref="#mxEditor.writeGraphModel"class=LFunctionid=link280onMouseOver="ShowTip(event, 'tt106', 'link280')"onMouseOut="HideTip('tt106')">writeGraphModel</a> to the given URL or the URL returned by <ahref="#mxEditor.getUrlPost"class=LFunctionid=link281onMouseOver="ShowTip(event, 'tt107', 'link281')"onMouseOut="HideTip('tt107')">getUrlPost</a>. The actual posting is carried out by <ahref="#mxEditor.postDiagram"class=LFunctionid=link282onMouseOver="ShowTip(event, 'tt7', 'link282')"onMouseOut="HideTip('tt7')">postDiagram</a>. If the URL is null then the resulting XML will be displayed using <ahref="../util/mxUtils-js.html#mxUtils.popup"class=LFunctionid=link283onMouseOver="ShowTip(event, 'tt136', 'link283')"onMouseOut="HideTip('tt136')">mxUtils.popup</a>. Exceptions should be handled as follows:</p><blockquote><preclass="prettyprint">try
mxUtils.error('Cannot save : ' + e.message, 280, true);
}</pre></blockquote></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.postDiagram"></a>postDiagram</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.postDiagram = function (</td><tdclass=PParameternowrap>url,</td></tr><tr><td></td><tdclass=PParameternowrap>data</td><tdclass=PAfterParametersnowrap>)</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. This fires an asynchronous <post> event if the diagram has been posted.</p><h4class=CHeading>Example</h4><p>To replace the diagram with the diagram in the response, use the following code.</p><blockquote><preclass="prettyprint">editor.addListener(mxEvent.POST, function(sender, evt)
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.writeGraphModel"></a>writeGraphModel</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.writeGraphModel = function (</td><tdclass=PParameternowrap>linefeed</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook to create the string representation of the diagram. The default implementation uses an <ahref="../io/mxCodec-js.html#mxCodec"class=LClassid=link284onMouseOver="ShowTip(event, 'tt3', 'link284')"onMouseOut="HideTip('tt3')">mxCodec</a> to encode the graph model as follows:</p><blockquote><preclass="prettyprint">var enc = new mxCodec();
return mxUtils.getXml(node, this.linefeed);</pre></blockquote><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>linefeed</td><tdclass=CDLDescription>Optional character to be used as the linefeed. Default is <linefeed>.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.getUrlPost"></a>getUrlPost</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.getUrlPost = function ()</td></tr></table></blockquote><p>Returns the URL to post the diagram to. This is used in <ahref="#mxEditor.save"class=LFunctionid=link285onMouseOver="ShowTip(event, 'tt6', 'link285')"onMouseOut="HideTip('tt6')">save</a>. The default implementation returns <ahref="#mxEditor.urlPost"class=LVariableid=link286onMouseOver="ShowTip(event, 'tt44', 'link286')"onMouseOut="HideTip('tt44')">urlPost</a>, adding <code>?draft=true</code>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.getUrlImage"></a>getUrlImage</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.getUrlImage = function ()</td></tr></table></blockquote><p>Returns the URL to create the image with. This is typically the URL of a backend which accepts an XML representation of a graph view to create an image. The function is used in the image action to create an image. This implementation returns <ahref="#mxEditor.urlImage"class=LVariableid=link287onMouseOver="ShowTip(event, 'tt45', 'link287')"onMouseOut="HideTip('tt45')">urlImage</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.swapStyles"></a>swapStyles</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.swapStyles = function (</td><tdclass=PParameternowrap>first,</td></tr><tr><td></td><tdclass=PParameternowrap>second</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Swaps the styles for the given names in the graph’s stylesheet and refreshes the graph.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.showProperties"></a>showProperties</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.showProperties = function (</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and shows the properties dialog for the given cell. The content area of the dialog is created using <ahref="#mxEditor.createProperties"class=LFunctionid=link288onMouseOver="ShowTip(event, 'tt112', 'link288')"onMouseOut="HideTip('tt112')">createProperties</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.isPropertiesVisible"></a>isPropertiesVisible</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="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>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createProperties"></a>createProperties</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.createProperties = function (</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</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. This implementation works for user objects that are XML nodes and display all the node attributes in a form.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.hideProperties"></a>hideProperties</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.hideProperties = function ()</td></tr></table></blockquote><p>Hides the properties dialog.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.showTasks"></a>showTasks</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.showTasks = function ()</td></tr></table></blockquote><p>Shows the tasks window. The tasks window is created using <ahref="#mxEditor.createTasks"class=LFunctionid=link289onMouseOver="ShowTip(event, 'tt115', 'link289')"onMouseOut="HideTip('tt115')">createTasks</a>. The default width of the window is 200 pixels, the y-coordinate of the location can be specifies in <ahref="#mxEditor.tasksTop"class=LVariableid=link290onMouseOver="ShowTip(event, 'tt57', 'link290')"onMouseOut="HideTip('tt57')">tasksTop</a> and the x-coordinate is right aligned with a 20 pixel offset from the right border. To change the location of the tasks window, the following code can be used:</p><blockquote><preclass="prettyprint">var oldShowTasks = mxEditor.prototype.showTasks;
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.refreshTasks"></a>refreshTasks</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.refreshTasks = function (</td><tdclass=PParameternowrap>div</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Updates the contents of the tasks window using <ahref="#mxEditor.createTasks"class=LFunctionid=link291onMouseOver="ShowTip(event, 'tt115', 'link291')"onMouseOut="HideTip('tt115')">createTasks</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createTasks"></a>createTasks</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.createTasks = function (</td><tdclass=PParameternowrap>div</td><tdclass=PAfterParametersnowrap>)</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. This is invoked whenever there is a possible change of state in the editor. Default implementation is empty.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.showHelp"></a>showHelp</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.showHelp = function (</td><tdclass=PParameternowrap>tasks</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Shows the help window. If the help window does not exist then it is created using an iframe pointing to the resource for the <code>urlHelp</code> key or <ahref="#mxEditor.urlHelp"class=LVariableid=link292onMouseOver="ShowTip(event, 'tt61', 'link292')"onMouseOut="HideTip('tt61')">urlHelp</a> if the resource is undefined.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.showOutline"></a>showOutline</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.showOutline = function ()</td></tr></table></blockquote><p>Shows the outline window. If the window does not exist, then it is created using an <ahref="../view/mxOutline-js.html#mxOutline"class=LClassid=link293onMouseOver="ShowTip(event, 'tt134', 'link293')"onMouseOut="HideTip('tt134')">mxOutline</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.setMode"></a>setMode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.setMode = function(</td><tdclass=PParameternowrap>modename</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Puts the graph into the specified mode. The following modenames are supported:</p><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>select</td><tdclass=CDLDescription>Selects using the left mouse button, new connections are disabled.</td></tr><tr><tdclass=CDLEntry>connect</td><tdclass=CDLDescription>Selects using the left mouse button or creates new connections if mouse over cell hotspot. See <ahref="../handler/mxConnectionHandler-js.html#mxConnectionHandler"class=LClassid=link294onMouseOver="ShowTip(event, 'tt137', 'link294')"onMouseOut="HideTip('tt137')">mxConnectionHandler</a>.</td></tr><tr><tdclass=CDLEntry>pan</td><tdclass=CDLDescription>Pans using the left mouse button, new connections are disabled.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createPopupMenu"></a>createPopupMenu</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.createPopupMenu = function (</td><tdclass=PParameternowrap>menu,</td></tr><tr><td></td><tdclass=PParameternowrap>cell,</td></tr><tr><td></td><tdclass=PParameternowrap>evt</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Uses <ahref="#mxEditor.popupHandler"class=LVariableid=link295onMouseOver="ShowTip(event, 'tt26', 'link295')"onMouseOut="HideTip('tt26')">popupHandler</a> to create the menu in the graph’s panning handler. The redirection is setup in <ahref="#mxEditor.setToolbarContainer"class=LFunctionid=link296onMouseOver="ShowTip(event, 'tt92', 'link296')"onMouseOut="HideTip('tt92')">setToolbarContainer</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.createEdge"></a>createEdge</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.createEdge = function (</td><tdclass=PParameternowrap>source,</td></tr><tr><td></td><tdclass=PParameternowrap>target</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Uses <ahref="#mxEditor.defaultEdge"class=LVariableid=link297onMouseOver="ShowTip(event, 'tt37', 'link297')"onMouseOut="HideTip('tt37')">defaultEdge</a> as the prototype for creating new edges in the connection handler of the graph. The style of the edge will be overridden with the value returned by <ahref="#mxEditor.getEdgeStyle"class=LFunctionid=link298onMouseOver="ShowTip(event, 'tt39', 'link298')"onMouseOut="HideTip('tt39')">getEdgeStyle</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.getEdgeStyle"></a>getEdgeStyle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.getEdgeStyle = function ()</td></tr></table></blockquote><p>Returns a string identifying the style of new edges. The function is used in <ahref="#mxEditor.createEdge"class=LFunctionid=link299onMouseOver="ShowTip(event, 'tt119', 'link299')"onMouseOut="HideTip('tt119')">createEdge</a> when new edges are created in the graph.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.consumeCycleAttribute"></a>consumeCycleAttribute</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.consumeCycleAttribute = function (</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the next attribute in <ahref="#mxEditor.cycleAttributeValues"class=LVariableid=link300onMouseOver="ShowTip(event, 'tt51', 'link300')"onMouseOut="HideTip('tt51')">cycleAttributeValues</a> or null, if not attribute should be used in the specified cell.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.cycleAttribute"></a>cycleAttribute</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.cycleAttribute = function (</td><tdclass=PParameternowrap>cell</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Uses the returned value from <ahref="#mxEditor.consumeCycleAttribute"class=LFunctionid=link301onMouseOver="ShowTip(event, 'tt120', 'link301')"onMouseOut="HideTip('tt120')">consumeCycleAttribute</a> as the value for the <ahref="#mxEditor.cycleAttributeName"class=LVariableid=link302onMouseOver="ShowTip(event, 'tt53', 'link302')"onMouseOut="HideTip('tt53')">cycleAttributeName</a> key in the given cell’s style.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.addVertex"></a>addVertex</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.addVertex = function (</td><tdclass=PParameternowrap>parent,</td></tr><tr><td></td><tdclass=PParameternowrap>vertex,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</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 <ahref="#mxEditor.addVertex"class=LFunctionid=link303onMouseOver="ShowTip(event, 'tt8', 'link303')"onMouseOut="HideTip('tt8')">addVertex</a> event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxEditor.destroy"></a>destroy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.destroy = function ()</td></tr></table></blockquote><p>Removes the editor and all its associated resources. This does not normally need to be called, it is called automatically when the window unloads.</p></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CClass>Base class for objects that dispatch named events. </div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="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><divclass=CToolTipid="tt3"><divclass=CClass>XML codec for JavaScript object graphs. </div></div><divclass=CToolTipid="tt4"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.undoManager</td></tr></table></blockquote>Holds an mxUndoManager for the command history.</div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.open = function (</td><tdclass=PParameternowrap>filename</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Opens the specified file synchronously and parses it using readGraphModel. </div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.save = function (</td><tdclass=PParameternowrap>url,</td></tr><tr><td></td><tdclass=PParameternowrap>linefeed</td><tdclass=PAfterParametersnowrap>)</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><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.postDiagram = function (</td><tdclass=PParameternowrap>url,</td></tr><tr><td></td><tdclass=PParameternowrap>data</td><tdclass=PAfterParametersnowrap>)</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><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxEditor.prototype.addVertex = function (</td><tdclass=PParameternowrap>parent,</td></tr><tr><td></td><tdclass=PParameternowrap>vertex,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y</td><tdclass=PAfterParametersnowrap>)</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><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxEditor(</td><tdclass=PParameternowrap>config</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new editor. </div></div><divclass=CToolTipid="tt10"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.askZoomResource</td></tr></table></blockquote>Specifies the resource key for the zoom dialog. </div></div><divclass=CToolTipid="tt11"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxEditor.prototype.lastSavedResource</td></tr></table></blockquote>Specifies the resource key for the last saved info. </div></div><divclass=CToolTipid="tt12"><divclass=CVariable><blockquote><tabl