diff --git a/pom.xml b/pom.xml index 320c95d..b599314 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ UTF-8 - 11 + 1.8 ${java.version} ${java.version} true @@ -39,9 +39,16 @@ osm.surveyor AdjustTime - 5.3.9 + 5.3.10-SNAPSHOT + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + org.apache.commons diff --git a/src/main/java/osm/jp/gpx/matchtime/gui/ParameterData.java b/src/main/java/osm/jp/gpx/matchtime/gui/ParameterData.java deleted file mode 100644 index 76eb082..0000000 --- a/src/main/java/osm/jp/gpx/matchtime/gui/ParameterData.java +++ /dev/null @@ -1,23 +0,0 @@ -package osm.jp.gpx.matchtime.gui; - -import java.util.Observable; - -public class ParameterData extends Observable { - String content = ""; - - String getContent() { - return content; - } - - void setContent(String content) { - this.content = content; - setChanged(); - super.notifyObservers(content); - clearChanged(); - } - - @Override - public void notifyObservers(Object arg) { - setContent(arg.toString()); - } -} diff --git a/src/main/java/osm/jp/gpx/matchtime/gui/ParameterPanelImageFile.java b/src/main/java/osm/jp/gpx/matchtime/gui/ParameterPanelImageFile.java index 1956433..1b6373c 100644 --- a/src/main/java/osm/jp/gpx/matchtime/gui/ParameterPanelImageFile.java +++ b/src/main/java/osm/jp/gpx/matchtime/gui/ParameterPanelImageFile.java @@ -18,12 +18,12 @@ public class ParameterPanelImageFile extends ParameterPanel implements PropertyChangeListener { JFileChooser fc; public JButton openButton; - public ParameterPanelFolder paramDir; + public ParameterPanelSourceFolder paramDir; private final PropertyChangeSupport pcs = new PropertyChangeSupport(this); public ParameterPanelImageFile( String name, String label, String text, - ParameterPanelFolder paramDir + ParameterPanelSourceFolder paramDir ) { super(name, label, text); diff --git a/src/main/java/osm/jp/gpx/matchtime/gui/ParameterPanelSourceFolder.java b/src/main/java/osm/jp/gpx/matchtime/gui/ParameterPanelSourceFolder.java index 1230af8..be1998f 100644 --- a/src/main/java/osm/jp/gpx/matchtime/gui/ParameterPanelSourceFolder.java +++ b/src/main/java/osm/jp/gpx/matchtime/gui/ParameterPanelSourceFolder.java @@ -28,7 +28,11 @@ } try { File dir = super.getDirectory(); - return (dir.exists() && dir.isDirectory()); + File[] files = dir.listFiles(new ImageFileFilter()); + if ((files == null) || (files.length < 1)) { + return false; + } + return true; } catch (Exception e) { return false; @@ -39,9 +43,8 @@ public File getDirectory() throws FileNotFoundException { File dir = super.getDirectory(); if (dir.exists() && dir.isDirectory()) { - + return dir; } - return dir; + throw new FileNotFoundException(); } - } \ No newline at end of file