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

    • Constructor Summary

      Constructors 
      Constructor Description
      MapCursorTracker​(boolean isPickmap, int xScrollDistance, int yScrollDistance, @NotNull MapCursor<G,​A,​R> mapCursor, @NotNull AbstractMapRenderer<G,​A,​R> renderer)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void closeNotify()
      Must be called when this instance is not used anymore.
      @NotNull javax.swing.JScrollPane getScrollPane()
      Returns the JScrollPane of the renderer.
      void setViewPosition​(@NotNull java.awt.Point viewPosition)
      Sets the view position.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapCursorTracker

        public MapCursorTracker​(boolean isPickmap,
                                int xScrollDistance,
                                int yScrollDistance,
                                @NotNull
                                @NotNull MapCursor<G,​A,​R> mapCursor,
                                @NotNull
                                @NotNull AbstractMapRenderer<G,​A,​R> renderer)
        Creates a new instance.
        Parameters:
        isPickmap - whether the map model belongs to a pickmap
        xScrollDistance - the x distance when scrolling
        yScrollDistance - the y distance when scrolling
        mapCursor - the map cursor to track
        renderer - the map renderer to update
    • Method Detail

      • setViewPosition

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

        public void closeNotify()
        Must be called when this instance is not used anymore. It un-registers all listeners.
      • getScrollPane

        @NotNull
        public @NotNull javax.swing.JScrollPane getScrollPane()
        Returns the JScrollPane of the renderer.
        Returns:
        the scroll pane