I committed this patch to add another missing border:
2005-09-27 David Gilbert <[EMAIL PROTECTED]> * javax/swing/plaf/metal/MetalBorders.java (RolloverButtonBorder): new class. Regards, Dave
Index: javax/swing/plaf/metal/MetalBorders.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalBorders.java,v retrieving revision 1.20 diff -u -r1.20 MetalBorders.java --- javax/swing/plaf/metal/MetalBorders.java 27 Sep 2005 15:40:26 -0000 1.20 +++ javax/swing/plaf/metal/MetalBorders.java 27 Sep 2005 20:51:04 -0000 @@ -918,6 +918,44 @@ } /** + * A button border that is only visible when the mouse pointer is within + * the button's bounds. + */ + public static class RolloverButtonBorder + extends MetalBorders.ButtonBorder + { + /** + * Creates a new border instance. + */ + public RolloverButtonBorder() + { + } + + /** + * Paints the border. + * + * @param c the component. + * @param g the graphics device. + * @param x the x-coordinate. + * @param y the y-coordinate. + * @param w the width. + * @param h the height. + */ + public void paintBorder(Component c, Graphics g, int x, int y, int w, + int h) + { + boolean mouseIsOver = false; + if (c instanceof AbstractButton) + { + ButtonModel bmodel = ((AbstractButton) c).getModel(); + mouseIsOver = bmodel.isRollover(); + } + if (mouseIsOver) + super.paintBorder(c, g, x, y, w, h); + } + } + + /** * This border is used in Toolbar buttons as inner border. */ static class RolloverMarginBorder extends AbstractBorder
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches