charva.awt

Class Point

Implemented Interfaces:
Cloneable

public class Point
extends java.lang.Object
implements Cloneable

Represents a point in (x,y) coordinate space, with integer precision.

Field Summary

int
x
int
y

Constructor Summary

Point(Point point_)
Point(int x_, int y_)

Method Summary

Point
addOffset(Dimension d_)
Point
addOffset(Point p_)
Point
addOffset(int x_, int y_)
Object
clone()
boolean
equals(Point other_)
Returns true is this Point is equal to the specified Point.
boolean
isInside(Rectangle rect_)
Returns true if this point is inside the specified rectangle.
Point
subtractOffset(Point p)
String
toString()
void
translate(Point point_)
Translates this point by the x and y values given in "point_"
void
translate(int dx_, int dy_)
Translates this point by dx_ along the x axis and by dy_ along the y axis.

Field Details

x

public int x

y

public int y

Constructor Details

Point

public Point(Point point_)

Point

public Point(int x_,
             int y_)

Method Details

addOffset

public Point addOffset(Dimension d_)

addOffset

public Point addOffset(Point p_)

addOffset

public Point addOffset(int x_,
                       int y_)

clone

public Object clone()

equals

public boolean equals(Point other_)
Returns true is this Point is equal to the specified Point.

isInside

public boolean isInside(Rectangle rect_)
Returns true if this point is inside the specified rectangle.

subtractOffset

public Point subtractOffset(Point p)

toString

public String toString()

translate

public void translate(Point point_)
Translates this point by the x and y values given in "point_"

translate

public void translate(int dx_,
                      int dy_)
Translates this point by dx_ along the x axis and by dy_ along the y axis.