GUI Debugger incompatibility with lookAndFeel's UIResource border

UNCONFIRMED
Unassigned

Status

Rhino
Core
--
minor
UNCONFIRMED
9 years ago
9 years ago

People

(Reporter: Eugene Lucash, Unassigned)

Tracking

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5
Build Identifier: 1_7R2

Problem arise when I switched lookAndFeel from default to Nimbus (included in jre1.6 update 10+) сaused in ClassCastException deeply in lookAndFeel rendering code.
But other lookAndFeels may be also affected.

In constructor of ContextWindow, there is very questionable operation
label.setBorder(context.getBorder());

method getBorder() may return ComponentUI specific border (that implements UIResource marker interface)

In this case SynthComboBoxUI's Border was assigned to JLabel, resulted
in invalid casting of JLabel to JComboBox while rendering border

Reproducible: Always

Steps to Reproduce:
Change default lookAndFeel (Ocean/Steel/System) to
com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel on jre1.6 u10+
Actual Results:  
Debugger window rendered partly and flaky, with trace of ClassCastException in rendering code 

Expected Results:  
Debugger window with nice LookAndFeel rendered correctly

simple removal of this line in ContextWindow did the job
//label.setBorder(context.getBorder());

1. All was running perfectly under Nimbus lookAndFeel
2. Did not notice any graphical difference with default lookAndFeel
You need to log in before you can comment on or make changes to this bug.