Class DefaultFileControl<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
      boolean closeAllMaps()
      Invoked when the user wants to close all maps.
      boolean confirmSaveChanges​(@NotNull MapControl<G,​A,​R> mapControl)
      Asks the user whether to save changes of a map.
      void openFile​(boolean mapFile)
      The user wants to edit a file.
      void reportLoadError​(@Nullable java.io.File file, @NotNull java.lang.String message)  
      void reportOutOfMapBoundsDeleted​(@NotNull java.io.File file, int outOfMapBoundsDeleted, @NotNull java.lang.StringBuilder outOfMapBoundsObjects)  
      void reportOutOfMemory​(@NotNull java.io.File file)  
      void reportSaveError​(@NotNull java.io.File mapFile, @NotNull java.lang.String message)
      Reports an error while saving a map file to the user.
      void reportSaveError​(@NotNull MapControl<G,​A,​R> mapControl, @NotNull java.lang.String message)
      Reports an error while saving a map file to the user.
      void reportTeleportCharacterError​(@NotNull java.lang.String mapPath, @NotNull java.lang.String message)
      Reports an error while teleporting a character to the current map.
      boolean save​(@NotNull MapControl<G,​A,​R> mapControl)
      Save one map.
      void saveAllMaps()
      Saves all maps.
      boolean saveAs​(@NotNull MapControl<G,​A,​R> mapControl)
      Asks the user for a filename, then saves the map.
      • Methods inherited from class java.lang.Object

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

      • DefaultFileControl

        public DefaultFileControl​(@NotNull
                                  @NotNull ProjectSettings projectSettings,
                                  @NotNull
                                  @NotNull VolatileSettings volatileSettings,
                                  @NotNull
                                  @NotNull MapImageCache<G,​A,​R> mapImageCache,
                                  @NotNull
                                  @NotNull MapManager<G,​A,​R> mapManager,
                                  @NotNull
                                  @NotNull MapViewsManager<G,​A,​R> mapViewsManager,
                                  @NotNull
                                  @NotNull java.awt.Component parent,
                                  @NotNull
                                  @NotNull javax.swing.filechooser.FileFilter mapFileFilter,
                                  @NotNull
                                  @NotNull javax.swing.filechooser.FileFilter scriptFileFilter,
                                  @NotNull
                                  @NotNull NewMapDialogFactory<G,​A,​R> newMapDialogFactory,
                                  @NotNull
                                  @NotNull java.lang.String scriptExtension,
                                  @NotNull
                                  @NotNull ScriptEditControl scriptEditControl,
                                  @NotNull
                                  @NotNull PathManager pathManager)
        Creates a new instance.
        Parameters:
        projectSettings - the project settings instance
        volatileSettings - the volatile settings instance
        mapImageCache - the map image cache
        mapManager - the map manager
        mapViewsManager - the map views manager
        parent - the parent component for showing dialog boxes
        mapFileFilter - the file filter for selecting map files
        scriptFileFilter - the file filter for selecting script files
        newMapDialogFactory - the new map dialog factory
        scriptExtension - the file extension for script files
        scriptEditControl - the script edit control to forward to
        pathManager - the path manager for creating map file instances