United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6640344 Nimbus L&F: JTree expand/collapse triangles are wrong color for selected cell
JDK-6640344 : Nimbus L&F: JTree expand/collapse triangles are wrong color for selected cell

Details
Type:
Bug
Submit Date:
2007-12-11
Status:
Closed
Updated Date:
2011-03-05
Project Name:
JDK
Resolved Date:
2008-01-08
Component:
client-libs
OS:
windows_vista,generic,windows_xp
Sub-Component:
javax.swing
CPU:
x86,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u5,6u10
Fixed Versions:
6u10 (b10)

Related Reports
Duplicate:
Duplicate:

Sub Tasks

Description
FULL PRODUCT VERSION :
JRE6 early access (jre6u10b08)

ADDITIONAL OS VERSION INFORMATION :
Windows XP SP2

A DESCRIPTION OF THE PROBLEM :
According to the Nimbus spec, when a JTree cell is selected, the little triangle used to expand/collapse parents should be drawn in white instead of the normal gray color. Instead, it's always drawn in the same gray color regardless of selection state, which is not easy to see against the blue background of the selection.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Use Nimbus.
2. Create a JTree with anything in it.
3. Select a parent node.
4. Bear witness that the little gray triangle on the left hand side, used to expand/collapse the parent, is not being shown as white.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected a white triangle, per the Nimbus spec for trees.
ACTUAL -
Got the same gray triangle that's used for non-selected tree parents.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
No workaround available as far as I know.

                                    

Comments
EVALUATION

It turns out to be a bug in SynthTreeUI. SynthTreeUI is passing via the SynthContext the state of the tree, as opposed to the state of the row. So since the tree is Enabled but not Selected, the row is never "Selected" and thus the white triangle icon is never used.
                                     
2007-12-18



Hardware and Software, Engineered to Work Together