SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A class representing a 2D point in screen coordinates.
Author: BRE, JANConstructor Summary | |
IWPoint(x, y)
Creates a new point at the specified coordinate. If x and y are not specified (0, 0) is returned.
|
Method Summary | |
IWPoint
|
add(other)
Returns a point whose value is (this + other). |
IWPoint
|
clone()
Returns a new instance of this object. |
Number
|
distanceFrom(other)
Returns the distance between this point and another one in pixels. |
boolean
|
equals(other)
Checks whether this point equals another one. |
Number
|
getX()
Returns the horizontal position of this point. |
Number
|
getY()
Returns the vertical position of this point. |
void
|
setX(x)
Sets the horizontal position of this point. |
void
|
setY(y)
Sets the vertical position of this point. |
IWPoint
|
substract(other)
Returns a point whose value is (this - other). |
String
|
toString()
Returns a string representation of this point. |
Constructor Detail |
IWPoint(x, y)
x
and y
are not specified (0, 0) is returned.
Number x
- horizontal coordinate
Number y
- vertical coordinate
Method Detail |
IWPoint add(other)
IWPoint other
- another a point
IWPoint
IWPoint clone()
IWPoint
Number distanceFrom(other)
IWPoint other
- another a point
Number
boolean equals(other)
IWPoint other
- another a point
boolean
Number getX()
Number
Number getY()
Number
void setX(x)
Number x
- new horizontal coordinate
void
void setY(y)
Number y
- new vertical coordinate
void
IWPoint substract(other)
IWPoint other
- another a point
IWPoint
String toString()
String