|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.border.AbstractBorder
public abstract class AbstractBorder
实现无尺寸限制的空边框类。它提供了一个便捷的基类,其他 border 类可方便地从其派生。
警告:此类的序列化对象将与以后的 Swing 版本不兼容。当前的序列化支持适用于短期存储或运行相同 Swing 版本的应用程序之间的 RMI。从 1.4 版本开始,已在 java.beans 包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder。
| 构造方法摘要 | |
|---|---|
AbstractBorder()
|
|
| 方法摘要 | |
|---|---|
Insets |
getBorderInsets(Component c)
此默认实现返回一个新的 Insets 实例,其中 top、left、bottom 和 right 字段都设置成了 0。 |
Insets |
getBorderInsets(Component c,
Insets insets)
用此边框的当前 Insets 重新初始化 insets 参数。 |
static Rectangle |
getInteriorRectangle(Component c,
Border b,
int x,
int y,
int width,
int height)
返回一个用所给的参数减去边框 insets 得到的矩形。 |
Rectangle |
getInteriorRectangle(Component c,
int x,
int y,
int width,
int height)
此便捷方法调用静态方法。 |
boolean |
isBorderOpaque()
此默认实现返回 false。 |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
此默认实现不执行绘制操作。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public AbstractBorder()
| 方法详细信息 |
|---|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Border 中的 paintBorderc - 要为其绘制边框的组件g - 绘制的图形x - 所绘制边框的 x 坐标位置y - 所绘制边框的 y 坐标位置width - 所绘制边框的宽度height - 所绘制边框的高度public Insets getBorderInsets(Component c)
Insets 实例,其中 top、left、bottom 和 right 字段都设置成了 0。
Border 中的 getBorderInsetsc - 应用此边框 insets 值的组件
Insets 对象public Insets getBorderInsets(Component c, Insets insets)
c - 应用此边框 insets 值的组件insets - 要重新初始化的对象
insets 对象public boolean isBorderOpaque()
Border 中的 isBorderOpaquepublic Rectangle getInteriorRectangle(Component c, int x, int y, int width, int height)
c - 要为其计算此边框的组件x - 边框的 x 坐标位置y - 边框的 y 坐标位置width - 边框的宽度height - 边框的高度
Rectanglepublic static Rectangle getInteriorRectangle(Component c, Border b, int x, int y, int width, int height)
c - 为其计算边框的组件b - Border 对象x - 边框的 x 坐标位置y - 边框的 y 坐标位置width - 边框的宽度height - 边框的高度
Rectangle
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。