Package net.sf.gridarta.updater
Class UpdaterManager
- java.lang.Object
-
- net.sf.gridarta.updater.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 booleanAUTO_CHECK_DEFAULTPreferences default value for AUTO_CHECK_KEY.static @NotNull java.lang.StringAUTO_CHECK_KEYPreferences key whether to automatically check for updates.static intINTERVAL_DEFAULTPreferences default value for INTERVAL_KEY.static @NotNull java.lang.StringINTERVAL_KEYPreferences 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 voidsetAction(@NotNull javax.swing.Action action, @NotNull java.lang.String name)Sets theActioninstance for this editor action.voidstartup()Eventually perform an update during startup.voidupdate()Perform an update.
-
-
-
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 applicationmapManager- the map manager to useparentComponent- the parent component to show dialogs onupdateFileName- 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:EditorActionSets theActioninstance for this editor action.- Specified by:
setActionin interfaceEditorAction- Parameters:
action- the action instancename- the name of the action
-
-