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

commit 53891b246c43bea11cad9efb168058525458afc5
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Fri Jan 15 00:11:42 2021 +0100

    Minor adjustment in table headers.
---
 .../java/org/apache/sis/gui/coverage/CoverageStyling.java     |  2 +-
 .../apache/sis/internal/gui/control/ColorColumnHandler.java   | 11 +++++------
 .../org/apache/sis/internal/gui/control/ValueColorMapper.java |  2 +-
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git 
a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageStyling.java
 
b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageStyling.java
index 77bce91..56632b5 100644
--- 
a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageStyling.java
+++ 
b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageStyling.java
@@ -180,7 +180,7 @@ final class CoverageStyling extends 
ColorColumnHandler<Category> implements Func
          */
         final TableView<Category> table = new TableView<>();
         table.getColumns().add(name);
-        addColumnTo(table, vocabulary);
+        addColumnTo(table, vocabulary.getString(Vocabulary.Keys.Colors));
         return table;
     }
 
diff --git 
a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ColorColumnHandler.java
 
b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ColorColumnHandler.java
index c60e977..640061d 100644
--- 
a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ColorColumnHandler.java
+++ 
b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ColorColumnHandler.java
@@ -23,7 +23,6 @@ import javafx.scene.control.TableView;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TablePosition;
 import javafx.beans.value.ObservableValue;
-import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.internal.gui.ImmutableObjectProperty;
 
 
@@ -108,12 +107,12 @@ public abstract class ColorColumnHandler<S> implements 
Callback<TableColumn.Cell
      * Adds a colors column to the specified table.
      * This method also modifies the table configuration.
      *
-     * @param  table       the table where to add a colors column.
-     * @param  vocabulary  localized resources, given because already known by 
the caller
-     *                     (this argument would be removed if this method was 
public API).
+     * @param  table   the table where to add a colors column.
+     * @param  header  column title to shown in header row. This is typically 
"Color" or "Colors".
+     *                 The use of singular or plural depends on whether the 
column allows color gradients.
      */
-    protected final void addColumnTo(final TableView<S> table, final 
Vocabulary vocabulary) {
-        final TableColumn<S,ColorRamp> colors = new 
TableColumn<>(vocabulary.getString(Vocabulary.Keys.Colors));
+    protected final void addColumnTo(final TableView<S> table, final String 
header) {
+        final TableColumn<S,ColorRamp> colors = new TableColumn<>(header);
         colors.setCellFactory((column) -> new ColorCell<S>(this));
         colors.setCellValueFactory(this);
         colors.setSortable(false);
diff --git 
a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ValueColorMapper.java
 
b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ValueColorMapper.java
index 1973ca3..c560422 100644
--- 
a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ValueColorMapper.java
+++ 
b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/ValueColorMapper.java
@@ -321,7 +321,7 @@ public final class ValueColorMapper extends 
ColorColumnHandler<ValueColorMapper.
          */
         final TableView<Step> table = new TableView<>();
         table.getColumns().setAll(visible, level);
-        addColumnTo(table, vocabulary);
+        addColumnTo(table, vocabulary.getString(Vocabulary.Keys.Color));
         /*
          * Add an empty row that user can edit for adding new data. This row 
will automatically enter in edition state
          * when a digit is typed (this is the purpose of `trigger`). For 
making easier to edit the cell in current row,

Reply via email to