Package org.astrogrid.samp.gui
Class GuiHubConnector.HubAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.astrogrid.samp.gui.GuiHubConnector.HubAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
- Enclosing class:
- GuiHubConnector
private class GuiHubConnector.HubAction extends javax.swing.AbstractAction
Action subclass for running a hub.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
external_
private HubServiceMode
hubMode_
private boolean
isAvailable_
-
Constructor Summary
Constructors Constructor Description HubAction(boolean external, HubServiceMode hubMode)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent evt)
private void
attemptRunHub()
Tries to start a hub, but may throw an exception.boolean
isEnabled()
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
external_
private final boolean external_
-
hubMode_
private final HubServiceMode hubMode_
-
isAvailable_
private final boolean isAvailable_
-
-
Constructor Detail
-
HubAction
HubAction(boolean external, HubServiceMode hubMode)
Constructor.- Parameters:
external
- false to run in the current JVM, true to run in a new onehubMode
- hub mode
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfacejavax.swing.Action
- Overrides:
isEnabled
in classjavax.swing.AbstractAction
-
attemptRunHub
private void attemptRunHub() throws java.io.IOException
Tries to start a hub, but may throw an exception.- Throws:
java.io.IOException
-
-