01: package fr.aliacom.form.swt.events;
02:
03: import org.eclipse.swt.events.SelectionEvent;
04: import org.eclipse.swt.events.SelectionListener;
05:
06: import fr.aliacom.commands.Command;
07:
08: /**
09: * @author tom
10: *
11: * (C) 2001, 2002 Thomas Cataldo
12: */
13: public class CommandSelectionListener implements SelectionListener {
14:
15: private Command theCommand;
16:
17: public CommandSelectionListener(Command c) {
18: theCommand = c;
19: }
20:
21: /**
22: * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
23: */
24: public void widgetSelected(SelectionEvent arg0) {
25: theCommand.run();
26: }
27:
28: /**
29: * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
30: */
31: public void widgetDefaultSelected(SelectionEvent arg0) {
32: }
33:
34: }
|