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 1f908a0fb4 Remove from the GUI and deprecate in the API the old 
windows system.
1f908a0fb4 is described below

commit 1f908a0fb4713e797177dd1b2186eede0f0e103b
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Fri Apr 10 13:23:35 2026 +0200

    Remove from the GUI and deprecate in the API the old windows system.
---
 .../apache/sis/gui/controls/SyncWindowList.java    |  1 +
 .../apache/sis/gui/coverage/CoverageControls.java  | 23 +++++-----------------
 .../apache/sis/gui/coverage/CoverageExplorer.java  |  6 +++++-
 .../org/apache/sis/gui/dataset/WindowHandler.java  |  3 +++
 .../org/apache/sis/gui/dataset/WindowManager.java  |  6 +++++-
 .../org/apache/sis/gui/internal/PrivateAccess.java |  1 +
 .../org/apache/sis/gui/internal/ToolbarButton.java |  3 +++
 7 files changed, 23 insertions(+), 20 deletions(-)

diff --git 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/controls/SyncWindowList.java
 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/controls/SyncWindowList.java
index 25ae55f80c..db257be1cf 100644
--- 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/controls/SyncWindowList.java
+++ 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/controls/SyncWindowList.java
@@ -41,6 +41,7 @@ import org.apache.sis.gui.internal.Resources;
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
+@Deprecated(since = "1.7", forRemoval = true)
 public final class SyncWindowList extends TabularWidget implements 
