public class MatteBorder extends EmptyBorder
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为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)
初始化参数和边界的插图插图。
|
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, getInteriorRectangle
public 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
-画边框的位置
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.