Ejemplo n.º 1
0
 private static Subsystem initTrayIcon(Subsystem core) throws Throwable {
   try {
     if (T.t) {
       T.info("Starting Java 6 tray icon...");
     }
     Subsystem tray =
         (Subsystem)
             Class.forName("org.alliance.launchers.ui.Java6TrayIconSubsystem").newInstance();
     tray.init(ResourceSingelton.getRl(), core);
     return tray;
   } catch (Throwable e) {
     if (T.t) {
       T.warn("Java 6 tray icon not supported. Falling back to old code.");
     }
     Subsystem tray =
         (Subsystem)
             Class.forName("org.alliance.launchers.ui.JDesktopTrayIconSubsystem").newInstance();
     tray.init(ResourceSingelton.getRl(), core);
     return tray;
   }
 }
Ejemplo n.º 2
0
 public static void initUI(Subsystem core) {
   try {
     System.out.println("starting ui");
     SimpleTimer s = new SimpleTimer();
     Subsystem ui = (Subsystem) Class.forName("org.alliance.ui.UISubsystem").newInstance();
     ui.init(ResourceSingelton.getRl(), core);
     if (T.t) {
       T.trace("Subsystem UI started in " + s.getTime());
     }
   } catch (Exception t) {
     reportError(t);
   }
 }
Ejemplo n.º 3
0
 private static Subsystem initCore(String settings, StartupProgressListener l) {
   try {
     SimpleTimer s = new SimpleTimer();
     Subsystem core = (Subsystem) Class.forName("org.alliance.core.CoreSubsystem").newInstance();
     core.init(ResourceSingelton.getRl(), settings, l);
     if (T.t) {
       T.info("" + "Subsystem CORE started in " + s.getTime());
     }
     return core;
   } catch (Throwable t) {
     reportError(t);
     System.err.println(t);
     return null;
   }
 }
 private synchronized void openUI() {
   try {
     if (ui != null) {
       if (T.t) {
         T.info("Subsystem already started.");
       }
       core.uiToFront();
       return;
     }
     Runnable r = (Runnable) Class.forName("org.alliance.launchers.SplashWindow").newInstance();
     SimpleTimer s = new SimpleTimer();
     ui = (Subsystem) Class.forName("org.alliance.ui.UISubsystem").newInstance();
     ui.init(ResourceSingelton.getRl(), core, r);
     if (T.t) {
       T.trace("Subsystem UI started in " + s.getTime());
     }
     r.run();
   } catch (Exception t) {
     core.reportError(t, this);
   }
 }
Ejemplo n.º 5
0
 private void ui() throws Exception {
   Runnable r = (Runnable) Class.forName("org.alliance.launchers.SplashWindow").newInstance();
   ui = (Subsystem) Class.forName("org.alliance.ui.UISubsystem").newInstance();
   ui.init(ResourceSingelton.getRl(), core);
   r.run(); // closes splashwindow
 }