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.project.ui.tool;
16:
17: import org.eclipse.core.commands.AbstractHandler;
18:
19: /**
20: * A convenience class.
21: *
22: * @author Jesse
23: * @since 1.1.0
24: */
25: public abstract class AbstractToolCommandHandler extends
26: AbstractHandler implements IToolHandler {
27:
28: private String currentCommandId;
29: private Tool currentTool;
30:
31: public void setTool(Tool tool) {
32: this .currentTool = tool;
33: }
34:
35: public void setCurrentCommandId(String currentCommandId) {
36: this .currentCommandId = currentCommandId;
37: }
38:
39: /**
40: * @return Returns the currentTool.
41: */
42: public Tool getCurrentTool() {
43: return currentTool;
44: }
45:
46: /**
47: * @return Returns the currentCommandId.
48: */
49: public String getCurrentCommandId() {
50: return currentCommandId;
51: }
52:
53: }
|