Class MapFileActions<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 closeMap()
      Invoked when the user wants to close the map.
      void closeNotify()
      Unregister all registered listeners.
      void createImage()
      Invoked when the user wants to create an image file of the map.
      void reloadMap()
      Invoked when the user wants to reload the map to the previously saved state.
      void saveMap()
      Invoked when the user wants to save the map.
      void saveMapAs()
      Invoked when the user wants to save the map to a file.
      void setAction​(javax.swing.Action action, java.lang.String name)
      Sets the Action instance for this editor action.
      • Methods inherited from class java.lang.Object

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

      • MapFileActions

        public MapFileActions​(@NotNull
                              ImageCreator2<G,​A,​R> imageCreator2,
                              @NotNull
                              MapManager<G,​A,​R> mapManager,
                              @NotNull
                              MapViewsManager<G,​A,​R> mapViewsManager,
                              @NotNull
                              MapViewManager<G,​A,​R> mapViewManager,
                              @NotNull
                              FileControl<G,​A,​R> fileControl,
                              @NotNull
                              java.awt.Component mainView)
        Create a new instance that tracks the map state.
        Parameters:
        imageCreator2 - the image creator to forwards actions to
        mapManager - the map manager
        mapViewsManager - the map views manager
        mapViewManager - the map view manager
        fileControl - the file control to forward actions to
        mainView - the main view component
    • Method Detail

      • closeNotify

        public void closeNotify()
        Unregister all registered listeners. Must be called when this instance is freed.
      • saveMap

        @ActionMethod
        public void saveMap()
        Invoked when the user wants to save the map.
      • saveMapAs

        @ActionMethod
        public void saveMapAs()
        Invoked when the user wants to save the map to a file.
      • createImage

        @ActionMethod
        public void createImage()
        Invoked when the user wants to create an image file of the map.
      • reloadMap

        @ActionMethod
        public void reloadMap()
        Invoked when the user wants to reload the map to the previously saved state.
      • closeMap

        @ActionMethod
        public void closeMap()
        Invoked when the user wants to close the map.
      • setAction

        public void setAction​(@NotNull
                              javax.swing.Action action,
                              @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