1 18 19 package swingwtx.swing.border; 20 21 import swingwt.awt.*; 22 23 public class EmptyBorder extends AbstractBorder implements Border { 24 protected int left, right, top, bottom; 25 26 public EmptyBorder(Insets borderInsets) { 27 this(borderInsets.top, borderInsets.left, borderInsets.bottom, borderInsets.right); 28 } 29 public EmptyBorder(int top, int left, int bottom, int right) { 30 this.top = top; 31 this.left = left; 32 this.bottom = bottom; 33 this.right = right; 34 } 35 36 public Insets getBorderInsets(Component c) { return getBorderInsets(); } 37 public Insets getBorderInsets() { return new Insets(top, left, bottom, right); } 38 39 public Insets getBorderInsets(Component c, Insets insets) { 40 insets.top = top; 41 insets.left = left; 42 insets.bottom = bottom; 43 insets.right = right; 44 return insets; 45 } 46 } 47 | Popular Tags |