maxGraph/java/docs/com/mxgraph/model/mxGeometry.html

848 lines
36 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_171) on Fri Jul 06 13:50:04 UTC 2018 -->
<title>mxGeometry (mxGraph 3.9.8 API Specification)</title>
<meta name="date" content="2018-07-06">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="mxGeometry (mxGraph 3.9.8 API Specification)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/mxGeometry.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><p><b>mxGraph 3.9.8</b></p></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/mxgraph/model/mxCellPath.html" title="class in com.mxgraph.model"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/mxgraph/model/mxGraphModel.html" title="class in com.mxgraph.model"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/mxgraph/model/mxGeometry.html" target="_top">Frames</a></li>
<li><a href="mxGeometry.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.mxgraph.model</div>
<h2 title="Class mxGeometry" class="title">Class mxGeometry</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">com.mxgraph.util.mxPoint</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">com.mxgraph.util.mxRectangle</a></li>
<li>
<ul class="inheritance">
<li>com.mxgraph.model.mxGeometry</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, java.lang.Cloneable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">mxGeometry</span>
extends <a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">mxRectangle</a></pre>
<div class="block">Represents the geometry of a cell. For vertices, the geometry consists
of the x- and y-location, as well as the width and height. For edges,
the geometry either defines the source- and target-terminal, or it
defines the respective terminal points.
For edges, if the geometry is relative (default), then the x-coordinate
is used to describe the distance from the center of the edge from -1 to 1
with 0 being the center of the edge and the default value, and the
y-coordinate is used to describe the absolute, orthogonal distance in
pixels from that point. In addition, the offset is used as an absolute
offset vector from the resulting point.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../serialized-form.html#com.mxgraph.model.mxGeometry">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">mxRectangle</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#alternateBounds">alternateBounds</a></span></code>
<div class="block">Stores alternate values for x, y, width and height in a rectangle.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#offset">offset</a></span></code>
<div class="block">Holds the offset of the label for edges.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected java.util.List&lt;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#points">points</a></span></code>
<div class="block">List of mxPoints which specifies the control points along the edge.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#relative">relative</a></span></code>
<div class="block">Specifies if the coordinates in the geometry are to be interpreted as
relative coordinates.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#sourcePoint">sourcePoint</a></span></code>
<div class="block">Defines the source- and target-point of the edge.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#targetPoint">targetPoint</a></span></code>
<div class="block">Defines the source- and target-point of the edge.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#TRANSLATE_CONTROL_POINTS">TRANSLATE_CONTROL_POINTS</a></span></code>
<div class="block">Global switch to translate the points in translate.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.com.mxgraph.util.mxRectangle">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;com.mxgraph.util.<a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">mxRectangle</a></h3>
<code><a href="../../../com/mxgraph/util/mxRectangle.html#height">height</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#width">width</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.com.mxgraph.util.mxPoint">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;com.mxgraph.util.<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a></h3>
<code><a href="../../../com/mxgraph/util/mxPoint.html#x">x</a>, <a href="../../../com/mxgraph/util/mxPoint.html#y">y</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#mxGeometry--">mxGeometry</a></span>()</code>
<div class="block">Constructs a new geometry at (0, 0) with the width and height set to 0.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#mxGeometry-double-double-double-double-">mxGeometry</a></span>(double&nbsp;x,
double&nbsp;y,
double&nbsp;width,
double&nbsp;height)</code>
<div class="block">Constructs a geometry using the given parameters.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#clone--">clone</a></span>()</code>
<div class="block">Returns a clone of the cell.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">mxRectangle</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#getAlternateBounds--">getAlternateBounds</a></span>()</code>
<div class="block">Returns the alternate bounds.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#getOffset--">getOffset</a></span>()</code>
<div class="block">Returns the offset.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#getPoints--">getPoints</a></span>()</code>
<div class="block">Returns the list of control points.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#getSourcePoint--">getSourcePoint</a></span>()</code>
<div class="block">Returns the source point.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#getTargetPoint--">getTargetPoint</a></span>()</code>
<div class="block">Returns the target point.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#getTerminalPoint-boolean-">getTerminalPoint</a></span>(boolean&nbsp;isSource)</code>
<div class="block">Returns the point representing the source or target point of this edge.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#isRelative--">isRelative</a></span>()</code>
<div class="block">Returns true of the geometry is relative.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#setAlternateBounds-com.mxgraph.util.mxRectangle-">setAlternateBounds</a></span>(<a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">mxRectangle</a>&nbsp;rect)</code>
<div class="block">Sets the alternate bounds to the given rectangle.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#setOffset-com.mxgraph.util.mxPoint-">setOffset</a></span>(<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;offset)</code>
<div class="block">Sets the offset to the given point.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#setPoints-java.util.List-">setPoints</a></span>(java.util.List&lt;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&gt;&nbsp;value)</code>
<div class="block">Sets the list of control points to the given list.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#setRelative-boolean-">setRelative</a></span>(boolean&nbsp;value)</code>
<div class="block">Sets the relative state of the geometry.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#setSourcePoint-com.mxgraph.util.mxPoint-">setSourcePoint</a></span>(<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;sourcePoint)</code>
<div class="block">Sets the source point.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#setTargetPoint-com.mxgraph.util.mxPoint-">setTargetPoint</a></span>(<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;targetPoint)</code>
<div class="block">Sets the target point.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#setTerminalPoint-com.mxgraph.util.mxPoint-boolean-">setTerminalPoint</a></span>(<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;point,
boolean&nbsp;isSource)</code>
<div class="block">Sets the sourcePoint or targetPoint to the given point and returns the
new point.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#swap--">swap</a></span>()</code>
<div class="block">Swaps the x, y, width and height with the values stored in
alternateBounds and puts the previous values into alternateBounds as
a rectangle.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/mxgraph/model/mxGeometry.html#translate-double-double-">translate</a></span>(double&nbsp;dx,
double&nbsp;dy)</code>
<div class="block">Translates the geometry by the specified amount.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.com.mxgraph.util.mxRectangle">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;com.mxgraph.util.<a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">mxRectangle</a></h3>
<code><a href="../../../com/mxgraph/util/mxRectangle.html#add-com.mxgraph.util.mxRectangle-">add</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#contains-double-double-">contains</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#equals-java.lang.Object-">equals</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#getCenterX--">getCenterX</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#getCenterY--">getCenterY</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#getHeight--">getHeight</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#getRectangle--">getRectangle</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#getWidth--">getWidth</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#grow-double-">grow</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#intersectLine-double-double-double-double-">intersectLine</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#rotate90--">rotate90</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#setHeight-double-">setHeight</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#setRect-double-double-double-double-">setRect</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#setWidth-double-">setWidth</a>, <a href="../../../com/mxgraph/util/mxRectangle.html#toString--">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.com.mxgraph.util.mxPoint">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;com.mxgraph.util.<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a></h3>
<code><a href="../../../com/mxgraph/util/mxPoint.html#getPoint--">getPoint</a>, <a href="../../../com/mxgraph/util/mxPoint.html#getX--">getX</a>, <a href="../../../com/mxgraph/util/mxPoint.html#getY--">getY</a>, <a href="../../../com/mxgraph/util/mxPoint.html#setX-double-">setX</a>, <a href="../../../com/mxgraph/util/mxPoint.html#setY-double-">setY</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="TRANSLATE_CONTROL_POINTS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TRANSLATE_CONTROL_POINTS</h4>
<pre>public static transient&nbsp;boolean TRANSLATE_CONTROL_POINTS</pre>
<div class="block">Global switch to translate the points in translate. Default is true.</div>
</li>
</ul>
<a name="alternateBounds">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>alternateBounds</h4>
<pre>protected&nbsp;<a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">mxRectangle</a> alternateBounds</pre>
<div class="block">Stores alternate values for x, y, width and height in a rectangle.
Default is null.</div>
</li>
</ul>
<a name="sourcePoint">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sourcePoint</h4>
<pre>protected&nbsp;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a> sourcePoint</pre>
<div class="block">Defines the source- and target-point of the edge. This is used if the
corresponding edge does not have a source vertex. Otherwise it is
ignored. Default is null.</div>
</li>
</ul>
<a name="targetPoint">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>targetPoint</h4>
<pre>protected&nbsp;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a> targetPoint</pre>
<div class="block">Defines the source- and target-point of the edge. This is used if the
corresponding edge does not have a source vertex. Otherwise it is
ignored. Default is null.</div>
</li>
</ul>
<a name="points">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>points</h4>
<pre>protected&nbsp;java.util.List&lt;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&gt; points</pre>
<div class="block">List of mxPoints which specifies the control points along the edge.
These points are the intermediate points on the edge, for the endpoints
use targetPoint and sourcePoint or set the terminals of the edge to
a non-null value. Default is null.</div>
</li>
</ul>
<a name="offset">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>offset</h4>
<pre>protected&nbsp;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a> offset</pre>
<div class="block">Holds the offset of the label for edges. This is the absolute vector
between the center of the edge and the top, left point of the label.
Default is null.</div>
</li>
</ul>
<a name="relative">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>relative</h4>
<pre>protected&nbsp;boolean relative</pre>
<div class="block">Specifies if the coordinates in the geometry are to be interpreted as
relative coordinates. Default is false. This is used to mark a geometry
with an x- and y-coordinate that is used to describe an edge label
position, or a relative location with respect to a parent cell's
width and height.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="mxGeometry--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mxGeometry</h4>
<pre>public&nbsp;mxGeometry()</pre>
<div class="block">Constructs a new geometry at (0, 0) with the width and height set to 0.</div>
</li>
</ul>
<a name="mxGeometry-double-double-double-double-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>mxGeometry</h4>
<pre>public&nbsp;mxGeometry(double&nbsp;x,
double&nbsp;y,
double&nbsp;width,
double&nbsp;height)</pre>
<div class="block">Constructs a geometry using the given parameters.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>x</code> - X-coordinate of the new geometry.</dd>
<dd><code>y</code> - Y-coordinate of the new geometry.</dd>
<dd><code>width</code> - Width of the new geometry.</dd>
<dd><code>height</code> - Height of the new geometry.</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getAlternateBounds--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAlternateBounds</h4>
<pre>public&nbsp;<a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">mxRectangle</a>&nbsp;getAlternateBounds()</pre>
<div class="block">Returns the alternate bounds.</div>
</li>
</ul>
<a name="setAlternateBounds-com.mxgraph.util.mxRectangle-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAlternateBounds</h4>
<pre>public&nbsp;void&nbsp;setAlternateBounds(<a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">mxRectangle</a>&nbsp;rect)</pre>
<div class="block">Sets the alternate bounds to the given rectangle.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rect</code> - Rectangle to be used for the alternate bounds.</dd>
</dl>
</li>
</ul>
<a name="getSourcePoint--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSourcePoint</h4>
<pre>public&nbsp;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;getSourcePoint()</pre>
<div class="block">Returns the source point.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns the source point.</dd>
</dl>
</li>
</ul>
<a name="setSourcePoint-com.mxgraph.util.mxPoint-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSourcePoint</h4>
<pre>public&nbsp;void&nbsp;setSourcePoint(<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;sourcePoint)</pre>
<div class="block">Sets the source point.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sourcePoint</code> - Source point to be used.</dd>
</dl>
</li>
</ul>
<a name="getTargetPoint--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTargetPoint</h4>
<pre>public&nbsp;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;getTargetPoint()</pre>
<div class="block">Returns the target point.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns the target point.</dd>
</dl>
</li>
</ul>
<a name="setTargetPoint-com.mxgraph.util.mxPoint-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTargetPoint</h4>
<pre>public&nbsp;void&nbsp;setTargetPoint(<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;targetPoint)</pre>
<div class="block">Sets the target point.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>targetPoint</code> - Target point to be used.</dd>
</dl>
</li>
</ul>
<a name="getPoints--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPoints</h4>
<pre>public&nbsp;java.util.List&lt;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&gt;&nbsp;getPoints()</pre>
<div class="block">Returns the list of control points.</div>
</li>
</ul>
<a name="setPoints-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPoints</h4>
<pre>public&nbsp;void&nbsp;setPoints(java.util.List&lt;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&gt;&nbsp;value)</pre>
<div class="block">Sets the list of control points to the given list.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - List that contains the new control points.</dd>
</dl>
</li>
</ul>
<a name="getOffset--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOffset</h4>
<pre>public&nbsp;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;getOffset()</pre>
<div class="block">Returns the offset.</div>
</li>
</ul>
<a name="setOffset-com.mxgraph.util.mxPoint-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOffset</h4>
<pre>public&nbsp;void&nbsp;setOffset(<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;offset)</pre>
<div class="block">Sets the offset to the given point.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offset</code> - Point to be used for the offset.</dd>
</dl>
</li>
</ul>
<a name="isRelative--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isRelative</h4>
<pre>public&nbsp;boolean&nbsp;isRelative()</pre>
<div class="block">Returns true of the geometry is relative.</div>
</li>
</ul>
<a name="setRelative-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRelative</h4>
<pre>public&nbsp;void&nbsp;setRelative(boolean&nbsp;value)</pre>
<div class="block">Sets the relative state of the geometry.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - Boolean value to be used as the new relative state.</dd>
</dl>
</li>
</ul>
<a name="swap--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>swap</h4>
<pre>public&nbsp;void&nbsp;swap()</pre>
<div class="block">Swaps the x, y, width and height with the values stored in
alternateBounds and puts the previous values into alternateBounds as
a rectangle. This operation is carried-out in-place, that is, using the
existing geometry instance. If this operation is called during a graph
model transactional change, then the geometry should be cloned before
calling this method and setting the geometry of the cell using
mxGraphModel.setGeometry.</div>
</li>
</ul>
<a name="getTerminalPoint-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTerminalPoint</h4>
<pre>public&nbsp;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;getTerminalPoint(boolean&nbsp;isSource)</pre>
<div class="block">Returns the point representing the source or target point of this edge.
This is only used if the edge has no source or target vertex.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>isSource</code> - Boolean that specifies if the source or target point
should be returned.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns the source or target point.</dd>
</dl>
</li>
</ul>
<a name="setTerminalPoint-com.mxgraph.util.mxPoint-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTerminalPoint</h4>
<pre>public&nbsp;<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;setTerminalPoint(<a href="../../../com/mxgraph/util/mxPoint.html" title="class in com.mxgraph.util">mxPoint</a>&nbsp;point,
boolean&nbsp;isSource)</pre>
<div class="block">Sets the sourcePoint or targetPoint to the given point and returns the
new point.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>point</code> - Point to be used as the new source or target point.</dd>
<dd><code>isSource</code> - Boolean that specifies if the source or target point
should be set.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns the new point.</dd>
</dl>
</li>
</ul>
<a name="translate-double-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>translate</h4>
<pre>public&nbsp;void&nbsp;translate(double&nbsp;dx,
double&nbsp;dy)</pre>
<div class="block">Translates the geometry by the specified amount. That is, x and y of the
geometry, the sourcePoint, targetPoint and all elements of points are
translated by the given amount. X and y are only translated if the
geometry is not relative. If TRANSLATE_CONTROL_POINTS is false, then
are not modified by this function.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dx</code> - Integer that specifies the x-coordinate of the translation.</dd>
<dd><code>dy</code> - Integer that specifies the y-coordinate of the translation.</dd>
</dl>
</li>
</ul>
<a name="clone--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>clone</h4>
<pre>public&nbsp;java.lang.Object&nbsp;clone()</pre>
<div class="block">Returns a clone of the cell.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../com/mxgraph/util/mxRectangle.html#clone--">clone</a></code>&nbsp;in class&nbsp;<code><a href="../../../com/mxgraph/util/mxRectangle.html" title="class in com.mxgraph.util">mxRectangle</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/mxGeometry.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><p><b>mxGraph 3.9.8</b></p></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/mxgraph/model/mxCellPath.html" title="class in com.mxgraph.model"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/mxgraph/model/mxGraphModel.html" title="class in com.mxgraph.model"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/mxgraph/model/mxGeometry.html" target="_top">Frames</a></li>
<li><a href="mxGeometry.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size=1>Copyright (c) 2010-2017 <a href="http://www.jgraph.com/"
target="_blank">Gaudenz Alder, JGraph Ltd</a>. All rights reserved.</font></small></p>
</body>
</html>