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.
-
x
- The x coordinate.
-
y
- The y coordinate.
-
Point()
- Constructs and initializes a Point initialized with (0, 0).
-
Point(int, int)
- Constructs and initializes a Point from the specified x and y
coordinates.
-
Point(Point)
- Constructs and initializes a Point with the same location as
the specified Point.
-
equals(Object)
- Checks whether two pointers are equal.
-
getLocation()
- Returns the location of this point.
-
hashCode()
- Returns the hashcode for this Point.
-
move(int, int)
- Changes the point to have the specified location.
-
setLocation(int, int)
- Changes the point to have the specificed location.
-
setLocation(Point)
- Changes the point to have the specificed location.
-
toString()
- Returns the String representation of this Point's coordinates.
-
translate(int, int)
- Translates the point.
x
Properties Public
x=int
- The x coordinate.
y
Properties Public
y=int
- The y coordinate.
Point
method Point() public
- Constructs and initializes a Point initialized with (0, 0).
Point
method Point(p=Point) public
- Constructs and initializes a Point with the same location as
the specified Point.
- Parameters:
- p - a point
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
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.
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
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
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
translate
method translate(x=int, -
y=int) public
- Translates the point.
hashCode
method hashCode() returns int public
- Returns the hashcode for this Point.
- Overrides:
- hashCode in class Object
equals
method equals(obj=Object) returns boolean public
- Checks whether two pointers are equal.
- Overrides:
- equals in class Object
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