01: package fr.aliacom.form.swt;
02:
03: import fr.aliacom.common.ui.ISplashScreen;
04: import fr.aliacom.common.ui.IconFactory;
05: import fr.aliacom.form.common.FormManager;
06: import fr.aliacom.form.common.IApplication;
07: import fr.aliacom.form.common.IForm;
08: import fr.aliacom.form.common.ToolkitManager;
09:
10: /**
11: * @author tom
12: *
13: * (C) 2001, 2003 Thomas Cataldo
14: */
15: public final class SWTAppRunner implements Runnable {
16:
17: private IApplication app;
18: private ISplashScreen splash;
19:
20: public SWTAppRunner(IApplication app, ISplashScreen splash) {
21: this .app = app;
22: this .splash = splash;
23: }
24:
25: public void run() {
26: IForm form = FormManager.getInstance()
27: .createForm(app.getStartupFormName(),
28: app.getStartupContext(splash));
29: form.setIcon(IconFactory.get(app.getIconName()));
30: ToolkitManager.getToolkit().setMainWindow(form);
31: app.mainWindowRealized(form);
32: }
33:
34: }
|