Hi,

I added initComponentDefaults that initializes the component colors (and later other properties) for Metal.

2005-04-15  Roman Kennke  <[EMAIL PROTECTED]>

       * javax/swing/plaf/metal/MetalLookAndFeel.java
       (initComponentDefaults): Added to set Metal specific component
       defaults.

/Roman

Index: javax/swing/plaf/metal/MetalLookAndFeel.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java,v retrieving revision 1.11 diff -u -r1.11 MetalLookAndFeel.java --- javax/swing/plaf/metal/MetalLookAndFeel.java 14 Apr 2005 21:00:02 -0000 1.11 +++ javax/swing/plaf/metal/MetalLookAndFeel.java 15 Apr 2005 08:55:57 -0000 @@ -38,6 +38,7 @@ package javax.swing.plaf.metal; +import java.awt.Color; import javax.swing.UIDefaults; import javax.swing.plaf.ColorUIResource; import javax.swing.plaf.FontUIResource; @@ -399,4 +400,68 @@ defaults.putDefaults(uiDefaults); } + /** + * Initializes the component defaults for the Metal Look & Feel. + * + * In particular this sets the following keys (the colors are given + * as RGB hex values): + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
KeyValue
Button.background0xcccccc
CheckBox.background0xcccccc
CheckBoxMenuItem.background0xcccccc
ToolBar.background0xcccccc
Panel.background0xcccccc
Slider.background0xcccccc
OptionPane.background0xcccccc
ProgressBar.background0xcccccc
TabbedPane.background0xcccccc
Label.background0xcccccc
Menu.background0xcccccc
MenuBar.background0xcccccc
MenuItem.background0xcccccc
ScrollBar.background0xcccccc
+ * + * @param defaults the UIDefaults instance to which the values are added + */ + protected void initComponentDefaults(UIDefaults defaults) + { + super.initComponentDefaults(defaults); + Color background = "" Color(0xcc, 0xcc, 0xcc); + Object[] myDefaults = new Object[] { + "Button.background", new ColorUIResource(background), + "CheckBox.background", new ColorUIResource(background), + "CheckBoxMenuItem.background", new ColorUIResource(background), + "ToolBar.background", new ColorUIResource(background), + "Panel.background", new ColorUIResource(background), + "Slider.background", new ColorUIResource(background), + "OptionPane.background", new ColorUIResource(background), + "ProgressBar.background", new ColorUIResource(background), + "TabbedPane.background", new ColorUIResource(background), + "Label.background", new ColorUIResource(background), + "Menu.background", new ColorUIResource(background), + "MenuBar.background", new ColorUIResource(background), + "MenuItem.background", new ColorUIResource(background), + "ScrollBar.background", new ColorUIResource(background) + }; + defaults.putDefaults(myDefaults); + } }
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to