View Javadoc

1   
2   package org.xrn.gui;
3   
4   import javax.swing.JFrame;
5   import javax.swing.UIManager;
6   
7   /***
8    * 
9    * Main class to start the application. Set the look&feel and open the main window
10   * @author Carsten Maneg
11   * Date Nov 7, 2004
12   * Time 5:40:05 PM
13   */
14  
15  public class StartXMLReleaseNotes{
16  
17  	private static final String ERRORMESSAGE = "ERROR ! Can't find Look&Feel.";
18  	
19  	/***
20  	 * @param args
21  	 * 
22  	 */
23  	public static void main( String args[ ] ){
24  		
25  		try{
26  			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
27  			
28  //			UIDefaults def = UIManager.getDefaults();
29  //			Set set = def.entrySet();
30  //			Iterator it = set.iterator();
31  //			Object test = null;
32  //			while( it.hasNext() ){
33  //			    test = it.next();
34  //			}
35  //			
36  //			
37  //			Enumeration enum = def.keys();
38  //			Object ob = null;
39  //			Object value = null;
40  //			while( enum.hasMoreElements() ){
41  //			    ob = enum.nextElement();
42  //			    value = def.get( ob );
43  //			    if( ob.toString().startsWith("Button") && value instanceof ColorUIResource ){
44  //			        ColorUIResource colorUI = (ColorUIResource)value;
45  //			        int red = colorUI.getRed();
46  //			        int blue = colorUI.getBlue();
47  //			        int green = colorUI.getGreen();
48  //			        Color col = new Color( red, green, blue );
49  //				    System.out.print( ob.toString() );
50  //				    if( col.equals( Color.black ) )
51  //					    System.out.println( "  " + "BLACK" );
52  //				    else if( col.equals( Color.white ) )
53  //					    System.out.println( "  " + "WHITE" );
54  //				    else if( col.equals( Color.blue ) )
55  //					    System.out.println( "  " + "BLUE" );
56  //				    else if( col.equals( Color.red ) )
57  //					    System.out.println( "  " + "RED" );
58  //				    else if( col.equals( Color.green ) )
59  //					    System.out.println( "  " + "GREEN" );
60  //				    else if( col.equals( Color.gray ) )
61  //					    System.out.println( "  " + "GRAY" );
62  //				    else
63  //				        System.out.println( "  " + col.toString() );
64  //			    }
65  //			    String s = value.toString();
66  //			    if( ob.toString().startsWith("Button") ){
67  //			        System.out.print( ob.toString() );
68  //			        System.out.println( " " + s );
69  //			    }
70  //			}
71  //			UIManager.getDefaults().put( "Button.showMnemonics", Boolean.TRUE );
72  			
73  			JFrame f = new XRNMainWindow( );
74  		}
75  		catch(Exception ex){
76  			MessageWindow.mitteilung( ERRORMESSAGE + '\n' + "Details: " + ex.getMessage() );
77  		}
78      }
79  }