OSDN Git Service

EXIF撮影時刻を基準時刻にしてGPX情報を変換する。
[importpicture/importpicture.git] / importPicture / src / osm / jp / gpx / matchtime / gui / ParameterPanelFolder.java
index 9b243fe..208a928 100644 (file)
@@ -17,16 +17,6 @@ public class ParameterPanelFolder extends ParameterPanel implements ActionListen
 
         //Create a file chooser
                this.chooser = chooser;
-               File sdir = new File(text);
-               System.out.println("sdir="+ sdir.getAbsolutePath());
-               if (sdir.exists()) {
-               fc = new JFileChooser(sdir);
-               }
-               else {
-               fc = new JFileChooser();
-               }
-               
-               fc.setFileSelectionMode(chooser);
 
         openButton = new JButton("選択...", AdjustTime.createImageIcon("images/Open16.gif"));
         openButton.addActionListener(this);
@@ -44,11 +34,20 @@ public class ParameterPanelFolder extends ParameterPanel implements ActionListen
        
     public void actionPerformed(ActionEvent e) {
                if (e.getSource() == openButton){
-                       fc = new JFileChooser(new File(this.argField.getText()));
-                       int returnVal = fc.showOpenDialog(ParameterPanelFolder.this);
+                       System.out.println("ParameterPanelFolder.actionPerformed(openButton)");
+                       File sdir = new File(this.argField.getText());
+                       if (sdir.exists()) {
+                       this.fc = new JFileChooser(sdir);
+                       }
+                       else {
+                       this.fc = new JFileChooser();
+                       }
+                       this.fc.setFileSelectionMode(this.chooser);
+                       
+                       int returnVal = this.fc.showOpenDialog(ParameterPanelFolder.this);
                        
                        if (returnVal == JFileChooser.APPROVE_OPTION) {
-                           File file = fc.getSelectedFile();
+                           File file = this.fc.getSelectedFile();
                            this.argField.setText(file.getAbsolutePath());
                        }
                }