Class MapWindows

Object
MapWindows
All Implemented Interfaces:
Auto­Closeable

public class MapWindows extends Object implements AutoCloseable
A group of windows showing map canvases. Each window can show a mosaic of Map­Canvas instances of the same size and a single Status­Bar. 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 Details

    • MapWindows

      public MapWindows(Window owner)
      Creates an initially empty group of windows. If owner is non-null, then the windows created by this class will always be on top of the owner and closing or minimizing owner will also close or minimize the windows created by this class.
      Parameters:
      owner - the parent stage, or null if none.
  • Method Details

    • isSupported

      public boolean isSupported(Resource resource)
      Returns whether the given resource is supported.
      Parameters:
      resource - the resource to show, or null.
      Returns:
      whether the given resource can be shown.
    • addResource

      public boolean addResource(Resource resource)
      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, or null.
      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:
      close in interface Auto­Closeable