KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cmsinstaller > InstallingDialog


1 /* ===============================================================================
2  *
3  * Part of the InfoGlue Content Management Platform (www.infoglue.org)
4  *
5  * ===============================================================================
6  *
7  * Copyright (C)
8  *
9  * This program is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License version 2, as published by the
11  * Free Software Foundation. See the file LICENSE.html for more information.
12  *
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
19  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
20  *
21  * ===============================================================================
22  */

23
24 package org.infoglue.cmsinstaller;
25
26 import javax.swing.*;
27 import java.awt.*;
28
29 /**
30  * This is the main class for the installer.
31  */

32
33 public class InstallingDialog extends JPanel
34 {
35     private InfoGlueInstaller infoGlueInstaller = null;
36     
37     private final static String JavaDoc introductionHeader = "Installing InfoGlue CMS";
38     private final JTextArea textArea = new JTextArea("InfoGlue CMS is being installed. \n\n");
39     
40     public InstallingDialog(InfoGlueInstaller infoGlueInstaller)
41     {
42         this.infoGlueInstaller = infoGlueInstaller;
43         
44         this.setSize(450, 350);
45         this.setLayout(null);
46         this.setBackground(Color.white);
47         
48         JLabel introductionLabel = new JLabel(introductionHeader);
49         introductionLabel.setBounds(0, 0, 400, 30);
50         introductionLabel.setFont(new java.awt.Font JavaDoc("Dialog", java.awt.Font.BOLD, 16));
51         
52         textArea.setEditable(false);
53         //textArea.setBackground(Color.lightGray);
54
textArea.setBounds(0, 30, 400, 400);
55         textArea.setWrapStyleWord(true);
56         textArea.setLineWrap(true);
57         
58         this.add(introductionLabel);
59         this.add(textArea);
60         
61         infoGlueInstaller.installerSkeleton.backButton.hide();
62         infoGlueInstaller.installerSkeleton.nextButton.hide();
63     }
64         
65     public void paint(Graphics g)
66     {
67         Graphics2D g2 = (Graphics2D)g;
68         g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
69         g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
70
71         super.paint(g);
72     }
73     
74     public JTextArea getTextArea()
75     {
76         return textArea;
77     }
78 }
Popular Tags