|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface Border
该接口描述一个能够呈现围绕 swing 组件边缘边框的对象。有关使用 border 的示例,请参阅 The Java Tutorial 中的 How to Use Borders 一节。
在 Swing 组件集中,作为一种创建组件边缘四周的装饰或普通区域的机制,border 取代了 Insets。
用法说明:
setInsets)。
BorderFactory,
EmptyBorder,
CompoundBorder| 方法摘要 | |
|---|---|
Insets |
getBorderInsets(Component c)
返回该边框的 insets。 |
boolean |
isBorderOpaque()
返回此边框是否透明。 |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
按指定的位置和尺寸绘制指定组件的边框。 |
| 方法详细信息 |
|---|
void paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
c - 要为其绘制边框的组件g - 绘制的图形x - 所绘制边框的 x 坐标位置y - 所绘制边框的 y 坐标位置width - 所绘制边框的宽度height - 所绘制边框的高度Insets getBorderInsets(Component c)
c - 要应用此边框 insets 值的组件boolean isBorderOpaque()
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。