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

    • Constructor Detail

      • DefaultMapView

        public DefaultMapView​(@NotNull
                              @NotNull MapControl<G,​A,​R> mapControl,
                              int number,
                              @NotNull
                              @NotNull PathManager pathManager,
                              @NotNull
                              @NotNull MapGrid mapGrid,
                              @NotNull
                              @NotNull MapCursor<G,​A,​R> mapCursor,
                              @NotNull
                              @NotNull AbstractMapRenderer<G,​A,​R> renderer,
                              int xScrollDistance,
                              int yScrollDistance)
        Creates a new instance.
        Parameters:
        mapControl - the controller of this view
        number - each view of a map will get a number
        pathManager - the path manager for converting path names
        mapGrid - the map grid for this map view
        mapCursor - the map cursor for this map view
        renderer - the map renderer for rendering the map model
        xScrollDistance - the x distance when scrolling
        yScrollDistance - the y distance when scrolling
    • Method Detail

      • setViewPosition

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

        @NotNull
        public @NotNull java.lang.String getWindowTitle()
        Description copied from interface: MapView
        Returns the title for the map window.
        Returns:
        the title
      • getComponent

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

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

        public void activate()
        Description copied from interface: MapView
        Activate this map view.
      • getInternalFrame

        @NotNull
        public @NotNull javax.swing.JInternalFrame getInternalFrame()
        Description copied from interface: MapView
        Returns the JInternalFrame instance for this map view.
        Returns:
        the internal frame
      • getRenderer

        @NotNull
        public @NotNull MapRenderer getRenderer()
        Description copied from interface: MapView
        Returns the MapRenderer for this view.
        Returns:
        the map renderer
      • getScrollPane

        @NotNull
        public @NotNull javax.swing.JScrollPane getScrollPane()
        Description copied from interface: MapView
        Returns the JScrollPane of this map view.
        Returns:
        the scroll pane