View Javadoc

1   /*
2    * @(#)$Id: RecogniseAction.java 787 2010-03-27 15:06:04Z bpuype $
3    *
4    * Author		:	Ueli Kurmann, igesture@uelikurmann.ch
5    *                  
6    *
7    * Purpose		: 
8    *
9    * -----------------------------------------------------------------------
10   *
11   * Revision Information:
12   *
13   * Date				Who			Reason
14   *
15   * 23.03.2008			ukurmann	Initial Release
16   *
17   * -----------------------------------------------------------------------
18   *
19   * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20   *
21   * This software is the proprietary information of ETH Zurich.
22   * Use is subject to license terms.
23   * 
24   */
25  
26  
27  package org.ximtec.igesture.tool.view.testbench.action;
28  
29  import java.awt.event.ActionEvent;
30  
31  import org.sigtec.graphix.widget.BasicAction;
32  import org.ximtec.igesture.configuration.Configuration;
33  import org.ximtec.igesture.tool.GestureConstants;
34  import org.ximtec.igesture.tool.core.Command;
35  import org.ximtec.igesture.tool.core.Controller;
36  import org.ximtec.igesture.tool.service.GuiBundleService;
37  import org.ximtec.igesture.tool.view.testbench.TestbenchController;
38  
39  
40  /**
41   * Comment
42   * @version 1.0 23.03.2008
43   * @author Ueli Kurmann
44   */
45  public class RecogniseAction extends BasicAction {
46  
47     private Configuration configuration;
48     private Controller controller;
49  
50  
51     public RecogniseAction(Controller controller, Configuration configuration) {
52        super(GestureConstants.RECOGNISE, controller.getLocator().getService(
53              GuiBundleService.IDENTIFIER, GuiBundleService.class));
54        this.configuration = configuration;
55        this.controller = controller;
56     }
57  
58  
59     @Override
60     public void actionPerformed(ActionEvent arg0) {
61        
62        controller.execute(new Command(TestbenchController.CMD_RECOGNIZE,
63              configuration));
64     }
65  
66  }