source: josm/trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java@ 4067

Last change on this file since 4067 was 2512, checked in by stoecker, 14 years ago

i18n updated, fixed files to reduce problems when applying patches, fix #4017

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
6
7import java.awt.event.ActionEvent;
8import java.awt.event.KeyEvent;
9
10import org.openstreetmap.josm.tools.Shortcut;
11
12public class SelectAllAction extends JosmAction {
13
14 public SelectAllAction() {
15 super(tr("Select All"),"selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."),
16 Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.GROUP_MENU), true);
17 putValue("help", ht("/Action/SelectAll"));
18 }
19
20 public void actionPerformed(ActionEvent e) {
21 if (!isEnabled())
22 return;
23 getCurrentDataSet().setSelected(getCurrentDataSet().allNonDeletedCompletePrimitives());
24 }
25
26 /**
27 * Refreshes the enabled state
28 *
29 */
30 @Override
31 protected void updateEnabledState() {
32 setEnabled(getEditLayer() != null);
33 }
34}
Note: See TracBrowser for help on using the repository browser.