1
2
3
4 package org.ximtec.igesture.tool.view.admin.action;
5
6 import java.awt.event.ActionEvent;
7
8 import javax.swing.tree.TreePath;
9
10 import org.ximtec.igesture.core.GestureClass;
11 import org.ximtec.igesture.core.SampleDescriptor3D;
12 import org.ximtec.igesture.tool.GestureConstants;
13 import org.ximtec.igesture.tool.core.Controller;
14 import org.ximtec.igesture.tool.core.TreePathAction;
15
16
17
18
19
20 public class AddSampleDescriptor3DAction extends TreePathAction {
21
22 public AddSampleDescriptor3DAction(Controller controller, TreePath treePath) {
23 super(GestureConstants.SAMPLE_DESCRIPTOR_3D_ADD, controller, treePath);
24 }
25
26
27
28
29 @Override
30 public void actionPerformed(ActionEvent e) {
31 GestureClass gestureClass = (GestureClass) getTreePath().getLastPathComponent();
32 gestureClass.addDescriptor(new SampleDescriptor3D());
33 }
34
35 }