Interface MapView<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Method Detail

      • setViewPosition

        void setViewPosition​(@NotNull
                             @NotNull java.awt.Point viewPosition)
        Sets the view position.
        Parameters:
        viewPosition - the view position to show
      • closeNotify

        void closeNotify()
        This function must be called when the view is closed.
      • getSelectedGameObject

        @Nullable
        G getSelectedGameObject()
        Return one selected game object. If more than one game object is selected, return a random one. If nothing is selected, return a random game object from the entire map.
        Returns:
        one random selected game object, or null if no game object is selected
      • getSelectedGameObjects

        @NotNull
        @NotNull java.util.List<G> getSelectedGameObjects()
        Return all selected game objects. If nothing is selected, return all game objects from the entire map.
        Returns:
        the selected game objects
      • getWindowTitle

        @NotNull
        @NotNull java.lang.String getWindowTitle()
        Returns the title for the map window.
        Returns:
        the title
      • getComponent

        @NotNull
        @NotNull java.awt.Component getComponent()
        Returns the component associated with this MapView that can be used as parent for dialogs.
        Returns:
        the component as parent for dialogs
      • getMapControl

        @NotNull
        @NotNull MapControl<G,​A,​R> getMapControl()
        Return the controller of this view.
        Returns:
        the controller of this view
      • activate

        void activate()
        Activate this map view.
      • getInternalFrame

        @NotNull
        @NotNull javax.swing.JInternalFrame getInternalFrame()
        Returns the JInternalFrame instance for this map view.
        Returns:
        the internal frame
      • getSelectedSquares

        @NotNull
        @NotNull java.util.List<MapSquare<G,​A,​R>> getSelectedSquares()
        Returns the selected squares.
        Returns:
        the selected squares; the list may be modified by the caller
      • getMapGrid

        @NotNull
        @NotNull MapGrid getMapGrid()
        Returns the MapGrid of this view.
        Returns:
        the map grid of this view
      • getMapCursor

        @NotNull
        @NotNull MapCursor<G,​A,​R> getMapCursor()
        Returns the MapCursor of this view.
        Returns:
        the map cursor of this view
      • getRenderer

        @NotNull
        @NotNull MapRenderer getRenderer()
        Returns the MapRenderer for this view.
        Returns:
        the map renderer
      • getScrollPane

        @NotNull
        @NotNull javax.swing.JScrollPane getScrollPane()
        Returns the JScrollPane of this map view.
        Returns:
        the scroll pane
      • setCursorLocation

        void setCursorLocation​(@NotNull
                               @NotNull java.awt.Point point)
        Sets the cursor location. If the map location is not within map bounds the cursor is set to the nearest valid location.
        Parameters:
        point - the new location will be modified to the actually set cursor location
      • centerMapView

        void centerMapView​(@NotNull
                           @NotNull java.awt.Point centerSquare)
        Centers the map view on a map square.
        Parameters:
        centerSquare - the map square