public class RestartAction extends JosmAction
JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
RESTART_APPLE_SCRIPT |
sc
Constructor and Description |
---|
RestartAction()
Constructs a new
RestartAction . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
private static void |
addVMArguments(java.util.Collection<java.lang.String> cmd) |
private static java.util.List<java.lang.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 java.util.List<java.lang.String> |
getCommands() |
private static java.lang.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, updateEnabledState, waitFuture
private static final java.lang.String RESTART_APPLE_SCRIPT
public RestartAction()
RestartAction
.public void actionPerformed(java.awt.event.ActionEvent e)
public static boolean isRestartSupported()
true
if the mandatory system property sun.java.command
is defined, false
otherwise.public static void restartJOSM() throws java.io.IOException
java.io.IOException
- in case of any I/O errorprivate static java.util.List<java.lang.String> getAppleCommands()
private static java.util.List<java.lang.String> getCommands() throws java.io.IOException
java.io.IOException
private static java.lang.String getJavaRuntime() throws java.io.IOException
java.io.IOException
private static void addVMArguments(java.util.Collection<java.lang.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()