Revision: 6205 http://sourceforge.net/p/jump-pilot/code/6205 Author: michaudm Date: 2019-12-30 11:03:18 +0000 (Mon, 30 Dec 2019) Log Message: ----------- version 0.8.2 fixes 2 bugs in UI
Modified Paths: -------------- plug-ins/MatchingPlugIn/trunk/build.xml plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/MatchingPlugIn.java plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/CentroidDistanceMatcher.java plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/DamarauLevenshteinDistanceMatcher.java plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/HausdorffDistanceMatcher.java plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/LevenshteinDistanceMatcher.java plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/MinimumDistanceMatcher.java plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/OverlappedByMatcher.java plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/OverlapsMatcher.java plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/SemiHausdorffDistanceMatcher.java plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/ShapeMatcher.java Modified: plug-ins/MatchingPlugIn/trunk/build.xml =================================================================== --- plug-ins/MatchingPlugIn/trunk/build.xml 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/build.xml 2019-12-30 11:03:18 UTC (rev 6205) @@ -16,7 +16,7 @@ <property name="resources" value="resources" /> <property name="javadoc" value="javadoc" /> - <property name="matching-version" value="0.8.1" /> + <property name="matching-version" value="0.8.2" /> <!-- =================================================================== --> <!-- Defines the classpath used for compilation and test. --> @@ -37,7 +37,7 @@ <mkdir dir="build"/> <javac srcdir="${src}" destdir="build" debug="on" deprecation="false" nowarn="true" - source="1.7" target="1.7"> + source="1.8" target="1.8"> <!--compilerarg value="-Xlint:unchecked"/--> <classpath refid="classpath"/> </javac> Modified: plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/MatchingPlugIn.java =================================================================== --- plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/MatchingPlugIn.java 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/MatchingPlugIn.java 2019-12-30 11:03:18 UTC (rev 6205) @@ -432,10 +432,10 @@ dialog.addComboBox(GEOMETRY_MATCHER, geometry_matcher, geomMatcherList, null); final JTextField jtf_dist = dialog.addDoubleField(MAXIMUM_DISTANCE, max_distance, 12, null); - jtf_dist.setEnabled(set_max_distance); + jtf_dist.setEnabled(!Double.isNaN(geometry_matcher.getMaximumDistance())); final JTextField jtf_overlap = dialog.addDoubleField(MINIMUM_OVERLAPPING, min_overlapping, 12, null); - jtf_overlap.setEnabled(set_min_overlapping); + jtf_overlap.setEnabled(!Double.isNaN(geometry_matcher.getMinimumOverlapping())); //////////////////////////////////////////////////////////////////////// // UI : CHOOSE TARGET LAYER AND SOURCE CARDINALITY @@ -453,11 +453,22 @@ jcb_geom_operation.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateDialog(dialog); + // Set jtf_dist and jtf_overlap to the last used values for this matcher geometry_matcher = (GeometryMatcher)jcb_geom_operation.getSelectedItem(); jtf_dist.setText(""+geometry_matcher.getMaximumDistance()); jtf_overlap.setText(""+geometry_matcher.getMinimumOverlapping()); } }); + jtf_dist.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + geometry_matcher.setMaximumDistance(dialog.getDouble(MAXIMUM_DISTANCE)); + } + }); + jtf_overlap.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + geometry_matcher.setMinimumOverlapping(dialog.getDouble(MINIMUM_OVERLAPPING)); + } + }); //////////////////////////////////////////////////////////////////////// // UI : CHOOSE OUTPUT OPTIONS @@ -575,8 +586,8 @@ // Updates related to a geometry_matcher change geometry_matcher = (GeometryMatcher)dialog.getValue(GEOMETRY_MATCHER); - geometry_matcher.setMaximumDistance(dialog.getDouble(MAXIMUM_DISTANCE)); - geometry_matcher.setMinimumOverlapping(dialog.getDouble(MINIMUM_OVERLAPPING)); + //geometry_matcher.setMaximumDistance(dialog.getDouble(MAXIMUM_DISTANCE)); + //geometry_matcher.setMinimumOverlapping(dialog.getDouble(MINIMUM_OVERLAPPING)); dialog.setFieldEnabled(MAXIMUM_DISTANCE, !Double.isNaN(geometry_matcher.getMaximumDistance())); dialog.setFieldEnabled(MINIMUM_OVERLAPPING, !Double.isNaN(geometry_matcher.getMinimumOverlapping())); //String sMatcher = dialog.getText(GEOMETRY_MATCHER); @@ -620,8 +631,10 @@ boolean _transfer_best_match_only = dialog.getBoolean(TRANSFER_BEST_MATCH_ONLY); dialog.setFieldEnabled(STRING_AGGREGATION, _transfer && !_transfer_best_match_only); dialog.setFieldEnabled(INTEGER_AGGREGATION, _transfer && !_transfer_best_match_only); + dialog.setFieldEnabled(LONG_AGGREGATION, _transfer && !_transfer_best_match_only); dialog.setFieldEnabled(DOUBLE_AGGREGATION, _transfer && !_transfer_best_match_only); dialog.setFieldEnabled(DATE_AGGREGATION, _transfer && !_transfer_best_match_only); + dialog.setFieldEnabled(BOOLEAN_AGGREGATION, _transfer && !_transfer_best_match_only); // Updates related to attribute matching boolean _use_attributes = dialog.getBoolean(USE_ATTRIBUTES); Modified: plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/CentroidDistanceMatcher.java =================================================================== --- plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/CentroidDistanceMatcher.java 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/CentroidDistanceMatcher.java 2019-12-30 11:03:18 UTC (rev 6205) @@ -61,6 +61,7 @@ * @see #getMaximumDistance */ public void setMaximumDistance(double max_dist) { + if (Double.isNaN(max_dist)) return; // Never set maxDistance to NaN this.max_dist = max_dist; } Modified: plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/DamarauLevenshteinDistanceMatcher.java =================================================================== --- plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/DamarauLevenshteinDistanceMatcher.java 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/DamarauLevenshteinDistanceMatcher.java 2019-12-30 11:03:18 UTC (rev 6205) @@ -93,6 +93,7 @@ * @see #getMaximumDistance */ public void setMaximumDistance(double max_dist) { + if (Double.isNaN(max_dist)) return; // Never set maxDistance to NaN this.max_dist = max_dist; } Modified: plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/HausdorffDistanceMatcher.java =================================================================== --- plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/HausdorffDistanceMatcher.java 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/HausdorffDistanceMatcher.java 2019-12-30 11:03:18 UTC (rev 6205) @@ -115,6 +115,7 @@ * @see #getMaximumDistance */ public void setMaximumDistance(double max_dist) { + if (Double.isNaN(max_dist)) return; // Never set maxDistance to NaN this.max_dist = max_dist; } Modified: plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/LevenshteinDistanceMatcher.java =================================================================== --- plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/LevenshteinDistanceMatcher.java 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/LevenshteinDistanceMatcher.java 2019-12-30 11:03:18 UTC (rev 6205) @@ -88,6 +88,7 @@ * @see #getMaximumDistance */ public void setMaximumDistance(double max_dist) { + if (Double.isNaN(max_dist)) return; // Never set maxDistance to NaN this.max_dist = max_dist; } Modified: plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/MinimumDistanceMatcher.java =================================================================== --- plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/MinimumDistanceMatcher.java 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/MinimumDistanceMatcher.java 2019-12-30 11:03:18 UTC (rev 6205) @@ -56,6 +56,7 @@ * @see #getMaximumDistance */ public void setMaximumDistance(double max_dist) { + if (Double.isNaN(max_dist)) return; // Never set maxDistance to NaN this.max_dist = max_dist; } Modified: plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/OverlappedByMatcher.java =================================================================== --- plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/OverlappedByMatcher.java 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/OverlappedByMatcher.java 2019-12-30 11:03:18 UTC (rev 6205) @@ -59,6 +59,7 @@ * @see #getMinimumOverlapping */ public void setMinimumOverlapping(double min_overlap) { + if (Double.isNaN(min_overlap)) return; // Never set minOverlap to NaN this.min_overlap = min_overlap; } Modified: plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/OverlapsMatcher.java =================================================================== --- plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/OverlapsMatcher.java 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/OverlapsMatcher.java 2019-12-30 11:03:18 UTC (rev 6205) @@ -59,6 +59,7 @@ * @see #getMinimumOverlapping */ public void setMinimumOverlapping(double min_overlap) { + if (Double.isNaN(min_overlap)) return; // Never set minOverlap to NaN this.min_overlap = min_overlap; } Modified: plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/SemiHausdorffDistanceMatcher.java =================================================================== --- plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/SemiHausdorffDistanceMatcher.java 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/SemiHausdorffDistanceMatcher.java 2019-12-30 11:03:18 UTC (rev 6205) @@ -63,6 +63,7 @@ * @see #getMaximumDistance */ public void setMaximumDistance(double max_dist) { + if (Double.isNaN(max_dist)) return; // Never set maxDistance to NaN this.max_dist = max_dist; } Modified: plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/ShapeMatcher.java =================================================================== --- plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/ShapeMatcher.java 2019-12-30 08:40:19 UTC (rev 6204) +++ plug-ins/MatchingPlugIn/trunk/src/fr/michaelm/jump/plugin/match/matcher/ShapeMatcher.java 2019-12-30 11:03:18 UTC (rev 6205) @@ -73,6 +73,7 @@ * @see #getMaximumDistance */ public void setMaximumDistance(double max_dist) { + if (Double.isNaN(max_dist)) return; // Never set maxDistance to NaN this.max_dist = max_dist; } @@ -82,6 +83,7 @@ * @see #getMinimumOverlapping */ public void setMinimumOverlapping(double min_overlap) { + if (Double.isNaN(min_overlap)) return; // Never set minOverlap to NaN this.min_overlap = min_overlap; } _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel