< prev index next >
core/JemmyCore/src/org/jemmy/Point.java
Print this page
*** 29,39 ****
import java.io.Serializable;
/**
* Replacement for java.awt.Point
! * @author Alexander Kouznetsov <mrkam@mail.ru>
*/
public class Point implements Serializable{
/**
* The X coordinate of this <code>Point</code>.
* If no X coordinate is set it will default to 0.
--- 29,39 ----
import java.io.Serializable;
/**
* Replacement for java.awt.Point
! * @author mrkam
*/
public class Point implements Serializable{
/**
* The X coordinate of this <code>Point</code>.
* If no X coordinate is set it will default to 0.
*** 99,117 ****
this.y = (int) Math.round(y);
}
/**
* {@inheritDoc}
- * @return
*/
public int getX() {
return x;
}
/**
* {@inheritDoc}
- * @return
*/
public int getY() {
return y;
}
--- 99,115 ----
*** 126,136 ****
}
/**
* Sets the location of the point to the specified location.
* @param p a point, the new location for this point
! * @return
* @see org.jemmy.Point#getLocation
*/
public Point setLocation(Point p) {
setLocation(p.x, p.y);
return this;
--- 124,134 ----
}
/**
* Sets the location of the point to the specified location.
* @param p a point, the new location for this point
! * @return self
* @see org.jemmy.Point#getLocation
*/
public Point setLocation(Point p) {
setLocation(p.x, p.y);
return this;
*** 201,212 ****
this.y += dy;
return this;
}
/**
*
! * @param v
* @return self
*/
public Point translate(Vector v) {
this.x = (int) Math.round(x + v.getX());
this.y = (int) Math.round(y + v.getY());
--- 199,211 ----
this.y += dy;
return this;
}
/**
+ * Translates the current point according to the given vector.
*
! * @param v vector by which to translate the point
* @return self
*/
public Point translate(Vector v) {
this.x = (int) Math.round(x + v.getX());
this.y = (int) Math.round(y + v.getY());
*** 231,241 ****
return super.equals(obj);
}
/**
* {@inheritDoc}
- * @return
*/
@Override
public int hashCode() {
int hash = 7;
hash = 89 * hash + this.x;
--- 230,239 ----
< prev index next >