java.lang.Objectjava.awt.geom.Point2D
java.awt.geom.Point2D.Float
public static class Point2D.Float
Float 类以 float 精度定义指定的点。
| 嵌套类摘要 |
|---|
| 从类 java.awt.geom.Point2D 继承的嵌套类/接口 |
|---|
Point2D.Double, Point2D.Float |
| 字段摘要 | |
|---|---|
float |
x 此 Point2D 的 X 坐标。 |
float |
y 此 Point2D 的 Y 坐标。 |
| 构造方法摘要 | |
|---|---|
Point2D.Float() 使用坐标 (0,0) 构造并初始化一个 Point2D。 |
|
Point2D.Float(float x, float y) 使用指定坐标构造并初始化一个 Point2D。 |
|
| 方法摘要 | |
|---|---|
double |
getX() 以 double 精度返回此 Point2D 的 X 坐标。 |
double |
getY() 以 double 精度返回此 Point2D 的 Y 坐标。 |
void |
setLocation(double x, double y) 将此 Point2D 的位置设为指定的 double 坐标。 |
void |
setLocation(float x, float y) 将此 Point2D 的位置设为指定的 float 坐标。 |
String |
toString() 返回表示此 Point2D 值的 String。 |
| 从类 java.awt.geom.Point2D 继承的方法 |
|---|
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation |
| 从类 java.lang.Object 继承的方法 |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
public float x
Point2D 的 X 坐标。
public float y
Point2D 的 Y 坐标。
| 构造方法详细信息 |
|---|
public Point2D.Float()
Point2D。
public Point2D.Float(float x,
float y)
Point2D。
x - 新构造
Point2D 的 X 坐标
y - 新构造
Point2D 的 Y 坐标
| 方法详细信息 |
|---|
public double getX()
public double getY()
public void setLocation(double x,
double y)
Point2D 的位置设为指定的
double 坐标。
Point2D 中的
setLocation
x - 此
Point2D 的新 X 坐标
y - 此
Point2D 的新 Y 坐标
public void setLocation(float x,
float y)
Point2D 的位置设为指定的
float 坐标。
x - 此
Point2D 的新 X 坐标
y - 此
Point2D 的新 Y 坐标
public String toString()