Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: ide/vide.java


1   /* **********************************
2    File: vide.java
3    Author: Lucian Ghita Felix(felix@ulise.cs.pub.ro)
4    Created on  03/25/98
5    Comments: Part of the vIDE Project
6               Copyright 1999 the vIDE Team.
7   ***********************************/
8   
9   package ide;
10  
11  
12  import java.awt.*;
13  import javax.swing.*;
14  import javax.swing.border.*;
15  
16  
17  /**
18  * vide IDE launcher class
19  *
20  * @version 1.0 03/25/98
21  * @author 
22  */
23  public class vide {
24  
25    /**
26     * this should be set to the basse installation dir
27     */
28    public static String baseDir;
29    
30    static {
31      if (System.getProperty("vide.home") == null) {
32        throw new RuntimeException("environment variabile \"VIDE_HOME\" not set. Please check up the README file.");
33      }
34      System.out.println("user.dir = " + System.getProperty("user.dir") +
35                         "\n vide.home = " + System.getProperty("vide.home"));
36      baseDir = System.getProperty("vide.home") + java.io.File.separatorChar;
37    }
38    
39    public static SplashScreen spl = new SplashScreen(new ImageIcon(vide.baseDir + "images/splash.gif"));
40    public static final String PROJECT_VERSION = "1.0 beta";
41    public static String laf = "Metal";
42    public static void main( String[] args ) {
43      System.out.println("Starting vide...");
44          vide.spl.showStatus("Starting...");
45  
46          JFrame frame;      
47          frame = new VeriSimFrame();
48          
49          /*if ((args[1] == null) || (args[1].startsWith("metal")));
50          else if (args[1].startsWith("motif")) laf = "com.sun.java.swing.plaf.windows.MotifLookAndFeel"; 
51          else if (args[1].startsWith("windows")) laf = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
52          else  System.out.println("I never heard of this look and feel: " + args[1] + ".Using Metal.");
53          */
54          try {
55            //javax.swing.plaf.metal.MetalLookAndFeel.setCurrentTheme( new javax.swing.plaf.metal.DefaultMetalTheme());
56            //  UIManager.setLookAndFeel(laf);
57            //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
58            //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
59            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
60            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
61            UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
62          }
63          catch ( UnsupportedLookAndFeelException e ) {
64            System.out.println (laf + "Look & Feel not supported on this platform. \nProgram Terminated");
65            System.exit(0);
66          }
67          catch ( IllegalAccessException e ) {
68            System.out.println (laf + " Look & Feel could not be accessed. \nProgram Terminated");
69            System.exit(0);
70          }
71          catch ( ClassNotFoundException e ) {
72            System.out.println (laf + " Look & Feel could not found. \nProgram Terminated");
73            System.exit(0);
74          }
75          catch ( InstantiationException e ) {
76            System.out.println (laf + " Look & Feel could not be instantiated. \nProgram Terminated");
77            System.exit(0);
78          }
79          catch ( Exception e ) {
80            System.out.println ("Fatal error. \nProgram Terminated");
81            e.printStackTrace();
82            System.exit(0);
83          }
84          
85          spl.toFront();
86          spl.showStatus("Done.");
87          spl.close();
88          spl = null;
89          
90          frame.setVisible(true);
91    }
92  }