01: /*
02: * Project: AMODA - Abstract Modeled Application
03: * Class: de.gulden.framework.amoda.environment.gui.component.AboutSplashWindow
04: * Version: snapshot-beautyj-1.1
05: *
06: * Date: 2004-09-29
07: *
08: * This is a snapshot version of the AMODA 0.2 development branch,
09: * it is not released as a seperate version.
10: * For AMODA, see http://amoda.berlios.de/.
11: *
12: * This is licensed under the GNU Lesser General Public License (LGPL)
13: * and comes with NO WARRANTY.
14: *
15: * Author: Jens Gulden
16: * Email: amoda@jensgulden.de
17: */
18:
19: package de.gulden.framework.amoda.environment.gui.component;
20:
21: /**
22: * Class AboutSplashWindow.
23: *
24: * @author Jens Gulden
25: * @version snapshot-beautyj-1.1
26: */
27: public class AboutSplashWindow extends javax.swing.JWindow {
28:
29: // ------------------------------------------------------------------------
30: // --- fields ---
31: // ------------------------------------------------------------------------
32:
33: private javax.swing.JPanel mainPanel;
34:
35: private javax.swing.JLabel aboutLabel;
36:
37: // ------------------------------------------------------------------------
38: // --- constructor ---
39: // ------------------------------------------------------------------------
40:
41: public AboutSplashWindow(java.awt.Frame parent) {
42: super (parent);
43: initComponents();
44: }
45:
46: // ------------------------------------------------------------------------
47: // --- methods ---
48: // ------------------------------------------------------------------------
49:
50: public void setAboutText(String text) {
51: aboutLabel.setText(text);
52: pack();
53: }
54:
55: private void initComponents() {
56: //GEN-BEGIN:initComponents
57: mainPanel = new javax.swing.JPanel();
58: aboutLabel = new javax.swing.JLabel();
59:
60: addWindowListener(new java.awt.event.WindowAdapter() {
61: public void windowClosing(java.awt.event.WindowEvent evt) {
62: closeDialog(evt);
63: }
64: });
65:
66: mainPanel.setLayout(new java.awt.BorderLayout());
67:
68: mainPanel.setBorder(new javax.swing.border.BevelBorder(
69: javax.swing.border.BevelBorder.RAISED));
70: aboutLabel
71: .setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
72: aboutLabel.setText("About...");
73: mainPanel.add(aboutLabel, java.awt.BorderLayout.CENTER);
74:
75: getContentPane().add(mainPanel, java.awt.BorderLayout.CENTER);
76:
77: pack();
78: }
79:
80: private void closeDialog(java.awt.event.WindowEvent evt) {
81: //GEN-FIRST:event_closeDialog
82: setVisible(false);
83: dispose();
84: }
85:
86: } // end AboutSplashWindow
|