Class Polygon
All Packages Class Hierarchy This Package Previous Next Index
Class Polygon
public class netscape.application.Polygon
extends java.lang.Object
implements netscape.util.Codable
{
/* Fields
*/
public int numPoints;
public int xPoints;
public int yPoints;
/* Constructors
*/
public Polygon();
public Polygon(int[], int[], int);
/* Methods
*/
public void addPoint(int, int);
public Rect boundingRect();
public boolean containsPoint(int, int);
public boolean containsPoint(Point);
public void decode(Decoder);
public void describeClassInfo(ClassInfo);
public void encode(Encoder);
public void finishDecoding();
public void moveBy(int, int);
}
Object subclass representing an ordered list of points.
Fields
numPoints
public int numPoints
xPoints
public int xPoints[]
yPoints
public int yPoints[]
Constructors
.Polygon
public Polygon()
- Constructs a Polygon with no vertices.
.Polygon
public Polygon(int xPoints[],
int yPoints[],
int numPoints)
- Constructs a polygon with the given points.
Methods
public void addPoint(int x,
int y)
- Adds the point (x, y) to the end of the Polygon's list
of points.
public Rect boundingRect()
- Returns the Polygon's bounding Rect.
public boolean containsPoint(int x,
int y)
- Returns true if the Polygon contains the point
(x, y).
public boolean containsPoint(Point aPoint)
- Returns true if the Polygon contains the point aPoint.
public void moveBy(int deltaX,
int deltaY)
- Moves each of the Polygon's points by deltaX and deltaY.
public void describeClassInfo(ClassInfo info)
- Describes the Polygon class' information.
- See Also:
- describeClassInfo
public void encode(Encoder encoder) throws CodingException
- Encodes the Polygon.
- See Also:
- encode
public void decode(Decoder decoder) throws CodingException
- Decodes the Polygon.
- See Also:
- decode
public void finishDecoding() throws CodingException
- Finishes the Polygon instance decoding.
- See Also:
- finishDecoding
All Packages Class Hierarchy This Package Previous Next Index
Copyright © 1997 Netscape Communications Corporation. All rights reserved
Please send any comments or corrections to ifcfeedback@netscape.com
HTML generated on 21 Oct 1997