32 import javax.swing.Icon; 33 34 /** 35 * A class which provides a matte-like border of either a solid color 36 * or a tiled icon. 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™ 44 * has been added to the <code>java.beans</code> package. 45 * Please see {@link java.beans.XMLEncoder}. 46 * 47 * @author Amy Fowler 48 */ 49 @SuppressWarnings("serial") 50 public class MatteBorder extends EmptyBorder 51 { 52 protected Color color; 53 protected Icon tileIcon; 54 55 /** 56 * Creates a matte border with the specified insets and color. 57 * @param top the top inset of the border 58 * @param left the left inset of the border 59 * @param bottom the bottom inset of the border 60 * @param right the right inset of the border 61 * @param matteColor the color rendered for the border 62 */ 63 public MatteBorder(int top, int left, int bottom, int right, Color matteColor) { 64 super(top, left, bottom, right); 65 this.color = matteColor; 66 } 67 68 /** 69 * Creates a matte border with the specified insets and color. 70 * @param borderInsets the insets of the border 71 * @param matteColor the color rendered for the border 72 * @since 1.3 | 32 import javax.swing.Icon; 33 34 /** 35 * A class which provides a matte-like border of either a solid color 36 * or a tiled icon. 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™ 44 * has been added to the <code>java.beans</code> package. 45 * Please see {@link java.beans.XMLEncoder}. 46 * 47 * @author Amy Fowler 48 */ 49 @SuppressWarnings("serial") 50 public class MatteBorder extends EmptyBorder 51 { 52 /** 53 * The color rendered for the border. 54 */ 55 protected Color color; 56 /** 57 * The icon to be used for tiling the border. 58 */ 59 protected Icon tileIcon; 60 61 /** 62 * Creates a matte border with the specified insets and color. 63 * @param top the top inset of the border 64 * @param left the left inset of the border 65 * @param bottom the bottom inset of the border 66 * @param right the right inset of the border 67 * @param matteColor the color rendered for the border 68 */ 69 public MatteBorder(int top, int left, int bottom, int right, Color matteColor) { 70 super(top, left, bottom, right); 71 this.color = matteColor; 72 } 73 74 /** 75 * Creates a matte border with the specified insets and color. 76 * @param borderInsets the insets of the border 77 * @param matteColor the color rendered for the border 78 * @since 1.3 |