]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/ModuleEditor/src/org/tianocore/packaging/module/ui/ModuleAbout.java
3 To show a about window with copyright information
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
.packaging
.module
.ui
;
18 import java
.awt
.event
.ActionEvent
;
19 import java
.awt
.event
.WindowEvent
;
21 import javax
.swing
.JButton
;
22 import javax
.swing
.JLabel
;
23 import javax
.swing
.JPanel
;
25 import org
.tianocore
.packaging
.common
.ui
.IDialog
;
28 The class is used to show a about window with copyright information
31 @since ModuleEditor 1.0
34 public class ModuleAbout
extends IDialog
{
37 /// Define class Serial Version UID
39 private static final long serialVersionUID
= 2958136136667310962L;
42 //Define class members
44 private JPanel jContentPane
= null;
46 private JLabel jLabel
= null;
48 private JLabel jLabel1
= null;
50 private JLabel jLabel2
= null;
52 private JButton jButtonOK
= null;
55 This method initializes jButtonOK
57 @return javax.swing.JButton jButtonOK
60 private JButton
getJButtonOK() {
61 if (jButtonOK
== null) {
62 jButtonOK
= new JButton();
63 jButtonOK
.setBounds(new java
.awt
.Rectangle(105, 120, 90, 20));
64 jButtonOK
.setText("OK");
65 jButtonOK
.addActionListener(this);
70 public static void main(String
[] args
) {
74 This is the default constructor
77 public ModuleAbout() {
83 This method initializes this
87 this.setSize(300, 200);
88 this.setContentPane(getJContentPane());
89 this.setTitle("About...");
90 this.getRootPane().setDefaultButton(jButtonOK
);
92 this.setVisible(true);
96 This method initializes jContentPane
98 @return javax.swing.JPanel jContentPane
101 private JPanel
getJContentPane() {
102 if (jContentPane
== null) {
103 jLabel2
= new JLabel();
104 jLabel2
.setBounds(new java
.awt
.Rectangle(15, 80, 270, 20));
105 jLabel2
.setHorizontalAlignment(javax
.swing
.SwingConstants
.CENTER
);
106 jLabel2
.setText("All rights reserved");
107 jLabel1
= new JLabel();
108 jLabel1
.setBounds(new java
.awt
.Rectangle(15, 50, 270, 20));
109 jLabel1
.setHorizontalAlignment(javax
.swing
.SwingConstants
.CENTER
);
110 jLabel1
.setText("Copyright (c) 2006, Intel Corporation");
111 jLabel
= new JLabel();
112 jLabel
.setToolTipText("");
113 jLabel
.setBounds(new java
.awt
.Rectangle(15, 20, 270, 20));
114 jLabel
.setHorizontalAlignment(javax
.swing
.SwingConstants
.CENTER
);
115 jLabel
.setText("Framework Development Package System 1.0");
116 jContentPane
= new JPanel();
117 jContentPane
.setLayout(null);
118 jContentPane
.add(jLabel
, null);
119 jContentPane
.add(jLabel1
, null);
120 jContentPane
.add(jLabel2
, null);
121 jContentPane
.add(getJButtonOK(), null);
127 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
129 * Override actionPerformed to listen all actions
131 public void actionPerformed(ActionEvent arg0
) {
132 if (arg0
.getSource() == jButtonOK
) {
138 Dispose when windows is closing
143 public void windowClosing(WindowEvent arg0
) {