Class OpenBrowserAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

    public class OpenBrowserAction
    extends javax.swing.AbstractAction
    Action to open browser on given URL.
    Since:
    15706
    See Also:
    OpenBrowser, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String originalName  
      private java.util.List<java.lang.String> urls  
      • 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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)  
      void addUrl​(java.lang.String url)
      Adds an additional URL to be launched.
      static boolean confirmLaunchMultiple​(int numBrowsers)
      Asks user confirmation before launching a large number of browser windows.
      private void updateNameAndDescription()  
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, 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

      • urls

        private final java.util.List<java.lang.String> urls
    • Constructor Detail

      • OpenBrowserAction

        public OpenBrowserAction​(java.lang.String name,
                                 java.lang.String url)
        Constructs a new OpenBrowserAction.
        Parameters:
        name - the name of this action
        url - the URL to launch
      • OpenBrowserAction

        public OpenBrowserAction​(java.lang.String name,
                                 java.lang.String url,
                                 ImageResource icon)
        Constructs a new OpenBrowserAction.
        Parameters:
        name - the name of this action
        url - the URL to launch
        icon - the action icon
        Since:
        16839
    • Method Detail

      • addUrl

        public void addUrl​(java.lang.String url)
        Adds an additional URL to be launched.
        Parameters:
        url - the URL to launch
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
      • confirmLaunchMultiple

        public static boolean confirmLaunchMultiple​(int numBrowsers)
        Asks user confirmation before launching a large number of browser windows.
        Parameters:
        numBrowsers - the number of browser windows to open
        Returns:
        true if the user confirms, false otherwise