Object
WindowHandler
A separated window for visualizing a resource managed by
ResourceExplorer
.
A window provides the area where the data are shown and where the user interacts.
The window can be a JavaFX top-level window (Stage
), but not necessarily.
It may also be a tile in a mosaic of windows.- Since:
- 1.3
-
Field Summary
Modifier and TypeFieldDescriptionfinal WindowManager
The window manager which contains this handler.final StringProperty
The property for a label that identify the view. -
Method Summary
Modifier and TypeMethodDescriptionstatic WindowHandler
create
(CoverageExplorer widget) Creates a new handler for the window which is showing the given coverage viewer.static WindowHandler
create
(FeatureTable widget) Creates a new handler for the window which is showing the given table of features.abstract WindowHandler
Prepares a new window with the same content than the window managed by this handler.abstract Optional
<MapCanvas> Returns the canvas (if any) where the resource is shown.void
show()
Shows the window and brings it to the front.
-
Field Details
-
manager
The window manager which contains this handler. The manager contains the list of all windows created for the same widget. -
title
The property for a label that identify the view. If the resource is shown in a top-level window, then this is typically the title of that window.
-
-
Method Details
-
create
Creates a new handler for the window which is showing the given coverage viewer.- Parameters:
widget
- the widget for which to create a handler.- Returns:
- a handler for the window of the given widget.
-
create
Creates a new handler for the window which is showing the given table of features.- Parameters:
widget
- the widget for which to create a handler.- Returns:
- a handler for the window of the given widget.
-
duplicate
Prepares a new window with the same content than the window managed by this handler. This method can be used for creating many windows over the same data. Each window can do pans, zooms and rotations independently of other windows, or be synchronized with other windows, at user's choice.The new view is added to the
WindowManager.windows
list and will be removed from that list if the window is closed. If the resource is closed in the window manager, then all windows showing that resource will be closed.The new window is not initially visible. To show the window, invoke
show()
on the returned handler.- Returns:
- information about the new window.
-
getCanvas
Returns the canvas (if any) where the resource is shown. Canvas exists for some kinds of view such asCoverageExplorer
, but not for every kinds. For example, tabular data such asFeatureTable
have no canvas.- Returns:
- the canvas where the resource is shown.
- See Also:
-
show
public void show()Shows the window and brings it to the front. For handlers created by acreate(…)
method, thisshow()
method can be invoked at any time. For handlers created byduplicate()
, thisshow()
method can be invoked as long as the window has not been closed. After a duplicated window has been closed, it is not possible to show it again.- Throws:
IllegalStateException
- if this handler is a duplicate and the window has been closed.
-