Class MapWindows
Object
MapWindows
- All Implemented Interfaces:
AutoCloseable
A group of windows showing map canvases.
Each window can show a mosaic of
MapCanvas instances of the same size and a single StatusBar.
User's navigation can optionally by synchronized so that panning or zooming in one map causes the same pan or
zoom to be applied in the other maps.- Since:
- 1.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddResource(Resource resource) Tries to allocate a canvas for the given resource and to show it.voidclose()Hides all windows and releases resources.booleanisSupported(Resource resource) Returns whether the given resource is supported.
-
Constructor Details
-
MapWindows
Creates an initially empty group of windows. Ifowneris non-null, then the windows created by this class will always be on top of the owner and closing or minimizingownerwill also close or minimize the windows created by this class.- Parameters:
owner- the parent stage, ornullif none.
-
-
Method Details
-
isSupported
Returns whether the given resource is supported.- Parameters:
resource- the resource to show, ornull.- Returns:
- whether the given resource can be shown.
-
addResource
Tries to allocate a canvas for the given resource and to show it. The first time that this method is invoked, it will show a new window. On next invocations, the resources are added in the existing window. The same resource may be shown many times. Null resources are ignored.- Parameters:
resource- the resource to add, ornull.- Returns:
- whether the given resource has been accepted.
-
close
public void close()Hides all windows and releases resources. Invoking this method is not strictly necessary (waiting for the garbage-collector is sufficient), but may help to release memory faster.- Specified by:
closein interfaceAutoCloseable
-