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
|
static class |
AbstractMergeAction.TargetLayerDialogResult<T extends Layer>
TargetLayerDialogResult returned by #askTargetLayer(List, String, boolean)
containing the selectedTargetLayer and whether the checkbox is ticked |
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdaptersc| 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 AbstractMergeAction.TargetLayerDialogResult<Layer> |
askTargetLayer(java.util.List<? extends Layer> targetLayers,
boolean showCheckbox,
java.lang.String checkbox,
boolean checkboxDefault,
java.lang.String buttonText)
Ask user to choose the target layer and shows a checkbox.
|
static <T extends Layer> |
askTargetLayer(T[] targetLayers,
java.lang.String label,
java.lang.String title,
java.lang.String buttonText,
java.lang.String buttonIcon)
Ask user to choose the target layer.
|
static <T extends Layer> |
askTargetLayer(T[] targetLayers,
java.lang.String label,
java.lang.String checkbox,
java.lang.String title,
java.lang.String buttonText,
java.lang.String buttonIcon,
boolean showCheckbox,
boolean checkboxDefault)
Ask user to choose the target layer.
|
protected void |
warnNoTargetLayersForSourceLayer(Layer sourceLayer)
Warns user when there no layers the source layer could be merged to.
|
buildActiveLayerChangeAdapter, buildLayerChangeAdapter, checkAndConfirmOutlyingOperation, destroy, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setHelpId, setTooltip, updateEnabledState, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFutureaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledpublic 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 AbstractMergeAction.TargetLayerDialogResult<Layer> askTargetLayer(java.util.List<? extends Layer> targetLayers, boolean showCheckbox, java.lang.String checkbox, boolean checkboxDefault, java.lang.String buttonText)
targetLayers - list of candidate target layers.showCheckbox - whether the checkbox is showncheckbox - The text of the checkbox shown to the user.checkboxDefault - whether the checkbox is ticked by defaultbuttonText - text of button used to select target layerAbstractMergeAction.TargetLayerDialogResult containing the chosen target layer and the state of the checkboxpublic 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 layerpublic static <T extends Layer> AbstractMergeAction.TargetLayerDialogResult<T> askTargetLayer(T[] targetLayers, java.lang.String label, java.lang.String checkbox, java.lang.String title, java.lang.String buttonText, java.lang.String buttonIcon, boolean showCheckbox, boolean checkboxDefault)
T - type of layertargetLayers - array of proposed target layerslabel - label displayed in dialogcheckbox - text of the checkbox displayedtitle - title of dialogbuttonText - text of button used to select target layerbuttonIcon - icon name of button used to select target layershowCheckbox - whether the checkbox is showncheckboxDefault - whether the checkbox is ticked by defaultAbstractMergeAction.TargetLayerDialogResult containing the chosen target layer and the state of the checkboxprotected void warnNoTargetLayersForSourceLayer(Layer sourceLayer)
sourceLayer - source layer