public class ShowThumbnailAction extends AbstractAction implements Layer.LayerAction
Modifier and Type | Field and Description |
---|---|
private GeoImageLayer |
layer |
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
ShowThumbnailAction(GeoImageLayer layer)
Constructs a new
ToggleGeoImageThumbAction action. |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent arg0)
This is called after the menu entry was selected.
|
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(List<Layer> layers)
Check if the current layer is supported.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
private final transient GeoImageLayer layer
public ShowThumbnailAction(GeoImageLayer layer)
ToggleGeoImageThumbAction
action.layer
- image layerpublic void actionPerformed(ActionEvent arg0)
actionPerformed
in interface ActionListener
arg0
- action eventprivate static boolean enabled(GeoImageLayer layer)
layer
- image layertrue
if there are images to be toggled,
false
otherwisepublic Component createMenuComponent()
createMenuComponent
in interface Layer.LayerAction
public boolean supportLayers(List<Layer> layers)
supportLayers
in interface Layer.LayerAction