public final class LayerVisibilityAction extends javax.swing.AbstractAction implements IEnabledStateUpdating, Layer.LayerAction
Modifier and Type | Class and Description |
---|---|
private class |
LayerVisibilityAction.ColorfulnessSlider
This slider allows you to change the colorfulness of a layer.
|
private class |
LayerVisibilityAction.FilterSlider<T extends Layer>
This is a slider for a filter value.
|
private class |
LayerVisibilityAction.GammaFilterSlider
This slider allows you to change the gamma value of a layer.
|
(package private) class |
LayerVisibilityAction.OpacitySlider
This slider allows you to change the opacity of a layer.
|
private class |
LayerVisibilityAction.SharpnessSlider
This slider allows you to change the sharpness of a layer.
|
Modifier and Type | Field and Description |
---|---|
private static double |
MAX_COLORFUL_FACTOR |
private static double |
MAX_SHARPNESS_FACTOR |
private LayerListDialog.LayerListModel |
model |
(package private) LayerVisibilityAction.OpacitySlider |
opacitySlider |
private javax.swing.JPopupMenu |
popup |
private SideButton |
sideButton |
private static int |
SLIDER_STEPS |
private java.util.ArrayList<LayerVisibilityAction.FilterSlider<?>> |
sliders |
private javax.swing.JCheckBox |
visibilityCheckbox |
Constructor and Description |
---|
LayerVisibilityAction(LayerListDialog.LayerListModel model)
Creates a new
LayerVisibilityAction |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
private void |
addSlider(javax.swing.JPanel content,
LayerVisibilityAction.FilterSlider<?> slider) |
java.awt.Component |
createMenuComponent()
Creates and return the menu component.
|
void |
setCorrespondingSideButton(SideButton sideButton)
Sets the corresponding side button.
|
protected void |
setVisibleFlag(boolean visible) |
boolean |
supportLayers(java.util.List<Layer> layers)
Determines if this action supports a given list of layers.
|
void |
updateEnabledState()
Called after the layer model has changed.
|
protected void |
updateValues() |
private static final int SLIDER_STEPS
private static final double MAX_SHARPNESS_FACTOR
private static final double MAX_COLORFUL_FACTOR
private final LayerListDialog.LayerListModel model
private final javax.swing.JPopupMenu popup
private SideButton sideButton
private final javax.swing.JCheckBox visibilityCheckbox
final LayerVisibilityAction.OpacitySlider opacitySlider
private final java.util.ArrayList<LayerVisibilityAction.FilterSlider<?>> sliders
public LayerVisibilityAction(LayerListDialog.LayerListModel model)
LayerVisibilityAction
model
- The list to get the selection from.private void addSlider(javax.swing.JPanel content, LayerVisibilityAction.FilterSlider<?> slider)
protected void setVisibleFlag(boolean visible)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
protected void updateValues()
public boolean supportLayers(java.util.List<Layer> layers)
Layer.LayerAction
supportLayers
in interface Layer.LayerAction
layers
- list of layerstrue
if this action supports the given list of layers, false
otherwisepublic java.awt.Component createMenuComponent()
Layer.LayerAction
createMenuComponent
in interface Layer.LayerAction
public void updateEnabledState()
IEnabledStateUpdating
updateEnabledState
in interface IEnabledStateUpdating
public void setCorrespondingSideButton(SideButton sideButton)
sideButton
- the corresponding side button