|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.protocol.WhiteboardPoint
public class WhiteboardPoint
A point representing a location in (x,y) coordinate space,
specified in integer precision.
This class has been inspired by the java.awt.Point class.
| Constructor Summary | |
|---|---|
WhiteboardPoint(double x,
double y)
Constructs and initializes a point at the specified (x,y) location in the coordinate space. |
|
WhiteboardPoint(WhiteboardPoint p)
Constructs and initializes a point with the same location as the specified Point object. |
|
| Method Summary | |
|---|---|
protected Object |
clone()
Creates and returns a copy of this WhiteboardPoint. |
double |
distance(WhiteboardPoint p)
Calculates the distance from this point the given point. |
boolean |
equals(Object obj)
Determines whether or not two points are equal. |
double |
getX()
Returns the X coordinate of this WhiteboardPoint. |
double |
getY()
Returns the Y coordinate of this WhiteboardPoint. |
void |
setX(double x)
Sets a new value to the x coordinate. |
void |
setY(double y)
Sets a new value to the y coordinate. |
String |
toString()
Returns a string representation of this point and its location in the (x,y) coordinate space. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WhiteboardPoint(WhiteboardPoint p)
p - a point
public WhiteboardPoint(double x,
double y)
x - the X coordinate of the newly constructed Pointy - the Y coordinate of the newly constructed Point| Method Detail |
|---|
public double getX()
public double getY()
public void setX(double x)
x - the new value of the x coordinatepublic void setY(double y)
y - the new value of the y coordinatepublic boolean equals(Object obj)
equals in class Objectobj - an object to be compared with this WhiteboardPoint
public String toString()
(x,y) coordinate space. This method is intended to be
used only for debugging purposes, and the content and format of the
returned string may vary between implementations.
The returned string may be empty but may not be null.
toString in class Objectprotected Object clone()
clone in class Objectpublic double distance(WhiteboardPoint p)
p - the point to which to calculate the distance
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||