JavaSwingComponentsRenderers: JComboBox component adjustments


JComboBox component adjustments

Transfer of ComboBox properties to internal JList

font (dynamically)

foreground, background (not dynamically, bug)

selection foreground/background from UIManager table

missing: component orientation

Editor property modifications

font (dynamically)

enabled (dynamically)

toolTipText (shudder), not on install (bug)

missing: component orientation

(none are uninstalled)

Renderer properties modifications

cf. (#4393661)

None of these are needed because everything could be picked up from the JList argument.

BasicComboBoxUI.getPreferredSize: font

BasicComboBoxUI.paintCurrentValue: font, selected/normal/disabled fore-/background

MotifComboBoxUI.paintCurrentValue: font, normal/disabled background;

MetalComboBoxButton.paintComponent: font, selected/normal/disabled foreground, background mainly if opaque (BUG - at least rendererComponent.isOpaque() should (also) have been used, though wrong as well), also uses "Button.select" color.

Renderer arguments

selected: false, except if hasFocus && !popupVisible (BasicComboBoxUI), buttonPressed (MetalComboBoxUI - some confusion here between pressed and selected?!)

focused: false

Some unrelated interesting notes

MotifComboBoxUI.paintCurrentValue: always uses renderer's preferred height

ridiculous fix of (#4238829) / (#4455045) (renderer component is not validated): only for JPanel, missing in Motif


(C) 2001-2009 Christian Kaufhold (swing@chka.de)