ListChangeListener<WindowHandler> {
     /**
      * Window containing a {@link MapCanvas} on which to replicate gesture 
events.
diff --git 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/CoverageControls.java
 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/CoverageControls.java
index 65106c39bd..4a72073d0c 100644
--- 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/CoverageControls.java
+++ 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/CoverageControls.java
@@ -26,7 +26,6 @@ import org.apache.sis.coverage.Category;
 import org.apache.sis.coverage.grid.GridCoverage;
 import org.apache.sis.storage.GridCoverageResource;
 import org.apache.sis.storage.DataStoreException;
-import org.apache.sis.gui.dataset.WindowHandler;
 import org.apache.sis.gui.map.MapMenu;
 import org.apache.sis.gui.map.style.MapLayer;
 import org.apache.sis.gui.map.style.MapContextView;
@@ -34,7 +33,6 @@ import org.apache.sis.gui.internal.Resources;
 import org.apache.sis.gui.internal.DataStoreOpener;
 import org.apache.sis.gui.internal.BackgroundThreads;
 import static org.apache.sis.gui.internal.LogHandler.LOGGER;
-import org.apache.sis.gui.controls.SyncWindowList;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.logging.Logging;
 
@@ -48,7 +46,7 @@ import org.apache.sis.util.logging.Logging;
  */
 final class CoverageControls extends ViewAndControls {
     /**
-     * The component for showing sample values.
+     * The component for visualizing the grid coverage.
      *
      * @see CoverageExplorer#getCanvas()
      */
@@ -68,10 +66,9 @@ final class CoverageControls extends ViewAndControls {
     /**
      * Creates a new set of coverage controls.
      *
-     * @param  owner   the widget which creates this view. Cannot be null.
-     * @param  window  the handler of the window which will show the coverage 
explorer.
+     * @param  owner  the widget which creates this view. Cannot be null.
      */
-    CoverageControls(final CoverageExplorer owner, final WindowHandler window) 
{
+    CoverageControls(final CoverageExplorer owner) {
         super(owner);
         final Locale     locale     = owner.getLocale();
         final Resources  resources  = Resources.forLocale(locale);
@@ -93,25 +90,16 @@ final class CoverageControls extends ViewAndControls {
         /*
          * "Layers" section with the following controls:
          *    - Tree of layers associated to the coverage (styling, isolines, 
visual indication of loaded tiles).
+         *    - Configuration panel for the selected layer.
          */
         final var layers = new MapContextView(resources);
         style = new StyleController(view);
         layers.setRootItem(style);
-        /*
-         * "Isolines" section with the following controls:
-         *    - Colors for each isoline levels
-         */
         if (view.isolines == null) {
             final var isolines = new IsolineController(view, 
vocabulary.getString(Vocabulary.Keys.Isolines));
             style.getChildren().add(isolines);
             view.isolines = isolines;
         }
-        /*
-         * Synchronized windows. A synchronized windows is a window which can 
reproduce the same gestures
-         * (zoom, pan, rotation) than the window containing this view. The 
maps displayed in different
-         * windows do not need to use the same map projection; translations 
will be adjusted as needed.
-         */
-        final SyncWindowList windows = new SyncWindowList(window, resources, 
vocabulary);
         /*
          * Put all sections together and have the first one expanded by 
default.
          * The "Properties" section will be built by `PropertyPaneCreator` 
only if requested.
@@ -119,13 +107,12 @@ final class CoverageControls extends ViewAndControls {
         final TitledPane deferred;                  // Control to be built 
only if requested.
         controlPanes = new TitledPane[] {
             new TitledPane(vocabulary.getString(Vocabulary.Keys.Layers), 
layers.getView()),
-            new TitledPane(resources.getString(Resources.Keys.Windows), 
windows.getView()),
             deferred = new 
TitledPane(vocabulary.getString(Vocabulary.Keys.Properties), null)
         };
         /*
          * Set listeners: changes on `CoverageCanvas` properties are 
propagated to the corresponding
          * `CoverageExplorer` properties. This constructor does not install 
listeners in the opposite
-         * direction; instead `CoverageExplorer` will invoke 
`load(ImageRequest)`.
+         * direction. Instead, `CoverageExplorer` will invoke 
`load(ImageRequest)`.
          */
         view.resourceProperty.addListener((p,o,n) -> notifyDataChanged(n, 
null));
         view.coverageProperty.addListener((p,o,n) -> 
notifyDataChanged(view.getResourceIfAdjusting(), n));
diff --git 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/CoverageExplorer.java
 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/CoverageExplorer.java
index 3379cc7228..948387bf01 100644
--- 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/CoverageExplorer.java
+++ 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/coverage/CoverageExplorer.java
@@ -228,6 +228,7 @@ public class CoverageExplorer extends Widget {
      *
      * @see #getWindowHandler()
      */
+    @Deprecated(since = "1.7", forRemoval = true)
     private WindowHandler window;
 
     /**
@@ -281,7 +282,10 @@ public class CoverageExplorer extends Widget {
      * @return the handler of the window showing this coverage view.
      *
      * @since 1.3
+     *
+     * @deprecated Replaced by {@link org.apache.sis.gui.map.MapWindows}.
      */
+    @Deprecated(since = "1.7", forRemoval = true)
     public final WindowHandler getWindowHandler() {
         assert Platform.isFxApplicationThread();
         /*
@@ -325,7 +329,7 @@ public class CoverageExplorer extends Widget {
         if (c == null) {
             switch (type) {
                 case TABLE: c = new GridControls(this); break;
-                case IMAGE: c = new CoverageControls(this, 
getWindowHandler()); break;
+                case IMAGE: c = new CoverageControls(this); break;
                 default: throw new AssertionError(type);
             }
             views.put(type, c);
diff --git 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowHandler.java
 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowHandler.java
index dc3e4d0b79..dd25beaa61 100644
--- 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowHandler.java
+++ 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowHandler.java
@@ -53,7 +53,10 @@ import static org.apache.sis.gui.internal.LogHandler.LOGGER;
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.7
  * @since   1.3
+ *
+ * @deprecated Replaced by {@link org.apache.sis.gui.map.MapWindows}.
  */
+@Deprecated(since = "1.7", forRemoval = true)
 public abstract class WindowHandler {
     /**
      * The window manager which contains this handler.
diff --git 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowManager.java
 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowManager.java
index 7889e4199c..7159d7b818 100644
--- 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowManager.java
+++ 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/dataset/WindowManager.java
@@ -45,9 +45,12 @@ import org.apache.sis.gui.internal.ToolbarButton;
  * or synchronized between windows, at user's choice.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.5
+ * @version 1.7
  * @since   1.3
+ *
+ * @deprecated Replaced by {@link org.apache.sis.gui.map.MapWindows}.
  */
+@Deprecated(since = "1.7", forRemoval = true)
 public final class WindowManager {          // Not designed for subclassing.
     /**
      * The handler of the main window. This handler shall never be disposed.
@@ -93,6 +96,7 @@ public final class WindowManager {          // Not designed 
for subclassing.
      * @param  content  control that contains the data to show in a new window.
      * @return window for showing the resource. Untitled and not yet visible.
      */
+    @Deprecated(since = "1.7", forRemoval = true)
     final Stage newWindow(final Region content) {
         final Stage     stage      = new Stage();
         final Button    mainWindow = FontGIS.button((char) 0,                 
"\uD83D\uDDD4");   // 🗔 — Desktop Window
diff --git 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/PrivateAccess.java
 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/PrivateAccess.java
index a0ed3914a6..505f87fd3c 100644
--- 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/PrivateAccess.java
+++ 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/PrivateAccess.java
@@ -30,6 +30,7 @@ import org.apache.sis.gui.dataset.WindowHandler;
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
+@Deprecated(since = "1.7", forRemoval = true)
 public final class PrivateAccess {
     /**
      * Do not allow instantiation of this class.
diff --git 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/ToolbarButton.java
 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/ToolbarButton.java
index 6054b31a03..5be3da9ec0 100644
--- 
a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/ToolbarButton.java
+++ 
b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/internal/ToolbarButton.java
@@ -52,7 +52,10 @@ public abstract class ToolbarButton implements 
EventHandler<ActionEvent> {
      *
      * @param  content  the pane for which to get the toolbar buttons.
      * @return the toolbar buttons (never null, but may be empty).
+     *
+     * @deprecated following deprecation of {@code WindowHandler}.
      */
+    @Deprecated(since = "1.7", forRemoval = true)
     public static Control[] remove(final Node content) {
         final Control[] buttons = (Control[]) 
content.getProperties().remove(PROPERTY_KEY);
         return (buttons != null) ? buttons : new Control[0];

Reply via email to