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
27 package org.ximtec.igesture.tool.view.testbench.action;
28
29 import java.awt.event.ActionEvent;
30
31 import javax.swing.tree.TreePath;
32
33 import org.ximtec.igesture.configuration.Configuration;
34 import org.ximtec.igesture.tool.GestureConstants;
35 import org.ximtec.igesture.tool.core.Controller;
36 import org.ximtec.igesture.tool.core.TreePathAction;
37 import org.ximtec.igesture.tool.view.testbench.wrapper.AlgorithmWrapper;
38
39
40
41
42
43
44
45
46 public class RemoveConfigurationAction extends TreePathAction {
47
48 public RemoveConfigurationAction(Controller controller, TreePath treePath) {
49 super(GestureConstants.CONFIGURATION_DEL, controller, treePath);
50 }
51
52 @Override
53 public void actionPerformed(ActionEvent arg0) {
54 Configuration configuration = (Configuration)getTreePath().getLastPathComponent();
55 AlgorithmWrapper algorithWrapper = (AlgorithmWrapper)getTreePath().getParentPath().getLastPathComponent();
56
57 algorithWrapper.removeConfiguration(configuration);
58
59 }
60
61 }