|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
jimm.datavision.Point
public class Point
A point with double coordinates.
| Field Summary | |
|---|---|
double |
x
Warning: though public, treat as read-only. |
double |
y
Warning: though public, treat as read-only. |
| Constructor Summary | |
|---|---|
Point()
Constructor. |
|
Point(double x,
double y)
Constructor. |
|
Point(java.awt.Point p)
Constructor. |
|
Point(Point p)
Constructor. |
|
| Method Summary | |
|---|---|
double |
distanceTo(Point p)
Returns the distance from this point to another. |
double |
getX()
Returns the x coordinate. |
double |
getY()
Returns the y coordinate. |
void |
setX(double newX)
Sets the x coordinate. |
void |
setY(double newY)
Sets the y coordinate. |
java.lang.String |
toString()
Returns a string representation of this point. |
void |
translate(double dx,
double dy)
Translates this point by the coordinates of another. |
void |
translate(java.awt.Point p)
Translates this point by the coordinates of another. |
void |
translate(Point p)
Translates this point by the coordinates of another. |
void |
writeXML(XMLWriter out)
Writes this point as an XML tag. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double x
public double y
| Constructor Detail |
|---|
public Point()
public Point(java.awt.Point p)
public Point(Point p)
public Point(double x,
double y)
x - a doubley - a double| Method Detail |
|---|
public double getX()
public void setX(double newX)
newX - the new x coordinatepublic double getY()
public void setY(double newY)
newY - the new y coordinatepublic void translate(java.awt.Point p)
public void translate(Point p)
public void translate(double dx,
double dy)
public double distanceTo(Point p)
p - the other point
public java.lang.String toString()
toString in class java.lang.Objectpublic void writeXML(XMLWriter out)
writeXML in interface Writeableout - a writer that knows how to write XML
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||