Package org.openstreetmap.josm.actions
Class ToggleUploadDiscouragedLayerAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.actions.ToggleUploadDiscouragedLayerAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action,Layer.LayerAction
public class ToggleUploadDiscouragedLayerAction extends javax.swing.AbstractAction implements Layer.LayerAction
An action enabling/disabling the discouraged upload flag of the layer specified in the constructor.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private OsmDataLayerlayer
-
Constructor Summary
Constructors Constructor Description ToggleUploadDiscouragedLayerAction(OsmDataLayer layer)Constructs a newToggleUploadDiscouragedLayerAction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)java.awt.ComponentcreateMenuComponent()Creates and return the menu component.booleansupportLayers(java.util.List<Layer> layers)Determines if this action supports a given list of layers.-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
layer
private final transient OsmDataLayer layer
-
-
Constructor Detail
-
ToggleUploadDiscouragedLayerAction
public ToggleUploadDiscouragedLayerAction(OsmDataLayer layer)
Constructs a newToggleUploadDiscouragedLayerAction.- Parameters:
layer- the layer for which to toggle the discouraged upload flag
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
createMenuComponent
public java.awt.Component createMenuComponent()
Description copied from interface:Layer.LayerActionCreates and return the menu component.- Specified by:
createMenuComponentin interfaceLayer.LayerAction- Returns:
- the menu component
-
supportLayers
public boolean supportLayers(java.util.List<Layer> layers)
Description copied from interface:Layer.LayerActionDetermines if this action supports a given list of layers.- Specified by:
supportLayersin interfaceLayer.LayerAction- Parameters:
layers- list of layers- Returns:
trueif this action supports the given list of layers,falseotherwise
-
-