Class MapViews<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Constructor Detail

      • MapViews

        public MapViews()
    • Method Detail

      • addMapViewsListener

        public void addMapViewsListener​(@NotNull
                                        @NotNull MapViewsListener<G,​A,​R> listener)
        Adds a MapViewsListener to be notified of events.
        Parameters:
        listener - the listener
      • removeMapViewsListener

        public void removeMapViewsListener​(@NotNull
                                           @NotNull MapViewsListener<G,​A,​R> listener)
        Removes a MapViewsListener to be notified of events.
        Parameters:
        listener - the listener
      • getMapViewFrame

        @Nullable
        public @Nullable MapView<G,​A,​R> getMapViewFrame()
        Returns the last used view of a MapControl.
        Returns:
        the last used view
      • getMapViews

        public int getMapViews()
        Returns the number of views of a MapControl.
        Returns:
        the number of views
      • newMapView

        @NotNull
        public @NotNull MapView<G,​A,​R> newMapView​(@NotNull
                                                              @NotNull MapControl<G,​A,​R> mapControl,
                                                              @Nullable
                                                              @Nullable java.awt.Point viewPosition,
                                                              @NotNull
                                                              @NotNull MapViewFactory<G,​A,​R> mapViewFactory)
        Creates a new MapView.
        Parameters:
        mapControl - the map control new map view is part of
        viewPosition - the view position to show initially; may be null to show the top left corner
        mapViewFactory - the map view factory to use
        Returns:
        the map view
      • getViewPositions

        @NotNull
        public @NotNull java.awt.Point @NotNull [] getViewPositions()
        Returns the current view positions of all views of a MapControl.
        Returns:
        the current view positions of all views
      • closeView

        public void closeView​(@NotNull
                              @NotNull MapView<G,​A,​R> mapView)
        Closes a view of a MapControl.
        Parameters:
        mapView - the view to be closed
      • closeAllViews

        public void closeAllViews()
        Closes all views of a MapControl.
      • setFocus

        public void setFocus​(@NotNull
                             @NotNull MapView<G,​A,​R> mapView)
        Sets a MapView as the main view.
        Parameters:
        mapView - the map view
      • getMapViewIterator

        @NotNull
        public @NotNull java.util.Iterator<MapView<G,​A,​R>> getMapViewIterator()
        Returns an Iterator returning all MapViews. The map views are returns top to bottom.
        Returns:
        the iterator
      • repaintAllViews

        public void repaintAllViews()
        Repaints all MapViews.
      • raise

        public void raise​(@NotNull
                          @NotNull MapView<G,​A,​R> mapView)
        Raises a MapView.
        Parameters:
        mapView - the map view