public class CompoundBorder extends AbstractBorder
边境getborder() =竞争力;边界=新EmptyBorder(10,10,10,10);公司setborder(新CompoundBorder(边界、边缘));
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans
包。请看XMLEncoder
。
Modifier and Type | Field and Description |
---|---|
protected Border |
insideBorder |
protected Border |
outsideBorder |
Constructor and Description |
---|
CompoundBorder()
创建一个空的外部和内部边界的复合边框。
|
CompoundBorder(Border outsideBorder, Border insideBorder)
创建一个指定的外部和内部边界的复合边框。
|
Modifier and Type | Method and Description |
---|---|
Insets |
getBorderInsets(Component c, Insets insets)
初始化参数和边界的插图插图。
|
Border |
getInsideBorder()
返回内部边界对象。
|
Border |
getOutsideBorder()
返回外部边界对象。
|
boolean |
isBorderOpaque()
返回是否复合边框是不透明的。
|
void |
paintBorder(Component c, Graphics g, int x, int y, int width, int height)
涂料复合边界与指定的位置和大小,然后画在边境的指定的位置和大小由外边框的镶嵌画的外边界偏移。
|
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
protected Border outsideBorder
protected Border insideBorder
public CompoundBorder()
@ConstructorProperties(value={"outsideBorder","insideBorder"}) public CompoundBorder(Border outsideBorder, Border insideBorder)
outsideBorder
-外边界
insideBorder
将嵌套的内部边界
public boolean isBorderOpaque()
isBorderOpaque
接口
Border
isBorderOpaque
方法重写,继承类
AbstractBorder
true
如果内部和外部边界是每个
null
或不透明;或
false
否则
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder
接口
Border
paintBorder
方法重写,继承类
AbstractBorder
c
的组件,这个边界是被涂
g
-绘制的图形
x
-画边框的位置
y
-画边框的位置
width
-画的边框宽度
height
-画边框的高度
public Insets getBorderInsets(Component c, Insets insets)
getBorderInsets
方法重写,继承类
AbstractBorder
c
的组件,这个边界值运用插图
insets
-重新初始化对象
insets
对象
public Border getOutsideBorder()
public Border getInsideBorder()
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.