sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 03/05: Simplify the layout of source images in the "Properties" pane.
Date Fri, 26 Jun 2020 14:53:31 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 287c6d379da4110f6262d2f860f3afbacff5355f
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Fri Jun 26 12:03:31 2020 +0200

    Simplify the layout of source images in the "Properties" pane.
---
 .../sis/gui/coverage/ImagePropertyExplorer.java      | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/ImagePropertyExplorer.java
b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/ImagePropertyExplorer.java
index f3a2150..a57ffb0 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/ImagePropertyExplorer.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/ImagePropertyExplorer.java
@@ -37,9 +37,7 @@ import javafx.beans.property.SimpleObjectProperty;
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
 import javafx.collections.transformation.FilteredList;
-import javafx.geometry.Orientation;
 import javafx.geometry.Pos;
-import javafx.scene.control.SplitPane;
 import javafx.scene.control.Tab;
 import javafx.scene.control.TabPane;
 import javafx.scene.control.TableCell;
@@ -349,7 +347,7 @@ public class ImagePropertyExplorer extends Widget {
      * The view containing all visual components.
      * The exact class may change in any future version.
      */
-    private final SplitPane view;
+    private final TabPane view;
 
     /**
      * Creates an initially empty explorer.
@@ -372,7 +370,6 @@ public class ImagePropertyExplorer extends Widget {
         final TableView<LayoutRow>    layout;
         final NumberFormat            integerFormat;
         final TableView<PropertyRow>  properties;
-        final TabPane                 tabPane;
 
         image            = new ImageProperty();
         imageUseBoundsCS = new IdentityHashMap<>(4);
@@ -457,18 +454,17 @@ public class ImagePropertyExplorer extends Widget {
             });
         }
         /*
-         * The view containing all visual components. A minimal height is given to `sources`
tree
-         * because otherwise it appears with a height of 0 every time the `TitledPane` is
expanded.
+         * The view containing all visual components. In current version the sources is a
tab like others.
+         * A previous version was showing the sources on top (using SlidePane), so we could
navigate easily
+         * in the properties of different sources. It has been removed for simplifying the
layout, but the
+         * listeners are still updating layout and property panes immediately when a new
source is selected.
          */
-        tabPane = new TabPane(
+        view = new TabPane(
+                new Tab(vocabulary.getString(Vocabulary.Keys.Source), sources),
                 new Tab(vocabulary.getString(Vocabulary.Keys.Layout), layout),
                 new Tab(vocabulary.getString(Vocabulary.Keys.Properties), properties),
                 detailsTab);
-        tabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
-        view = new SplitPane(sources, tabPane);
-        view.setOrientation(Orientation.VERTICAL);
-        SplitPane.setResizableWithParent(sources, false);
-        sources.setMinHeight(50);
+        view.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE);
         updateOnChange.addListener((p,o,n) -> {if (n) startListening();});
     }
 


Mime
View raw message