Source Code Cross Referenced for NewDroolsProjectWizardPage.java in  » Rule-Engine » drolls-Rule-Engine » org » drools » eclipse » wizard » project » 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 » Rule Engine » drolls Rule Engine » org.drools.eclipse.wizard.project 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.drools.eclipse.wizard.project;
002:
003:        import org.eclipse.jface.wizard.WizardPage;
004:        import org.eclipse.swt.SWT;
005:        import org.eclipse.swt.events.SelectionEvent;
006:        import org.eclipse.swt.events.SelectionListener;
007:        import org.eclipse.swt.layout.GridData;
008:        import org.eclipse.swt.layout.GridLayout;
009:        import org.eclipse.swt.widgets.Button;
010:        import org.eclipse.swt.widgets.Composite;
011:
012:        public class NewDroolsProjectWizardPage extends WizardPage {
013:
014:            private Button addSampleJavaRuleCodeButton;
015:            private Button addSampleRuleButton;
016:            private Button addSampleJavaDecisionTableCodeButton;
017:            private Button addSampleDecisionTableCodeButton;
018:            private Button addSampleRuleFlowButton;
019:            private Button addSampleJavaRuleFlowCodeButton;
020:            private boolean addSampleJavaRuleCode = true;
021:            private boolean addSampleRule = true;
022:            private boolean addSampleJavaDecisionTableCode = false;
023:            private boolean addSampleDecisionTableCode = false;
024:            private boolean addSampleJavaRuleFlowCode = false;
025:            private boolean addSampleRuleFlow = false;
026:
027:            public NewDroolsProjectWizardPage() {
028:                super ("extendedNewProjectPage");
029:                setTitle("New Drools Project");
030:                setDescription("Create a new Drools Project");
031:            }
032:
033:            public void createControl(Composite parent) {
034:                Composite composite = new Composite(parent, SWT.NULL);
035:                composite.setFont(parent.getFont());
036:                composite.setLayout(new GridLayout());
037:                composite.setLayoutData(new GridData(GridData.FILL_BOTH));
038:                createControls(composite);
039:                setPageComplete(true);
040:                // Show description on opening
041:                setErrorMessage(null);
042:                setMessage(null);
043:                setControl(composite);
044:            }
045:
046:            private void createControls(Composite parent) {
047:                addSampleRuleButton = createCheckBox(parent,
048:                        "Add a sample HelloWorld rule file to this project.");
049:                addSampleRuleButton.setSelection(addSampleRule);
050:                addSampleRuleButton
051:                        .addSelectionListener(new SelectionListener() {
052:                            public void widgetDefaultSelected(SelectionEvent e) {
053:                                // do nothing
054:                            }
055:
056:                            public void widgetSelected(SelectionEvent e) {
057:                                addSampleRule = ((Button) e.widget)
058:                                        .getSelection();
059:                            }
060:                        });
061:                addSampleJavaRuleCodeButton = createCheckBox(parent,
062:                        "Add a sample Java class for loading and executing the HelloWorld rules.");
063:                addSampleJavaRuleCodeButton.setSelection(addSampleJavaRuleCode);
064:                addSampleJavaRuleCodeButton
065:                        .addSelectionListener(new SelectionListener() {
066:                            public void widgetDefaultSelected(SelectionEvent e) {
067:                                // do nothing
068:                            }
069:
070:                            public void widgetSelected(SelectionEvent e) {
071:                                addSampleJavaRuleCode = ((Button) e.widget)
072:                                        .getSelection();
073:                            }
074:                        });
075:                addSampleDecisionTableCodeButton = createCheckBox(parent,
076:                        "Add a sample HelloWorld decision table file to this project.");
077:                addSampleDecisionTableCodeButton
078:                        .setSelection(addSampleDecisionTableCode);
079:                addSampleDecisionTableCodeButton
080:                        .addSelectionListener(new SelectionListener() {
081:                            public void widgetDefaultSelected(SelectionEvent e) {
082:                                // do nothing
083:                            }
084:
085:                            public void widgetSelected(SelectionEvent e) {
086:                                addSampleDecisionTableCode = ((Button) e.widget)
087:                                        .getSelection();
088:                            }
089:                        });
090:                addSampleJavaDecisionTableCodeButton = createCheckBox(
091:                        parent,
092:                        "Add a sample Java class for loading and executing the HelloWorld decision table.");
093:                addSampleJavaDecisionTableCodeButton
094:                        .setSelection(addSampleDecisionTableCode);
095:                addSampleJavaDecisionTableCodeButton
096:                        .addSelectionListener(new SelectionListener() {
097:                            public void widgetDefaultSelected(SelectionEvent e) {
098:                                // do nothing
099:                            }
100:
101:                            public void widgetSelected(SelectionEvent e) {
102:                                addSampleJavaDecisionTableCode = ((Button) e.widget)
103:                                        .getSelection();
104:                            }
105:                        });
106:                addSampleRuleFlowButton = createCheckBox(parent,
107:                        "Add a sample RuleFlow file to this project.");
108:                addSampleRuleFlowButton.setSelection(addSampleRuleFlow);
109:                addSampleRuleFlowButton
110:                        .addSelectionListener(new SelectionListener() {
111:                            public void widgetDefaultSelected(SelectionEvent e) {
112:                                // do nothing
113:                            }
114:
115:                            public void widgetSelected(SelectionEvent e) {
116:                                addSampleRuleFlow = ((Button) e.widget)
117:                                        .getSelection();
118:                            }
119:                        });
120:                addSampleJavaRuleFlowCodeButton = createCheckBox(parent,
121:                        "Add a sample Java class for loading and executing the RuleFlow.");
122:                addSampleJavaRuleFlowCodeButton
123:                        .setSelection(addSampleJavaRuleFlowCode);
124:                addSampleJavaRuleFlowCodeButton
125:                        .addSelectionListener(new SelectionListener() {
126:                            public void widgetDefaultSelected(SelectionEvent e) {
127:                                // do nothing
128:                            }
129:
130:                            public void widgetSelected(SelectionEvent e) {
131:                                addSampleJavaRuleFlowCode = ((Button) e.widget)
132:                                        .getSelection();
133:                            }
134:                        });
135:
136:            }
137:
138:            private Button createCheckBox(Composite group, String label) {
139:                Button button = new Button(group, SWT.CHECK | SWT.LEFT);
140:                button.setText(label);
141:                GridData data = new GridData();
142:                button.setLayoutData(data);
143:                return button;
144:            }
145:
146:            public boolean createRuleFile() {
147:                return addSampleRule;
148:            }
149:
150:            public boolean createJavaRuleFile() {
151:                return addSampleJavaRuleCode;
152:            }
153:
154:            public boolean createDecisionTableFile() {
155:                return addSampleDecisionTableCode;
156:            }
157:
158:            public boolean createJavaDecisionTableFile() {
159:                return addSampleJavaDecisionTableCode;
160:            }
161:
162:            public boolean createRuleFlowFile() {
163:                return addSampleRuleFlow;
164:            }
165:
166:            public boolean createJavaRuleFlowFile() {
167:                return addSampleJavaRuleFlowCode;
168:            }
169:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.