This patch (committed) fixes a couple of failures in the Intel test suite:

2006-07-07  David Gilbert  <[EMAIL PROTECTED]>

        * javax/swing/plaf/metal/MetalLookAndFeel.java
        (createDefaultTheme): Corrected API docs,
        (initComponentDefaults): Added entry for 'TitledBorder.border',
        (getCurrentTheme): Initialise theme if it is null.

Regards,

Dave
Index: javax/swing/plaf/metal/MetalLookAndFeel.java
===================================================================
RCS file: 
/sources/classpath/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java,v
retrieving revision 1.83
diff -u -r1.83 MetalLookAndFeel.java
--- javax/swing/plaf/metal/MetalLookAndFeel.java        19 May 2006 09:03:07 
-0000      1.83
+++ javax/swing/plaf/metal/MetalLookAndFeel.java        7 Jul 2006 14:27:09 
-0000
@@ -85,7 +85,7 @@
   }
 
   /**
-   * Sets the current theme to a new instance of [EMAIL PROTECTED] 
DefaultMetalTheme}.
+   * Sets the current theme to a new instance of [EMAIL PROTECTED] OceanTheme}.
    */
   protected void createDefaultTheme()
   {
@@ -709,6 +709,8 @@
    * @param theme  the theme (<code>null</code> not permitted).
    * 
    * @throws NullPointerException if <code>theme</code> is <code>null</code>.
+   * 
+   * @see #getCurrentTheme()
    */
   public static void setCurrentTheme(MetalTheme theme)
   {
@@ -1243,6 +1245,7 @@
       "TextPane.selectionBackground", getTextHighlightColor(),
       "TextPane.selectionForeground", getHighlightedTextColor(),
 
+      "TitledBorder.border", new LineBorderUIResource(getPrimaryControl(), 1),
       "TitledBorder.font", new FontUIResource("Dialog", Font.BOLD, 12),
       "TitledBorder.titleColor", getSystemTextColor(),
 
@@ -1335,12 +1338,17 @@
   }
 
   /**
-   * Returns the current theme setting for the Metal L&amp;F.
+   * Returns the current theme for the Metal look and feel.  The default is
+   * an instance of [EMAIL PROTECTED] OceanTheme}.
    *
-   * @return the current theme setting for the Metal L&amp;F
+   * @return The current theme (never <code>null</code>).
+   * 
+   * @see #setCurrentTheme(MetalTheme)
    */
   public static MetalTheme getCurrentTheme()
   {
+    if (theme == null)
+      theme = new OceanTheme();
     return theme;
   }
 

Reply via email to