| java.lang.Object java.util.Observable jimm.datavision.Point
Field Summary | |
public double | x Warning: though public, treat as read-only. | public double | y Warning: though public, treat as read-only. |
Method Summary | |
public double | distanceTo(Point p) Returns the distance from this point to another. | public double | getX() Returns the x coordinate. | public double | getY() Returns the y coordinate. | public void | setX(double newX) Sets the x coordinate. | public void | setY(double newY) Sets the y coordinate. | public String | toString() Returns a string representation of this point. | public void | translate(java.awt.Point p) Translates this point by the coordinates of another. | public void | translate(Point p) Translates this point by the coordinates of another. | public void | translate(double dx, double dy) Translates this point by the coordinates of another. | public void | writeXML(XMLWriter out) Writes this point as an XML tag. |
x | public double x(Code) | | Warning: though public, treat as read-only. When writing, make sure to
use setter method so observers are notified.
|
y | public double y(Code) | | Warning: though public, treat as read-only. When writing, make sure to
use setter method so observers are notified.
|
Point | public Point()(Code) | | Constructor.
|
Point | public Point(double x, double y)(Code) | | Constructor.
Parameters: x - a double Parameters: y - a double |
distanceTo | public double distanceTo(Point p)(Code) | | Returns the distance from this point to another.
Parameters: p - the other point the distance between the two points |
getX | public double getX()(Code) | | Returns the x coordinate.
the doubleing-point x coordinate |
getY | public double getY()(Code) | | Returns the y coordinate.
the doubleing-point y coordinate |
setX | public void setX(double newX)(Code) | | Sets the x coordinate.
Parameters: newX - the new x coordinate |
setY | public void setY(double newY)(Code) | | Sets the y coordinate.
Parameters: newY - the new y coordinate |
toString | public String toString()(Code) | | Returns a string representation of this point.
a string representing this point |
translate | public void translate(java.awt.Point p)(Code) | | Translates this point by the coordinates of another.
|
translate | public void translate(Point p)(Code) | | Translates this point by the coordinates of another.
|
translate | public void translate(double dx, double dy)(Code) | | Translates this point by the coordinates of another.
|
writeXML | public void writeXML(XMLWriter out)(Code) | | Writes this point as an XML tag.
Parameters: out - a writer that knows how to write XML |
|
|