|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.border.AbstractBorder
javax.swing.border.EmptyBorder
javax.swing.border.MatteBorder
public class MatteBorder
该类提供类似衬边的边框,衬边图案既可以是纯色也可以是平铺的图标。
警告:此类的已序列化对象与以后的 Swing 版本不兼容。当前序列化支持适用于短期存储,或适用于在运行相同 Swing 版本的应用程序之间进行 RMI(Remote Method Invocation,远程方法调用)。从 1.4 版本开始,已在 java.beans 包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder。
| 字段摘要 | |
|---|---|
protected Color |
color
|
protected Icon |
tileIcon
|
| 从类 javax.swing.border.EmptyBorder 继承的字段 |
|---|
bottom, left, right, top |
| 构造方法摘要 | |
|---|---|
MatteBorder(Icon tileIcon)
创建具有指定平铺图标的衬边边框。 |
|
MatteBorder(Insets borderInsets,
Color matteColor)
创建具有指定 insets 和颜色的衬边边框。 |
|
MatteBorder(Insets borderInsets,
Icon tileIcon)
创建具有指定 insets 和平铺图标的衬边边框。 |
|
MatteBorder(int top,
int left,
int bottom,
int right,
Color matteColor)
创建具有指定 insets 和颜色的衬边边框。 |
|
MatteBorder(int top,
int left,
int bottom,
int right,
Icon tileIcon)
创建具有指定 insets 和平铺图标的衬边边框。 |
|
| 方法摘要 | |
|---|---|
Insets |
getBorderInsets()
返回此边框的 insets。 |
Insets |
getBorderInsets(Component c)
返回边框的 insets。 |
Insets |
getBorderInsets(Component c,
Insets insets)
用此边框的当前 Insets 重新初始化 insets 参数。 |
Color |
getMatteColor()
返回平铺边框的颜色,如果使用了平铺图标,则返回 null。 |
Icon |
getTileIcon()
返回平铺边框的图标,如果使用了纯色,则返回 null。 |
boolean |
isBorderOpaque()
返回边框是否透明。 |
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
绘制衬边边框。 |
| 从类 javax.swing.border.AbstractBorder 继承的方法 |
|---|
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected Color color
protected Icon tileIcon
| 构造方法详细信息 |
|---|
public MatteBorder(int top,
int left,
int bottom,
int right,
Color matteColor)
top - 边框顶部 insetleft - 边框左部 insetbottom - 边框底部 insetright - 边框右部 insetmatteColor - 边框呈现的颜色
public MatteBorder(Insets borderInsets,
Color matteColor)
borderInsets - 边框的 insetsmatteColor - 边框呈现的颜色
public MatteBorder(int top,
int left,
int bottom,
int right,
Icon tileIcon)
top - 边框顶部 insetleft - 边框左部 insetbottom - 边框底部 insetr边框右部 - insettileIcon - 用于平铺边框的图标
public MatteBorder(Insets borderInsets,
Icon tileIcon)
borderInsets - 边框的 insetstileIcon - 用于平铺边框的图标public MatteBorder(Icon tileIcon)
tileIcon - 用于平铺边框的图标| 方法详细信息 |
|---|
public void paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
Border 中的 paintBorderEmptyBorder 中的 paintBorderc - 要为其绘制边框的组件g - 绘制的图形x - 所绘制边框的 x 坐标位置y - 所绘制边框的 y 坐标位置width - 所绘制边框的宽度height - 所绘制边框的高度public Insets getBorderInsets(Component c)
Border 中的 getBorderInsetsEmptyBorder 中的 getBorderInsetsc - 要应用此边框 insets 值的组件
Insets 对象
public Insets getBorderInsets(Component c,
Insets insets)
EmptyBorder 中的 getBorderInsetsc - 应用此边框 insets 值的组件insets - 要重新初始化的对象
insets 对象public Insets getBorderInsets()
EmptyBorder 中的 getBorderInsetspublic Color getMatteColor()
public Icon getTileIcon()
public boolean isBorderOpaque()
Border 中的 isBorderOpaqueEmptyBorder 中的 isBorderOpaque
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。