- java.lang.Object
 -  
      
- javax.swing.border.AbstractBorder
 -  
        
- javax.swing.border.EmptyBorder
 
 
 
-  
       
- 实现的所有接口
 -  
         
Serializable,Border 
public class EmptyBorder extends AbstractBorder implements Serializable
提供空白透明边框的类,占用空间但不绘制。警告:此类的序列化对象与以后的Swing版本不兼容。 当前的序列化支持适用于运行相同版本Swing的应用程序之间的短期存储或RMI。 从1.4开始,
java.beans软件包中添加了对所有JavaBeansjava.beans长期存储的支持。 请参阅XMLEncoder。- 另请参见:
 - Serialized Form
 
 
-  
        
       
-  
             
构造方法摘要
构造方法 构造器 描述 EmptyBorder(int top, int left, int bottom, int right)使用指定的insets创建空边框。EmptyBorder(Insets borderInsets)使用指定的insets创建空边框。 
-  
             
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 InsetsgetBorderInsets()返回边框的insets。InsetsgetBorderInsets(Component c, Insets insets)使用此Border的当前Insets重新初始化insets参数。booleanisBorderOpaque()返回边框是否不透明。voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height)默认情况下没有绘图。-  
               
声明方法的类 javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle 
 -  
               
 
 -  
             
 
-  
        
       
-  
             
构造方法详细信息
-  
EmptyBorder
public EmptyBorder(int top, int left, int bottom, int right)使用指定的insets创建空边框。- 参数
 -  
              
top- 边界的顶部插图 -  
              
left- 边界的左侧插图 -  
              
bottom- 边框的底部插图 -  
              
right- 边界的右边插图 
 
-  
EmptyBorder
@ConstructorProperties("borderInsets") public EmptyBorder(Insets borderInsets)
使用指定的insets创建空边框。- 参数
 -  
              
borderInsets- 边界的插图 
 
 -  
 
-  
             
方法详细信息
-  
paintBorder
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
默认情况下没有绘图。- Specified by:
 -  
              
paintBorder,界面Border - 重写:
 -  
              
paintBorder在类AbstractBorder - 参数
 -  
              
c- 正在为其绘制边框的组件 -  
              
g- 油漆图形 -  
              
x- 绘制边框的x位置 -  
              
y- 绘制边框的y位置 -  
              
width- 绘边框的宽度 -  
              
height- 绘边框的高度 
 
-  
getBorderInsets
public Insets getBorderInsets(Component c, Insets insets)
使用此Border的当前Insets重新初始化insets参数。- 重写:
 -  
              
getBorderInsets,类AbstractBorder - 参数
 -  
              
c- 应用此border insets值的组件 -  
              
insets- 要重新初始化的对象 - 结果
 -  
              
insets对象 
 
-  
getBorderInsets
public Insets getBorderInsets()
返回边框的insets。- 结果
 - 
               包含顶部,左侧,底部和右侧的插入的 
              
Insets对象 - 从以下版本开始:
 - 1.3
 
 
-  
isBorderOpaque
public boolean isBorderOpaque()
返回边框是否不透明。 默认返回false。- Specified by:
 -  
              
isBorderOpaque在界面Border - 重写:
 -  
              
isBorderOpaque,类AbstractBorder - 结果
 - 假
 
 
 -  
 
 -