public final class LayerListDialog.LayerOpacityAction extends AbstractAction implements LayerListDialog.IEnabledStateUpdating, Layer.LayerAction
Modifier and Type | Field and Description |
---|---|
private Layer |
layer |
private JPopupMenu |
popup |
private JSlider |
slider |
changeSupport, enabled
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 and Description |
---|
LayerListDialog.LayerOpacityAction()
Creates a
LayerListDialog.ShowHideLayerAction which will toggle the visibility of
the currently selected layers |
LayerListDialog.LayerOpacityAction(Layer layer)
Creates a
LayerListDialog.LayerOpacityAction which allows to change the
opacity of one or more layers. |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
Component |
createMenuComponent() |
boolean |
equals(Object obj) |
private double |
getOpacity() |
int |
hashCode() |
private void |
setOpacity(double value) |
boolean |
supportLayers(List<Layer> layers) |
void |
updateEnabledState() |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public LayerListDialog.LayerOpacityAction(Layer layer) throws IllegalArgumentException
LayerListDialog.LayerOpacityAction
which allows to change the
opacity of one or more layers.layer
- the layer. Must not be null.IllegalArgumentException
- thrown, if layer is nullpublic LayerListDialog.LayerOpacityAction()
LayerListDialog.ShowHideLayerAction
which will toggle the visibility of
the currently selected layersprivate void setOpacity(double value)
private double getOpacity()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void updateEnabledState()
updateEnabledState
in interface LayerListDialog.IEnabledStateUpdating
public Component createMenuComponent()
createMenuComponent
in interface Layer.LayerAction
public boolean supportLayers(List<Layer> layers)
supportLayers
in interface Layer.LayerAction