JDK-4338458 : MultiLookAndFeel is Missing UI delegate entry for RootPaneUI
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-05-16
  • Updated: 2000-07-10
  • Resolved: 2000-07-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 betaFixed
Description

Name: skT45625			Date: 05/16/2000


java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

After switching from jdk1.2.2 using auxiliary LAFs fails. The program hits an
uncaught exception in Hashtable.get(Object key) which is called by
UIDefaults.get(Object key). This error is caused by a missing entry for
  RootPaneUI in the UIDefaults table.

FIX: JRootPane.getUIClassID() should either return "MultiPaneUI" or the key
should be added to MultiLookAndFeel's UIDefault table.
(Review ID: 104931) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta FIXED IN: merlin-beta INTEGRATED IN: merlin-beta
14-06-2004

WORK AROUND Name: skT45625 Date: 05/16/2000 Specify swing.plaf.multiplexinglaf=myProperMultiLAF in swing.properties, override getDefaults() from MultiLookAndFeel and add a key value pair for RootPaneUI, "javax.swing.plaf.multi.MultiPaneUI". ======================================================================
11-06-2004

EVALUATION MultiLookAndFeel lacks an UI class for JRootPane. ###@###.### 2000-05-22 MultiRootPaneUI has been created. scott.violet@eng 2000-06-30
22-05-2000

SUGGESTED FIX Create a new class: javax.swing.plaf.multi.MultiRootPaneUI and add it to Multi LAF defauls table. Alternatively, we can probably use MultiPanelUI for JRootPane, since there is no big differences between Multi UI classes. The diffs that follow are for the first approach. I used a test (from Graphic Java book) to verify this fix. This test (3 files) is attached. /* * %W% %E% * * Copyright 1997-2000 Sun Microsystems, Inc. All Rights Reserved. * * This software is the proprietary information of Sun Microsystems, Inc. * Use is subject to license terms. * */ package javax.swing.plaf.multi; import java.util.Vector; import javax.swing.plaf.RootPaneUI; import javax.swing.plaf.ComponentUI; import javax.swing.JComponent; import java.awt.Graphics; import java.awt.Dimension; import javax.accessibility.Accessible; /** * MultiRootPaneUI implementation * * <p>This file was automatically generated by AutoMulti. * * @version 1.8 02/02/00 18:15:42 * @author Otto Multey */ public class MultiRootPaneUI extends RootPaneUI { /** * The Vector containing the real UI's. This is populated * in the call to createUI, and can be obtained by calling * getUIs. The first element is guaranteed to the real UI * obtained from the default look and feel. */ protected Vector uis = new Vector(); //////////////////// // Common UI methods //////////////////// /** * Return the list of UI's associated with this multiplexing UI. This * allows processing of the UI's by an application aware of multiplexing * UI's on components. */ public ComponentUI[] getUIs() { return MultiLookAndFeel.uisToArray(uis); } //////////////////// // RootPaneUI methods //////////////////// //////////////////// // ComponentUI methods //////////////////// /** * Call installUI on each UI handled by this MultiUI. */ public void installUI(JComponent a) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).installUI(a); } } /** * Call uninstallUI on each UI handled by this MultiUI. */ public void uninstallUI(JComponent a) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).uninstallUI(a); } } /** * Call paint on each UI handled by this MultiUI. */ public void paint(Graphics a, JComponent b) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).paint(a,b); } } /** * Call update on each UI handled by this MultiUI. */ public void update(Graphics a, JComponent b) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).update(a,b); } } /** * Call getPreferredSize on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public Dimension getPreferredSize(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getPreferredSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getPreferredSize(a); } return returnValue; } /** * Call getMinimumSize on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public Dimension getMinimumSize(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getMinimumSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getMinimumSize(a); } return returnValue; } /** * Call getMaximumSize on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public Dimension getMaximumSize(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getMaximumSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getMaximumSize(a); } return returnValue; } /** * Call contains on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public boolean contains(JComponent a, int b, int c) { boolean returnValue = ((ComponentUI) (uis.elementAt(0))).contains(a,b,c); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).contains(a,b,c); } return returnValue; } /** * Return a multiplexing UI instance if any of the auxiliary * LookAndFeels support this UI. Otherwise, just return a * UI obtained using the normal methods. */ public static ComponentUI createUI(JComponent a) { ComponentUI mui = new MultiRootPaneUI(); return MultiLookAndFeel.createUIs(mui, ((MultiRootPaneUI) mui).uis, a); } /** * Call getAccessibleChildrenCount on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public int getAccessibleChildrenCount(JComponent a) { int returnValue = ((ComponentUI) (uis.elementAt(0))).getAccessibleChildrenCount(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getAccessibleChildrenCount(a); } return returnValue; } /** * Call getAccessibleChild on each UI handled by this MultiUI. * Return only the value obtained from the first UI, which is * the UI obtained from the default LookAndFeel. */ public Accessible getAccessibleChild(JComponent a, int b) { Accessible returnValue = ((ComponentUI) (uis.elementAt(0))).getAccessibleChild(a,b); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getAccessibleChild(a,b); } return returnValue; } } ------- MultiLookAndFeel.java ------- *** /tmp/d7gaiwt Mon May 22 13:16:38 2000 --- MultiLookAndFeel.java Mon May 22 13:06:09 2000 *************** *** 81,86 **** --- 81,87 ---- "ProgressBarUI", packageName + "ProgressBarUI", "RadioButtonMenuItemUI", packageName + "MenuItemUI", "RadioButtonUI", packageName + "ButtonUI", + "RootPaneUI", packageName + "RootPaneUI", "ScrollBarUI", packageName + "ScrollBarUI", "ScrollPaneUI", packageName + "ScrollPaneUI", "SeparatorUI", packageName + "SeparatorUI", ###@###.### 2000-05-22
22-05-2000