View Javadoc

1   package org.xrn.gui;
2   
3   import java.awt.Color;
4   import java.awt.Font;
5   
6   import javax.swing.JComponent;
7   import javax.swing.JLabel;
8   import javax.swing.JPanel;
9   import javax.swing.border.TitledBorder;
10  
11  /***
12   * 
13   * TODO Description
14   * @author Carsten Maneg
15   * Date Nov 7, 2004
16   * Time 6:24:16 PM
17   */
18  public class InformationPanel extends JPanel{
19      
20  	private JLabel status;
21  	private JLabel author;
22  	private String anfangstext = "NO RELEASE NOTES OPENED !";
23  //	private String authorS = "     E. Mercier & C. Maneg";
24  	private String authorS = "  Brain & Design by  E. Mercier & C. Maneg";
25  	private String text = "Current release notes : ";
26  	private String aktuelles_Verzeichnis = " ";
27  	private Font schriftTyp;
28  	
29  	/***
30  	 * Constructor
31  	 * @param breite
32  	 */
33  	public InformationPanel( int breite ){
34  	    setBorder( new TitledBorder( "" ) );
35  	    schriftTyp =  new Font( "Dialog", Font.BOLD, 12 );
36  	    setFont( schriftTyp );
37  	    setLayout( null );
38      
39  	    status = new JLabel( anfangstext );
40  	    status.setFont( schriftTyp );
41  	    dlgObjHinzufuegen( status, 10, 5, 500, 15  );
42  
43  	    author = new JLabel( authorS );
44  	    author.setFont( schriftTyp );
45  	    dlgObjHinzufuegen( author, breite - 250 , 5, 250, 15  );   
46      
47  	}
48  	
49  	/***
50  	 * Adds the component to the panel
51  	 * @param c - component
52  	 * @param x0
53  	 * @param y0
54  	 * @param breite
55  	 * @param hoehe
56  	 */
57  	public void dlgObjHinzufuegen( JComponent c, int x0, int y0, int breite, int hoehe ){
58  	    
59  	    c.setBounds( x0, y0, breite, hoehe );
60  	    c.setForeground( Color.black );
61  	    add(c);
62  	}
63  	
64  	/***  
65  	 * 
66  	 * @param pfad
67  	 */
68  	public void setStatus( String pfad ){
69  	    status.setText( text + pfad );
70  	}
71  }