Class PickmapChooserControl<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 addNewPickmap()
      Invoked when user wants to open a new pickmap.
      boolean canExit()
      Invoked when the user wants to exit the application.
      void deletePickmap()
      Invoked when the user wants to delete the active pickmap.
      @NotNull java.awt.Component getComponent()
      Returns the component to show in the object chooser.
      G getSelection()
      Returns the selected game object.
      @NotNull java.util.List<G> getSelections()
      Returns the selected game objects.
      @NotNull java.lang.String getTitle()
      Returns the title to display in the object chooser.
      boolean isLockAllPickmaps()
      Returns whether all pickmaps are locked.
      boolean isMatching​(G gameObject)
      Returns whether the current selection matches the given game object.
      void openPickmapMap()
      Opens the active pickmap as a normal map for extensive editing.
      void revertPickmap()
      Invoked when user wants to revert the current pickmap to previously saved state.
      void savePickmap()
      Saves the current active pickmap.
      void setAction​(@NotNull javax.swing.Action action, @NotNull java.lang.String name)
      Sets the Action instance for this editor action.
      void setActive​(boolean active)
      Called whenever this tab becomes active or inactive.
      void setLockAllPickmaps​(boolean lockAllPickmaps)
      Sets whether all pickmaps are locked.
      void setPopupMenu​(@NotNull javax.swing.JPopupMenu popupMenu)
      Sets the popup menu to show.
      • Methods inherited from class java.lang.Object

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

      • PickmapChooserControl

        public PickmapChooserControl​(@NotNull
                                     @NotNull PickmapChooserModel<G,​A,​R> pickmapChooserModel,
                                     @NotNull
                                     @NotNull PickmapSettings pickmapSettings,
                                     @NotNull
                                     @NotNull NewMapDialogFactory<G,​A,​R> newMapDialogFactory,
                                     @NotNull
                                     @NotNull MapFolderTree<G,​A,​R> mapFolderTree,
                                     @NotNull
                                     @NotNull MapManager<G,​A,​R> mapManager,
                                     @NotNull
                                     @NotNull java.awt.Component parent,
                                     @NotNull
                                     @NotNull MapViewsManager<G,​A,​R> mapViewsManager,
                                     @NotNull
                                     @NotNull FileControl<G,​A,​R> fileControl,
                                     @NotNull
                                     @NotNull PickmapChooserView<G,​A,​R> pickmapChooserView)
        Creates a new instance.
        Parameters:
        pickmapChooserModel - the pickmap chooser model to control
        pickmapSettings - the pickmap settings to use
        newMapDialogFactory - the factory for creating new pickmaps
        mapFolderTree - the map folder tree instance
        mapManager - the map manager instance
        parent - the parent component
        mapViewsManager - the map views
        fileControl - the file control instance
        pickmapChooserView - the view for this controller
    • Method Detail

      • setPopupMenu

        public void setPopupMenu​(@NotNull
                                 @NotNull javax.swing.JPopupMenu popupMenu)
        Sets the popup menu to show.
        Parameters:
        popupMenu - the popup menu to use
      • isLockAllPickmaps

        @ActionMethod
        public boolean isLockAllPickmaps()
        Returns whether all pickmaps are locked.
        Returns:
        true if all pickmaps are locked
      • canExit

        public boolean canExit()
        Invoked when the user wants to exit the application.
        Returns:
        true if exiting the application is allowed
      • isMatching

        public boolean isMatching​(@NotNull
                                  G gameObject)
        Description copied from interface: ObjectChooserTab
        Returns whether the current selection matches the given game object.
        Specified by:
        isMatching in interface ObjectChooserTab<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
        Parameters:
        gameObject - the game object to compare to
        Returns:
        whether the game object matches
      • addNewPickmap

        @ActionMethod
        public void addNewPickmap()
        Invoked when user wants to open a new pickmap.
      • openPickmapMap

        @ActionMethod
        public void openPickmapMap()
        Opens the active pickmap as a normal map for extensive editing.
      • deletePickmap

        @ActionMethod
        public void deletePickmap()
        Invoked when the user wants to delete the active pickmap.
      • savePickmap

        @ActionMethod
        public void savePickmap()
        Saves the current active pickmap.
      • revertPickmap

        @ActionMethod
        public void revertPickmap()
        Invoked when user wants to revert the current pickmap to previously saved state.
      • setLockAllPickmaps

        @ActionMethod
        public void setLockAllPickmaps​(boolean lockAllPickmaps)
        Sets whether all pickmaps are locked.
        Parameters:
        lockAllPickmaps - true if all pickmaps are locked
      • 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