]> gitweb.fperrin.net Git - GpsPrune.git/blob - tim/prune/gui/FunctionLauncher.java
Version 8, September 2009
[GpsPrune.git] / tim / prune / gui / FunctionLauncher.java
1 package tim.prune.gui;
2
3 import java.awt.event.ActionEvent;
4 import java.awt.event.ActionListener;
5 import tim.prune.GenericFunction;
6
7 /**
8  * Class to launch a function triggered by an action
9  */
10 public class FunctionLauncher implements ActionListener
11 {
12         /** Function to launch */
13         private GenericFunction _function = null;
14
15         /**
16          * Constructor
17          * @param inFunction function to launch
18          */
19         public FunctionLauncher(GenericFunction inFunction)
20         {
21                 _function = inFunction;
22         }
23
24         /**
25          * React to action
26          * @param e event
27          */
28         public void actionPerformed(ActionEvent e)
29         {
30                 _function.begin();
31         }
32
33 }