/[classpath]/classpath/javax/swing/JComboBox.java
ViewVC logotype

Diff of /classpath/javax/swing/JComboBox.java

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

revision 1.8.2.3 by gnu_andrew, Sun Jan 16 15:15:13 2005 UTC revision 1.8.2.4 by gnu_andrew, Thu Jan 27 09:45:34 2005 UTC
# Line 1  Line 1 
1  /* JComboBox.java --  /* JComboBox.java --
2     Copyright (C) 2002, 2004 Free Software Foundation, Inc.     Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 92  public class JComboBox extends JComponen Line 92  public class JComboBox extends JComponen
92     * Maximum number of rows that should be visible by default  in the     * Maximum number of rows that should be visible by default  in the
93     * JComboBox's popup     * JComboBox's popup
94     */     */
95    public static final int DEFAULT_MAXIMUM_ROW_COUNT = 8;    private static final int DEFAULT_MAXIMUM_ROW_COUNT = 8;
   
   /**  
    * Fired in a PropertyChangeEvent when the 'editable' property changes.  
    */  
   public static final String EDITABLE_CHANGED_PROPERTY = "editable";  
   
   /**  
    * Fired in a PropertyChangeEvent when the 'maximumRowCount' property  
    * changes.  
    */  
   public static final String MAXIMUM_ROW_COUNT_CHANGED_PROPERTY = "maximumRowCount";  
   
   /**  
    * Fired in a PropertyChangeEvent when the 'enabled' property changes.  
    */  
   public static final String ENABLED_CHANGED_PROPERTY = "enabled";  
   
   /**  
    * Fired in a PropertyChangeEvent when the 'renderer' property changes.  
    */  
   public static final String RENDERER_CHANGED_PROPERTY = "renderer";  
   
   /**  
    * Fired in a PropertyChangeEvent when the 'editor' property changes.  
    */  
   public static final String EDITOR_CHANGED_PROPERTY = "editor";  
   
   /**  
    * Fired in a PropertyChangeEvent when the 'dataModel' property changes.  
    */  
   public static final String MODEL_CHANGED_PROPERTY = "dataModel";  
   
   /**  
    * name for the UI delegate for this combo box.  
    */  
   private static final String uiClassID = "ComboBoxUI";  
96    
97    /**    /**
98     * dataModel used by JComboBox to keep track of its list data and currently     * dataModel used by JComboBox to keep track of its list data and currently
# Line 298  public class JComboBox extends JComponen Line 262  public class JComboBox extends JComponen
262     */     */
263    public String getUIClassID()    public String getUIClassID()
264    {    {
265      return uiClassID;      return "ComboBoxUI";
266    }    }
267    
268    /**    /**
# Line 342  public class JComboBox extends JComponen Line 306  public class JComboBox extends JComponen
306      dataModel = newDataModel;      dataModel = newDataModel;
307    
308      // Notifies the listeners of the model change.      // Notifies the listeners of the model change.
309      firePropertyChange(MODEL_CHANGED_PROPERTY, oldDataModel, dataModel);      firePropertyChange("model", oldDataModel, dataModel);
310    }    }
311    
312    /**    /**
# Line 397  public class JComboBox extends JComponen Line 361  public class JComboBox extends JComponen
361      if (isEditable != editable)      if (isEditable != editable)
362        {        {
363          isEditable = editable;          isEditable = editable;
364          firePropertyChange(EDITABLE_CHANGED_PROPERTY, ! isEditable, isEditable);          firePropertyChange("editable", ! isEditable, isEditable);
365        }        }
366    }    }
367    
# Line 415  public class JComboBox extends JComponen Line 379  public class JComboBox extends JComponen
379        {        {
380          int oldMaximumRowCount = maximumRowCount;          int oldMaximumRowCount = maximumRowCount;
381          maximumRowCount = rowCount;          maximumRowCount = rowCount;
382          firePropertyChange(MAXIMUM_ROW_COUNT_CHANGED_PROPERTY,          firePropertyChange("maximumRowCount",
383                             oldMaximumRowCount, maximumRowCount);                             oldMaximumRowCount, maximumRowCount);
384        }        }
385    }    }
# Line 447  public class JComboBox extends JComponen Line 411  public class JComboBox extends JComponen
411        {        {
412          ListCellRenderer oldRenderer = renderer;          ListCellRenderer oldRenderer = renderer;
413          renderer = aRenderer;          renderer = aRenderer;
414          firePropertyChange(RENDERER_CHANGED_PROPERTY, oldRenderer,          firePropertyChange("renderer", oldRenderer,
415                             renderer);                             renderer);
416        }        }
417    }    }
# Line 483  public class JComboBox extends JComponen Line 447  public class JComboBox extends JComponen
447      if (editor != null)      if (editor != null)
448        editor.addActionListener(this);        editor.addActionListener(this);
449    
450      firePropertyChange(EDITOR_CHANGED_PROPERTY, oldEditor, editor);      firePropertyChange("editor", oldEditor, editor);
451    }    }
452    
453    /**    /**
# Line 967  public class JComboBox extends JComponen Line 931  public class JComboBox extends JComponen
931      if (enabled != oldEnabled)      if (enabled != oldEnabled)
932        {        {
933          super.setEnabled(enabled);          super.setEnabled(enabled);
934          firePropertyChange(ENABLED_CHANGED_PROPERTY, oldEnabled,          firePropertyChange("enabled", oldEnabled, enabled);
                            (boolean) enabled);  
935        }        }
936    }    }
937    

Legend:
Removed from v.1.8.2.3  
changed lines
  Added in v.1.8.2.4

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