/[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.23 by trebligd, Mon Oct 17 16:17:45 2005 UTC revision 1.24 by trebligd, Tue Oct 18 11:05:10 2005 UTC
# Line 157  public class BasicComboBoxUI extends Com Line 157  public class BasicComboBoxUI extends Com
157     */     */
158    protected PropertyChangeListener propertyChangeListener;    protected PropertyChangeListener propertyChangeListener;
159    
160      /**
161       * The button background.
162       * @see #installDefaults()
163       */
164      private Color buttonBackground;
165      
166      /**
167       * The button shadow.
168       * @see #installDefaults()
169       */
170      private Color buttonShadow;
171      
172    /**    /**
173     * Colors that are used to render selected item in the combo box.     * The button dark shadow.
174       * @see #installDefaults()
175     */     */
176    private Color shadow;    private Color buttonDarkShadow;
177    private Color darkShadow;  
178    private Color highlight;    /**
179       * The button highlight.
180       * @see #installDefaults()
181       */
182      private Color buttonHighlight;
183    
184    /* Size of the largest item in the comboBox    /* Size of the largest item in the comboBox
185     * This is package-private to avoid an accessor method.     * This is package-private to avoid an accessor method.
# Line 244  public class BasicComboBoxUI extends Com Line 261  public class BasicComboBoxUI extends Com
261    {    {
262      LookAndFeel.installColorsAndFont(comboBox, "ComboBox.background",      LookAndFeel.installColorsAndFont(comboBox, "ComboBox.background",
263                                       "ComboBox.foreground", "ComboBox.font");                                       "ComboBox.foreground", "ComboBox.font");
264        
265      // fetch the button color scheme      // fetch the button color scheme
266      shadow = UIManager.getColor("ComboBox.buttonShadow");      buttonBackground = UIManager.getColor("ComboBox.buttonBackground");
267      darkShadow = UIManager.getColor("ComboBox.buttonDarkShadow");      buttonShadow = UIManager.getColor("ComboBox.buttonShadow");
268      highlight = UIManager.getColor("ComboBox.buttonHighlight");      buttonDarkShadow = UIManager.getColor("ComboBox.buttonDarkShadow");
269        buttonHighlight = UIManager.getColor("ComboBox.buttonHighlight");
270    }    }
271    
272    /**    /**
# Line 295  public class BasicComboBoxUI extends Com Line 314  public class BasicComboBoxUI extends Com
314      if (comboBox.getBackground() instanceof UIResource)      if (comboBox.getBackground() instanceof UIResource)
315        comboBox.setBackground(null);        comboBox.setBackground(null);
316    
317      shadow = null;      buttonBackground = null;
318      darkShadow = null;      buttonShadow = null;
319      highlight = null;      buttonDarkShadow = null;
320        buttonHighlight = null;
321    }    }
322    
323    /**    /**
# Line 432  public class BasicComboBoxUI extends Com Line 452  public class BasicComboBoxUI extends Com
452     */     */
453    protected ComboBoxEditor createEditor()    protected ComboBoxEditor createEditor()
454    {    {
455      return new BasicComboBoxEditor();      return new BasicComboBoxEditor.UIResource();
456    }    }
457    
458    /**    /**
# Line 551  public class BasicComboBoxUI extends Com Line 571  public class BasicComboBoxUI extends Com
571     */     */
572    protected JButton createArrowButton()    protected JButton createArrowButton()
573    {    {
574      return new BasicArrowButton(BasicArrowButton.SOUTH);      return new BasicArrowButton(BasicArrowButton.SOUTH, buttonBackground,
575                buttonShadow, buttonDarkShadow, buttonHighlight);
576    }    }
577    
578    /**    /**
# Line 649  public class BasicComboBoxUI extends Com Line 670  public class BasicComboBoxUI extends Com
670     *     *
671     * @param c The {@link JComponent} to find the maximum size for     * @param c The {@link JComponent} to find the maximum size for
672     *     *
673     * @return The dimensions of the minimum size.     * @return The maximum size (<code>Dimension(32767, 32767)</code>).
674     */     */
675    public Dimension getMaximumSize(JComponent c)    public Dimension getMaximumSize(JComponent c)
676    {    {

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

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