Border around checkBox is now drawn for MetalL&F

2005-08-04  Lillian Angel  <[EMAIL PROTECTED]>

        * javax/swing/plaf/basic/BasicMenuItemUI.java
        (paintIcon): Added in border painting code for MenuItem
        * javax/swing/plaf/metal/MetalLookAndFeel.java:
        Added in default for CheckBox border

Index: javax/swing/plaf/basic/BasicMenuItemUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java,v
retrieving revision 1.16
diff -u -r1.16 BasicMenuItemUI.java
--- javax/swing/plaf/basic/BasicMenuItemUI.java	3 Aug 2005 18:09:44 -0000	1.16
+++ javax/swing/plaf/basic/BasicMenuItemUI.java	4 Aug 2005 18:10:44 -0000
@@ -534,6 +534,9 @@
 	                                   vr, cr, tr, defaultTextIconGap);
   if (m.isSelected())
     checkIcon.paintIcon(m, g, cr.x, cr.y);
+  UIDefaults defaults = UIManager.getLookAndFeelDefaults();
+  defaults.getBorder("CheckBox.border").paintBorder(m, g, cr.x, cr.y, 
+      cr.width, cr.height);
 
 	// We need to calculate position of the menu text and position of
 	// user menu icon if there exists one relative to the check icon.
Index: javax/swing/plaf/metal/MetalLookAndFeel.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java,v
retrieving revision 1.37
diff -u -r1.37 MetalLookAndFeel.java
--- javax/swing/plaf/metal/MetalLookAndFeel.java	4 Aug 2005 15:47:32 -0000	1.37
+++ javax/swing/plaf/metal/MetalLookAndFeel.java	4 Aug 2005 18:10:44 -0000
@@ -772,6 +772,7 @@
       "Button.select", new ColorUIResource(getPrimaryControlShadow()),
       "Button.shadow", new ColorUIResource(getPrimaryControlShadow()),
       "CheckBox.background", new ColorUIResource(getControl()),
+      "CheckBox.border", MetalBorders.getButtonBorder(),
       "CheckBox.icon",
       new UIDefaults.ProxyLazyValue
           ("javax.swing.plaf.metal.MetalCheckBoxIcon"),
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to