sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] branch geoapi-4.0 updated: Remove the control for cell spacing since it is likely to be more confusing than helpful.
Date Sat, 01 Feb 2020 17:01:22 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new 335984c  Remove the control for cell spacing since it is likely to be more confusing
than helpful.
335984c is described below

commit 335984cbd44ad01e90cb5f735281d1de48d8132a
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Sat Feb 1 18:00:40 2020 +0100

    Remove the control for cell spacing since it is likely to be more confusing than helpful.
---
 .../org/apache/sis/gui/coverage/CoverageExplorer.java   | 17 +++++++----------
 .../java/org/apache/sis/util/resources/Vocabulary.java  |  7 +------
 .../org/apache/sis/util/resources/Vocabulary.properties |  1 -
 .../apache/sis/util/resources/Vocabulary_fr.properties  |  1 -
 4 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageExplorer.java
b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageExplorer.java
index 724bbfa..bd48f4f 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageExplorer.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageExplorer.java
@@ -134,25 +134,22 @@ public class CoverageExplorer {
             gp.setBorder(GROUP_BORDER);
             gp.setVgap(9);
             gp.setHgap(9);
-            for (int i=0; i<3; i++) {
+            int row = 0;
+            do {
                 final DoubleProperty property;
                 final double min, max;
                 final short key;
-                switch (i) {
-                    case 0: key = Vocabulary.Keys.Width;   property = gridView.cellWidth;
  min = 30; max = 200; break;
-                    case 1: key = Vocabulary.Keys.Height;  property = gridView.cellHeight;
 min = 10; max =  50; break;
-                    case 2: key = Vocabulary.Keys.Spacing; property = gridView.cellSpacing;
min =  0; max =  10; break;
-                    default: throw new AssertionError(i);
-                }
+                if (row == 0) {key = Vocabulary.Keys.Width;   property = gridView.cellWidth;
  min = 30; max = 200;}
+                else          {key = Vocabulary.Keys.Height;  property = gridView.cellHeight;
 min = 10; max =  50;}
                 final Label  label  = new Label(vocabulary.getLabel(key));
                 final Slider slider = new Slider(min, max, property.getValue());
                 property.bind(slider.valueProperty());
                 slider.setShowTickMarks(false);
                 label.setLabelFor(slider);
-                GridPane.setConstraints(label,  0, i);
-                GridPane.setConstraints(slider, 1, i);
+                GridPane.setConstraints(label,  0, row);
+                GridPane.setConstraints(slider, 1, row);
                 gp.getChildren().addAll(label, slider);
-            }
+            } while (++row <= 1);
             final Label label = new Label(vocabulary.getLabel(Vocabulary.Keys.Cells));
             label.setPadding(CAPTION_MARGIN);
             label.setLabelFor(gp);
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
index 2f232c6..2afc5b3 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
@@ -342,7 +342,7 @@ public final class Vocabulary extends IndexedResourceBundle {
         /**
          * Display
          */
-        public static final short Display = 196;
+        public static final short Display = 194;
 
         /**
          * ″
@@ -840,11 +840,6 @@ public final class Vocabulary extends IndexedResourceBundle {
         public static final short SouthBound = 139;
 
         /**
-         * Spacing
-         */
-        public static final short Spacing = 194;
-
-        /**
          * Standard deviation
          */
         public static final short StandardDeviation = 140;
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
index 490af7d..21688a3 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
@@ -171,7 +171,6 @@ Simplified              = Simplified
 SlashSeparatedList_2    = {0}/{1}
 Source                  = Source
 SouthBound              = South bound
-Spacing                 = Spacing
 StandardDeviation       = Standard deviation
 StartDate               = Start date
 StartPoint              = Start point
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
index dad27a3..62f4c5a 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
@@ -178,7 +178,6 @@ Simplified              = Simplifi\u00e9
 SlashSeparatedList_2    = {0}/{1}
 Source                  = Source
 SouthBound              = Limite sud
-Spacing                 = Espacement
 StandardDeviation       = \u00c9cart type
 StartDate               = Date de d\u00e9part
 StartPoint              = Point de d\u00e9part


Mime
View raw message