sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 04/05: Move the menu about band selection first and add a comment about whether positional accuracy are shown.
Date Fri, 26 Jun 2020 14:53:32 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 70a60783f29de01a9fb8e276ed3b105e0a587135
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Fri Jun 26 12:14:33 2020 +0200

    Move the menu about band selection first and add a comment about whether positional accuracy
are shown.
---
 .../sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java   | 5 ++++-
 .../src/main/java/org/apache/sis/gui/map/ValuesUnderCursor.java      | 3 +--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java
index 4e8c364..ea35a23 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java
@@ -469,7 +469,7 @@ public class StatusBar extends Widget implements EventHandler<MouseEvent>
{
         sampleValuesProvider.addListener((p,o,n) -> {
             ValuesUnderCursor.update(this, o, n);
             if (o != null) items.remove(o.valueChoices);
-            if (n != null) items.add(n.valueChoices);
+            if (n != null) items.add(0, n.valueChoices);
             setSampleValuesVisible(n != null && !n.isEmpty());
         });
         /*
@@ -981,6 +981,9 @@ public class StatusBar extends Widget implements EventHandler<MouseEvent>
{
      * then the accuracy actually shown by {@code StatusBar} will be the greatest value between
the accuracy
      * specified to this method and the coordinate transformation accuracy.
      *
+     * <p>Note that the "± <var>accuracy</var>" text may be shown or hidden
depending on the zoom level.
+     * If pixels on screen are larger than the accuracy, then the accuracy text is hidden.</p>
+     *
      * @param  accuracy  the lowest accuracy to append after the coordinate values, or {@code
null} if none.
      *
      * @see CoordinateFormat#setGroundAccuracy(Quantity)
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/ValuesUnderCursor.java
b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/ValuesUnderCursor.java
index 614d6ad..f0d2e84 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/ValuesUnderCursor.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/ValuesUnderCursor.java
@@ -59,7 +59,6 @@ import org.apache.sis.util.resources.Vocabulary;
 
 /**
  * Provider of textual content to show in a {@link StatusBar} for values under cursor position.
- * Different subtypes are defined for different data sources such as {@link GridCoverage}.
  * When the mouse cursor moves, {@link #evaluate(DirectPosition)} is invoked with the same
  * "real world" coordinates than the ones shown in the status bar.
  *
@@ -205,7 +204,7 @@ public abstract class ValuesUnderCursor {
      * @since   1.1
      * @module
      */
-    public static class FromCoverage extends ValuesUnderCursor implements ChangeListener<GridCoverage>
{
+    private static class FromCoverage extends ValuesUnderCursor implements ChangeListener<GridCoverage>
{
         /**
          * The separator to insert between sample values. We use EM space.
          */


Mime
View raw message