/[classpath]/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicComboBoxUI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by trebligd, Mon Sep 19 08:51:36 2005 UTC revision 1.19 by langel, Wed Sep 28 14:04:48 2005 UTC
# Line 242  public class BasicComboBoxUI extends Com Line 242  public class BasicComboBoxUI extends Com
242    protected void installDefaults()    protected void installDefaults()
243    {    {
244      UIDefaults defaults = UIManager.getLookAndFeelDefaults();      UIDefaults defaults = UIManager.getLookAndFeelDefaults();
245        Font f = comboBox.getFont();
246      if (comboBox.getFont() instanceof UIResource)      Color fore = comboBox.getForeground();
247        Color back = comboBox.getBackground();
248        if (f == null || f instanceof UIResource)
249        comboBox.setFont(defaults.getFont("ComboBox.font"));        comboBox.setFont(defaults.getFont("ComboBox.font"));
250            
251      if (comboBox.getForeground() instanceof UIResource)      if (fore == null || fore instanceof UIResource)
252        comboBox.setForeground(defaults.getColor("ComboBox.foreground"));        comboBox.setForeground(defaults.getColor("ComboBox.foreground"));
253    
254      if (comboBox.getBackground() instanceof UIResource)      if (back == null || back instanceof UIResource)
255        comboBox.setBackground(defaults.getColor("ComboBox.background"));        comboBox.setBackground(defaults.getColor("ComboBox.background"));
256    
257      // fetch the button color scheme      // fetch the button color scheme

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26