FileDocCategorySizeDatePackage
EmptyBorder.javaAPI DocJava SE 5 API3001Fri Aug 26 14:58:00 BST 2005javax.swing.border

EmptyBorder

public class EmptyBorder extends AbstractBorder implements Serializable
A class which provides an empty, transparent border which takes up space but does no drawing.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see {@link java.beans.XMLEncoder}.

version
1.26 12/19/03
author
David Kloba

Fields Summary
protected int
left
protected int
right
protected int
top
protected int
bottom
Constructors Summary
public EmptyBorder(int top, int left, int bottom, int right)
Creates an empty border with the specified insets.

param
top the top inset of the border
param
left the left inset of the border
param
bottom the bottom inset of the border
param
right the right inset of the border

        this.top = top; 
        this.right = right;
        this.bottom = bottom;
        this.left = left;
    
public EmptyBorder(Insets borderInsets)
Creates an empty border with the specified insets.

param
borderInsets the insets of the border

        this.top = borderInsets.top; 
        this.right = borderInsets.right;
        this.bottom = borderInsets.bottom;
        this.left = borderInsets.left;
    
Methods Summary
public java.awt.InsetsgetBorderInsets(java.awt.Component c)
Returns the insets of the border.

param
c the component for which this border insets value applies

        return getBorderInsets();
    
public java.awt.InsetsgetBorderInsets(java.awt.Component c, java.awt.Insets insets)
Reinitialize the insets parameter with this Border's current Insets.

param
c the component for which this border insets value applies
param
insets the object to be reinitialized

        insets.left = left;
        insets.top = top;
        insets.right = right;
        insets.bottom = bottom;
        return insets;
    
public java.awt.InsetsgetBorderInsets()
Returns the insets of the border.

        return new Insets(top, left, bottom, right);
    
public booleanisBorderOpaque()
Returns whether or not the border is opaque. Returns false by default.

 return false; 
public voidpaintBorder(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
Does no drawing by default.