Package org.openstreetmap.josm.gui.io
Class OnlineResourceMenu.ToggleOnlineResourceAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.JosmAction
-
- org.openstreetmap.josm.actions.ToggleAction
-
- org.openstreetmap.josm.gui.io.OnlineResourceMenu.ToggleOnlineResourceAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
,Destroyable
- Enclosing class:
- OnlineResourceMenu
private static class OnlineResourceMenu.ToggleOnlineResourceAction extends ToggleAction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.actions.JosmAction
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
-
-
Field Summary
Fields Modifier and Type Field Description private OnlineResource
onlineResource
-
Fields inherited from class org.openstreetmap.josm.actions.JosmAction
sc
-
-
Constructor Summary
Constructors Constructor Description ToggleOnlineResourceAction(OnlineResource onlineResource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
private boolean
isOffline()
protected boolean
listenToSelectionChange()
Overwrite this ifJosmAction.updateEnabledState()
should be called when the selection changed.private void
updateSelectedState()
-
Methods inherited from class org.openstreetmap.josm.actions.ToggleAction
addButtonModel, isSelected, notifySelectedState, removeButtonModel, setSelected, toggleSelectedState
-
Methods inherited from class org.openstreetmap.josm.actions.JosmAction
buildActiveLayerChangeAdapter, buildLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, setHelpId, setToolbarId, setTooltip, updateEnabledState, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFuture
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
onlineResource
private final OnlineResource onlineResource
-
-
Constructor Detail
-
ToggleOnlineResourceAction
ToggleOnlineResourceAction(OnlineResource onlineResource)
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
-
updateSelectedState
private void updateSelectedState()
-
isOffline
private boolean isOffline()
-
listenToSelectionChange
protected boolean listenToSelectionChange()
Description copied from class:JosmAction
Overwrite this ifJosmAction.updateEnabledState()
should be called when the selection changed. Default is true.- Overrides:
listenToSelectionChange
in classJosmAction
- Returns:
true
if aDataSelectionListener
should be registered.
-
-