<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxCellHighlight"></a>mxCellHighlight</h1><divclass=CBody><p>A helper class to highlight cells. Here is an example for a given cell.</p><blockquote><preclass="prettyprint">var highlight = new mxCellHighlight(graph, '#ff0000', 2);
highlight.highlight(graph.view.getState(cell)));</pre></blockquote><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxCellHighlight">mxCellHighlight</a></td><tdclass=SDescription>A helper class to highlight cells. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxCellHighlight.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellHighlight.mxCellHighlight"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxCellHighlight</a></td><tdclass=SDescription>Constructs a cell highlight.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxCellHighlight.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellHighlight.keepOnTop"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">keepOnTop</a></td><tdclass=SDescription>Specifies if the highlights should appear on top of everything else in the overlay pane. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxCellHighlight.graph"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">graph</a></td><tdclass=SDescription>Reference to the enclosing <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">mxGraph</a>.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellHighlight.state"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">state</a></td><tdclass=SDescription>Reference to the <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">mxCellState</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxCellHighlight.spacing"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">spacing</a></td><tdclass=SDescription>Specifies the spacing between the highlight for vertices and the vertex. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellHighlight.resetHandler"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">resetHandler</a></td><tdclass=SDescription>Holds the handler that automatically invokes reset if the highlight should be hidden.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxCellHighlight.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellHighlight.setHighlightColor"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">setHighlightColor</a></td><tdclass=SDescription>Sets the color of the rectangle used to highlight drop targets.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxCellHighlight.drawHighlight"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">drawHighlight</a></td><tdclass=SDescription>Creates and returns the highlight shape for the given state.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellHighlight.createShape"id=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut="HideTip('tt11')">createShape</a></td><tdclass=SDescription>Creates and returns the highlight shape for the given state.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxCellHighlight.repaint">repaint</a></td><tdclass=SDescription>Updates the highlight after a change of the model or view.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxCellHighlight.repaint"id=link12onMouseOver="ShowTip(event, 'tt12', 'link12')"onMouseOut="HideTip('tt12')">repaint</a></td><tdclass=SDescription>Updates the highlight after a change of the model or view.<
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.keepOnTop"></a>keepOnTop</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.keepOnTop</td></tr></table></blockquote><p>Specifies if the highlights should appear on top of everything else in the overlay pane. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.graph"></a>graph</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.graph</td></tr></table></blockquote><p>Reference to the enclosing <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link17onMouseOver="ShowTip(event, 'tt4', 'link17')"onMouseOut="HideTip('tt4')">mxGraph</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.state"></a>state</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.state</td></tr></table></blockquote><p>Reference to the <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link18onMouseOver="ShowTip(event, 'tt6', 'link18')"onMouseOut="HideTip('tt6')">mxCellState</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.spacing"></a>spacing</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.spacing</td></tr></table></blockquote><p>Specifies the spacing between the highlight for vertices and the vertex. Default is 2.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.resetHandler"></a>resetHandler</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.resetHandler</td></tr></table></blockquote><p>Holds the handler that automatically invokes reset if the highlight should be hidden.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.setHighlightColor"></a>setHighlightColor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellHighlight.prototype.setHighlightColor = function(</td><tdclass="PParameter prettyprint "nowrap>color</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the color of the rectangle used to highlight drop targets.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>color</td><tdclass=CDLDescription>String that represents the new highlight color.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.drawHighlight"></a>drawHighlight</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.drawHighlight = function()</td></tr></table></blockquote><p>Creates and returns the highlight shape for the given state.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.createShape"></a>createShape</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.createShape = function()</td></tr></table></blockquote><p>Creates and returns the highlight shape for the given state.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.repaint"></a>repaint</h3><divclass=CBody><p>Updates the highlight after a change of the model or view.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.repaint"></a>repaint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.repaint = function()</td></tr></table></blockquote><p>Updates the highlight after a change of the model or view.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.hide"></a>hide</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.hide = function()</td></tr></table></blockquote><p>Resets the state of the cell marker.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.mark"></a>mark</h3><divclass=CBody><p>Marks the <markedState> and fires a <ahref="#mxCellHighlight.mark"class=LFunctionid=link19onMouseOver="ShowTip(event, 'tt14', 'link19')"onMouseOut="HideTip('tt14')">mark</a> event.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.isHighlightAt"></a>isHighlightAt</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellHighlight.prototype.isHighlightAt = function(</td><tdclass="PParameter prettyprint "nowrap>x,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>y</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if this highlight is at the given position.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxCellHighlight.destroy"></a>destroy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.destroy = function()</td></tr></table></blockquote><p>Destroys the handler and all its resources and DOM nodes.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxCellHighlight(</td><tdclass="PParameter prettyprint "nowrap>graph,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>highlightColor,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>strokeWidth,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>dashed</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a cell highlight.</div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.keepOnTop</td></tr></table></blockquote>Specifies if the highlights should appear on top of everything else in the overlay pane. </div></div><divclass=CToolTipid="tt3"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.graph</td></tr></table></blockquote>Reference to the enclosing mxGraph.</div></div><divclass=CToolTipid="tt4"><divclass=CClass>Extends mxEventSource to implement a graph component for the browser. </div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.state</td></tr></table></blockquote>Reference to the mxCellState.</div></div><divclass=CToolTipid="tt6"><divclass=CClass>Represents the current state of a cell in a given mxGraphView.</div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.spacing</td></tr></table></blockquote>Specifies the spacing between the highlight for vertices and the vertex. </div></div><divclass=CToolTipid="tt8"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.resetHandler</td></tr></table></blockquote>Holds the handler that automatically invokes reset if the highlight should be hidden.</div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxCellHighlight.prototype.setHighlightColor = function(</td><tdclass="PParameter prettyprint "nowrap>color</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Sets the color of the rectangle used to highlight drop targets.</div></div><divclass=CToolTipid="tt10"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.drawHighlight = function()</td></tr></table></blockquote>Creates and returns the highlight shape for the given state.</div></div><divclass=CToolTipid="tt11"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.createShape = function()</td></tr></table></blockquote>Creates and returns the highlight shape for the given state.</div></div><divclass=CToolTipid="tt12"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.repaint = function()</td></tr></table></blockquote>Updates the highlight after a change of the model or view.</div></div><divclass=CToolTipid="tt13"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxCellHighlight.prototype.hide = function()</td></tr></table></blockquote>Resets the state of the cell marker.</div></