public final class LayerVisibilityAction extends javax.swing.AbstractAction implements IEnabledStateUpdating, Layer.LayerAction
Modifier and Type | Class and Description |
---|---|
private class |
LayerVisibilityAction.AbstractFilterSlider<T extends Layer>
This is a slider for a filter value.
|
private class |
LayerVisibilityAction.ColorfulnessSlider
This slider allows you to change the colorfulness of a layer.
|
private static class |
LayerVisibilityAction.ColorSelector
Allows to select the color for the GPX layer
|
private class |
LayerVisibilityAction.GammaFilterSlider
This slider allows you to change the gamma value of a layer.
|
private static interface |
LayerVisibilityAction.LayerVisibilityMenuEntry
An entry in the visibility settings dropdown.
|
(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.
|
private class |
LayerVisibilityAction.VisibilityCheckbox |
Modifier and Type | Field and Description |
---|---|
private javax.swing.JPanel |
content
The real content, just to add a border
|
private static java.lang.String |
DIALOGS_LAYERLIST |
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.LayerVisibilityMenuEntry> |
sliders |
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 |
addContentEntry(LayerVisibilityAction.LayerVisibilityMenuEntry 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 java.lang.String DIALOGS_LAYERLIST
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.JPanel content
final LayerVisibilityAction.OpacitySlider opacitySlider
private final java.util.ArrayList<LayerVisibilityAction.LayerVisibilityMenuEntry> sliders
public LayerVisibilityAction(LayerListDialog.LayerListModel model)
LayerVisibilityAction
model
- The list to get the selection from.private void addContentEntry(LayerVisibilityAction.LayerVisibilityMenuEntry slider)
void setVisibleFlag(boolean visible)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
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