Package org.openstreetmap.josm.gui.layer
Class CustomizeColor
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.layer.CustomizeColor
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
,Layer.LayerAction
,Layer.MultiLayerAction
public class CustomizeColor extends AbstractAction implements Layer.LayerAction, Layer.MultiLayerAction
Action to show a dialog for picking a color. By calling this action, the user can choose a color to customize the painting of a certainGpxLayer
orMarkerLayer
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private List<Layer>
colorLayers
-
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
-
Fields inherited from interface javax.swing.Action
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 Summary
Constructors Constructor Description CustomizeColor(List<Layer> l)
Constructs a newCustomizeColor
for a given list of layers.CustomizeColor(Layer l)
Constructs a newCustomizeColor
for a single layer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent e)
Component
createMenuComponent()
Creates and return the menu component.Action
getMultiLayerAction(List<Layer> layers)
Returns the action for a given list of layers.boolean
supportLayers(List<Layer> layers)
Determines if this action supports a given list of layers.-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
colorLayers
private final transient List<Layer> colorLayers
-
-
Constructor Detail
-
CustomizeColor
public CustomizeColor(List<Layer> l)
Constructs a newCustomizeColor
for a given list of layers.- Parameters:
l
- list of layers
-
CustomizeColor
public CustomizeColor(Layer l)
Constructs a newCustomizeColor
for a single layer.- Parameters:
l
- layer
-
-
Method Detail
-
supportLayers
public boolean supportLayers(List<Layer> layers)
Description copied from interface:Layer.LayerAction
Determines if this action supports a given list of layers.- Specified by:
supportLayers
in interfaceLayer.LayerAction
- Parameters:
layers
- list of layers- Returns:
true
if this action supports the given list of layers,false
otherwise
-
createMenuComponent
public Component createMenuComponent()
Description copied from interface:Layer.LayerAction
Creates and return the menu component.- Specified by:
createMenuComponent
in interfaceLayer.LayerAction
- Returns:
- the menu component
-
getMultiLayerAction
public Action getMultiLayerAction(List<Layer> layers)
Description copied from interface:Layer.MultiLayerAction
Returns the action for a given list of layers.- Specified by:
getMultiLayerAction
in interfaceLayer.MultiLayerAction
- Parameters:
layers
- list of layers- Returns:
- the action for the given list of layers
-
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed
in interfaceActionListener
-
-