1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 package org.ximtec.igesture.tool.view.admin.action;
27
28 import java.awt.event.ActionEvent;
29
30 import javax.swing.tree.TreePath;
31
32 import org.ximtec.igesture.core.GestureSet;
33 import org.ximtec.igesture.tool.GestureConstants;
34 import org.ximtec.igesture.tool.core.Controller;
35 import org.ximtec.igesture.tool.core.TreePathAction;
36 import org.ximtec.igesture.tool.view.admin.wrapper.GestureSetList;
37
38
39 public class RemoveGestureSetAction extends TreePathAction {
40
41
42 public RemoveGestureSetAction(Controller controller, TreePath treePath) {
43 super(GestureConstants.GESTURE_SET_DEL, controller, treePath);
44 }
45
46
47 @Override
48 public void actionPerformed(ActionEvent arg0) {
49 GestureSet gestureSet = (GestureSet)getTreePath().getLastPathComponent();
50 GestureSetList rootSet = (GestureSetList)getTreePath().getParentPath().getLastPathComponent();
51 rootSet.removeGestureSet(gestureSet);
52
53 }
54
55 }