Source Code Cross Referenced for SimpleFinishPanel.java in  » Installer » IzPack » com » izforge » izpack » panels » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Installer » IzPack » com.izforge.izpack.panels 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
003:         * 
004:         * http://izpack.org/
005:         * http://izpack.codehaus.org/
006:         * 
007:         * Licensed under the Apache License, Version 2.0 (the "License");
008:         * you may not use this file except in compliance with the License.
009:         * You may obtain a copy of the License at
010:         * 
011:         *     http://www.apache.org/licenses/LICENSE-2.0
012:         *     
013:         * Unless required by applicable law or agreed to in writing, software
014:         * distributed under the License is distributed on an "AS IS" BASIS,
015:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016:         * See the License for the specific language governing permissions and
017:         * limitations under the License.
018:         */
019:
020:        package com.izforge.izpack.panels;
021:
022:        import java.io.File;
023:
024:        import com.izforge.izpack.gui.IzPanelLayout;
025:        import com.izforge.izpack.gui.LabelFactory;
026:        import com.izforge.izpack.installer.InstallData;
027:        import com.izforge.izpack.installer.InstallerFrame;
028:        import com.izforge.izpack.installer.IzPanel;
029:        import com.izforge.izpack.util.Log;
030:        import com.izforge.izpack.util.VariableSubstitutor;
031:
032:        /**
033:         * The simple finish panel class.
034:         * 
035:         * @author Julien Ponge
036:         */
037:        public class SimpleFinishPanel extends IzPanel {
038:
039:            /**
040:             * 
041:             */
042:            private static final long serialVersionUID = 3689911781942572085L;
043:
044:            /** The variables substitutor. */
045:            private VariableSubstitutor vs;
046:
047:            /**
048:             * The constructor.
049:             * 
050:             * @param parent The parent.
051:             * @param idata The installation data.
052:             */
053:            public SimpleFinishPanel(InstallerFrame parent, InstallData idata) {
054:                super (parent, idata, new IzPanelLayout());
055:                vs = new VariableSubstitutor(idata.getVariables());
056:            }
057:
058:            /**
059:             * Indicates wether the panel has been validated or not.
060:             * 
061:             * @return true if the panel has been validated.
062:             */
063:            public boolean isValidated() {
064:                return true;
065:            }
066:
067:            /** Called when the panel becomes active. */
068:            public void panelActivate() {
069:                parent.lockNextButton();
070:                parent.lockPrevButton();
071:                parent.setQuitButtonText(parent.langpack
072:                        .getString("FinishPanel.done"));
073:                parent.setQuitButtonIcon("done");
074:                if (idata.installSuccess) {
075:
076:                    // We set the information
077:                    add(LabelFactory.create(parent.icons.getImageIcon("check")));
078:                    add(IzPanelLayout.createParagraphGap());
079:                    add(LabelFactory.create(parent.langpack
080:                            .getString("FinishPanel.success"), parent.icons
081:                            .getImageIcon("information"), LEADING), NEXT_LINE);
082:                    add(IzPanelLayout.createParagraphGap());
083:                    if (idata.uninstallOutJar != null) {
084:                        // We prepare a message for the uninstaller feature
085:                        String path = translatePath("$INSTALL_PATH")
086:                                + File.separator + "Uninstaller";
087:
088:                        add(LabelFactory.create(parent.langpack
089:                                .getString("FinishPanel.uninst.info"),
090:                                parent.icons.getImageIcon("information"),
091:                                LEADING), NEXT_LINE);
092:                        add(LabelFactory.create(path, parent.icons
093:                                .getImageIcon("empty"), LEADING), NEXT_LINE);
094:                    }
095:                } else
096:                    add(LabelFactory.create(parent.langpack
097:                            .getString("FinishPanel.fail"), parent.icons
098:                            .getImageIcon("information"), LEADING));
099:                getLayoutHelper().completeLayout(); // Call, or call not?
100:                Log.getInstance().informUser();
101:            }
102:
103:            /**
104:             * Translates a relative path to a local system path.
105:             * 
106:             * @param destination The path to translate.
107:             * @return The translated path.
108:             */
109:            private String translatePath(String destination) {
110:                // Parse for variables
111:                destination = vs.substitute(destination, null);
112:
113:                // Convert the file separator characters
114:                return destination.replace('/', File.separatorChar);
115:            }
116:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.