Class TagTable.DeleteAction
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.gui.tagging.TagTable.DeleteAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action,ListSelectionListener
- Enclosing class:
- TagTable
Action to be run when the user invokes a delete action on the table, for
instance by pressing DEL.
Depending on the shape on the current selection the action deletes individual values or entire tags from the model.
If the current selection consists of cells in the second column only, the keys of the selected tags are set to the empty string.
If the current selection consists of cell in the third column only, the values of the selected tags are set to the empty string.
If the current selection consists of cells in the second and the third column, the selected tags are removed from the model.
This action listens to the table selection. It becomes enabled when the selection is non-empty, otherwise it is disabled.
-
Field Summary
Fields 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 TypeMethodDescriptionvoidprotected voiddelete a selection of tag namesprotected voiddelete a selection of tagsprotected voiddelete a selection of tag valuesprotected final voidvoidlistens to the table selection modelMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
DeleteAction
-
-
Method Details
-
deleteTagNames
delete a selection of tag names -
deleteTagValues
delete a selection of tag values -
deleteTags
delete a selection of tags -
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
valueChanged
listens to the table selection model- Specified by:
valueChangedin interfaceListSelectionListener
-
updateEnabledState
-