View Javadoc

1   /***
2    * 
3    */
4   package org.telscenter.pas.ui.beans.issueReporter;
5   
6   import java.awt.BorderLayout;
7   import java.awt.Component;
8   import java.awt.FlowLayout;
9   
10  import javax.swing.BorderFactory;
11  import javax.swing.JButton;
12  import javax.swing.JPanel;
13  import javax.swing.JTabbedPane;
14  import javax.swing.JTextArea;
15  
16  import org.telscenter.pas.common.ui.CommonUI;
17  import org.telscenter.pas.common.ui.layouts.EqualsLayout;
18  import org.telscenter.pas.common.ui.tab.PasTabbedPaneUI;
19  import org.telscenter.pas.steps.actions.DialogSaveAction;
20  import org.telscenter.pas.ui.beans.issueReporter.actions.ReportIssueAction;
21  import org.telscenter.pas.ui.util.PasColors;
22  
23  /***
24   * @author aperritano
25   *
26   */
27  public class AboutUI extends JPanel {
28  	
29  	public AboutUI() {
30  		setBackground(PasColors.issueReporterBackgroundColor);
31  		
32  		JTabbedPane tabbedPane = new JTabbedPane();
33  		
34  		tabbedPane.setBackground(PasColors.issueReporterBorderColor);
35  		tabbedPane.setUI(new PasTabbedPaneUI());
36  		
37  		tabbedPane.addTab("About Pas", createAboutPanel());
38  		
39  		add(tabbedPane, BorderLayout.CENTER);
40  	}
41  
42  	/***
43  	 * @return
44  	 */
45  	protected Component createAboutPanel() {
46  		JPanel reportPanel = new JPanel(new BorderLayout(0,0));
47  		reportPanel.setBorder(BorderFactory.createLineBorder(PasColors.issueReporterBorderColor, 2));
48  
49  		JPanel innerPanel = new JPanel(new BorderLayout(0, 0));
50  
51  		JTextArea aboutText = new JTextArea();
52  		aboutText.setText("TELS SAIL & Pas framework developers\n\n" +
53  				"University California Berkeley Team:\n\n" +
54  				"	Turadg Aleahmad\n" +
55  				"	Anthony Perritano\n\n" +
56  				"Concord Consortium Team:\n\n" +
57  				"	Edward Burke\n" +
58  				"	Scott Cytacki\n\n" +
59  				"TELS is a NSF Funded Project"); 
60  		aboutText.setEditable(false);
61  		aboutText.setBackground(PasColors.issueReporterReportBackgroundColor);
62  		aboutText.setOpaque(false);
63  		innerPanel.add(aboutText, BorderLayout.NORTH);
64  		innerPanel.setOpaque(false);
65  		
66  		reportPanel.add(innerPanel, BorderLayout.CENTER);
67  		reportPanel.setBackground(PasColors.issueReporterReportBackgroundColor);
68  		reportPanel.add(createButtonPanel(),BorderLayout.SOUTH);
69  		return reportPanel;
70  	}
71  
72  	protected JPanel createButtonPanel() {
73  		JButton cancelButton = new JButton();
74  
75  		cancelButton.setAction(new DialogSaveAction("Ok")); //$NON-NLS-1$
76  
77  		cancelButton = CommonUI.makeEnhancedButton(cancelButton);
78  		JPanel buttonPanel = new JPanel();
79  		buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
80  		buttonPanel.add(cancelButton);
81  
82  		buttonPanel.setOpaque(false);
83  		return buttonPanel;
84  	}
85  
86  }