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

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addWindowAction​(@NotNull javax.swing.JMenu menu, @NotNull MapView<G,​A,​R> mapView, int index)
      Adds an action for selecting this window to a menu.
      @NotNull java.awt.Component getComponent()
      Returns the Component that shows all map views.
      void nextWindow()
      Gives focus to the previous window.
      void prevWindow()
      Gives focus to the next window.
      void setAction​(@NotNull javax.swing.Action action, @NotNull java.lang.String name)
      Sets the Action instance for this editor action.
      void setCurrentMapView​(@NotNull MapView<G,​A,​R> mapView)
      Sets the given level view as the current one.
      • Methods inherited from class java.lang.Object

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

      • MapDesktop

        public MapDesktop​(@NotNull
                          @NotNull MapViewManager<G,​A,​R> mapViewManager,
                          @NotNull
                          @NotNull MapManager<G,​A,​R> mapManager,
                          @NotNull
                          @NotNull MapImageCache<G,​A,​R> mapImageCache,
                          @NotNull
                          @NotNull MapViewsManager<G,​A,​R> mapViewsManager)
        Creates a new instance.
        Parameters:
        mapViewManager - all open map views
        mapManager - the map manager to use
        mapImageCache - the map image cache to use
        mapViewsManager - the map views
    • Method Detail

      • getComponent

        @NotNull
        public @NotNull java.awt.Component getComponent()
        Returns the Component that shows all map views.
        Returns:
        the component
      • setCurrentMapView

        public void setCurrentMapView​(@NotNull
                                      @NotNull MapView<G,​A,​R> mapView)
        Sets the given level view as the current one.
        Parameters:
        mapView - the new current level view
      • addWindowAction

        public void addWindowAction​(@NotNull
                                    @NotNull javax.swing.JMenu menu,
                                    @NotNull
                                    @NotNull MapView<G,​A,​R> mapView,
                                    int index)
        Adds an action for selecting this window to a menu.
        Parameters:
        menu - the menu to add the action to
        mapView - the map view to add
        index - the index of the menu entry
      • prevWindow

        @ActionMethod
        public void prevWindow()
        Gives focus to the next window.
      • nextWindow

        @ActionMethod
        public void nextWindow()
        Gives focus to the previous window.
      • setAction

        public void setAction​(@NotNull
                              @NotNull javax.swing.Action action,
                              @NotNull
                              @NotNull java.lang.String name)
        Description copied from interface: EditorAction
        Sets the Action instance for this editor action.
        Specified by:
        setAction in interface EditorAction
        Parameters:
        action - the action instance
        name - the name of the action