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