public class MergeLayerAction extends AbstractMergeAction
AbstractMergeAction.LayerListCellRenderersc| Constructor and Description |
|---|
MergeLayerAction()
Constructs a new
MergeLayerAction. |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
protected void |
doMerge(java.util.List<Layer> targetLayers,
java.util.Collection<Layer> sourceLayers) |
void |
merge(Layer sourceLayer)
Merges the given source layer with another one, determined at runtime.
|
void |
merge(java.util.List<Layer> sourceLayers)
Merges a list of layers together.
|
protected void |
updateEnabledState()
Override in subclasses to update the enabled state of the action when
something in the JOSM state changes, i.e.
|
static boolean |
warnMergingUploadDiscouragedLayers(Layer sourceLayer,
Layer targetLayer)
Warns about a discouraged merge operation, ask for confirmation.
|
askTargetLayer, warnNoTargetLayersForSourceLayerdestroy, getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltip, updateEnabledStatepublic MergeLayerAction()
MergeLayerAction.protected void doMerge(java.util.List<Layer> targetLayers, java.util.Collection<Layer> sourceLayers)
public void merge(java.util.List<Layer> sourceLayers)
sourceLayers - The layers to mergepublic void merge(Layer sourceLayer)
sourceLayer - The source layer to mergepublic void actionPerformed(java.awt.event.ActionEvent e)
protected void updateEnabledState()
JosmActionJosmAction.updateEnabledState(Collection) to respond to changes in the collection
of selected primitives.
Default behavior is empty.updateEnabledState in class JosmActionJosmAction.updateEnabledState(Collection),
JosmAction.initEnabledState()public static final boolean warnMergingUploadDiscouragedLayers(Layer sourceLayer, Layer targetLayer)
sourceLayer - The source layertargetLayer - The target layertrue if the user wants to cancel, false if they want to continue