01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package net.refractions.udig.tool.select;
16:
17: import net.refractions.udig.project.ui.tool.AbstractActionTool;
18:
19: /**
20: * Action that clears the selection of the map.
21: *
22: * @author Jesse
23: * @since 1.0.0
24: */
25: public class ClearSelection extends AbstractActionTool {
26:
27: public ClearSelection() {
28: }
29:
30: public void run() {
31: getContext().sendASyncCommand(
32: getContext().getEditFactory()
33: .createNullEditFeatureCommand());
34: getContext().sendASyncCommand(
35: getContext().getSelectionFactory()
36: .createNoSelectCommand());
37: }
38:
39: public void dispose() {
40: // TODO Auto-generated method stub
41:
42: }
43:
44: }
|