public abstract class AbstractMergeAction extends JosmAction
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMergeAction.LayerListCellRenderer
the list cell renderer used to render layer list entries
|
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter
sc
Constructor and Description |
---|
AbstractMergeAction(java.lang.String name,
java.lang.String iconName,
java.lang.String tooltip,
Shortcut shortcut,
boolean register)
Constructs a new
AbstractMergeAction . |
AbstractMergeAction(java.lang.String name,
java.lang.String iconName,
java.lang.String tooltip,
Shortcut shortcut,
boolean register,
java.lang.String toolbar,
boolean installAdapters)
Constructs a new
AbstractMergeAction . |
Modifier and Type | Method and Description |
---|---|
protected static Layer |
askTargetLayer(java.util.List<Layer> targetLayers)
Ask user to choose the target layer.
|
static <T extends Layer> |
askTargetLayer(T[] targetLayers,
java.lang.String label,
java.lang.String title,
java.lang.String buttonText,
java.lang.String buttonIcon)
Asks a target layer.
|
protected void |
warnNoTargetLayersForSourceLayer(Layer sourceLayer)
Warns user when there no layers the source layer could be merged to.
|
checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setTooltip, updateEnabledState, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFuture
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public AbstractMergeAction(java.lang.String name, java.lang.String iconName, java.lang.String tooltip, Shortcut shortcut, boolean register)
AbstractMergeAction
.name
- the action's text as displayed on the menu (if it is added to a menu)iconName
- the filename of the icon to usetooltip
- a longer description of the action that will be displayed in the tooltip. Please note
that html is not supported for menu actions on some platforms.shortcut
- a ready-created shortcut object or null if you don't want a shortcut. But you always
do want a shortcut, remember you can always register it with group=none, so you
won't be assigned a shortcut unless the user configures one. If you pass null here,
the user CANNOT configure a shortcut for your action.register
- register this action for the toolbar preferences?public AbstractMergeAction(java.lang.String name, java.lang.String iconName, java.lang.String tooltip, Shortcut shortcut, boolean register, java.lang.String toolbar, boolean installAdapters)
AbstractMergeAction
.name
- the action's text as displayed on the menu (if it is added to a menu)iconName
- the filename of the icon to usetooltip
- a longer description of the action that will be displayed in the tooltip. Please note
that html is not supported for menu actions on some platforms.shortcut
- a ready-created shortcut object or null if you don't want a shortcut. But you always
do want a shortcut, remember you can always register it with group=none, so you
won't be assigned a shortcut unless the user configures one. If you pass null here,
the user CANNOT configure a shortcut for your action.register
- register this action for the toolbar preferences?toolbar
- identifier for the toolbar preferences. The iconName is used, if this parameter is nullinstallAdapters
- false, if you don't want to install layer changed and selection changed adaptersprotected static Layer askTargetLayer(java.util.List<Layer> targetLayers)
targetLayers
- list of candidate target layers.public static <T extends Layer> T askTargetLayer(T[] targetLayers, java.lang.String label, java.lang.String title, java.lang.String buttonText, java.lang.String buttonIcon)
T
- type of layertargetLayers
- array of proposed target layerslabel
- label displayed in dialogtitle
- title of dialogbuttonText
- text of button used to select target layerbuttonIcon
- icon name of button used to select target layerprotected void warnNoTargetLayersForSourceLayer(Layer sourceLayer)
sourceLayer
- source layer