Source Code Cross Referenced for SetupWizardPage.java in  » Net » Terracotta » org » terracotta » dso » wizards » 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 » Net » Terracotta » org.terracotta.dso.wizards 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
003:         * notice. All rights reserved.
004:         */
005:        package org.terracotta.dso.wizards;
006:
007:        import org.eclipse.core.resources.IProject;
008:        import org.eclipse.jdt.core.IJavaProject;
009:        import org.eclipse.jface.wizard.WizardPage;
010:        import org.eclipse.swt.SWT;
011:        import org.eclipse.swt.events.SelectionAdapter;
012:        import org.eclipse.swt.events.SelectionEvent;
013:        import org.eclipse.swt.layout.GridData;
014:        import org.eclipse.swt.layout.GridLayout;
015:        import org.eclipse.swt.widgets.Button;
016:        import org.eclipse.swt.widgets.Composite;
017:        import org.eclipse.swt.widgets.Group;
018:        import org.eclipse.swt.widgets.Text;
019:        import org.terracotta.dso.TcPlugin;
020:        import org.terracotta.dso.editors.chooser.ConfigFileBehavior;
021:        import org.terracotta.dso.editors.chooser.NavigatorBehavior;
022:        import org.terracotta.dso.editors.chooser.PackageNavigator;
023:        import org.terracotta.ui.util.SWTUtil;
024:
025:        import com.tc.util.event.UpdateEvent;
026:        import com.tc.util.event.UpdateEventListener;
027:
028:        public class SetupWizardPage extends WizardPage {
029:            private IProject m_project;
030:            private Text m_configPathField;
031:            private Button m_configFileButton;
032:            private Text m_serverOptionsField;
033:            private Button m_resetOptionsButton;
034:
035:            private static final String TERRACOTTA_CONFIG = "Terracotta Configuration";
036:            private static final String BROWSE = "Browse...";
037:            private static final String RESET = "Reset";
038:            private static final String SERVER_OPTIONS = "Server Options";
039:            private static final String PAGE_NAME = "TCSetupWizardPage";
040:            private static final String PAGE_TITLE = "Terracotta Project Setup";
041:            private static final String PAGE_DESC = "Specify the location of your Terracotta configuration file and\n"
042:                    + "Terracotta server Java runtime options";
043:
044:            private static final String DEFAULT_CONFIG_FILENAME = TcPlugin.DEFAULT_CONFIG_FILENAME;
045:            private static final String DEFAULT_SERVER_OPTIONS = TcPlugin.DEFAULT_SERVER_OPTIONS;
046:
047:            public SetupWizardPage(IJavaProject project) {
048:                super (PAGE_NAME);
049:
050:                m_project = project.getProject();
051:
052:                setTitle(PAGE_TITLE);
053:                setDescription(PAGE_DESC);
054:            }
055:
056:            public void createControl(Composite parent) {
057:                final Composite topComp = new Composite(parent, SWT.NONE);
058:                GridLayout gridLayout = new GridLayout();
059:                gridLayout.numColumns = 1;
060:                gridLayout.makeColumnsEqualWidth = false;
061:                topComp.setLayout(gridLayout);
062:                topComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
063:
064:                Group domainConfig = new Group(topComp, SWT.SHADOW_ETCHED_IN);
065:                domainConfig.setText(TERRACOTTA_CONFIG);
066:                gridLayout = new GridLayout();
067:                gridLayout.numColumns = 2;
068:                domainConfig.setLayout(gridLayout);
069:                domainConfig.setLayoutData(new GridData(
070:                        GridData.FILL_HORIZONTAL));
071:
072:                m_configPathField = new Text(domainConfig, SWT.SINGLE
073:                        | SWT.BORDER);
074:                m_configPathField.setLayoutData(new GridData(
075:                        GridData.FILL_HORIZONTAL));
076:                m_configPathField.setText(DEFAULT_CONFIG_FILENAME);
077:
078:                m_configFileButton = new Button(domainConfig, SWT.PUSH);
079:                m_configFileButton.setText(BROWSE);
080:                m_configFileButton.setLayoutData(new GridData(
081:                        GridData.HORIZONTAL_ALIGN_END));
082:                SWTUtil.applyDefaultButtonSize(m_configFileButton);
083:                m_configFileButton.addSelectionListener(new SelectionAdapter() {
084:                    public void widgetSelected(SelectionEvent e) {
085:                        NavigatorBehavior behavior = new ConfigFileBehavior();
086:                        PackageNavigator dialog = new PackageNavigator(
087:                                getShell(), behavior.getTitle(), m_project,
088:                                behavior);
089:                        dialog.addValueListener(new UpdateEventListener() {
090:                            public void handleUpdate(UpdateEvent event) {
091:                                m_configPathField.setText((String) event.data);
092:                            }
093:                        });
094:                        dialog.open();
095:                    }
096:                });
097:                Group serverOptions = new Group(topComp, SWT.SHADOW_ETCHED_IN);
098:                serverOptions.setText(SERVER_OPTIONS);
099:                gridLayout = new GridLayout();
100:                gridLayout.numColumns = 2;
101:                serverOptions.setLayout(gridLayout);
102:                GridData gridData = new GridData();
103:                gridData.horizontalAlignment = GridData.FILL;
104:                gridData.heightHint = 60;
105:                serverOptions.setLayoutData(gridData);
106:
107:                m_serverOptionsField = new Text(serverOptions, SWT.MULTI
108:                        | SWT.BORDER | SWT.V_SCROLL);
109:                GridData gd = new GridData(GridData.FILL_BOTH);
110:                m_serverOptionsField.setLayoutData(gd);
111:                m_serverOptionsField.setText(DEFAULT_SERVER_OPTIONS);
112:
113:                m_resetOptionsButton = new Button(serverOptions, SWT.PUSH);
114:                m_resetOptionsButton.setText(RESET);
115:                SWTUtil.applyDefaultButtonSize(m_resetOptionsButton);
116:                gridData = (GridData) m_resetOptionsButton.getLayoutData();
117:                gridData.verticalAlignment = SWT.BEGINNING;
118:                m_resetOptionsButton
119:                        .addSelectionListener(new SelectionAdapter() {
120:                            public void widgetSelected(SelectionEvent e) {
121:                                m_serverOptionsField
122:                                        .setText(DEFAULT_SERVER_OPTIONS);
123:                            }
124:                        });
125:                setControl(topComp);
126:            }
127:
128:            public boolean isPageComplete() {
129:                return true;
130:            }
131:
132:            public boolean canFinish() {
133:                return isPageComplete();
134:            }
135:
136:            public String getDomainConfigurationPath() {
137:                return m_configPathField.getText();
138:            }
139:
140:            public String getServerOptions() {
141:                return m_serverOptionsField.getText();
142:            }
143:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.