1. Fix EDKT328 Splash Screen Text is recommended to be modified.
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / SplashScreen.java
CommitLineData
7f492c43 1/** @file\r
2 \r
3 To show a splash screen when starting\r
4 \r
5 Copyright (c) 2006, Intel Corporation\r
6 All rights reserved. This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10 \r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13 \r
14 **/\r
15\r
16package org.tianocore.frameworkwizard;\r
17\r
18import javax.swing.ImageIcon;\r
19import javax.swing.JLabel;\r
20import javax.swing.JPanel;\r
21import javax.swing.JRootPane;\r
22\r
23import org.tianocore.frameworkwizard.common.DataType;\r
24import org.tianocore.frameworkwizard.common.ui.IFrame;\r
25\r
26public class SplashScreen extends IFrame {\r
27\r
28 ///\r
29 /// Serial Version UID\r
30 ///\r
31 private static final long serialVersionUID = 1077736364497801470L;\r
32\r
33 private JPanel jContentPane = null; // @jve:decl-index=0:visual-constraint="10,54"\r
34\r
35 private JLabel jLabelImage = null;\r
36 \r
37 private JLabel jLabel = null;\r
38\r
39 private JLabel jLabel1 = null;\r
40\r
41 private JLabel jLabel2 = null;\r
42\r
43\r
44 /**\r
45 * This is the default constructor\r
46 */\r
47 public SplashScreen() {\r
48 super();\r
49 init();\r
50 }\r
51\r
52 /**\r
53 * This method initializes this\r
54 * \r
55 * @return void\r
56 */\r
57 private void init() {\r
58 this.setSize(320, 205);\r
59 this.setUndecorated(true);\r
60 this.setContentPane(getJContentPane());\r
61 this.getRootPane().setWindowDecorationStyle(JRootPane.NONE);\r
62 this.setTitle("Init");\r
63 this.centerWindow();\r
64 }\r
65\r
66 /**\r
67 * This method initializes jContentPane\r
68 * \r
69 * @return javax.swing.JPanel\r
70 */\r
71 private JPanel getJContentPane() {\r
72 if (jContentPane == null) {\r
73 jLabelImage = new JLabel();\r
74 jLabelImage.setBounds(new java.awt.Rectangle(63, 20, 193, 58));\r
75 jLabelImage.setIcon(new ImageIcon(getClass().getResource("/resources/images/logo.gif")));\r
76\r
77 jLabel2 = new JLabel();\r
78 jLabel2.setBounds(new java.awt.Rectangle(25, 120, 270, 20));\r
79 jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r
80 jLabel2.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));\r
f5b7798e 81 jLabel2.setText("Initializing...");\r
7f492c43 82 jLabel1 = new JLabel();\r
83 jLabel1.setBounds(new java.awt.Rectangle(3,166,270,20));\r
84 jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\r
85 jLabel1.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 8));\r
86 jLabel1.setText("Copyright (c) 2006, Intel Corporation");\r
87 jLabel = new JLabel();\r
88 jLabel.setToolTipText("");\r
89 jLabel.setBounds(new java.awt.Rectangle(25, 90, 270, 20));\r
90 jLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r
91 jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 18));\r
92 jLabel.setText(DataType.PROJECT_NAME + " " + DataType.PROJECT_VERSION);\r
93 jContentPane = new JPanel();\r
94 jContentPane.setLayout(null);\r
95 jContentPane.setSize(new java.awt.Dimension(320,199));\r
96 jContentPane.setBackground(java.awt.SystemColor.inactiveCaptionText);\r
97 jContentPane.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\r
98 jContentPane.add(jLabel, null);\r
99 jContentPane.add(jLabel1, null);\r
100 jContentPane.add(jLabel2, null);\r
101 jContentPane.add(jLabelImage, null);\r
102 }\r
103 return jContentPane;\r
104 }\r
105\r
106}\r