View Javadoc

1   package org.ximtec.igesture.tool.core;
2   
3   import org.sigtec.graphix.widget.BasicAction;
4   import org.ximtec.igesture.tool.locator.Locator;
5   import org.ximtec.igesture.tool.service.GuiBundleService;
6   
7   public abstract class LocateableAction extends BasicAction{
8   	
9   	private Locator locator;
10  	
11  	/**
12  	 * Sets the application locator
13  	 * @param locator
14  	 */
15  	public LocateableAction(String key, Locator locator){
16  		super(key,locator.getService(
17  	            GuiBundleService.IDENTIFIER, GuiBundleService.class));
18  		setLocator(locator);
19  	}
20  	
21  	/**
22  	 * Returns the applications locator
23  	 * @return the applications locator
24  	 */
25  	public Locator getLocator(){
26  		return this.locator;
27  	}
28  	
29  	/**
30  	 * Sets the applications locator
31  	 * @param locator the applications locator
32  	 */
33  	public void setLocator(Locator locator){
34  		this.locator = locator;
35  	}
36  
37  }