Class UpdaterManager

  • All Implemented Interfaces:
    EditorAction

    public class UpdaterManager
    extends java.lang.Object
    implements EditorAction
    This class handles updating the map editor.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean AUTO_CHECK_DEFAULT
      Preferences default value for AUTO_CHECK_KEY.
      static @NotNull java.lang.String AUTO_CHECK_KEY
      Preferences key whether to automatically check for updates.
      static int INTERVAL_DEFAULT
      Preferences default value for INTERVAL_KEY.
      static @NotNull java.lang.String INTERVAL_KEY
      Preferences key for selected update interval.
    • Constructor Summary

      Constructors 
      Constructor Description
      UpdaterManager​(@NotNull Exiter exiter, @NotNull MapManager<?,​?,​?> mapManager, @NotNull java.awt.Component parentComponent, @NotNull java.lang.String updateFileName)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setAction​(@NotNull javax.swing.Action action, @NotNull java.lang.String name)
      Sets the Action instance for this editor action.
      void startup()
      Eventually perform an update during startup.
      void update()
      Perform an update.
      • Methods inherited from class java.lang.Object

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

      • AUTO_CHECK_KEY

        @NotNull
        public static final @NotNull java.lang.String AUTO_CHECK_KEY
        Preferences key whether to automatically check for updates.
        See Also:
        Constant Field Values
      • AUTO_CHECK_DEFAULT

        public static final boolean AUTO_CHECK_DEFAULT
        Preferences default value for AUTO_CHECK_KEY.
        See Also:
        Constant Field Values
      • INTERVAL_KEY

        @NotNull
        public static final @NotNull java.lang.String INTERVAL_KEY
        Preferences key for selected update interval.
        See Also:
        Constant Field Values
      • INTERVAL_DEFAULT

        public static final int INTERVAL_DEFAULT
        Preferences default value for INTERVAL_KEY.
        See Also:
        Constant Field Values
    • Constructor Detail

      • UpdaterManager

        public UpdaterManager​(@NotNull
                              @NotNull Exiter exiter,
                              @NotNull
                              @NotNull MapManager<?,​?,​?> mapManager,
                              @NotNull
                              @NotNull java.awt.Component parentComponent,
                              @NotNull
                              @NotNull java.lang.String updateFileName)
        Creates a new instance.
        Parameters:
        exiter - the exiter for terminating the application
        mapManager - the map manager to use
        parentComponent - the parent component to show dialogs on
        updateFileName - the file to update
    • Method Detail

      • startup

        public void startup()
        Eventually perform an update during startup.
      • update

        @ActionMethod
        public void update()
        Perform an update.
      • 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