|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.awt.geom.RectangularShape
java.awt.geom.Ellipse2D
java.awt.geom.Ellipse2D.Float
public static class Ellipse2D.Float
Float 类以 float 精度定义椭圆。
| 嵌套类摘要 |
|---|
| 从类 java.awt.geom.Ellipse2D 继承的嵌套类/接口 |
|---|
Ellipse2D.Double, Ellipse2D.Float |
| 字段摘要 | |
|---|---|
float |
height 此 Ellipse2D 的总高度。 |
float |
width 此 Ellipse2D 的总宽度。 |
float |
x 此 Ellipse2D 窗体矩形左上角的 X 坐标。 |
float |
y 此 Ellipse2D 窗体矩形左上角的 Y 坐标。 |
| 构造方法摘要 | |
|---|---|
Ellipse2D.Float() 构造一个新 Ellipse2D,并将其初始化为:位置 (0, 0)、大小 (0, 0)。 |
|
Ellipse2D.Float(float x, float y, float w, float h) 根据指定坐标构造和初始化 Ellipse2D。 |
|
| 方法摘要 | |
|---|---|
Rectangle2D |
getBounds2D() 返回一个高精度的、比 getBounds 方法更准确的 Shape 边界框。 |
double |
getHeight() 以 double 精度返回窗体矩形的高度。 |
double |
getWidth() 以 double 精度返回窗体矩形的宽度。 |
double |
getX() 以 double 精度返回窗体矩形左上角的 X 坐标。 |
double |
getY() 以 double 精度返回窗体矩形左上角的 Y 坐标。 |
boolean |
isEmpty() 确定 RectangularShape 是否为空。 |
void |
setFrame(double x, double y, double w, double h) 将此 Shape 窗体矩形的位置和大小设置为指定的矩形值。 |
void |
setFrame(float x, float y, float w, float h) 将此 Shape 窗体矩形的位置和大小设置为指定矩形值。 |
| 从类 java.awt.geom.Ellipse2D 继承的方法 |
|---|
contains, contains, equals, getPathIterator, hashCode, intersects |
| 从类 java.awt.geom.RectangularShape 继承的方法 |
|---|
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
| 从类 java.lang.Object 继承的方法 |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public float x
Ellipse2D 窗体矩形左上角的 X 坐标。
public float y
Ellipse2D 窗体矩形左上角的 Y 坐标。
public float width
Ellipse2D 的总宽度。
public float height
Ellipse2D 的总高度。
| 构造方法详细信息 |
|---|
public Ellipse2D.Float()
Ellipse2D,并将其初始化为:位置 (0, 0)、大小 (0, 0)。
public Ellipse2D.Float(float x,
float y,
float w,
float h)
Ellipse2D。
x - 窗体矩形左上角的 X 坐标
y - 窗体矩形左上角的 Y 坐标
w - 窗体矩形的宽度
h - 窗体矩形的高度
| 方法详细信息 |
|---|
public double getX()
double 精度返回窗体矩形左上角的 X 坐标。
RectangularShape 中的
getX
public double getY()
double 精度返回窗体矩形左上角的 Y 坐标。
RectangularShape 中的
getY
public double getWidth()
double 精度返回窗体矩形的宽度。
RectangularShape 中的
getWidth
public double getHeight()
double 精度返回窗体矩形的高度。
RectangularShape 中的
getHeight
public boolean isEmpty()
RectangularShape 是否为空。当
RectangularShape 为空时,它不封闭任何区域。
RectangularShape 中的
isEmpty
RectangularShape 为空,则返回
true;否则返回
false。
public void setFrame(float x,
float y,
float w,
float h)
Shape 窗体矩形的位置和大小设置为指定矩形值。
x - 指定矩形的左上角的 X 坐标
y - 指定矩形的左上角的 Y 坐标
w - 指定矩形的宽度
h - 指定矩形的高度
public void setFrame(double x,
double y,
double w,
double h)
Shape 窗体矩形的位置和大小设置为指定的矩形值。
RectangularShape 中的
setFrame
x - 指定矩形左上角的 X 坐标
y - 指定矩形左上角的 Y 坐标
w - 指定矩形的宽度
h - 指定矩形的高度
RectangularShape.getFrame()
public Rectangle2D getBounds2D()
getBounds 方法更准确的
Shape 边界框。注意,不保证返回的
Rectangle2D 是包围
Shape 的最小边界框,只保证
Shape 完全位于指示的
Rectangle2D 中。此方法返回的边界框通常比
getBounds 方法返回的更紧密,而且永远不会因为溢出问题而出错,因为返回值可以是一个使用双精度值存储尺寸的
Rectangle2D 实例。
Shape 中的
getBounds2D
Rectangle2D 实例,它是
Shape 的高精度边界框。
Shape.getBounds()
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。