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