Class Point
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Point

public class netscape.application.Point
    extends java.lang.Object
    implements netscape.util.Codable
{
    /* Fields
     */
    public int x;
    public int y;

    /* Constructors
     */
    public Point();
    public Point(int, int);
    public Point(Point);

    /* Methods
     */
    public void decode(Decoder);
    public void describeClassInfo(ClassInfo);
    public void encode(Encoder);
    public boolean equals(Object);
    public void finishDecoding();
    public int hashCode();
    public void moveBy(int, int);
    public void moveTo(int, int);
    public String toString();
}
Object subclass representing an (x, y) coordinate.

Fields

x

  public int x
The Point's X-coordinate.

y

  public int y
The Point's Y-coordinate.

Constructors

.Point

  public Point()
Constructs a Point with coordinates (0, 0).

.Point

  public Point(int x,
               int y)
Constructs a Point with coordinates (x, y).

.Point

  public Point(Point templatePoint)
Constructs a Point with coordinates (templatePoint.x, templatePoint.y).

Methods

.toString

  public String toString()
Returns the Point's String representation.
Overrides:
toString in class Object

.moveTo

  public void moveTo(int x,
                     int y)
Sets the Point's coordinates to (x, y).

.moveBy

  public void moveBy(int deltaX,
                     int deltaY)
Moves the Point by (deltaX, deltaY).

.equals

  public boolean equals(Object anObject)
Returns true if the Point equals anObject.
Overrides:
equals in class Object

.hashCode

  public int hashCode()
Returns the Point's hash code.
Overrides:
hashCode in class Object

.describeClassInfo

  public void describeClassInfo(ClassInfo info)
Describes the Point class' coding information.
See Also:
describeClassInfo

.encode

  public void encode(Encoder encoder) throws CodingException
Encodes the Point.
See Also:
encode

.decode

  public void decode(Decoder decoder) throws CodingException
Decodes the Point.
See Also:
decode

.finishDecoding

  public void finishDecoding() throws CodingException
Finishes the Point 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