Closed Bug 516244 Opened 15 years ago Closed 5 years ago

GUI Debugger incompatibility with lookAndFeel's UIResource border

Categories

(Rhino Graveyard :: Core, defect)

x86
Windows XP
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: e.lucash, Unassigned)

Details

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

Closing. Bug management is now done here:
https://github.com/mozilla/rhino

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.