Package org.mibew.notifier

Source Code of org.mibew.notifier.NotifyApp

package org.mibew.notifier;

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.mibew.api.MibewAgent;
import org.mibew.notifier.Options.JOptions;

public class NotifyApp {

  public static void main(String[] args) {
        Display display = new Display();
        Shell shell = new Shell(display);

        Options options = new JOptions(shell, args);
    if (!options.load()) {
      return;
    }

    MibewTray tray = new MibewTray();
    MibewAgent agent = new MibewAgent(options.getAgentOptions(), tray);
    agent.launch();

    tray.initTray(display, shell, agent);
 
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch())
        display.sleep();
    }
        tray.dispose();
        agent.stop();
    display.dispose();
        System.exit(0);
  }
}
TOP

Related Classes of org.mibew.notifier.NotifyApp

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.