Class DuplicateRelationAction
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.actions.relation.AbstractRelationAction
org.openstreetmap.josm.actions.relation.DuplicateRelationAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action,IPrimitiveAction,Destroyable
Creates a new relation with a copy of the current editor state
- Since:
- 5799
- See Also:
-
Field Summary
Fields inherited from class org.openstreetmap.josm.actions.relation.AbstractRelationAction
relationsFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate static booleanconfirmRelationDuplicate(Relation relation) static voidduplicateRelationAndLaunchEditor(Relation original) Duplicates the given relation and launches the relation editor for the created copy.private static booleanisEditableRelation(IRelation<?> r) protected voidOverride in subclasses to update the enabled state of the action when something changes.Methods inherited from class org.openstreetmap.josm.actions.relation.AbstractRelationAction
canDownload, canModify, destroy, getRelations, setHelpId, setPrimitivesMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
DuplicateRelationAction
public DuplicateRelationAction()Constructs a newDuplicateRelationAction.
-
-
Method Details
-
duplicateRelationAndLaunchEditor
Duplicates the given relation and launches the relation editor for the created copy.- Parameters:
original- The relation to duplicate
-
actionPerformed
-
isEditableRelation
-
updateEnabledState
Description copied from class:AbstractRelationActionOverride in subclasses to update the enabled state of the action when something changes.- Overrides:
updateEnabledStatein classAbstractRelationAction
-
confirmRelationDuplicate
-