Changeset 1820 in josm for trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java
- Timestamp:
- 2009-07-21T19:52:53+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java
r1814 r1820 11 11 import org.openstreetmap.josm.tools.Shortcut; 12 12 13 public class SelectAllAction extends JosmAction implements LayerChangeListener{13 public class SelectAllAction extends JosmAction { 14 14 15 15 public SelectAllAction() { 16 16 super(tr("Select All"),"selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."), 17 17 Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.GROUP_MENU), true); 18 Layer.listeners.add(this);19 refreshEnabled();20 18 } 21 19 … … 30 28 * 31 29 */ 32 protected void refreshEnabled() { 30 @Override 31 protected void updateEnabledState() { 33 32 setEnabled(getEditLayer() != null); 34 33 } 35 36 /* ---------------------------------------------------------------------------------- */37 /* Interface LayerChangeListener */38 /* ---------------------------------------------------------------------------------- */39 public void activeLayerChange(Layer oldLayer, Layer newLayer) {40 refreshEnabled();41 }42 43 public void layerAdded(Layer newLayer) {44 refreshEnabled();45 }46 47 public void layerRemoved(Layer oldLayer) {48 refreshEnabled();49 }50 34 }
Note:
See TracChangeset
for help on using the changeset viewer.