public class RestartAction extends JosmAction
JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter| Modifier and Type | Field and Description |
|---|---|
private static String |
RESTART_APPLE_SCRIPT |
scchangeSupport, enabledACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON| Constructor and Description |
|---|
RestartAction()
Constructs a new
RestartAction. |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
private static void |
addVMArguments(Collection<String> cmd) |
private static List<String> |
getAppleCommands() |
static HelpAwareOptionPane.ButtonSpec[] |
getButtonSpecs()
Returns default
ButtonSpec instances for this action (Restart/Cancel). |
static HelpAwareOptionPane.ButtonSpec |
getCancelButtonSpec()
Returns a new
ButtonSpec instance that do not perform this action. |
private static List<String> |
getCommands() |
private static String |
getJavaRuntime() |
static HelpAwareOptionPane.ButtonSpec |
getRestartButtonSpec()
Returns a new
ButtonSpec instance that performs this action. |
static boolean |
isRestartSupported()
Determines if restarting the application should be possible on this platform.
|
static void |
restartJOSM()
Restarts the current Java application
|
destroy, getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltip, updateEnabledState, updateEnabledStateaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledprivate static final String RESTART_APPLE_SCRIPT
public RestartAction()
RestartAction.public void actionPerformed(ActionEvent e)
public static boolean isRestartSupported()
true if the mandatory system property sun.java.command is defined, false otherwise.public static void restartJOSM() throws IOException
IOException - in case of any errorprivate static List<String> getAppleCommands()
private static List<String> getCommands() throws IOException
IOExceptionprivate static String getJavaRuntime() throws IOException
IOExceptionprivate static void addVMArguments(Collection<String> cmd)
public static HelpAwareOptionPane.ButtonSpec getRestartButtonSpec()
ButtonSpec instance that performs this action.ButtonSpec instance that performs this action.public static HelpAwareOptionPane.ButtonSpec getCancelButtonSpec()
ButtonSpec instance that do not perform this action.ButtonSpec instance that do not perform this action.public static HelpAwareOptionPane.ButtonSpec[] getButtonSpecs()
ButtonSpec instances for this action (Restart/Cancel).ButtonSpec instances for this action.getRestartButtonSpec(),
getCancelButtonSpec()