ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meta...@apache.org
Subject cvs commit: jakarta-ant/src/antidote/org/apache/tools/ant/gui/customizer FilePropertyEditor.java
Date Wed, 24 Jan 2001 19:50:51 GMT
metasim     01/01/24 11:50:51

  Modified:    src/antidote/org/apache/tools/ant/gui/customizer
                        FilePropertyEditor.java
  Log:
  Fixed bug where currently selected files were not showing up in the displayed
  diallog.
  
  Revision  Changes    Path
  1.3       +5 -8      jakarta-ant/src/antidote/org/apache/tools/ant/gui/customizer/FilePropertyEditor.java
  
  Index: FilePropertyEditor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/antidote/org/apache/tools/ant/gui/customizer/FilePropertyEditor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FilePropertyEditor.java	2001/01/16 21:45:44	1.2
  +++ FilePropertyEditor.java	2001/01/24 19:50:50	1.3
  @@ -66,7 +66,7 @@
   /**
    * Custom property editor for File types.
    * 
  - * @version $Revision: 1.2 $ 
  + * @version $Revision: 1.3 $ 
    * @author Simeon Fitch 
    */
   public class FilePropertyEditor extends AbstractPropertyEditor {
  @@ -83,7 +83,6 @@
        */
       public FilePropertyEditor() {
           _container = new JPanel(new BorderLayout());
  -        
   
           _widget = new JTextField();
   
  @@ -192,12 +191,10 @@
       private class ActionHandler implements ActionListener {
           public void actionPerformed(ActionEvent e) {
               JFileChooser chooser = null;
  -            if(_widget.getText().length() > 0) {
  -                chooser = new JFileChooser(_widget.getText());
  -            }
  -            else {
  -                chooser = new JFileChooser();
  -            }
  +            chooser = new JFileChooser();
  +            chooser.setSelectedFile((File) getValue());
  +
  +
               _filter = (_filter == null ? 
                          chooser.getAcceptAllFileFilter() : _filter);
               chooser.setFileFilter(_filter);
  
  
  

Mime
View raw message