public final class LayerListDialog.LayerOpacityAction extends javax.swing.AbstractAction implements LayerListDialog.IEnabledStateUpdating, Layer.LayerAction
Modifier and Type | Field and Description |
---|---|
private Layer |
layer |
private javax.swing.JPopupMenu |
popup |
private javax.swing.JSlider |
slider |
Constructor and Description |
---|
LayerOpacityAction()
Creates a
LayerListDialog.ShowHideLayerAction which will toggle the visibility of
the currently selected layers |
LayerOpacityAction(Layer layer)
Creates a
LayerListDialog.LayerOpacityAction which allows to chenge the
opacity of one or more layers. |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
java.awt.Component |
createMenuComponent() |
boolean |
equals(java.lang.Object obj) |
private double |
getOpacity() |
int |
hashCode() |
private void |
setOpacity(double value) |
boolean |
supportLayers(java.util.List<Layer> layers) |
void |
updateEnabledState() |
public LayerOpacityAction(Layer layer) throws java.lang.IllegalArgumentException
LayerListDialog.LayerOpacityAction
which allows to chenge the
opacity of one or more layers.layer
- the layer. Must not be null.java.lang.IllegalArgumentException
- thrown, if layer is nullpublic LayerOpacityAction()
LayerListDialog.ShowHideLayerAction
which will toggle the visibility of
the currently selected layersprivate void setOpacity(double value)
private double getOpacity()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void updateEnabledState()
updateEnabledState
in interface LayerListDialog.IEnabledStateUpdating
public java.awt.Component createMenuComponent()
createMenuComponent
in interface Layer.LayerAction
public boolean supportLayers(java.util.List<Layer> layers)
supportLayers
in interface Layer.LayerAction
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object