public class MatteBorder extends EmptyBorder
警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4版本开始,所有JavaBeans的长期存储支持已被添加到java.beans软件包中。 请参阅XMLEncoder 。
| Modifier and Type | Field and Description |
|---|---|
protected Color |
color |
protected Icon |
tileIcon |
bottom, left, right, top| Constructor and Description |
|---|
MatteBorder(Icon tileIcon)
使用指定的图块图标创建无光泽边框。
|
MatteBorder(Insets borderInsets, Color matteColor)
创建具有指定插图和颜色的无光泽边框。
|
MatteBorder(Insets borderInsets, Icon tileIcon)
使用指定的插图和图块图标创建无光泽边框。
|
MatteBorder(int top, int left, int bottom, int right, Color matteColor)
创建具有指定插图和颜色的无光泽边框。
|
MatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
使用指定的插图和图块图标创建无光泽边框。
|
| Modifier and Type | Method and Description |
|---|---|
Insets |
getBorderInsets()
返回边框的插入。
|
Insets |
getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。
|
Color |
getMatteColor()
返回用于平铺边框的颜色,如果正在使用图块图标,则返回null。
|
Icon |
getTileIcon()
返回用于平铺边框的图标,如果使用纯色,则返回null。
|
boolean |
isBorderOpaque()
返回边框是否不透明。
|
void |
paintBorder(Component c, Graphics g, int x, int y, int width, int height)
涂抹无光泽的边框。
|
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectanglepublic MatteBorder(int top,
int left,
int bottom,
int right,
Color matteColor)
top - 边界的顶级插图
left - 边框的左边插图
bottom - 边框的底部插图
right - 边界的正确插图
matteColor - 为边框呈现的颜色
public MatteBorder(Insets borderInsets, Color matteColor)
borderInsets - 边界的插图
matteColor - 为边框呈现的颜色
public MatteBorder(int top,
int left,
int bottom,
int right,
Icon tileIcon)
top - 边界的顶级插图
left - 边界的左边插图
bottom - 边框的底部插图
right - 边界的正确插图
tileIcon - 用于平铺边框的图标
public MatteBorder(Insets borderInsets, Icon tileIcon)
borderInsets - 边框的插图
tileIcon - 要用于平铺边框的图标
public MatteBorder(Icon tileIcon)
tileIcon - 用于平铺边框的图标
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder在界面
Border
paintBorder在类别
EmptyBorder
c - 正在绘制此边框的组件
g - 油漆图形
x - 绘画边框的x位置
y - 绘画边框的y位置
width - 绘制边框的宽度
height - 绘画边框的高度
public Insets getBorderInsets(Component c, Insets insets)
getBorderInsets在类别
EmptyBorder
c - 应用此边界插入值的组件
insets - 要重新初始化的对象
insets对象
public Insets getBorderInsets()
getBorderInsets在类别
EmptyBorder
public Color getMatteColor()
public Icon getTileIcon()
public boolean isBorderOpaque()
isBorderOpaque在界面
Border
isBorderOpaque在类别
EmptyBorder
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.