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 static int |
SLIDER_WHEEL_INCREMENT
Steps the value is changed by a mouse wheel change (one full click)
|
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.
|
(package private) 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.
|
(package private) void |
updateValues() |
private static final int SLIDER_STEPS
private static final int SLIDER_WHEEL_INCREMENT
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)
LayerVisibilityActionmodel - The list to get the selection from.private void addSlider(javax.swing.JPanel content, LayerVisibilityAction.FilterSlider<?> slider)
void setVisibleFlag(boolean visible)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenervoid updateValues()
public boolean supportLayers(java.util.List<Layer> layers)
Layer.LayerActionsupportLayers in interface Layer.LayerActionlayers - list of layerstrue if this action supports the given list of layers, false otherwisepublic java.awt.Component createMenuComponent()
Layer.LayerActioncreateMenuComponent in interface Layer.LayerActionpublic void updateEnabledState()
IEnabledStateUpdatingupdateEnabledState in interface IEnabledStateUpdatingpublic void setCorrespondingSideButton(SideButton sideButton)
sideButton - the corresponding side button