Files
2016-04-27 01:07:35 -04:00

904 lines
51 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>Polygon (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="Polygon (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/Polygon.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/Point.html" title="class in edu.rit.draw.item"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../edu/rit/draw/item/Rectangle.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/Polygon.html" target="_top">Frames</a></li>
<li><a href="Polygon.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields_inherited_from_class_edu.rit.draw.item.FilledItem">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>Field&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">edu.rit.draw.item</div>
<h2 title="Class Polygon" class="title">Class Polygon</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><a href="../../../../edu/rit/draw/item/DrawingItem.html" title="class in edu.rit.draw.item">edu.rit.draw.item.DrawingItem</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../edu/rit/draw/item/OutlinedItem.html" title="class in edu.rit.draw.item">edu.rit.draw.item.OutlinedItem</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../edu/rit/draw/item/FilledItem.html" title="class in edu.rit.draw.item">edu.rit.draw.item.FilledItem</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../edu/rit/draw/item/ShapeItem.html" title="class in edu.rit.draw.item">edu.rit.draw.item.ShapeItem</a></li>
<li>
<ul class="inheritance">
<li>edu.rit.draw.item.Polygon</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</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">Polygon</span>
extends <a href="../../../../edu/rit/draw/item/ShapeItem.html" title="class in edu.rit.draw.item">ShapeItem</a></pre>
<div class="block">Class Polygon provides a polygon <a href="../../../../edu/rit/draw/item/DrawingItem.html" title="class in edu.rit.draw.item">DrawingItem</a> whose boundary
consists of one or more straight line segments. The polygon has an outline
and a filled interior.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../serialized-form.html#edu.rit.draw.item.Polygon">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>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_edu.rit.draw.item.FilledItem">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;edu.rit.draw.item.<a href="../../../../edu/rit/draw/item/FilledItem.html" title="class in edu.rit.draw.item">FilledItem</a></h3>
<code><a href="../../../../edu/rit/draw/item/FilledItem.html#NORMAL_FILL">NORMAL_FILL</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_edu.rit.draw.item.OutlinedItem">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;edu.rit.draw.item.<a href="../../../../edu/rit/draw/item/OutlinedItem.html" title="class in edu.rit.draw.item">OutlinedItem</a></h3>
<code><a href="../../../../edu/rit/draw/item/OutlinedItem.html#NORMAL_OUTLINE">NORMAL_OUTLINE</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="overviewSummary" 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><strong><a href="../../../../edu/rit/draw/item/Polygon.html#Polygon()">Polygon</a></strong>()</code>
<div class="block">Construct a new polygon.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#Polygon(edu.rit.draw.item.Polygon)">Polygon</a></strong>(<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;thePolygon)</code>
<div class="block">Construct a new polygon with the same points, outline, and fill paint as
the given polygon.</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">&nbsp;</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/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#add()">add</a></strong>()</code>
<div class="block">Add this polygon to the end of the default drawing's sequence of drawing
items.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#add(edu.rit.draw.Drawing)">add</a></strong>(<a href="../../../../edu/rit/draw/Drawing.html" title="class in edu.rit.draw">Drawing</a>&nbsp;theDrawing)</code>
<div class="block">Add this polygon to the end of the given drawing's sequence of drawing
items.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#addFirst()">addFirst</a></strong>()</code>
<div class="block">Add this polygon to the beginning of the default drawing's sequence of
drawing items.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#addFirst(edu.rit.draw.Drawing)">addFirst</a></strong>(<a href="../../../../edu/rit/draw/Drawing.html" title="class in edu.rit.draw">Drawing</a>&nbsp;theDrawing)</code>
<div class="block">Add this polygon to the beginning of the given drawing's sequence of
drawing items.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#by(double, double)">by</a></strong>(double&nbsp;dx,
double&nbsp;dy)</code>
<div class="block">Add a line segment to this polygon.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#by(edu.rit.draw.item.Size)">by</a></strong>(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a>&nbsp;theSize)</code>
<div class="block">Add a line segment to this polygon.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#clear()">clear</a></strong>()</code>
<div class="block">Clear this polygon.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#fill(edu.rit.draw.item.Fill)">fill</a></strong>(<a href="../../../../edu/rit/draw/item/Fill.html" title="interface in edu.rit.draw.item">Fill</a>&nbsp;theFill)</code>
<div class="block">Set this polygon's fill paint.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#hby(double)">hby</a></strong>(double&nbsp;dx)</code>
<div class="block">Add a horizontal line segment to this polygon.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#hby(edu.rit.draw.item.Size)">hby</a></strong>(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a>&nbsp;theSize)</code>
<div class="block">Add a horizontal line segment to this polygon.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#height()">height</a></strong>()</code>
<div class="block">Returns the height of this polygon's bounding box.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#hto(double)">hto</a></strong>(double&nbsp;x)</code>
<div class="block">Add a horizontal line segment to this polygon.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#hto(edu.rit.draw.item.Point)">hto</a></strong>(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a>&nbsp;thePoint)</code>
<div class="block">Add a horizontal line segment to this polygon.</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/Polygon.html#nw()">nw</a></strong>()</code>
<div class="block">Returns the northwest corner point of this polygon's bounding box.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#outline(edu.rit.draw.item.Outline)">outline</a></strong>(<a href="../../../../edu/rit/draw/item/Outline.html" title="interface in edu.rit.draw.item">Outline</a>&nbsp;theOutline)</code>
<div class="block">Set this polygon's outline.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.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>&nbsp;in)</code>
<div class="block">Read this polygon from the given object input stream.</div>
</td>
</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/Polygon.html#size()">size</a></strong>()</code>
<div class="block">Returns the size of this polygon's bounding box.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#to(double, double)">to</a></strong>(double&nbsp;x,
double&nbsp;y)</code>
<div class="block">Add a line segment to this polygon.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#to(edu.rit.draw.item.Point)">to</a></strong>(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a>&nbsp;thePoint)</code>
<div class="block">Add a line segment to this polygon.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#vby(double)">vby</a></strong>(double&nbsp;dy)</code>
<div class="block">Add a vertical line segment to this polygon.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#vby(edu.rit.draw.item.Size)">vby</a></strong>(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a>&nbsp;theSize)</code>
<div class="block">Add a vertical line segment to this polygon.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#vto(double)">vto</a></strong>(double&nbsp;y)</code>
<div class="block">Add a vertical line segment to this polygon.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a></code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#vto(edu.rit.draw.item.Point)">vto</a></strong>(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a>&nbsp;thePoint)</code>
<div class="block">Add a vertical line segment to this polygon.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.html#width()">width</a></strong>()</code>
<div class="block">Returns the width of this polygon's bounding box.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/draw/item/Polygon.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>&nbsp;out)</code>
<div class="block">Write this polygon to the given object output stream.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_edu.rit.draw.item.ShapeItem">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;edu.rit.draw.item.<a href="../../../../edu/rit/draw/item/ShapeItem.html" title="class in edu.rit.draw.item">ShapeItem</a></h3>
<code><a href="../../../../edu/rit/draw/item/ShapeItem.html#draw(java.awt.Graphics2D)">draw</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_edu.rit.draw.item.FilledItem">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;edu.rit.draw.item.<a href="../../../../edu/rit/draw/item/FilledItem.html" title="class in edu.rit.draw.item">FilledItem</a></h3>
<code><a href="../../../../edu/rit/draw/item/FilledItem.html#defaultFill()">defaultFill</a>, <a href="../../../../edu/rit/draw/item/FilledItem.html#defaultFill(edu.rit.draw.item.Fill)">defaultFill</a>, <a href="../../../../edu/rit/draw/item/FilledItem.html#fill()">fill</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_edu.rit.draw.item.OutlinedItem">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;edu.rit.draw.item.<a href="../../../../edu/rit/draw/item/OutlinedItem.html" title="class in edu.rit.draw.item">OutlinedItem</a></h3>
<code><a href="../../../../edu/rit/draw/item/OutlinedItem.html#defaultOutline()">defaultOutline</a>, <a href="../../../../edu/rit/draw/item/OutlinedItem.html#defaultOutline(edu.rit.draw.item.Outline)">defaultOutline</a>, <a href="../../../../edu/rit/draw/item/OutlinedItem.html#outline()">outline</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_edu.rit.draw.item.DrawingItem">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;edu.rit.draw.item.<a href="../../../../edu/rit/draw/item/DrawingItem.html" title="class in edu.rit.draw.item">DrawingItem</a></h3>
<code><a href="../../../../edu/rit/draw/item/DrawingItem.html#boundingBox()">boundingBox</a>, <a href="../../../../edu/rit/draw/item/DrawingItem.html#c()">c</a>, <a href="../../../../edu/rit/draw/item/DrawingItem.html#e()">e</a>, <a href="../../../../edu/rit/draw/item/DrawingItem.html#n()">n</a>, <a href="../../../../edu/rit/draw/item/DrawingItem.html#ne()">ne</a>, <a href="../../../../edu/rit/draw/item/DrawingItem.html#s()">s</a>, <a href="../../../../edu/rit/draw/item/DrawingItem.html#se()">se</a>, <a href="../../../../edu/rit/draw/item/DrawingItem.html#sw()">sw</a>, <a href="../../../../edu/rit/draw/item/DrawingItem.html#w()">w</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.<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#equals(java.lang.Object)" title="class or interface in java.lang">equals</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#hashCode()" title="class or interface in java.lang">hashCode</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#toString()" title="class or interface in java.lang">toString</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="Polygon()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Polygon</h4>
<pre>public&nbsp;Polygon()</pre>
<div class="block">Construct a new polygon. The polygon has no points initially. The default
outline and fill paint are used.</div>
</li>
</ul>
<a name="Polygon(edu.rit.draw.item.Polygon)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Polygon</h4>
<pre>public&nbsp;Polygon(<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;thePolygon)</pre>
<div class="block">Construct a new polygon with the same points, outline, and fill paint as
the given polygon.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>thePolygon</code> - Polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>thePolygon</TT> is null.</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="size()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a>&nbsp;size()</pre>
<div class="block">Returns the size of this polygon's bounding box.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/DrawingItem.html#size()">size</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/DrawingItem.html" title="class in edu.rit.draw.item">DrawingItem</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>Size.</dd></dl>
</li>
</ul>
<a name="width()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>width</h4>
<pre>public&nbsp;double&nbsp;width()</pre>
<div class="block">Returns the width of this polygon's bounding box.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/DrawingItem.html#width()">width</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/DrawingItem.html" title="class in edu.rit.draw.item">DrawingItem</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>Width.</dd></dl>
</li>
</ul>
<a name="height()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>height</h4>
<pre>public&nbsp;double&nbsp;height()</pre>
<div class="block">Returns the height of this polygon's bounding box.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/DrawingItem.html#height()">height</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/DrawingItem.html" title="class in edu.rit.draw.item">DrawingItem</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>Height.</dd></dl>
</li>
</ul>
<a name="nw()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nw</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a>&nbsp;nw()</pre>
<div class="block">Returns the northwest corner point of this polygon's bounding box.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/DrawingItem.html#nw()">nw</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/DrawingItem.html" title="class in edu.rit.draw.item">DrawingItem</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>Northwest corner point.</dd></dl>
</li>
</ul>
<a name="outline(edu.rit.draw.item.Outline)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>outline</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;outline(<a href="../../../../edu/rit/draw/item/Outline.html" title="interface in edu.rit.draw.item">Outline</a>&nbsp;theOutline)</pre>
<div class="block">Set this polygon's outline.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/ShapeItem.html#outline(edu.rit.draw.item.Outline)">outline</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/ShapeItem.html" title="class in edu.rit.draw.item">ShapeItem</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>theOutline</code> - Outline, or <TT>Outline.NONE</TT>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd></dl>
</li>
</ul>
<a name="fill(edu.rit.draw.item.Fill)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fill</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;fill(<a href="../../../../edu/rit/draw/item/Fill.html" title="interface in edu.rit.draw.item">Fill</a>&nbsp;theFill)</pre>
<div class="block">Set this polygon's fill paint.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/ShapeItem.html#fill(edu.rit.draw.item.Fill)">fill</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/ShapeItem.html" title="class in edu.rit.draw.item">ShapeItem</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>theFill</code> - Fill paint, or <TT>Fill.NONE</TT>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd></dl>
</li>
</ul>
<a name="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;clear()</pre>
<div class="block">Clear this polygon. All of this polygon's line segments are removed.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd></dl>
</li>
</ul>
<a name="to(double, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>to</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;to(double&nbsp;x,
double&nbsp;y)</pre>
<div class="block">Add a line segment to this polygon. The new endpoint is (<TT>x</TT>,
<TT>y</TT>). If this polygon has no line segments, the <TT>to()</TT>
method specifies this polygon's starting endpoint.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - Endpoint's X coordinate.</dd><dd><code>y</code> - Endpoint's Y coordinate.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd></dl>
</li>
</ul>
<a name="to(edu.rit.draw.item.Point)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>to</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;to(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a>&nbsp;thePoint)</pre>
<div class="block">Add a line segment to this polygon. The new endpoint is
<TT>thePoint</TT>. If this polygon has no line segments, the
<TT>to()</TT> method specifies this polygon's starting endpoint.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>thePoint</code> - Endpoint.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>thePoint</TT> is null.</dd></dl>
</li>
</ul>
<a name="hto(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hto</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;hto(double&nbsp;x)</pre>
<div class="block">Add a horizontal line segment to this polygon. The new endpoint is
(<TT>x</TT>, previous endpoint's Y coordinate).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>x</code> - Endpoint's X coordinate.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if there is no previous endpoint.</dd></dl>
</li>
</ul>
<a name="hto(edu.rit.draw.item.Point)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hto</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;hto(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a>&nbsp;thePoint)</pre>
<div class="block">Add a horizontal line segment to this polygon. The new endpoint is
(<TT>thePoint</TT>'s X coordinate, previous endpoint's Y coordinate).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>thePoint</code> - Endpoint.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>thePoint</TT> is null. Thrown if
there is no previous endpoint.</dd></dl>
</li>
</ul>
<a name="vto(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vto</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;vto(double&nbsp;y)</pre>
<div class="block">Add a vertical line segment to this polygon. The new endpoint is
(previous endpoint's X coordinate, <TT>y</TT>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>y</code> - Endpoint's Y coordinate.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if there is no previous endpoint.</dd></dl>
</li>
</ul>
<a name="vto(edu.rit.draw.item.Point)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vto</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;vto(<a href="../../../../edu/rit/draw/item/Point.html" title="class in edu.rit.draw.item">Point</a>&nbsp;thePoint)</pre>
<div class="block">Add a vertical line segment to this polygon. The new endpoint is
(previous endpoint's X coordinate, <TT>thePoint</TT>'s Y coordinate).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>thePoint</code> - Endpoint.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>thePoint</TT> is null. Thrown if
there is no previous endpoint.</dd></dl>
</li>
</ul>
<a name="by(double, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>by</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;by(double&nbsp;dx,
double&nbsp;dy)</pre>
<div class="block">Add a line segment to this polygon. The new endpoint is (previous
endpoint's X coordinate + <TT>dx</TT>, previous endpoint's Y coordinate +
<TT>dy</TT>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dx</code> - X distance.</dd><dd><code>dy</code> - Y distance.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if there is no previous endpoint.</dd></dl>
</li>
</ul>
<a name="by(edu.rit.draw.item.Size)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>by</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;by(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a>&nbsp;theSize)</pre>
<div class="block">Add a line segment to this polygon. The new endpoint is (previous
endpoint's X coordinate + <TT>theSize.width()</TT>, previous endpoint's Y
coordinate + <TT>theSize.height()</TT>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theSize</code> - Distance.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>theSize</TT> is null. Thrown if
there is no previous endpoint.</dd></dl>
</li>
</ul>
<a name="hby(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hby</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;hby(double&nbsp;dx)</pre>
<div class="block">Add a horizontal line segment to this polygon. The new endpoint is
(previous endpoint's X coordinate + <TT>dx</TT>, previous endpoint's Y
coordinate).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dx</code> - X distance.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if there is no previous endpoint.</dd></dl>
</li>
</ul>
<a name="hby(edu.rit.draw.item.Size)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hby</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;hby(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a>&nbsp;theSize)</pre>
<div class="block">Add a horizontal line segment to this polygon. The new endpoint is
(previous endpoint's X coordinate + <TT>theSize.width()</TT>, previous
endpoint's Y coordinate).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theSize</code> - Distance.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>theSize</TT> is null. Thrown if
there is no previous endpoint.</dd></dl>
</li>
</ul>
<a name="vby(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vby</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;vby(double&nbsp;dy)</pre>
<div class="block">Add a vertical line segment to this polygon. The new endpoint is
(previous endpoint's X coordinate, previous endpoint's Y coordinate +
<TT>dy</TT>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dy</code> - Y distance.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if there is no previous endpoint.</dd></dl>
</li>
</ul>
<a name="vby(edu.rit.draw.item.Size)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vby</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;vby(<a href="../../../../edu/rit/draw/item/Size.html" title="class in edu.rit.draw.item">Size</a>&nbsp;theSize)</pre>
<div class="block">Add a vertical line segment to this polygon. The new endpoint is
(previous endpoint's X coordinate, previous endpoint's Y coordinate +
<TT>theSize.height()</TT>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>theSize</code> - Distance.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>theSize</TT> is null. Thrown if
there is no previous endpoint.</dd></dl>
</li>
</ul>
<a name="add()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;add()</pre>
<div class="block">Add this polygon to the end of the default drawing's sequence of drawing
items.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/ShapeItem.html#add()">add</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/ShapeItem.html" title="class in edu.rit.draw.item">ShapeItem</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if there is no default drawing.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../edu/rit/draw/Drawing.html#defaultDrawing()"><code>Drawing.defaultDrawing()</code></a></dd></dl>
</li>
</ul>
<a name="add(edu.rit.draw.Drawing)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;add(<a href="../../../../edu/rit/draw/Drawing.html" title="class in edu.rit.draw">Drawing</a>&nbsp;theDrawing)</pre>
<div class="block">Add this polygon to the end of the given drawing's sequence of drawing
items.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/ShapeItem.html#add(edu.rit.draw.Drawing)">add</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/ShapeItem.html" title="class in edu.rit.draw.item">ShapeItem</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>theDrawing</code> - Drawing.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>theDrawing</TT> is null.</dd></dl>
</li>
</ul>
<a name="addFirst()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addFirst</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;addFirst()</pre>
<div class="block">Add this polygon to the beginning of the default drawing's sequence of
drawing items.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/ShapeItem.html#addFirst()">addFirst</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/ShapeItem.html" title="class in edu.rit.draw.item">ShapeItem</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if there is no default drawing.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../edu/rit/draw/Drawing.html#defaultDrawing()"><code>Drawing.defaultDrawing()</code></a></dd></dl>
</li>
</ul>
<a name="addFirst(edu.rit.draw.Drawing)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addFirst</h4>
<pre>public&nbsp;<a href="../../../../edu/rit/draw/item/Polygon.html" title="class in edu.rit.draw.item">Polygon</a>&nbsp;addFirst(<a href="../../../../edu/rit/draw/Drawing.html" title="class in edu.rit.draw">Drawing</a>&nbsp;theDrawing)</pre>
<div class="block">Add this polygon to the beginning of the given drawing's sequence of
drawing items.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/ShapeItem.html#addFirst(edu.rit.draw.Drawing)">addFirst</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/ShapeItem.html" title="class in edu.rit.draw.item">ShapeItem</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>theDrawing</code> - Drawing.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This polygon.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>theDrawing</TT> is null.</dd></dl>
</li>
</ul>
<a name="writeExternal(java.io.ObjectOutput)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeExternal</h4>
<pre>public&nbsp;void&nbsp;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>&nbsp;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 polygon 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>&nbsp;in interface&nbsp;<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><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/FilledItem.html#writeExternal(java.io.ObjectOutput)">writeExternal</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/FilledItem.html" title="class in edu.rit.draw.item">FilledItem</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="blockListLast">
<li class="blockList">
<h4>readExternal</h4>
<pre>public&nbsp;void&nbsp;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>&nbsp;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>,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></pre>
<div class="block">Read this polygon 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>&nbsp;in interface&nbsp;<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><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../edu/rit/draw/item/FilledItem.html#readExternal(java.io.ObjectInput)">readExternal</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/draw/item/FilledItem.html" title="class in edu.rit.draw.item">FilledItem</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>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code> - Thrown if any class needed to deserialize this polygon cannot be
found.</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/Polygon.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/Point.html" title="class in edu.rit.draw.item"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../edu/rit/draw/item/Rectangle.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/Polygon.html" target="_top">Frames</a></li>
<li><a href="Polygon.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields_inherited_from_class_edu.rit.draw.item.FilledItem">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>Field&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="-2">Copyright &copy; 2013&ndash;2016 by Alan Kaminsky. All rights reserved. Send comments to ark</FONT><FONT SIZE="1" COLOR="#FFFFFF">&shy;</FONT><FONT SIZE="-2">&#64;</FONT><FONT SIZE="1" COLOR="#FFFFFF">&shy;</FONT><FONT SIZE="-2">cs.rit.edu.</FONT></small></p>
</body>
</html>