org.openstreetmap.josm.gui.dialogs
Class LayerListDialog.LayerOpacityAction
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.gui.dialogs.LayerListDialog.LayerOpacityAction
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, LayerListDialog.IEnabledStateUpdating, Layer.LayerAction
- Enclosing class:
- LayerListDialog
public final class LayerListDialog.LayerOpacityAction
- extends javax.swing.AbstractAction
- implements LayerListDialog.IEnabledStateUpdating, Layer.LayerAction
- See Also:
- Serialized Form
Field Summary |
private Layer |
layer
|
private javax.swing.JPopupMenu |
popup
|
private javax.swing.JSlider |
slider
|
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 |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
layer
private Layer layer
popup
private javax.swing.JPopupMenu popup
slider
private javax.swing.JSlider slider
LayerListDialog.LayerOpacityAction
public LayerListDialog.LayerOpacityAction(Layer layer)
throws java.lang.IllegalArgumentException
- Creates a
LayerListDialog.LayerOpacityAction
which allows to chenge the
opacity of one or more layers.
- Parameters:
layer
- the layer. Must not be null.
- Throws:
java.lang.IllegalArgumentException
- thrown, if layer is null
LayerListDialog.LayerOpacityAction
public LayerListDialog.LayerOpacityAction()
- Creates a
LayerListDialog.ShowHideLayerAction
which will toggle the visibility of
the currently selected layers
setOpacity
private void setOpacity(double value)
getOpacity
private double getOpacity()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
updateEnabledState
public void updateEnabledState()
- Specified by:
updateEnabledState
in interface LayerListDialog.IEnabledStateUpdating
createMenuComponent
public java.awt.Component createMenuComponent()
- Specified by:
createMenuComponent
in interface Layer.LayerAction
supportLayers
public boolean supportLayers(java.util.List<Layer> layers)
- Specified by:
supportLayers
in interface Layer.LayerAction
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
JOSM