Package org.luisa

Source Code of org.luisa.Luisa

package org.luisa;



import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.luisa.menu.LuisaMenu;

import java.io.InputStream;

public class Luisa
{
   private final Shell shell;
   private LuisaMenu luisaMenu;

   /** Default constructor, loads preferences, initializes plugins and GUI. */
   public Luisa(Shell shell)
   {
      super();
      this.shell = shell;
     
     
      setTitle();
      luisaMenu = new LuisaMenu(shell);
   }


   private void setTitle()
   {
      shell.setText("Luisa - Lucene Index tool, v 0.1 (2009-12-19)");
      shell.setSize(800, 600);
   }


   public Shell getShell()
   {
      return shell;
   }

   /**
    * @param args
    */
   public static void main(String[] args)
   {

      Display display = new Display();
      Shell shell = new Shell(display);

      InputStream res = Luisa.class.getResourceAsStream("/img/luke.gif");
      if (res != null)
      {

         Image image = new Image(display, res);
         shell.setImage(image);

      }
      Luisa swtLuke = new Luisa(shell);
      shell.open();
      while (!shell.isDisposed())
      {
         if (!display.readAndDispatch())
            display.sleep();
      }

      display.dispose();

   }

}
TOP

Related Classes of org.luisa.Luisa

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.