public class MergeLayerAction extends AbstractMergeAction
AbstractMergeAction.LayerListCellRenderer, AbstractMergeAction.TargetLayerDialogResult<T extends Layer>JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdaptersc| Constructor and Description |
|---|
MergeLayerAction()
Constructs a new
MergeLayerAction. |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
protected java.util.concurrent.Future<?> |
doMerge(java.util.List<Layer> targetLayers,
java.util.Collection<Layer> sourceLayers)
Submits merge of layers.
|
protected Layer |
getSourceLayer()
Returns the source layer.
|
java.util.concurrent.Future<?> |
merge(Layer sourceLayer)
Merges the given source layer with another one, determined at runtime.
|
java.util.concurrent.Future<?> |
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, askTargetLayer, askTargetLayer, askTargetLayer, askTargetLayer, warnNoTargetLayersForSourceLayercheckAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setHelpId, setTooltip, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFuturepublic MergeLayerAction()
MergeLayerAction.protected java.util.concurrent.Future<?> doMerge(java.util.List<Layer> targetLayers, java.util.Collection<Layer> sourceLayers)
targetLayers - possible target layerssourceLayers - source layersnullpublic java.util.concurrent.Future<?> merge(java.util.List<Layer> sourceLayers)
sourceLayers - The layers to mergenullpublic java.util.concurrent.Future<?> merge(Layer sourceLayer)
sourceLayer - The source layer to mergenullpublic 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(),
JosmAction.listenToLayerChange()protected Layer getSourceLayer()
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