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.AbstractActionAction subclass for running a hub.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanexternal_private HubServiceModehubMode_private booleanisAvailable_
-
Constructor Summary
Constructors Constructor Description HubAction(boolean external, HubServiceMode hubMode)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent evt)private voidattemptRunHub()Tries to start a hub, but may throw an exception.booleanisEnabled()-
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:
isEnabledin interfacejavax.swing.Action- Overrides:
isEnabledin classjavax.swing.AbstractAction
-
attemptRunHub
private void attemptRunHub() throws java.io.IOExceptionTries to start a hub, but may throw an exception.- Throws:
java.io.IOException
-
-