 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.updater;
22 import java.awt.Component;
23 import java.util.prefs.Preferences;
24 import javax.swing.Action;
29 import net.
sf.japi.swing.action.ActionBuilder;
30 import net.
sf.japi.swing.action.ActionBuilderFactory;
31 import net.
sf.japi.swing.action.ActionMethod;
32 import org.jetbrains.annotations.NotNull;
44 private static final ActionBuilder
ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder(
"net.sf.gridarta");
138 if (System.currentTimeMillis() > lastUpdate + timeDifference) {
156 public void setAction(@NotNull
final Action action, @NotNull
final String
name) {
UpdaterManager(@NotNull final Exiter exiter, @NotNull final MapManager<?, ?, ?> mapManager, @NotNull final Component parentComponent, @NotNull final String updateFileName)
Creates a new instance.
A MapManager manages all opened maps.
Base package of all Gridarta classes.
static final String INTERVAL_KEY
Preferences key for selected update interval.
void update()
Perform an update.
static final String LAST_UPDATE_KEY
The preferences key for last update.
final Exiter exiter
The Exiter for terminating the application.
static final Preferences PREFERENCES
Preferences.
List< MapControl< G, A, R > > getOpenedMaps()
Returns all opened maps.
void startup()
Eventually perform an update during startup.
final MapManager<?, ?, ?> mapManager
The map manager to use.
final Component parentComponent
The component to show dialogs on.
static final long[] UPDATE_TIMES
The times for update calculation.
void setAction(@NotNull final Action action, @NotNull final String name)
Sets the Action instance for this editor action.
static final boolean AUTO_CHECK_DEFAULT
Preferences default value for AUTO_CHECK_KEY.
This class handles updating the map editor.
final String updateFileName
The file to update.
static final String AUTO_CHECK_KEY
Preferences key whether to automatically check for updates.
final boolean hasUpdateURL
Whether an update URL is defined.
static final int INTERVAL_DEFAULT
Preferences default value for INTERVAL_KEY.
This class handles updating the map editor.
static final ActionBuilder ACTION_BUILDER
Action Builder to create Actions.
Interface used as preferences location.