KickJava   Java API By Example, From Geeks To Geeks.

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


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 import javax.swing.*;
26 import java.awt.*;
27
28 /**
29  * This is the main class for the installer.
30  */

31
32 public class DoneDialog extends JPanel
33 {
34     private InfoGlueInstaller infoGlueInstaller = null;
35     
36     private final static String JavaDoc introductionHeader = "Installation of InfoGlue CMS completed";
37     //private final static String introductionMessage = "InfoGlue CMS was installed successfully. You can now start the tomcat server and launch your favourite browser with the location http://localhost:8080/infoglueCMS/ViewCMSTool.action. \n\n.";
38

39     public DoneDialog(InfoGlueInstaller infoGlueInstaller)
40     {
41         this.infoGlueInstaller = infoGlueInstaller;
42         
43         this.setSize(450, 350);
44         this.setLayout(null);
45         this.setBackground(Color.white);
46         
47         JLabel introductionLabel = new JLabel(introductionHeader);
48         introductionLabel.setBounds(0, 0, 400, 30);
49         introductionLabel.setFont(new java.awt.Font JavaDoc("Dialog", java.awt.Font.BOLD, 16));
50         
51         JTextArea textArea = new JTextArea("InfoGlue CMS was installed successfully. You can now start the tomcat server and launch your favourite browser with the location http://" + this.infoGlueInstaller.installerSkeleton.serverDialog.getHostName() + ":" + this.infoGlueInstaller.installerSkeleton.serverDialog.getPortNumber() + "/infoglueCMS" + this.infoGlueInstaller.installerSkeleton.serverDialog.getApplicationSuffix() + "/ViewCMSTool.action. \n\n.");
52         textArea.setEditable(false);
53         //textArea.setBackground(Color.lightGray);
54
textArea.setBounds(0, 30, 380, 200);
55         textArea.setWrapStyleWord(true);
56         textArea.setLineWrap(true);
57         
58         this.add(introductionLabel);
59         this.add(textArea);
60         
61         infoGlueInstaller.installerSkeleton.backButton.show();
62         infoGlueInstaller.installerSkeleton.nextButton.show();
63
64         infoGlueInstaller.setNextButtonCommand("Exit");
65         infoGlueInstaller.setNextButtonLabel("Close");
66     }
67         
68     public void paint(Graphics g)
69     {
70         Graphics2D g2 = (Graphics2D)g;
71         g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
72         g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
73
74         super.paint(g);
75     }
76 }
Popular Tags