Class 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_  
      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • 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
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Field Detail

      • external_

        private final boolean external_
      • 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 one
        hubMode - hub mode
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent evt)
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface javax.swing.Action
        Overrides:
        isEnabled in class javax.swing.AbstractAction
      • attemptRunHub

        private void attemptRunHub()
                            throws java.io.IOException
        Tries to start a hub, but may throw an exception.
        Throws:
        java.io.IOException