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

  • All Implemented Interfaces:
    EditorAction

    public class MapFolderTreeActions<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
    extends java.lang.Object
    implements EditorAction
    Encapsulates functionality related to actions for pickmap folder selection.
    • Constructor Summary

      Constructors 
      Constructor Description
      MapFolderTreeActions​(@NotNull MapFolderTree<G,​A,​R> mapFolderTree, @NotNull PickmapSettings pickmapSettings, @NotNull NewMapDialogFactory<G,​A,​R> newMapDialogFactory, @NotNull java.lang.String createFolderKey, @NotNull java.lang.String deleteFolderKey, @NotNull java.lang.String confirmDeleteFolderKey, @NotNull java.lang.String deleteFolderNotEmptyKey)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void createPickmapFolder()
      Action callback function to create a new pickmap folder.
      void deletePickmapFolder()
      Action callback function to delete the current pickmap folder.
      void setAction​(@NotNull javax.swing.Action action, @NotNull java.lang.String name)
      Sets the Action instance for this editor action.
      void setPickmapFoldersMenu​(@Nullable javax.swing.JMenu folderMenu)
      Deprecated.
      • Methods inherited from class java.lang.Object

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

      • MapFolderTreeActions

        public MapFolderTreeActions​(@NotNull
                                    @NotNull MapFolderTree<G,​A,​R> mapFolderTree,
                                    @NotNull
                                    @NotNull PickmapSettings pickmapSettings,
                                    @NotNull
                                    @NotNull NewMapDialogFactory<G,​A,​R> newMapDialogFactory,
                                    @NotNull
                                    @NotNull java.lang.String createFolderKey,
                                    @NotNull
                                    @NotNull java.lang.String deleteFolderKey,
                                    @NotNull
                                    @NotNull java.lang.String confirmDeleteFolderKey,
                                    @NotNull
                                    @NotNull java.lang.String deleteFolderNotEmptyKey)
        Creates a new instance.
        Parameters:
        mapFolderTree - the model to operate on
        pickmapSettings - the pickmap settings to use
        newMapDialogFactory - the factory for creating new pickmap folders
        createFolderKey - the action key for "create folder"
        deleteFolderKey - the action key for "delete folder"
        confirmDeleteFolderKey - the dialog key for "confirm delete folder?"
        deleteFolderNotEmptyKey - the dialog key for "delete folder not empty"
    • Method Detail

      • setPickmapFoldersMenu

        @Deprecated
        public void setPickmapFoldersMenu​(@Nullable
                                          @Nullable javax.swing.JMenu folderMenu)
        Deprecated.
        Sets the pickmap folders menu to manage. If the passed menu is null, nothing is updated.
        Parameters:
        folderMenu - the pickmap folders menu
      • createPickmapFolder

        @ActionMethod
        public void createPickmapFolder()
        Action callback function to create a new pickmap folder.
      • deletePickmapFolder

        @ActionMethod
        public void deletePickmapFolder()
        Action callback function to delete the current pickmap folder.
      • 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