Source Code Cross Referenced for XuiWizard.java in  » Installer » VAInstall » com » memoire » vainstall » xui » 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 » VAInstall » com.memoire.vainstall.xui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * $RCSfile: XuiWizard.java,v $
003:         * @creation     01/02/00
004:         * @modification $Date: 2002/06/20 17:35:45 $
005:         */package com.memoire.vainstall.xui;
006:
007:        import java.awt.*;
008:        import java.awt.event.ActionListener;
009:        import java.awt.event.ActionEvent;
010:        import javax.swing.*;
011:        import javax.swing.border.*;
012:        import com.memoire.vainstall.VAStep;
013:        import com.memoire.vainstall.VAWizardInterface;
014:        import com.memoire.vainstall.VAGlobals;
015:        import com.memoire.vainstall.VALanguageStep;
016:        import com.memoire.vainstall.VAWelcomeStep;
017:
018:        /**
019:         * Based on mode 'Graphic' by Axel von Arnim.
020:         * @version $Id: XuiWizard.java,v 1.8 2002/06/20 17:35:45 desnoix Exp $
021:         * @author  Guillaume Desnoix
022:         */
023:
024:        public class XuiWizard extends JDialog implements  VAWizardInterface,
025:                ActionListener {
026:            private static XuiWizard UNIQUE_WIZARD = null;
027:            JButton btAbout_, btNext_, btBack_, btCancel_;
028:            XuiAbstractPanel panel_;
029:            JPanel pnNav_;
030:
031:            protected XuiWizard() {
032:                super (XuiBlueScreen.MAIN);
033:                init();
034:            }
035:
036:            protected void init() {
037:                super .setTitle("VAInstall");
038:                super .setDefaultCloseOperation(HIDE_ON_CLOSE);
039:                setModal(true);
040:                setResizable(false);
041:
042:                Container cp = getContentPane();
043:                cp.setLayout(new BorderLayout());
044:                cp.setBackground(Color.black);
045:
046:                pnNav_ = new XuiPanel();
047:                pnNav_.setLayout(new FlowLayout(FlowLayout.RIGHT, 4, 0));
048:                //    pnNav_.setBorder(new CompoundBorder(new EtchedBorder(),
049:                //                                    new EmptyBorder(new Insets(5, 5, 5, 5))));
050:                pnNav_.setBackground(Color.black);
051:                pnNav_.setBorder(new EmptyBorder(5, 5, 5, 5));
052:
053:                btAbout_ = new XuiButton(VAGlobals.i18n("XuiWizard_About"));
054:                btNext_ = new XuiButton(VAGlobals.i18n("UI_Next"));
055:                btBack_ = new XuiButton(VAGlobals.i18n("UI_Back"));
056:                btCancel_ = new XuiButton(VAGlobals.i18n("UI_Cancel"));
057:
058:                pnNav_.add(btAbout_);
059:                pnNav_.add(btCancel_);
060:                pnNav_.add(btBack_);
061:                pnNav_.add(btNext_);
062:
063:                btAbout_.addActionListener(this );
064:                btNext_.addActionListener(this );
065:                btBack_.addActionListener(this );
066:                btCancel_.addActionListener(this );
067:
068:                panel_ = new XuiAbstractPanel();
069:                panel_.setPreferredSize(new Dimension(660, 360));
070:                cp.add(BorderLayout.CENTER, panel_);
071:                cp.add(BorderLayout.SOUTH, pnNav_);
072:
073:                setSize(getPreferredSize());
074:                doLayout();
075:                validate();
076:
077:                // center dialog
078:                Dimension dimScreen = Toolkit.getDefaultToolkit()
079:                        .getScreenSize();
080:                this .setLocation((dimScreen.width - this .getSize().width) / 2,
081:                        (dimScreen.height - this .getSize().height) / 2);
082:
083:            }
084:
085:            public static VAWizardInterface createWizard() {
086:                if (UNIQUE_WIZARD == null)
087:                    UNIQUE_WIZARD = new XuiWizard();
088:                else
089:                    UNIQUE_WIZARD.init();
090:                return UNIQUE_WIZARD;
091:            }
092:
093:            public void setStep(VAStep step) {
094:                panel_ = (XuiAbstractPanel) step;
095:                Container pnContent = getContentPane();
096:                pnContent.removeAll();
097:                panel_.setPreferredSize(new Dimension(660, 360));
098:                // panel_.setBorder(new CompoundBorder(new EtchedBorder(),
099:                //                                     new EmptyBorder(new Insets(5, 5, 5, 5))));
100:                pnContent.add(BorderLayout.CENTER, panel_);
101:
102:                // in case of language change we need to update the pnNav_ panel
103:                // this is a hack due to the static way of handling language
104:                if (step instanceof  VAWelcomeStep
105:                        || step instanceof  VALanguageStep) {
106:                    btAbout_.setText(VAGlobals.i18n("XuiWizard_About"));
107:                    btNext_.setText(VAGlobals.i18n("UI_Next"));
108:                    btBack_.setText(VAGlobals.i18n("UI_Back"));
109:                    btCancel_.setText(VAGlobals.i18n("UI_Cancel"));
110:                    doLayout();
111:                    validate();
112:                }
113:
114:                pnContent.add(BorderLayout.SOUTH, pnNav_);
115:                pnContent.doLayout();
116:                invalidate();
117:                pnContent.validate();
118:                //    Dimension size=getSize();
119:                //    setSize(new Dimension(size.width, size.height));
120:                Dimension size = getSize();
121:                //setSize(new Dimension(size.width+1, size.height+1));
122:                //repaint();
123:            }
124:
125:            public XuiAbstractPanel getPanel() {
126:                return panel_;
127:            }
128:
129:            public void setActionEnabled(int actions) {
130:                btCancel_.setEnabled((actions & CANCEL) == CANCEL);
131:                btBack_.setEnabled((actions & BACK) == BACK);
132:                btNext_.setEnabled(((actions & NEXT) == NEXT)
133:                        || ((actions & FINISH) == FINISH));
134:                if ((actions & FINISH) == FINISH)
135:                    btNext_.setText(VAGlobals.i18n("UI_Finish"));
136:            }
137:
138:            public void actionPerformed(ActionEvent e) {
139:                Object src = e.getSource();
140:                if (src == btCancel_)
141:                    dispose(true);
142:                else if (src == btBack_)
143:                    panel_.backAction();
144:                else if (src == btNext_)
145:                    panel_.nextAction();
146:                else if (src == btAbout_)
147:                    about();
148:            }
149:
150:            public void about() {
151:                XuiOptionPane.showMessageDialog(this , "\n^" + VAGlobals.NAME
152:                        + " " + VAGlobals.VERSION + "\n" + VAGlobals.AUTHOR
153:                        + " <" + VAGlobals.EMAIL + ">\n" + VAGlobals.HTTP
154:                        + "\n" + VAGlobals.i18n("UI_License")
155:                        + VAGlobals.LICENSE + "\n" + "(c) "
156:                        + VAGlobals.COPYRIGHT + " " + VAGlobals.AUTHOR + "\n"
157:                        + "\n^Xtra Mode\n" + "(c) 2001-2002 Guillaume Desnoix",
158:                        VAGlobals.i18n("XuiWizard_About"));
159:            }
160:
161:            public void hide(boolean question) {
162:                /*
163:                if( question ) {
164:                  int res=JOptionPane.showConfirmDialog(
165:                    this,
166:                    VAGlobals.getString("Do you want to abort installation ?"),
167:                    VAGlobals.getString("Exit"),
168:                    JOptionPane.YES_NO_OPTION,
169:                    JOptionPane.QUESTION_MESSAGE);
170:                  if( res==JOptionPane.YES_OPTION ) {
171:                    panel_.cancelAction();
172:                  }
173:                } else super.hide();
174:                 */
175:
176:                if (question) {
177:                    int res = XuiOptionPane.showConfirmDialog(this , VAGlobals
178:                            .i18n("UI_AbortQuestion"), VAGlobals
179:                            .i18n("UI_Cancel")
180:                    // JOptionPane.YES_NO_OPTION,
181:                            // JOptionPane.QUESTION_MESSAGE
182:                            );
183:                    if (res == XuiOptionPane.YES)
184:                        panel_.cancelAction();
185:                } else
186:                    super .hide();
187:            }
188:
189:            public void dispose() {
190:                hide(true);
191:            }
192:
193:            public void dispose(boolean confirm) {
194:                hide(confirm);
195:            }
196:
197:            public void show() {
198:                super .show();
199:            }
200:
201:            public void hide() {
202:                hide(true);
203:            }
204:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.