public class mxPoint extends Object implements Serializable, Cloneable
Modifier and Type | Field and Description |
---|---|
protected double |
x
Holds the x- and y-coordinates of the point.
|
protected double |
y
Holds the x- and y-coordinates of the point.
|
Constructor and Description |
---|
mxPoint()
Constructs a new point at (0, 0).
|
mxPoint(double x,
double y)
Constructs a new point at (x, y).
|
mxPoint(mxPoint point)
Constructs a new point at the location of the given point.
|
mxPoint(Point2D point)
Constructs a new point at the location of the given point.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a new instance of the same point.
|
boolean |
equals(Object obj)
Returns true if the given object equals this rectangle.
|
Point |
getPoint()
Returns the coordinates as a new point.
|
double |
getX()
Returns the x-coordinate of the point.
|
double |
getY()
Returns the x-coordinate of the point.
|
void |
setX(double value)
Sets the x-coordinate of the point.
|
void |
setY(double value)
Sets the y-coordinate of the point.
|
String |
toString()
Returns a
String that represents the value
of this mxPoint . |
protected double x
protected double y
public mxPoint()
public mxPoint(Point2D point)
point
- Point that specifies the location.public mxPoint(mxPoint point)
point
- Point that specifies the location.public mxPoint(double x, double y)
x
- X-coordinate of the point to be created.y
- Y-coordinate of the point to be created.public double getX()
public void setX(double value)
value
- Double that specifies the new x-coordinate.public double getY()
public void setY(double value)
value
- Double that specifies the new x-coordinate.public Point getPoint()
public boolean equals(Object obj)
public Object clone()
Copyright (c) 2010 Gaudenz Alder, David Benson. All rights reserved.