< prev index next >

src/java.desktop/share/classes/javax/swing/border/EmptyBorder.java

Print this page




  32 import java.beans.ConstructorProperties;
  33 
  34 /**
  35  * A class which provides an empty, transparent border which
  36  * takes up space but does no drawing.
  37  * <p>
  38  * <strong>Warning:</strong>
  39  * Serialized objects of this class will not be compatible with
  40  * future Swing releases. The current serialization support is
  41  * appropriate for short term storage or RMI between applications running
  42  * the same version of Swing.  As of 1.4, support for long term storage
  43  * of all JavaBeans&trade;
  44  * has been added to the <code>java.beans</code> package.
  45  * Please see {@link java.beans.XMLEncoder}.
  46  *
  47  * @author David Kloba
  48  */
  49 @SuppressWarnings("serial")
  50 public class EmptyBorder extends AbstractBorder implements Serializable
  51 {
  52     protected int left, right, top, bottom;















  53 
  54     /**
  55      * Creates an empty border with the specified insets.
  56      * @param top the top inset of the border
  57      * @param left the left inset of the border
  58      * @param bottom the bottom inset of the border
  59      * @param right the right inset of the border
  60      */
  61     public EmptyBorder(int top, int left, int bottom, int right)   {
  62         this.top = top;
  63         this.right = right;
  64         this.bottom = bottom;
  65         this.left = left;
  66     }
  67 
  68     /**
  69      * Creates an empty border with the specified insets.
  70      * @param borderInsets the insets of the border
  71      */
  72     @ConstructorProperties({"borderInsets"})




  32 import java.beans.ConstructorProperties;
  33 
  34 /**
  35  * A class which provides an empty, transparent border which
  36  * takes up space but does no drawing.
  37  * <p>
  38  * <strong>Warning:</strong>
  39  * Serialized objects of this class will not be compatible with
  40  * future Swing releases. The current serialization support is
  41  * appropriate for short term storage or RMI between applications running
  42  * the same version of Swing.  As of 1.4, support for long term storage
  43  * of all JavaBeans&trade;
  44  * has been added to the <code>java.beans</code> package.
  45  * Please see {@link java.beans.XMLEncoder}.
  46  *
  47  * @author David Kloba
  48  */
  49 @SuppressWarnings("serial")
  50 public class EmptyBorder extends AbstractBorder implements Serializable
  51 {
  52     /**
  53      * The left inset of the border.
  54      */
  55     protected int left;
  56     /**
  57      * The right inset of the border.
  58      */
  59     protected int right;
  60     /**
  61      * The top inset of the border.
  62      */
  63     protected int top;
  64     /**
  65      * The bottom inset of the border.
  66      */
  67     protected int bottom;
  68 
  69     /**
  70      * Creates an empty border with the specified insets.
  71      * @param top the top inset of the border
  72      * @param left the left inset of the border
  73      * @param bottom the bottom inset of the border
  74      * @param right the right inset of the border
  75      */
  76     public EmptyBorder(int top, int left, int bottom, int right)   {
  77         this.top = top;
  78         this.right = right;
  79         this.bottom = bottom;
  80         this.left = left;
  81     }
  82 
  83     /**
  84      * Creates an empty border with the specified insets.
  85      * @param borderInsets the insets of the border
  86      */
  87     @ConstructorProperties({"borderInsets"})


< prev index next >