Package org.openstreetmap.josm.gui.layer
Class CustomizeColor
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.layer.CustomizeColor
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action,Layer.LayerAction,Layer.MultiLayerAction
public class CustomizeColor extends javax.swing.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 certain
GpxLayerorMarkerLayer.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Layer>colorLayers
-
Constructor Summary
Constructors Constructor Description CustomizeColor(java.util.List<Layer> l)Constructs a newCustomizeColorfor a given list of layers.CustomizeColor(Layer l)Constructs a newCustomizeColorfor a single layer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)java.awt.ComponentcreateMenuComponent()Creates and return the menu component.javax.swing.ActiongetMultiLayerAction(java.util.List<Layer> layers)Returns the action for a given list of layers.booleansupportLayers(java.util.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 java.util.List<Layer> colorLayers
-
-
Constructor Detail
-
CustomizeColor
public CustomizeColor(java.util.List<Layer> l)
Constructs a newCustomizeColorfor a given list of layers.- Parameters:
l- list of layers
-
CustomizeColor
public CustomizeColor(Layer l)
Constructs a newCustomizeColorfor a single layer.- Parameters:
l- layer
-
-
Method Detail
-
supportLayers
public boolean supportLayers(java.util.List<Layer> layers)
Description copied from interface:Layer.LayerActionDetermines if this action supports a given list of layers.- Specified by:
supportLayersin interfaceLayer.LayerAction- Parameters:
layers- list of layers- Returns:
trueif this action supports the given list of layers,falseotherwise
-
createMenuComponent
public java.awt.Component createMenuComponent()
Description copied from interface:Layer.LayerActionCreates and return the menu component.- Specified by:
createMenuComponentin interfaceLayer.LayerAction- Returns:
- the menu component
-
getMultiLayerAction
public javax.swing.Action getMultiLayerAction(java.util.List<Layer> layers)
Description copied from interface:Layer.MultiLayerActionReturns the action for a given list of layers.- Specified by:
getMultiLayerActionin interfaceLayer.MultiLayerAction- Parameters:
layers- list of layers- Returns:
- the action for the given list of layers
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
-