public class DownloadReferrersAction extends JosmAction
scchangeSupport, enabledACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON| Constructor and Description |
|---|
DownloadReferrersAction() |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
static void |
downloadReferrers(OsmDataLayer targetLayer,
Collection<OsmPrimitive> children)
Downloads the primitives referring to the primitives in
primitives
into the target layer targetLayer. |
static void |
downloadReferrers(OsmDataLayer targetLayer,
long id,
OsmPrimitiveType type)
Downloads the primitives referring to the primitive given by
id and
type. |
static void |
downloadReferrers(OsmDataLayer targetLayer,
Map<Long,OsmPrimitiveType> children)
Downloads the primitives referring to the primitives in
primitives
into the target layer targetLayer. |
protected void |
updateEnabledState()
Override in subclasses to update the enabled state of the action when
something in the JOSM state changes, i.e. when a layer is removed or added.
|
protected void |
updateEnabledState(Collection<? extends OsmPrimitive> selection)
Override in subclasses to update the enabled state of the action if the
collection of selected primitives changes.
|
destroy, getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltipaddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledpublic DownloadReferrersAction()
public static void downloadReferrers(OsmDataLayer targetLayer, Collection<OsmPrimitive> children) throws IllegalArgumentException
primitives
into the target layer targetLayer.
Does nothing if primitives is null or empty.targetLayer - the target layer. Must not be null.children - the collection of child primitives.IllegalArgumentException - thrown if targetLayer is nullpublic static void downloadReferrers(OsmDataLayer targetLayer, Map<Long,OsmPrimitiveType> children) throws IllegalArgumentException
primitives
into the target layer targetLayer.
Does nothing if primitives is null or empty.targetLayer - the target layer. Must not be null.children - the collection of primitives, given as map of ids and typesIllegalArgumentException - thrown if targetLayer is nullpublic static void downloadReferrers(OsmDataLayer targetLayer, long id, OsmPrimitiveType type) throws IllegalArgumentException
id and
type.targetLayer - the target layer. Must not be null.id - the primitive id. id > 0 required.type - the primitive type. type != null requiredIllegalArgumentException - thrown if targetLayer is nullIllegalArgumentException - thrown if id <= 0IllegalArgumentException - thrown if type == nullpublic void actionPerformed(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()protected void updateEnabledState(Collection<? extends OsmPrimitive> selection)
JosmActionupdateEnabledState in class JosmActionselection - the collection of selected primitives; may be empty, but not nullJosmAction.updateEnabledState(),
JosmAction.initEnabledState()