Package org.openstreetmap.josm.actions
Class OpenBrowserAction
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.actions.OpenBrowserAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
Action to open browser on given URL.
- Since:
- 15706
- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields 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
ConstructorsConstructorDescriptionOpenBrowserAction(String name, String url) Constructs a newOpenBrowserAction.OpenBrowserAction(String name, String url, ImageResource icon) Constructs a newOpenBrowserAction. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAdds an additional URL to be launched.static booleanconfirmLaunchMultiple(int numBrowsers) Asks user confirmation before launching a large number of browser windows.private voidMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
urls
-
originalName
-
-
Constructor Details
-
OpenBrowserAction
Constructs a newOpenBrowserAction.- Parameters:
name- the name of this actionurl- the URL to launch
-
OpenBrowserAction
Constructs a newOpenBrowserAction.- Parameters:
name- the name of this actionurl- the URL to launchicon- the action icon- Since:
- 16839
-
-
Method Details
-
addUrl
Adds an additional URL to be launched.- Parameters:
url- the URL to launch
-
updateNameAndDescription
-
actionPerformed
-
confirmLaunchMultiple
Asks user confirmation before launching a large number of browser windows.- Parameters:
numBrowsers- the number of browser windows to open- Returns:
trueif the user confirms,falseotherwise
-