sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 03/03: Make `FormatTableCell` package-private for now.
Date Mon, 11 Jan 2021 17:50:11 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

commit 80fd5600d4f8eaaff00c4c9543bd801679c3f1ba
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Mon Jan 11 16:23:17 2021 +0100

    Make `FormatTableCell` package-private for now.
---
 .../java/org/apache/sis/internal/gui/control/FormatTableCell.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/FormatTableCell.java
b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/FormatTableCell.java
index c4761ec..fd02025 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/FormatTableCell.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/control/FormatTableCell.java
@@ -52,7 +52,7 @@ import org.apache.sis.util.CharSequences;
  * @since 1.1
  * @module
  */
-public final class FormatTableCell<S,T> extends TableCell<S,T> {
+final class FormatTableCell<S,T> extends TableCell<S,T> {
     /**
      * The type of objects expected and returned by {@link #format}.
      */
@@ -243,7 +243,7 @@ public final class FormatTableCell<S,T> extends TableCell<S,T>
{
      *
      * @param  <S>  the type of elements contained in {@link javafx.scene.control.TableView}.
      */
-    public static final class Trigger<S> implements EventHandler<KeyEvent> {
+    static final class Trigger<S> implements EventHandler<KeyEvent> {
         /**
          * The column containing the cells to transition to edition state.
          */
@@ -315,6 +315,7 @@ public final class FormatTableCell<S,T> extends TableCell<S,T>
{
                     final char c = t.charAt(0);
                     if ((c >= '0' && c <= '9') || c == minusSign || c == zeroDigit)
{
                         final int row = table.getItems().size() - 1;
+                        table.getSelectionModel().select(row);
                         try {
                             initialText = t;
                             table.edit(row, column);


Mime
View raw message