KickJava   Java API By Example, From Geeks To Geeks.

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


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 javax.swing.border.BevelBorder JavaDoc;
28
29 import java.awt.*;
30
31 /**
32  * This is the main class for the installer.
33  */

34
35 public class IntroductionDialog extends JPanel
36 {
37     private InfoGlueInstaller infoglueInstaller = null;
38     
39     private final static String JavaDoc introductionHeader = "Welcome to the installation of InfoGlue CMS";
40     private final static String JavaDoc introductionMessage = "This wizard will take you through the different steps of setting up InfoGlue to work on your server.\n\nThis installer knows how to upgrade your current infoglue database from a previous version, if you have one, so your don't have to loose data.\nAs this process is a bit sensitive we very strongly recommend that you take a backup of the database before continuing in case something goes wrong and you need to fall back to the original.\n\nThe previous InfoGlue-directories/files will not be upgraded but instead new ones will be created so you can remove any old InfoGlue directories if you want. If you have files in the old directories you have modified or \nadded be sure to backup them before continuing.\n\nClick next to continue.";
41      
42     public IntroductionDialog(InfoGlueInstaller infoglueInstaller)
43     {
44         this.infoglueInstaller = infoglueInstaller;
45         
46         this.setSize(300, 300);
47         this.setLayout(null);
48         this.setBackground(Color.white);
49         
50         JLabel introductionLabel = new JLabel(introductionHeader);
51         introductionLabel.setBounds(0, 0, 400, 30);
52         introductionLabel.setFont(new java.awt.Font JavaDoc("Dialog", java.awt.Font.BOLD, 16));
53                 
54         JTextArea textArea = new JTextArea(introductionMessage);
55         textArea.setEditable(false);
56         //textArea.setBackground(Color.lightGray);
57
textArea.setBounds(0, 30, 400, 300);
58         textArea.setWrapStyleWord(true);
59         textArea.setLineWrap(true);
60         
61         this.add(introductionLabel);
62         this.add(textArea);
63         
64         infoglueInstaller.setNextButtonCommand("ShowDatabaseDialog");
65     }
66         
67     public void paint(Graphics g)
68     {
69         Graphics2D g2 = (Graphics2D)g;
70         g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
71         g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
72
73         super.paint(g);
74     }
75 }
Popular Tags