X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=src%2Ftim%2Fprune%2Fgui%2FFunctionLauncher.java;fp=src%2Ftim%2Fprune%2Fgui%2FFunctionLauncher.java;h=e8464129b2cda68270e39bea3d856a278670f0bd;hp=0000000000000000000000000000000000000000;hb=ce6f2161b8596f7018d6a76bff79bc9e571f35fd;hpb=2d8cb72e84d5cc1089ce77baf1e34ea3ea2f8465 diff --git a/src/tim/prune/gui/FunctionLauncher.java b/src/tim/prune/gui/FunctionLauncher.java new file mode 100644 index 0000000..e846412 --- /dev/null +++ b/src/tim/prune/gui/FunctionLauncher.java @@ -0,0 +1,33 @@ +package tim.prune.gui; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import tim.prune.GenericFunction; + +/** + * Class to launch a function triggered by an action + */ +public class FunctionLauncher implements ActionListener +{ + /** Function to launch */ + private GenericFunction _function = null; + + /** + * Constructor + * @param inFunction function to launch + */ + public FunctionLauncher(GenericFunction inFunction) + { + _function = inFunction; + } + + /** + * React to action + * @param e event + */ + public void actionPerformed(ActionEvent e) + { + _function.begin(); + } + +} \ No newline at end of file