public class EmptyBorder extends AbstractBorder implements Serializable
警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4版本开始,所有JavaBeans的长期存储支持已被添加到java.beans软件包中。 请参阅XMLEncoder 。
| Modifier and Type | Field and Description |
|---|---|
protected int |
bottom |
protected int |
left |
protected int |
right |
protected int |
top |
| Constructor and Description |
|---|
EmptyBorder(Insets borderInsets)
使用指定的插图创建空白边框。
|
EmptyBorder(int top, int left, int bottom, int right)
使用指定的插图创建空白边框。
|
| Modifier and Type | Method and Description |
|---|---|
Insets |
getBorderInsets()
返回边框的插入。
|
Insets |
getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。
|
boolean |
isBorderOpaque()
返回边框是否不透明。
|
void |
paintBorder(Component c, Graphics g, int x, int y, int width, int height)
默认情况下不绘图。
|
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangleprotected int left
protected int right
protected int top
protected int bottom
public EmptyBorder(int top,
int left,
int bottom,
int right)
top - 边界的顶级插图
left - 边框的左边插图
bottom - 边框的底部插图
right - 边界的正确插图
@ConstructorProperties(value="borderInsets") public EmptyBorder(Insets borderInsets)
borderInsets - 边界的插图
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder在界面
Border
paintBorder在类别
AbstractBorder
c - 正在绘制边框的组件
g - 油漆图形
x - 绘画边框的x位置
y - 绘画边框的y位置
width - 绘制边框的宽度
height - 绘画边框的高度
public Insets getBorderInsets(Component c, Insets insets)
getBorderInsets在类别
AbstractBorder
c - 应用此边界插入值的组件
insets - 要重新初始化的对象
insets对象
public Insets getBorderInsets()
public boolean isBorderOpaque()
isBorderOpaque在界面
Border
isBorderOpaque在类别
AbstractBorder
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.