All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.Point

java.lang.Object
   |
   +----java.awt.Point

public class Point
extends Object
implements Serializable
A point representing a location in (x, y) coordinate space.


Variable Index

 o x
The x coordinate.
 o y
The y coordinate.

Constructor Index

 o Point()
Constructs and initializes a Point initialized with (0, 0).
 o Point(int, int)
Constructs and initializes a Point from the specified x and y coordinates.
 o Point(Point)
Constructs and initializes a Point with the same location as the specified Point.

Method Index

 o equals(Object)
Checks whether two pointers are equal.
 o getLocation()
Returns the location of this point.
 o hashCode()
Returns the hashcode for this Point.
 o move(int, int)
Changes the point to have the specified location.
 o setLocation(int, int)
Changes the point to have the specificed location.
 o setLocation(Point)
Changes the point to have the specificed location.
 o toString()
Returns the String representation of this Point's coordinates.
 o translate(int, int)
Translates the point.

Variables

 o x
Properties Public 
   x=int 
The x coordinate.

 o y
Properties Public 
   y=int 
The y coordinate.

Constructors

 o Point
    method Point() public 
Constructs and initializes a Point initialized with (0, 0).

 o Point
    method Point(p=Point) public 
Constructs and initializes a Point with the same location as the specified Point.

Parameters:
p - a point
 o Point
    method Point(x=int, -
                 y=int) public 
Constructs and initializes a Point from the specified x and y coordinates.

Parameters:
x - the x coordinate
y - the y coordinate

Methods

 o getLocation
    method getLocation() returns Point public     
Returns the location of this point. This method is included for completeness, to parallel the getLocation method of Component.

 o setLocation
    method setLocation(p=Point)  public     
Changes the point to have the specificed location. This method is included for completeness, to parallel the setLocation method of Component.

Parameters:
p - the new location for the point
 o setLocation
    method setLocation(x=int, -
                       y=int)  public     
Changes the point to have the specificed location. This method is included for completeness, to parallel the setLocation method of Component.

Parameters:
x - the x coordinate of the new location
y - the y coordinate of the new location
 o move
    method move(x=int, -
                y=int)  public     
Changes the point to have the specified location.

Parameters:
x - the x coordinate of the new location
y - the y coordinate of the new location
 o translate
    method translate(x=int, -
                     y=int)  public     
Translates the point.

 o hashCode
    method hashCode() returns int public     
Returns the hashcode for this Point.

Overrides:
hashCode in class Object
 o equals
    method equals(obj=Object) returns boolean public     
Checks whether two pointers are equal.

Overrides:
equals in class Object
 o toString
    method toString() returns String public     
Returns the String representation of this Point's coordinates.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index