OSDN Git Service

issue: Restampからダイアログが表示できない
[importpicture/importpicture.git] / src / osm / jp / gpx / matchtime / gui / ParameterPanelImageFile.java
index 1cb8853..84e40e7 100644 (file)
@@ -61,6 +61,25 @@ public class ParameterPanelImageFile extends ParameterPanel {
         fc.setSelectedFile(null);
     }
     
+    public File getImageFile() {
+        if (this.paramDir.isEnable()) {
+            String text = this.argField.getText();
+            if (text != null) {
+                try {
+                    File dir = this.paramDir.getDirectory();
+                    File file = new File(dir, text);
+                    if (file.exists() && file.isFile()) {
+                        return file;
+                    }
+                }
+                catch (FileNotFoundException e) {
+                    return null;
+                }
+            }
+        }
+        return null;
+    }
+    
     /**
      * 
      * @return