<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxGraph"></a>mxGraph</h1><divclass=CBody><p>Implements a graph component.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxGraph">mxGraph</a></td><tdclass=SDescription>Implements a graph component.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraph.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraph.model"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">model</a></td><tdclass=SDescription>Holds the <ahref="#mxGraph.mxGraphModel"class=LFunctionid=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">mxGraphModel</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGraph.stylesheet"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">stylesheet</a></td><tdclass=SDescription>Holds the <ahref="mxStylesheet-php.html#mxStylesheet"class=LClassid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">mxStylesheet</a>.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraph.view"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">view</a></td><tdclass=SDescription>Holds the <ahref="mxGraphView-php.html#mxGraphView"class=LClassid=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">mxGraphView</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGraph.gridSize"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">gridSize</a></td><tdclass=SDescription>Specifies the grid size. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraph.labelsVisible"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">labelsVisible</a></td><tdclass=SDescription>Specifies if labels should be visible. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxGraph.defaultLoopStyle"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">defaultLoopStyle</a></td><tdclass=SDescription><ahref="mxEdgeStyle-php.html#mxEdgeStyle"class=LClassid=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">mxEdgeStyle</a> to be used for loops. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraph.imageBundles"id=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut="HideTip('tt11')">imageBundles</a></td><tdclass=SDescription>Holds the list of image bundles.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxGraph.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraph.mxGraphModel">mxGraphModel</a></td><tdclass=SDescription>Constructs a new graph model using the specified root cell.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxGraph.createStylesheet"id=link12onMouseOver="ShowTip(event, 'tt12', 'link12')"onMouseOut="HideTip('tt12')">createStylesheet</a></td><tdclass=SDescription>Creates a new <ahref="mxStylesheet-php.html#mxStylesheet"class=LClassid=link13onMouseOver="ShowTip(event, 'tt4', 'link13')"onMouseOut="HideTip('tt4')">mxStylesheet</a> to be used in this graph.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxGraph.createGraphView"id=link14onMouseOver="ShowTip(event, 'tt13', 'link14')"onMouseOut="HideTip('tt13')">createGraphView</a></td><tdclass=SDescription>Creates a new <ahref="mxGraphView-php.html#mxGraphView"class=LClassid=link15onMouseOver="ShowTip(event, 'tt6', 'link15')"onMouseOut="HideTip('tt6')">mxGraphView</a> to be used in this graph.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahr
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraph.gridSize"></a>gridSize</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">var $gridSize</td></tr></table></blockquote><p>Specifies the grid size. Default is 10.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraph.labelsVisible"></a>labelsVisible</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">var $labelsVisible</td></tr></table></blockquote><p>Specifies if labels should be visible. This is used in <ahref="#mxGraph.getLabel"class=LFunctionid=link69onMouseOver="ShowTip(event, 'tt21', 'link69')"onMouseOut="HideTip('tt21')">getLabel</a>. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraph.defaultLoopStyle"></a>defaultLoopStyle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">var $defaultLoopStyle</td></tr></table></blockquote><p><ahref="mxEdgeStyle-php.html#mxEdgeStyle"class=LClassid=link70onMouseOver="ShowTip(event, 'tt10', 'link70')"onMouseOut="HideTip('tt10')">mxEdgeStyle</a> to be used for loops. This is a fallback for loops if the <ahref="../util/mxConstants-php.html#mxConstants.STYLE_LOOP"class=LVariableid=link71onMouseOver="ShowTip(event, 'tt53', 'link71')"onMouseOut="HideTip('tt53')">mxConstants.STYLE_LOOP</a> is undefined. Default is <ahref="mxEdgeStyle-php.html#mxEdgeStyle.Loop"class=LVariableid=link72onMouseOver="ShowTip(event, 'tt54', 'link72')"onMouseOut="HideTip('tt54')">mxEdgeStyle.Loop</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxGraph.imageBundles"></a>imageBundles</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">protected $imageBundles</td></tr></table></blockquote><p>Holds the list of image bundles.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.mxGraphModel"></a>mxGraphModel</h3><divclass=CBody><p>Constructs a new graph model using the specified root cell.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.createStylesheet"></a>createStylesheet</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function createStylesheet()</td></tr></table></blockquote><p>Creates a new <ahref="mxStylesheet-php.html#mxStylesheet"class=LClassid=link73onMouseOver="ShowTip(event, 'tt4', 'link73')"onMouseOut="HideTip('tt4')">mxStylesheet</a> to be used in this graph.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.createGraphView"></a>createGraphView</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function createGraphView()</td></tr></table></blockquote><p>Creates a new <ahref="mxGraphView-php.html#mxGraphView"class=LClassid=link74onMouseOver="ShowTip(event, 'tt6', 'link74')"onMouseOut="HideTip('tt6')">mxGraphView</a> to be used in this graph.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getModel"></a>getModel</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function getModel()</td></tr></table></blockquote><p>Returns the <ahref="#mxGraph.mxGraphModel"class=LFunctionid=link75onMouseOver="ShowTip(event, 'tt2', 'link75')"onMouseOut="HideTip('tt2')">mxGraphModel</a> that contains the cells.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getStylesheet"></a>getStylesheet</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function getStylesheet()</td></tr></table></blockquote><p>Returns the <ahref="mxStylesheet-php.html#mxStylesheet"class=LClassid=link76onMouseOver="ShowTip(event, 'tt4', 'link76')"onMouseOut="HideTip('tt4')">mxStylesheet</a> that defines the style.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getView"></a>getView</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function getView()</td></tr></table></blockquote><p>Returns the <ahref="mxGraphView-php.html#mxGraphView"class=LClassid=link77onMouseOver="ShowTip(event, 'tt6', 'link77')"onMouseOut="HideTip('tt6')">mxGraphView</a> that contains the <ahref="mxCellState-php.html#mxCellState"class=LClassid=link78onMouseOver="ShowTip(event, 'tt17', 'link78')"onMouseOut="HideTip('tt17')">mxCellStates</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getDefaultParent"></a>getDefaultParent</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function getDefaultParent()</td></tr></table></blockquote><p>Returns the first child child of <ahref="../model/mxGraphModel-php.html#mxGraphModel.root"class=LVariableid=link79onMouseOver="ShowTip(event, 'tt19', 'link79')"onMouseOut="HideTip('tt19')">mxGraphModel.root</a>. The value returned by this function should be used as the parent for new cells (aka default layer).</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.convertValueToString"></a>convertValueToString</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function convertValueToString(</td><tdclass="PParameter prettyprint "nowrap>$cell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the textual representation for the given cell. This implementation returns the nodename or string-representation of the user object.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getLabel"></a>getLabel</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function getLabel(</td><tdclass="PParameter prettyprint "nowrap>$cell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a string or DOM node that represents the label for the given cell. This implementation uses <ahref="#mxGraph.convertValueToString"class=LFunctionid=link80onMouseOver="ShowTip(event, 'tt20', 'link80')"onMouseOut="HideTip('tt20')">convertValueToString</a> if <ahref="#mxGraph.labelsVisible"class=LVariableid=link81onMouseOver="ShowTip(event, 'tt8', 'link81')"onMouseOut="HideTip('tt8')">labelsVisible</a> is true. Otherwise it returns an empty string.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getChildOffsetForCell"></a>getChildOffsetForCell</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function getChildOffsetForCell(</td><tdclass="PParameter prettyprint "nowrap>$cell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the offset to be used for the cells inside the given cell. The root and layer cells may be identified using <mxGraphModel.isRoot> and <mxGraphModel.isLayer>. For all other current roots, the <mxGraphView.currentRoot> field points to the respective cell, so that the following holds: cell == this.view.currentRoot. This implementation returns null.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cell</td><tdclass=CDLDescription><ahref="../model/mxCell-php.html#mxCell"class=LClassid=link82onMouseOver="ShowTip(event, 'tt28', 'link82')"onMouseOut="HideTip('tt28')">mxCell</a> whose offset should be returned.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.isOrthogonal"></a>isOrthogonal</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function isOrthogonal(</td><tdclass="PParameter prettyprint "nowrap>$edge</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if perimeter points should be computed such that the resulting edge has only horizontal or vertical segments.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>edge</td><tdclass=CDLDescription><ahref="mxCellState-php.html#mxCellState"class=LClassid=link83onMouseOver="ShowTip(event, 'tt17', 'link83')"onMouseOut="HideTip('tt17')">mxCellState</a> that represents the edge.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.isCellVisible"></a>isCellVisible</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function isCellVisible(</td><tdclass="PParameter prettyprint "nowrap>$cell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given cell is visible.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.isCellCollapsed"></a>isCellCollapsed</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function isCellCollapsed(</td><tdclass="PParameter prettyprint "nowrap>$cell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given cell is collapsed.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.isCellCollapsed"></a>isCellCollapsed</h3><divclass=CBody><p>Returns true if the given cell is connectable.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getCellGeometry"></a>getCellGeometry</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function getCellGeometry(</td><tdclass="PParameter prettyprint "nowrap>$cell</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the <ahref="../model/mxGeometry-php.html#mxGeometry"class=LClassid=link84onMouseOver="ShowTip(event, 'tt27', 'link84')"onMouseOut="HideTip('tt27')">mxGeometry</a> for the given <ahref="../model/mxCell-php.html#mxCell"class=LClassid=link85onMouseOver="ShowTip(event, 'tt28', 'link85')"onMouseOut="HideTip('tt28')">mxCell</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.postProcessCellStyle"></a>postProcessCellStyle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function postProcessCellStyle(</td><tdclass="PParameter prettyprint "nowrap>$style</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Tries to resolve the value for the image style in the image bundles and turns short data URIs as defined in mxImageBundle to data URIs as defined in RFC 2397 of the IETF.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.setCellStyles"></a>setCellStyles</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function setCellStyles(</td><tdclass="PParameter prettyprint "nowrap>$key,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$value,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$cells</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the key to value in the styles of the given cells. This will modify the existing cell styles in-place and override any existing assignment for the given key. If no cells are specified, then the selection cells are changed. If no value is specified, then the respective key is removed from the styles.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>key</td><tdclass=CDLDescription>String representing the key to be assigned.</td></tr><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>String representing the new value for the key.</td></tr><tr><tdclass=CDLEntry>cells</td><tdclass=CDLDescription>Array of <ahref="../model/mxCell-php.html#mxCell"class=LClassid=link86onMouseOver="ShowTip(event, 'tt28', 'link86')"onMouseOut="HideTip('tt28')">mxCells</a> to change the style for.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getImageFromBundles"></a>getImageFromBundles</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function getImageFromBundles(</td><tdclass="PParameter prettyprint "nowrap>$key</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Searches all <ahref="#mxGraph.imageBundles"class=LVariableid=link89onMouseOver="ShowTip(event, 'tt11', 'link89')"onMouseOut="HideTip('tt11')">imageBundles</a> for the specified key and returns the value for the first match or null if the key is not found.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.insertVertex"></a>insertVertex</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function insertVertex(</td><tdclass="PParameter prettyprint "nowrap>$parent,</td><tdclass="PDefaultValuePrefix prettyprint "> </td><tdclass="PDefaultValue prettyprint "width=100%></td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$id</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$value</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$x</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> 0,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$y</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> 0,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$width</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> 1,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$height</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> 1,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$style</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$relative</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> false</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a new vertex into the given parent <ahref="../model/mxCell-php.html#mxCell"class=LClassid=link92onMouseOver="ShowTip(event, 'tt28', 'link92')"onMouseOut="HideTip('tt28')">mxCell</a> using value as the user object and the given coordinates as the <ahref="../model/mxGeometry-php.html#mxGeometry"class=LClassid=link93onMouseOver="ShowTip(event, 'tt27', 'link93')"onMouseOut="HideTip('tt27')">mxGeometry</a> of the new vertex. The id and style are used for the respective properties of the new <ahref="../model/mxCell-php.html#mxCell"class=LClassid=link94onMouseOver="ShowTip(event, 'tt28', 'link94')"onMouseOut="HideTip('tt28')">mxCell</a>, which is returned.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription><ahref="../model/mxCell-php.html#mxCell"class=LClassid=link95onMouseOver="ShowTip(event, 'tt28', 'link95')"onMouseOut="HideTip('tt28')">mxCell</a> that specifies the parent of the new vertex.</td></tr><tr><tdclass=CDLEntry>id</td><tdclass=CDLDescription>Optional string that defines the Id of the new vertex.</td></tr><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>Object to be used as the user object.</td></tr><tr><tdclass=CDLEntry>x</td><tdclass=CDLDescription>Integer that defines the x coordinate of the vertex.</td></tr><tr><tdclass=CDLEntry>y</td><tdclass=CDLDescription>Integer that defines the y coordinate of the vertex.</td></tr><tr><tdclass=CDLEntry>width</td><tdclass=CDLDescription>Integer that defines the width of the vertex.</td></tr><tr><tdclass=CDLEntry>height</td><tdclass=CDLDescription>Integer that defines the height of the vertex.</td></tr><tr><tdclass=CDLEntry>style</td><tdclass=CDLDescription>Optional string that defines the cell style.</td></tr><tr><tdclass=CDLEntry>relative</td><tdclass=CDLDescription>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.insertEdge"></a>insertEdge</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function insertEdge(</td><tdclass="PParameter prettyprint "nowrap>$parent,</td><tdclass="PDefaultValuePrefix prettyprint "> </td><tdclass="PDefaultValue prettyprint "width=100%></td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$id</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$value</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$source</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$target</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$style</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a new edge into the given parent <ahref="../model/mxCell-php.html#mxCell"class=LClassid=link96onMouseOver="ShowTip(event, 'tt28', 'link96')"onMouseOut="HideTip('tt28')">mxCell</a> using value as the user object and the given source and target as the terminals of the new edge. The id and style are used for the respective properties of the new <ahref="../model/mxCell-php.html#mxCell"class=LClassid=link97onMouseOver="ShowTip(event, 'tt28', 'link97')"onMouseOut="HideTip('tt28')">mxCell</a>, which is returned.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription><ahref="../model/mxCell-php.html#mxCell"class=LClassid=link98onMouseOver="ShowTip(event, 'tt28', 'link98')"onMouseOut="HideTip('tt28')">mxCell</a> that specifies the parent of the new edge.</td></tr><tr><tdclass=CDLEntry>id</td><tdclass=CDLDescription>Optional string that defines the Id of the new edge.</td></tr><tr><tdclass=CDLEntry>value</td><tdclass=CDLDescription>JavaScript object to be used as the user object.</td></tr><tr><tdclass=CDLEntry>source</td><tdclass=CDLDescription><ahref="../model/mxCell-php.html#mxCell"class=LClassid=link99onMouseOver="ShowTip(event, 'tt28', 'link99')"onMouseOut="HideTip('tt28')">mxCell</a> that defines the source of the edge.</td></tr><tr><tdclass=CDLEntry>target</td><tdclass=CDLDescription><ahref="../model/mxCell-php.html#mxCell"class=LClassid=link100onMouseOver="ShowTip(event, 'tt28', 'link100')"onMouseOut="HideTip('tt28')">mxCell</a> that defines the target of the edge.</td></tr><tr><tdclass=CDLEntry>style</td><tdclass=CDLDescription>Optional string that defines the cell style.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.createEdge"></a>createEdge</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function createEdge(</td><tdclass="PParameter prettyprint "nowrap>$parent,</td><tdclass="PDefaultValuePrefix prettyprint "> </td><tdclass="PDefaultValue prettyprint "width=100%></td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$id</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$value</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$source</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$target</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$style</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> null</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates the edge to be used in <ahref="#mxGraph.insertEdge"class=LFunctionid=link101onMouseOver="ShowTip(event, 'tt39', 'link101')"onMouseOut="HideTip('tt39')">insertEdge</a>. This implementation does not set the source and target of the edge, these are set when the edge is added to the model.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getGraphBounds"></a>getGraphBounds</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function getGraphBounds()</td></tr></table></blockquote><p>Returns the bounds of the visible graph. Shortcut to <ahref="mxGraphView-php.html#mxGraphView.getGraphBounds"class=LFunctionid=link102onMouseOver="ShowTip(event, 'tt55', 'link102')"onMouseOut="HideTip('tt55')">mxGraphView.getGraphBounds</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getPaintBounds"></a>getPaintBounds</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function getPaintBounds(</td><tdclass="PParameter prettyprint "nowrap>$cells</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the bounding box of the given cells and their descendants.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getConnectionConstraint"></a>getConnectionConstraint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function getConnectionConstraint(</td><tdclass="PParameter prettyprint "nowrap>$edge,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$terminal,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$source</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns an <ahref="mxConnectionConstraint-php.html#mxConnectionConstraint"class=LClassid=link103onMouseOver="ShowTip(event, 'tt47', 'link103')"onMouseOut="HideTip('tt47')">mxConnectionConstraint</a> that describes the given connection point. This result can then be passed to <ahref="#mxGraph.getConnectionPoint"class=LFunctionid=link104onMouseOver="ShowTip(event, 'tt48', 'link104')"onMouseOut="HideTip('tt48')">getConnectionPoint</a>.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>edge</td><tdclass=CDLDescription><ahref="mxCellState-php.html#mxCellState"class=LClassid=link105onMouseOver="ShowTip(event, 'tt17', 'link105')"onMouseOut="HideTip('tt17')">mxCellState</a> that represents the edge.</td></tr><tr><tdclass=CDLEntry>terminal</td><tdclass=CDLDescription><ahref="mxCellState-php.html#mxCellState"class=LClassid=link106onMouseOver="ShowTip(event, 'tt17', 'link106')"onMouseOut="HideTip('tt17')">mxCellState</a> that represents the terminal.</td></tr><tr><tdclass=CDLEntry>source</td><tdclass=CDLDescription>Boolean indicating if the terminal is the source or target.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.getConnectionPoint"></a>getConnectionPoint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function getConnectionPoint(</td><tdclass="PParameter prettyprint "nowrap>$vertex,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$constraint</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the nearest point in the list of absolute points or the center of the opposite terminal.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>vertex</td><tdclass=CDLDescription><ahref="mxCellState-php.html#mxCellState"class=LClassid=link107onMouseOver="ShowTip(event, 'tt17', 'link107')"onMouseOut="HideTip('tt17')">mxCellState</a> that represents the vertex.</td></tr><tr><tdclass=CDLEntry>constraint</td><tdclass=CDLDescription><ahref="mxConnectionConstraint-php.html#mxConnectionConstraint"class=LClassid=link108onMouseOver="ShowTip(event, 'tt47', 'link108')"onMouseOut="HideTip('tt47')">mxConnectionConstraint</a> that represents the connection point constraint as returned by <ahref="#mxGraph.getConnectionConstraint"class=LFunctionid=link109onMouseOver="ShowTip(event, 'tt46', 'link109')"onMouseOut="HideTip('tt46')">getConnectionConstraint</a>.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.findTreeRoots"></a>findTreeRoots</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function findTreeRoots(</td><tdclass="PParameter prettyprint "nowrap>$parent,</td><tdclass="PDefaultValuePrefix prettyprint "> </td><tdclass="PDefaultValue prettyprint "width=100%></td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$isolate</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> false,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>$invert</td><tdclass="PDefaultValuePrefix prettyprint "> = </td><tdclass="PDefaultValue prettyprint "width=100%> false</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns all children in the given parent which do not have incoming edges. If the result is empty then the with the greatest difference between incoming and outgoing edges is returned.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>parent</td><tdclass=CDLDescription><ahref="../model/mxCell-php.html#mxCell"class=LClassid=link110onMouseOver="ShowTip(event, 'tt28', 'link110')"onMouseOut="HideTip('tt28')">mxCell</a> whose children should be checked.</td></tr><tr><tdclass=CDLEntry>isolate</td><tdclass=CDLDescription>Optional boolean that specifies if edges should be ignored if the opposite end is not a child of the given parent cell. Default is false.</td></tr><tr><tdclass=CDLEntry>invert</td><tdclass=CDLDescription>Optional boolean that specifies if outgoing or incoming edges should be counted for a tree root. If false then outgoing edges will be counted. Default is false.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.drawGraph"></a>drawGraph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function drawGraph(</td><tdclass="PParameter prettyprint "nowrap>$canvas</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Draws the given cell onto the specified canvas.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.paintCell"></a>paintCell</h3><divclass=CBody><p>Draws the given cell onto the specified canvas.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.paintState"></a>paintState</h3><divclass=CBody><p>Draws the given cell and label onto the specified canvas. No children or descendants are painted.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxGraph.graphModelChanged"></a>graphModelChanged</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function graphModelChanged(</td><tdclass="PParameter prettyprint "nowrap>$event</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Called when the graph model has changed.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">var $model</td></tr></table></blockquote>Holds the mxGraphModel.</div></div><divclass=CToolTipid="tt2"><divclass=CFunction>Constructs a new graph model using the specified root cell.</div></div><divclass=CToolTipid="tt3"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">var $stylesheet</td></tr></table></blockquote>Holds the mxStylesheet.</div></div><divclass=CToolTipid="tt4"><divclass=CClass>Defines the appearance of the cells in a graph. </div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">var $view</td></tr></table></blockquote>Holds the mxGraphView.</div></div><divclass=CToolTipid="tt6"><divclass=CClass>Implements a view for the graph. </div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">var $gridSize</td></tr></table></blockquote>Specifies the grid size. </div></div><divclass=CToolTipid="tt8"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">var $labelsVisible</td></tr></table></blockquote>Specifies if labels should be visible. </div></div><divclass=CToolTipid="tt9"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">var $defaultLoopStyle</td></tr></table></blockquote>mxEdgeStyle to be used for loops. </div></div><divclass=CToolTipid="tt10"><divclass=CClass>Provides various edge styles to be used as the values for mxConstants.STYLE_EDGE in a cell style.</div></div><divclass=CToolTipid="tt11"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">protected $imageBundles</td></tr></table></blockquote>Holds the list of image bundles.</div></div><divclass=CToolTipid="tt12"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function createStylesheet()</td></tr></table></blockquote>Creates a new mxStylesheet to be used in this graph.</div></div><divclass=CToolTipid="tt13"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function createGraphView()</td></tr></table></blockquote>Creates a new mxGraphView to be used in this graph.</div></div><divclass=CToolTipid="tt14"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function getModel()</td></tr></table></blockquote>Returns the mxGraphModel that contains the cells.</div></div><divclass=CToolTipid="tt15"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function getStylesheet()</td></tr></table></blockquote>Returns the mxStylesheet that defines the style.</div></div><divclass=CToolTipid="tt16"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function getView()</td></tr></table></blockquote>Returns the mxGraphView that contains the mxCellStates.</div></div><divclass=CToolTipid="tt17"><divclass=CClass>Represents the current state of a cell in a given mxGraphView.</div></div><divclass=CToolTipid="tt18"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">function getDefaultParent()</td></tr></table></blockquote>Returns the first child child of mxGraphModel.root. </div></div><divclass=CToolTipid="tt19"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">var $root</td></tr></table></blockquote>Holds