所有类
java.awt.geom
类 Point2D.Double
java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Double
- 所有已实现的接口:
- Cloneable
- 正在封闭类:
- Point2D
public static class Point2D.Double
- extends Point2D
Double
类以 double
精度定义指定的点。
字段摘要 |
---|
double | x 此 Point2D 的 X 坐标。 |
double | y 此 Point2D 的 Y 坐标。 |
方法摘要 |
---|
double | getX() 以 double 精度返回此 Point2D 的 X 坐标。 |
double | getY() 以 double 精度返回此 Point2D 的 Y 坐标。 |
void | setLocation(double x, double y) 将此 Point2D 的位置设为指定的 double 坐标。 |
String | toString() 返回表示此 Point2D 的值的 String 。 |
x
public double x
- 此
Point2D
的 X 坐标。 - 从以下版本开始:
- 1.2
y
public double y
- 此
Point2D
的 Y 坐标。 - 从以下版本开始:
- 1.2
Point2D.Double
public Point2D.Double()
- 构造并初始化坐标为 (0,0) 的
Point2D
。 - 从以下版本开始:
- 1.2
Point2D.Double
public Point2D.Double(double x,
double y)
- 构造并初始化具有指定坐标的
Point2D
。 - 参数:
x, y
- 用于设置新构造的 Point2D
的坐标 - 从以下版本开始:
- 1.2
getX
public double getX()
- 以
double
精度返回此 Point2D
的 X 坐标。 - 指定者:
- 类
Point2D
中的 getX
- 返回:
- 此
Point2D
的 X 坐标。 - 从以下版本开始:
- 1.2
getY
public double getY()
- 以
double
精度返回此 Point2D
的 Y 坐标。 - 指定者:
- 类
Point2D
中的 getY
- 返回:
- 此
Point2D
的 Y 坐标。 - 从以下版本开始:
- 1.2
setLocation
public void setLocation(double x,
double y)
- 将此
Point2D
的位置设为指定的 double
坐标。 - 指定者:
- 类
Point2D
中的 setLocation
- 参数:
x, y
- 用于设置此 Point2D
的坐标 - 从以下版本开始:
- 1.2
toString
public String toString()
- 返回表示此
Point2D
的值的 String
。 - 覆盖:
- 类
Object
中的 toString
- 返回:
- 此
Point2D
的字符串表示形式。 - 从以下版本开始:
- 1.2
所有类