753 lines
38 KiB
HTML
753 lines
38 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 (version 1.7.0_51) on Wed Apr 06 13:11:02 EDT 2016 -->
|
|
<title>Point (Parallel Java 2 Library Documentation)</title>
|
|
<meta name="date" content="2016-04-06">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Point (Parallel Java 2 Library Documentation)";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar_top">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/Point.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-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../edu/rit/draw/item/Oval.html" title="class in edu.rit.draw.item"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?edu/rit/draw/item/Point.html" target="_top">Frames</a></li>
|
|
<li><a href="Point.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All 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: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </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">edu.rit.draw.item</div>
|
|
<h2 title="Class Point" class="title">Class Point</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>edu.rit.draw.item.Point</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Externalizable.html?is-external=true" title="class or interface in java.io">Externalizable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="strong">Point</span>
|
|
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
|
|
implements <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Externalizable.html?is-external=true" title="class or interface in java.io">Externalizable</a></pre>
|
|
<div class="block">Class Point provides an (<I>x,y</I>) point on a drawing. Operations are
|
|
provided for doing arithmetic on points.</div>
|
|
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../serialized-form.html#edu.rit.draw.item.Point">Serialized Form</a></dd></dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#Point()">Point</a></strong>()</code>
|
|
<div class="block">Construct a new point at location (0,0).</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colOne"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#Point(double, double)">Point</a></strong>(double x,
|
|
double y)</code>
|
|
<div class="block">Construct a new point at location (<I>x,y</I>).</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#Point(edu.rit.draw.item.Point)">Point</a></strong>(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> thePoint)</code>
|
|
<div class="block">Construct a new point at the same location as the given point.</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#absDifference(edu.rit.draw.item.Point)">absDifference</a></strong>(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> thePoint)</code>
|
|
<div class="block">Returns a <a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> object representing the absolute difference
|
|
between this point and the given point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#add(double, double)">add</a></strong>(double dx,
|
|
double dy)</code>
|
|
<div class="block">Returns a new point at the given offsets from this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#add(edu.rit.draw.item.Size)">add</a></strong>(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</code>
|
|
<div class="block">Returns a new point at the given width and height away from this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#difference(edu.rit.draw.item.Point)">difference</a></strong>(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> thePoint)</code>
|
|
<div class="block">Returns a <a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> object representing the difference between
|
|
this point and the given point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#e(double)">e</a></strong>(double distance)</code>
|
|
<div class="block">Returns a new point that is the given distance east of this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#e(edu.rit.draw.item.Size)">e</a></strong>(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</code>
|
|
<div class="block">Returns a new point that is the given distance east of this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#equals(java.lang.Object)">equals</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</code>
|
|
<div class="block">Determine if this point is equal to the given object.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#hashCode()">hashCode</a></strong>()</code>
|
|
<div class="block">Returns a hash code for this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#max(edu.rit.draw.item.Point)">max</a></strong>(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> thePoint)</code>
|
|
<div class="block">Returns a new point that is the maximum of this point and the given
|
|
point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#min(edu.rit.draw.item.Point)">min</a></strong>(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> thePoint)</code>
|
|
<div class="block">Returns a new point that is the minimum of this point and the given
|
|
point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#n(double)">n</a></strong>(double distance)</code>
|
|
<div class="block">Returns a new point that is the given distance north of this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#n(edu.rit.draw.item.Size)">n</a></strong>(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</code>
|
|
<div class="block">Returns a new point that is the given distance north of this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#readExternal(java.io.ObjectInput)">readExternal</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/ObjectInput.html?is-external=true" title="class or interface in java.io">ObjectInput</a> in)</code>
|
|
<div class="block">Read this point from the given object input stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#s(double)">s</a></strong>(double distance)</code>
|
|
<div class="block">Returns a new point that is the given distance south of this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#s(edu.rit.draw.item.Size)">s</a></strong>(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</code>
|
|
<div class="block">Returns a new point that is the given distance south of this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#sub(double, double)">sub</a></strong>(double dx,
|
|
double dy)</code>
|
|
<div class="block">Returns a new point at the given offsets from this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#sub(edu.rit.draw.item.Size)">sub</a></strong>(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</code>
|
|
<div class="block">Returns a new point at the given width and height away from this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#toString()">toString</a></strong>()</code>
|
|
<div class="block">Returns a string version of this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#w(double)">w</a></strong>(double distance)</code>
|
|
<div class="block">Returns a new point that is the given distance west of this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#w(edu.rit.draw.item.Size)">w</a></strong>(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</code>
|
|
<div class="block">Returns a new point that is the given distance east of this point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#writeExternal(java.io.ObjectOutput)">writeExternal</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/ObjectOutput.html?is-external=true" title="class or interface in java.io">ObjectOutput</a> out)</code>
|
|
<div class="block">Write this point to the given object output stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>double</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#x()">x</a></strong>()</code>
|
|
<div class="block">Returns this point's X coordinate.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>double</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Point.html#y()">y</a></strong>()</code>
|
|
<div class="block">Returns this point's Y coordinate.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
|
|
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="Point()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Point</h4>
|
|
<pre>public Point()</pre>
|
|
<div class="block">Construct a new point at location (0,0).</div>
|
|
</li>
|
|
</ul>
|
|
<a name="Point(double, double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>Point</h4>
|
|
<pre>public Point(double x,
|
|
double y)</pre>
|
|
<div class="block">Construct a new point at location (<I>x,y</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - X coordinate.</dd><dd><code>y</code> - Y coordinate.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="Point(edu.rit.draw.item.Point)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>Point</h4>
|
|
<pre>public Point(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> thePoint)</pre>
|
|
<div class="block">Construct a new point at the same location as the given point.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>thePoint</code> - Point to copy.</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="x()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>x</h4>
|
|
<pre>public double x()</pre>
|
|
<div class="block">Returns this point's X coordinate.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="y()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>y</h4>
|
|
<pre>public double y()</pre>
|
|
<div class="block">Returns this point's Y coordinate.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="add(double, double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>add</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> add(double dx,
|
|
double dy)</pre>
|
|
<div class="block">Returns a new point at the given offsets from this point.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dx</code> - X offset; added to this point's X coordinate.</dd><dd><code>dy</code> - Y offset; added to this point's Y coordinate.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="add(edu.rit.draw.item.Size)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>add</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> add(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</pre>
|
|
<div class="block">Returns a new point at the given width and height away from this point.
|
|
<TT>theSize</TT>'s width is added to this point's X coordinate.
|
|
<TT>theSize</TT>'s height is added to this point's Y coordinate.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theSize</code> - Size object containing width and height.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="sub(double, double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>sub</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> sub(double dx,
|
|
double dy)</pre>
|
|
<div class="block">Returns a new point at the given offsets from this point.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dx</code> - X offset; subtracted from this point's X coordinate.</dd><dd><code>dy</code> - Y offset; subtracted from this point's Y coordinate.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="sub(edu.rit.draw.item.Size)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>sub</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> sub(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</pre>
|
|
<div class="block">Returns a new point at the given width and height away from this point.
|
|
<TT>theSize</TT>'s width is subtracted from this point's X coordinate.
|
|
<TT>theSize</TT>'s height is subtracted from this point's Y coordinate.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theSize</code> - Size object containing width and height.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="difference(edu.rit.draw.item.Point)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>difference</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> difference(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> thePoint)</pre>
|
|
<div class="block">Returns a <a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> object representing the difference between
|
|
this point and the given point. The size object's width is this point's X
|
|
coordinate minus <TT>thePoint</TT>'s X coordinate. The size object's
|
|
height is this point's Y coordinate minus <TT>thePoint</TT>'s Y
|
|
coordinate.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>thePoint</code> - Point object.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="absDifference(edu.rit.draw.item.Point)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>absDifference</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> absDifference(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> thePoint)</pre>
|
|
<div class="block">Returns a <a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> object representing the absolute difference
|
|
between this point and the given point. The size object's width is the
|
|
absolute value of this point's X coordinate minus <TT>thePoint</TT>'s X
|
|
coordinate. The size object's height is the absolute value of this
|
|
point's Y coordinate minus <TT>thePoint</TT>'s Y coordinate.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>thePoint</code> - Point object.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="max(edu.rit.draw.item.Point)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>max</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> max(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> thePoint)</pre>
|
|
<div class="block">Returns a new point that is the maximum of this point and the given
|
|
point. Each coordinate of the returned point is the maximum of the
|
|
corresponding coordinates of this point and <TT>thePoint</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>thePoint</code> - Point object.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="min(edu.rit.draw.item.Point)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>min</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> min(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> thePoint)</pre>
|
|
<div class="block">Returns a new point that is the minimum of this point and the given
|
|
point. Each coordinate of the returned point is the minimum of the
|
|
corresponding coordinates of this point and <TT>thePoint</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>thePoint</code> - Point object.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="n(double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>n</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> n(double distance)</pre>
|
|
<div class="block">Returns a new point that is the given distance north of this point. The
|
|
new point's X coordinate is the same as this point's X coordinate. The
|
|
new point's Y coordinate is this point's Y coordinate minus
|
|
<TT>distance</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>distance</code> - Distance of new point from this point.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="s(double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>s</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> s(double distance)</pre>
|
|
<div class="block">Returns a new point that is the given distance south of this point. The
|
|
new point's X coordinate is the same as this point's X coordinate. The
|
|
new point's Y coordinate is this point's Y coordinate plus
|
|
<TT>distance</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>distance</code> - Distance of new point from this point.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="e(double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>e</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> e(double distance)</pre>
|
|
<div class="block">Returns a new point that is the given distance east of this point. The
|
|
new point's X coordinate is this point's X coordinate plus
|
|
<TT>distance</TT>. The new point's Y coordinate is the same as this
|
|
point's Y coordinate.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>distance</code> - Distance of new point from this point.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="w(double)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>w</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> w(double distance)</pre>
|
|
<div class="block">Returns a new point that is the given distance west of this point. The
|
|
new point's X coordinate is this point's X coordinate minus
|
|
<TT>distance</TT>. The new point's Y coordinate is the same as this
|
|
point's Y coordinate.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>distance</code> - Distance of new point from this point.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="n(edu.rit.draw.item.Size)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>n</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> n(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</pre>
|
|
<div class="block">Returns a new point that is the given distance north of this point. The
|
|
new point's X coordinate is the same as this point's X coordinate. The
|
|
new point's Y coordinate is this point's Y coordinate minus
|
|
<TT>theSize.height()</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theSize</code> - Distance of new point from this point =
|
|
<TT>theSize.height()</TT>.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="s(edu.rit.draw.item.Size)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>s</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> s(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</pre>
|
|
<div class="block">Returns a new point that is the given distance south of this point. The
|
|
new point's X coordinate is the same as this point's X coordinate. The
|
|
new point's Y coordinate is this point's Y coordinate plus
|
|
<TT>theSize.height()</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theSize</code> - Distance of new point from this point =
|
|
<TT>theSize.height()</TT>.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="e(edu.rit.draw.item.Size)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>e</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> e(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</pre>
|
|
<div class="block">Returns a new point that is the given distance east of this point. The
|
|
new point's X coordinate is this point's X coordinate plus
|
|
<TT>theSize.width()</TT>. The new point's Y coordinate is the same as
|
|
this point's Y coordinate.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theSize</code> - Distance of new point from this point =
|
|
<TT>theSize.width()</TT>.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="w(edu.rit.draw.item.Size)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>w</h4>
|
|
<pre>public <a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a> w(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a> theSize)</pre>
|
|
<div class="block">Returns a new point that is the given distance east of this point. The
|
|
new point's X coordinate is this point's X coordinate minus
|
|
<TT>theSize.width()</TT>. The new point's Y coordinate is the same as
|
|
this point's Y coordinate.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theSize</code> - Distance of new point from this point =
|
|
<TT>theSize.width()</TT>.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="writeExternal(java.io.ObjectOutput)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>writeExternal</h4>
|
|
<pre>public void writeExternal(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/ObjectOutput.html?is-external=true" title="class or interface in java.io">ObjectOutput</a> out)
|
|
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
|
|
<div class="block">Write this point to the given object output stream.</div>
|
|
<dl>
|
|
<dt><strong>Specified by:</strong></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Externalizable.html?is-external=true#writeExternal(java.io.ObjectOutput)" title="class or interface in java.io">writeExternal</a></code> in interface <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Externalizable.html?is-external=true" title="class or interface in java.io">Externalizable</a></code></dd>
|
|
<dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - Object output stream.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - Thrown if an I/O error occurred.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="readExternal(java.io.ObjectInput)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readExternal</h4>
|
|
<pre>public void readExternal(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/ObjectInput.html?is-external=true" title="class or interface in java.io">ObjectInput</a> in)
|
|
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
|
|
<div class="block">Read this point from the given object input stream.</div>
|
|
<dl>
|
|
<dt><strong>Specified by:</strong></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Externalizable.html?is-external=true#readExternal(java.io.ObjectInput)" title="class or interface in java.io">readExternal</a></code> in interface <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Externalizable.html?is-external=true" title="class or interface in java.io">Externalizable</a></code></dd>
|
|
<dt><span class="strong">Parameters:</span></dt><dd><code>in</code> - Object input stream.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - Thrown if an I/O error occurred.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="equals(java.lang.Object)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>equals</h4>
|
|
<pre>public boolean equals(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> obj)</pre>
|
|
<div class="block">Determine if this point is equal to the given object.</div>
|
|
<dl>
|
|
<dt><strong>Overrides:</strong></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
|
|
<dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - Object to test.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>True if this point is equal to <TT>obj</TT>, false otherwise.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="hashCode()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>hashCode</h4>
|
|
<pre>public int hashCode()</pre>
|
|
<div class="block">Returns a hash code for this point.</div>
|
|
<dl>
|
|
<dt><strong>Overrides:</strong></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="toString()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>toString</h4>
|
|
<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre>
|
|
<div class="block">Returns a string version of this point.</div>
|
|
<dl>
|
|
<dt><strong>Overrides:</strong></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/Point.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-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../edu/rit/draw/item/Oval.html" title="class in edu.rit.draw.item"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?edu/rit/draw/item/Point.html" target="_top">Frames</a></li>
|
|
<li><a href="Point.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All 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: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </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="-2">Copyright © 2013–2016 by Alan Kaminsky. All rights reserved. Send comments to ark</FONT><FONT SIZE="1" COLOR="#FFFFFF">­</FONT><FONT SIZE="-2">@</FONT><FONT SIZE="1" COLOR="#FFFFFF">­</FONT><FONT SIZE="-2">cs.rit.edu.</FONT></small></p>
|
|
</body>
|
|
</html>
|