public class ShowThumbnailAction extends javax.swing.AbstractAction implements Layer.LayerAction
Modifier and Type | Field and Description |
---|---|
private GeoImageLayer |
layer |
Constructor and Description |
---|
ShowThumbnailAction(GeoImageLayer layer)
Constructs a new
ToggleGeoImageThumbAction action. |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
This is called after the menu entry was selected.
|
java.awt.Component |
createMenuComponent()
Create actual menu entry and define if it is enabled or not.
|
private static boolean |
enabled(GeoImageLayer layer)
Check if there is any suitable image to be toggled.
|
boolean |
supportLayers(java.util.List<Layer> layers)
Check if the current layer is supported.
|
private final transient GeoImageLayer layer
public ShowThumbnailAction(GeoImageLayer layer)
ToggleGeoImageThumbAction
action.layer
- image layerpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- action eventprivate static boolean enabled(GeoImageLayer layer)
layer
- image layertrue
if there are images to be toggled,
false
otherwisepublic java.awt.Component createMenuComponent()
createMenuComponent
in interface Layer.LayerAction
public boolean supportLayers(java.util.List<Layer> layers)
supportLayers
in interface Layer.LayerAction
layers
- list of layerstrue
if this action supports the given list of layers, false
otherwise