|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.awt.geom.RectangularShape
java.awt.geom.RoundRectangle2D
java.awt.geom.RoundRectangle2D.Double
public static class RoundRectangle2D.Double
Double 类定义一个所有圆角都使用 double 坐标指定的矩形。
| 嵌套类摘要 |
|---|
| 从类 java.awt.geom.RoundRectangle2D 继承的嵌套类/接口 |
|---|
RoundRectangle2D.Double, RoundRectangle2D.Float |
| 字段摘要 | |
|---|---|
double |
archeight 圆角弧的高度。 |
double |
arcwidth 圆角弧的宽度。 |
double |
height 此 RoundRectangle2D 的高度。 |
double |
width 此 RoundRectangle2D 的宽度。 |
double |
x 此 RoundRectangle2D 的 X 坐标。 |
double |
y 此 RoundRectangle2D 的 Y 坐标。 |
| 构造方法摘要 | |
|---|---|
RoundRectangle2D.Double() 构造一个新 RoundRectangle2D,并将其初始化为:位置 (0.0,0)、大小 (0.0,0.0)、圆角弧半径 0.0。 |
|
RoundRectangle2D.Double(double x, double y, double w, double h, double arcw, double arch) 根据指定 double 坐标构造并初始化 RoundRectangle2D。 |
|
| 方法摘要 | |
|---|---|
double |
getArcHeight() 获取圆角弧的高度。 |
double |
getArcWidth() 获取圆角弧的宽度。 |
Rectangle2D |
getBounds2D() 返回一个高精度的、比 getBounds 方法更准确的 Shape 边界框。 |
double |
getHeight() 以 double 精度返回窗体矩形的高度。 |
double |
getWidth() 以 double 精度返回窗体矩形的宽度。 |
double |
getX() 以 double 精度返回窗体矩形左上角的 X 坐标。 |
double |
getY() 以 double 精度返回窗体矩形左上角的 Y 坐标。 |
boolean |
isEmpty() 确定 RectangularShape 是否为空。 |
void |
setRoundRect(double x, double y, double w, double h, double arcw, double arch) 将此 RoundRectangle2D 的位置、大小和圆角半径设置为指定的 double 值。 |
void |
setRoundRect(RoundRectangle2D rr) 将此 RoundRectangle2D 设置为与指定的 RoundRectangle2D 相同。 |
| 从类 java.awt.geom.RoundRectangle2D 继承的方法 |
|---|
contains, contains, equals, getPathIterator, hashCode, intersects, setFrame |
| 从类 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 double x
RoundRectangle2D 的 X 坐标。
public double y
RoundRectangle2D 的 Y 坐标。
public double width
RoundRectangle2D 的宽度。
public double height
RoundRectangle2D 的高度。
public double arcwidth
public double archeight
| 构造方法详细信息 |
|---|
public RoundRectangle2D.Double()
RoundRectangle2D,并将其初始化为:位置 (0.0,0)、大小 (0.0,0.0)、圆角弧半径 0.0。
public RoundRectangle2D.Double(double x,
double y,
double w,
double h,
double arcw,
double arch)
double 坐标构造并初始化
RoundRectangle2D。
x - 新构造
RoundRectangle2D 的 X 坐标
y - 新构造
RoundRectangle2D 的 Y 坐标
w - 设置新构造
RoundRectangle2D 的宽度
设置新构造 -
RoundRectangle2D 的高度
arcw - 新构造
RoundRectangle2D 的圆角弧宽度
arch - 新构造
RoundRectangle2D 的圆角弧高度
| 方法详细信息 |
|---|
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 double getArcWidth()
RoundRectangle2D 中的
getArcWidth
RoundRectangle2D 圆角弧的宽度。
public double getArcHeight()
RoundRectangle2D 中的
getArcHeight
RoundRectangle2D 圆角弧的高度。
public boolean isEmpty()
RectangularShape 是否为空。当
RectangularShape 为空时,它不封闭任何区域。
RectangularShape 中的
isEmpty
RectangularShape 为空,则返回
true;否则返回
false。
public void setRoundRect(double x,
double y,
double w,
double h,
double arcw,
double arch)
RoundRectangle2D 的位置、大小和圆角半径设置为指定的
double 值。
RoundRectangle2D 中的
setRoundRect
x - 设置此
RoundRectangle2D 的 X 坐标
y - 设置此
RoundRectangle2D 的 Y 坐标
w - 设置此
RoundRectangle2D 的宽度
h - 设置此
RoundRectangle2D 的高度
arcw - 设置此
RoundRectangle2D 的弧宽
arch - 设置此
RoundRectangle2D 的弧高
public void setRoundRect(RoundRectangle2D rr)
RoundRectangle2D 设置为与指定的
RoundRectangle2D 相同。
RoundRectangle2D 中的
setRoundRect
rr - 指定的
RoundRectangle2D
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. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。