Here I add two little methods to BasicPanelUI that provide a hook for
uninstalling UI defaults.

2005-09-23  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/plaf/basic/BasicPanelUI.java
        (uninstallUI): New method.
        (uninstallDefaults): New method.

/Roman
Index: javax/swing/plaf/basic/BasicPanelUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicPanelUI.java,v
retrieving revision 1.7
diff -u -r1.7 BasicPanelUI.java
--- javax/swing/plaf/basic/BasicPanelUI.java	27 Jul 2005 14:43:40 -0000	1.7
+++ javax/swing/plaf/basic/BasicPanelUI.java	23 Sep 2005 16:06:29 -0000
@@ -68,4 +68,25 @@
     p.setBackground(defaults.getColor("Panel.background"));
     p.setOpaque(true);
   }
+
+  /**
+   * Uninstalls this UI from the JPanel.
+   *
+   * @param c the JPanel from which to uninstall this UI
+   */
+  public void uninstallUI(JComponent c)
+  {
+    uninstallDefaults((JPanel) c);
+  }
+
+  /**
+   * Uninstalls the UI defaults that have been install through
+   * [EMAIL PROTECTED] #installDefaults}.
+   *
+   * @param p the panel from which to uninstall the UI defaults
+   */
+  protected void uninstallDefaults(JPanel p)
+  {
+    // Nothing to do here.
+  }
 }
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to