Source Code Cross Referenced for New_processPaletteFactory.java in  » Workflow-Engines » osbl-1_0 » newprocess » diagram » part » 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 » Workflow Engines » osbl 1_0 » newprocess.diagram.part 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package newprocess.diagram.part;
002:
003:        import java.util.ArrayList;
004:        import java.util.List;
005:
006:        import newprocess.diagram.cust.tool.ProcessLinkTool;
007:        import newprocess.diagram.providers.New_processElementTypes;
008:
009:        import org.eclipse.gef.Tool;
010:        import org.eclipse.gef.palette.PaletteContainer;
011:        import org.eclipse.gef.palette.PaletteDrawer;
012:        import org.eclipse.gef.palette.PaletteGroup;
013:        import org.eclipse.gef.palette.PaletteRoot;
014:        import org.eclipse.gef.palette.ToolEntry;
015:        import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool;
016:        import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool;
017:
018:        /**
019:         * @generated
020:         */
021:        public class New_processPaletteFactory {
022:
023:            /**
024:             * @generated
025:             */
026:            public void fillPalette(PaletteRoot paletteRoot) {
027:                paletteRoot.add(createNewprocess1Group());
028:            }
029:
030:            /**
031:             * Creates "newprocess" palette tool group
032:             * @generated
033:             */
034:            private PaletteContainer createNewprocess1Group() {
035:                PaletteGroup paletteContainer = new PaletteGroup(
036:                        New_processDiagramEditorPlugin
037:                                .getString("Newprocess1Group.title")); //$NON-NLS-1$
038:                paletteContainer.add(createActivity1Group());
039:                paletteContainer.add(createCondition2Group());
040:                paletteContainer.add(createActorMessage3Group());
041:                return paletteContainer;
042:            }
043:
044:            /**
045:             * Creates "Activity" palette tool group
046:             * @generated
047:             */
048:            private PaletteContainer createActivity1Group() {
049:                PaletteDrawer paletteContainer = new PaletteDrawer(
050:                        New_processDiagramEditorPlugin
051:                                .getString("Activity1Group.title")); //$NON-NLS-1$
052:                paletteContainer.setDescription(New_processDiagramEditorPlugin
053:                        .getString("Activity1Group.desc")); //$NON-NLS-1$
054:                paletteContainer.add(createAsyncActivity1CreationTool());
055:                paletteContainer.add(createSyncActivity2CreationTool());
056:                paletteContainer.add(createEvent3CreationTool());
057:                paletteContainer.add(createListener4CreationTool());
058:                return paletteContainer;
059:            }
060:
061:            /**
062:             * Creates "Condition" palette tool group
063:             * @generated
064:             */
065:            private PaletteContainer createCondition2Group() {
066:                PaletteDrawer paletteContainer = new PaletteDrawer(
067:                        New_processDiagramEditorPlugin
068:                                .getString("Condition2Group.title")); //$NON-NLS-1$
069:                paletteContainer.setDescription(New_processDiagramEditorPlugin
070:                        .getString("Condition2Group.desc")); //$NON-NLS-1$
071:                paletteContainer.add(createOrOperator1CreationTool());
072:                paletteContainer.add(createAndOperator2CreationTool());
073:                paletteContainer.add(createExpansion3CreationTool());
074:                paletteContainer.add(createConclusion4CreationTool());
075:                paletteContainer.add(createProxy5CreationTool());
076:                paletteContainer.add(createCondition6CreationTool());
077:                paletteContainer.add(createConditionLink7CreationTool());
078:                paletteContainer
079:                        .add(createExpansionConclusionLink8CreationTool());
080:                return paletteContainer;
081:            }
082:
083:            /**
084:             * Creates "Actor & Message" palette tool group
085:             * @generated
086:             */
087:            private PaletteContainer createActorMessage3Group() {
088:                PaletteDrawer paletteContainer = new PaletteDrawer(
089:                        New_processDiagramEditorPlugin
090:                                .getString("ActorMessage3Group.title")); //$NON-NLS-1$
091:                paletteContainer.setDescription(New_processDiagramEditorPlugin
092:                        .getString("ActorMessage3Group.desc")); //$NON-NLS-1$
093:                paletteContainer.add(createActor1CreationTool());
094:                paletteContainer.add(createMessage2CreationTool());
095:                paletteContainer.add(createActivityLink3CreationTool());
096:                return paletteContainer;
097:            }
098:
099:            /**
100:             * @generated
101:             */
102:            private ToolEntry createAsyncActivity1CreationTool() {
103:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
104:                        1);
105:                types.add(New_processElementTypes.AsyncActivity_2003);
106:                NodeToolEntry entry = new NodeToolEntry(
107:                        New_processDiagramEditorPlugin
108:                                .getString("AsyncActivity1CreationTool.title"), New_processDiagramEditorPlugin.getString("AsyncActivity1CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
109:                entry
110:                        .setSmallIcon(New_processElementTypes
111:                                .getImageDescriptor(New_processElementTypes.AsyncActivity_2003));
112:                entry.setLargeIcon(entry.getSmallIcon());
113:                return entry;
114:            }
115:
116:            /**
117:             * @generated
118:             */
119:            private ToolEntry createSyncActivity2CreationTool() {
120:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
121:                        1);
122:                types.add(New_processElementTypes.SyncActivity_2001);
123:                NodeToolEntry entry = new NodeToolEntry(
124:                        New_processDiagramEditorPlugin
125:                                .getString("SyncActivity2CreationTool.title"), New_processDiagramEditorPlugin.getString("SyncActivity2CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
126:                entry
127:                        .setSmallIcon(New_processElementTypes
128:                                .getImageDescriptor(New_processElementTypes.SyncActivity_2001));
129:                entry.setLargeIcon(entry.getSmallIcon());
130:                return entry;
131:            }
132:
133:            /**
134:             * @generated
135:             */
136:            private ToolEntry createEvent3CreationTool() {
137:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
138:                        1);
139:                types.add(New_processElementTypes.Event_2005);
140:                NodeToolEntry entry = new NodeToolEntry(
141:                        New_processDiagramEditorPlugin
142:                                .getString("Event3CreationTool.title"), New_processDiagramEditorPlugin.getString("Event3CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
143:                entry
144:                        .setSmallIcon(New_processElementTypes
145:                                .getImageDescriptor(New_processElementTypes.Event_2005));
146:                entry.setLargeIcon(entry.getSmallIcon());
147:                return entry;
148:            }
149:
150:            /**
151:             * @generated
152:             */
153:            private ToolEntry createListener4CreationTool() {
154:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
155:                        1);
156:                types.add(New_processElementTypes.Listener_2002);
157:                NodeToolEntry entry = new NodeToolEntry(
158:                        New_processDiagramEditorPlugin
159:                                .getString("Listener4CreationTool.title"), New_processDiagramEditorPlugin.getString("Listener4CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
160:                entry
161:                        .setSmallIcon(New_processElementTypes
162:                                .getImageDescriptor(New_processElementTypes.Listener_2002));
163:                entry.setLargeIcon(entry.getSmallIcon());
164:                return entry;
165:            }
166:
167:            /**
168:             * @generated
169:             */
170:            private ToolEntry createOrOperator1CreationTool() {
171:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
172:                        1);
173:                types.add(New_processElementTypes.OrOperator_3003);
174:                NodeToolEntry entry = new NodeToolEntry(
175:                        New_processDiagramEditorPlugin
176:                                .getString("OrOperator1CreationTool.title"), New_processDiagramEditorPlugin.getString("OrOperator1CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
177:                entry
178:                        .setSmallIcon(New_processElementTypes
179:                                .getImageDescriptor(New_processElementTypes.OrOperator_3003));
180:                entry.setLargeIcon(entry.getSmallIcon());
181:                return entry;
182:            }
183:
184:            /**
185:             * @generated
186:             */
187:            private ToolEntry createAndOperator2CreationTool() {
188:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
189:                        1);
190:                types.add(New_processElementTypes.AndOperator_3004);
191:                NodeToolEntry entry = new NodeToolEntry(
192:                        New_processDiagramEditorPlugin
193:                                .getString("AndOperator2CreationTool.title"), New_processDiagramEditorPlugin.getString("AndOperator2CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
194:                entry
195:                        .setSmallIcon(New_processElementTypes
196:                                .getImageDescriptor(New_processElementTypes.AndOperator_3004));
197:                entry.setLargeIcon(entry.getSmallIcon());
198:                return entry;
199:            }
200:
201:            /**
202:             * @generated
203:             */
204:            private ToolEntry createExpansion3CreationTool() {
205:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
206:                        1);
207:                types.add(New_processElementTypes.Expansion_2009);
208:                NodeToolEntry entry = new NodeToolEntry(
209:                        New_processDiagramEditorPlugin
210:                                .getString("Expansion3CreationTool.title"), New_processDiagramEditorPlugin.getString("Expansion3CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
211:                entry
212:                        .setSmallIcon(New_processElementTypes
213:                                .getImageDescriptor(New_processElementTypes.Expansion_2009));
214:                entry.setLargeIcon(entry.getSmallIcon());
215:                return entry;
216:            }
217:
218:            /**
219:             * @generated
220:             */
221:            private ToolEntry createConclusion4CreationTool() {
222:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
223:                        1);
224:                types.add(New_processElementTypes.Conclusion_2010);
225:                NodeToolEntry entry = new NodeToolEntry(
226:                        New_processDiagramEditorPlugin
227:                                .getString("Conclusion4CreationTool.title"), New_processDiagramEditorPlugin.getString("Conclusion4CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
228:                entry
229:                        .setSmallIcon(New_processElementTypes
230:                                .getImageDescriptor(New_processElementTypes.Conclusion_2010));
231:                entry.setLargeIcon(entry.getSmallIcon());
232:                return entry;
233:            }
234:
235:            /**
236:             * @generated
237:             */
238:            private ToolEntry createProxy5CreationTool() {
239:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
240:                        1);
241:                types.add(New_processElementTypes.ConditionProxy_2006);
242:                NodeToolEntry entry = new NodeToolEntry(
243:                        New_processDiagramEditorPlugin
244:                                .getString("Proxy5CreationTool.title"), New_processDiagramEditorPlugin.getString("Proxy5CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
245:                entry
246:                        .setSmallIcon(New_processElementTypes
247:                                .getImageDescriptor(New_processElementTypes.ConditionProxy_2006));
248:                entry.setLargeIcon(entry.getSmallIcon());
249:                return entry;
250:            }
251:
252:            /**
253:             * @generated
254:             */
255:            private ToolEntry createCondition6CreationTool() {
256:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
257:                        1);
258:                types.add(New_processElementTypes.Condition_3014);
259:                NodeToolEntry entry = new NodeToolEntry(
260:                        New_processDiagramEditorPlugin
261:                                .getString("Condition6CreationTool.title"), New_processDiagramEditorPlugin.getString("Condition6CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
262:                entry
263:                        .setSmallIcon(New_processElementTypes
264:                                .getImageDescriptor(New_processElementTypes.Condition_3014));
265:                entry.setLargeIcon(entry.getSmallIcon());
266:                return entry;
267:            }
268:
269:            /**
270:             * @generated NOT
271:             * @author sh
272:             */
273:            private ToolEntry createConditionLink7CreationTool() {
274:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
275:                        3);
276:                types.add(New_processElementTypes.RootTerm_4002);
277:                types.add(New_processElementTypes.OperatorTermSubTerm_4003);
278:                types
279:                        .add(New_processElementTypes.ConditionTermConditionProxy_4004);
280:                ConditionLinkToolEntry entry = new ConditionLinkToolEntry(
281:                        New_processDiagramEditorPlugin
282:                                .getString("ConditionLink7CreationTool.title"), New_processDiagramEditorPlugin.getString("ConditionLink7CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
283:                entry
284:                        .setSmallIcon(New_processElementTypes
285:                                .getImageDescriptor(New_processElementTypes.RootTerm_4002));
286:                entry.setLargeIcon(entry.getSmallIcon());
287:                return entry;
288:            }
289:
290:            /**
291:             * @generated
292:             */
293:            private ToolEntry createExpansionConclusionLink8CreationTool() {
294:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
295:                        2);
296:                types
297:                        .add(New_processElementTypes.ConclusionConclusionProxy_4005);
298:                types.add(New_processElementTypes.ExpansionExpansionProxy_4006);
299:                LinkToolEntry entry = new LinkToolEntry(
300:                        New_processDiagramEditorPlugin
301:                                .getString("ExpansionConclusionLink8CreationTool.title"), New_processDiagramEditorPlugin.getString("ExpansionConclusionLink8CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
302:                entry
303:                        .setSmallIcon(New_processElementTypes
304:                                .getImageDescriptor(New_processElementTypes.ConclusionConclusionProxy_4005));
305:                entry.setLargeIcon(entry.getSmallIcon());
306:                return entry;
307:            }
308:
309:            /**
310:             * @generated
311:             */
312:            private ToolEntry createActor1CreationTool() {
313:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
314:                        1);
315:                types.add(New_processElementTypes.Actor_2007);
316:                NodeToolEntry entry = new NodeToolEntry(
317:                        New_processDiagramEditorPlugin
318:                                .getString("Actor1CreationTool.title"), New_processDiagramEditorPlugin.getString("Actor1CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
319:                entry
320:                        .setSmallIcon(New_processElementTypes
321:                                .getImageDescriptor(New_processElementTypes.Actor_2007));
322:                entry.setLargeIcon(entry.getSmallIcon());
323:                return entry;
324:            }
325:
326:            /**
327:             * @generated
328:             */
329:            private ToolEntry createMessage2CreationTool() {
330:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
331:                        1);
332:                types.add(New_processElementTypes.Message_2008);
333:                NodeToolEntry entry = new NodeToolEntry(
334:                        New_processDiagramEditorPlugin
335:                                .getString("Message2CreationTool.title"), New_processDiagramEditorPlugin.getString("Message2CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
336:                entry
337:                        .setSmallIcon(New_processElementTypes
338:                                .getImageDescriptor(New_processElementTypes.Message_2008));
339:                entry.setLargeIcon(entry.getSmallIcon());
340:                return entry;
341:            }
342:
343:            /**
344:             * @generated
345:             */
346:            private ToolEntry createActivityLink3CreationTool() {
347:                List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(
348:                        1);
349:                types.add(New_processElementTypes.AsyncActivityActor_4001);
350:                LinkToolEntry entry = new LinkToolEntry(
351:                        New_processDiagramEditorPlugin
352:                                .getString("ActivityLink3CreationTool.title"), New_processDiagramEditorPlugin.getString("ActivityLink3CreationTool.desc"), types); //$NON-NLS-1$ $NON-NLS-2$
353:                entry
354:                        .setSmallIcon(New_processElementTypes
355:                                .getImageDescriptor(New_processElementTypes.AsyncActivityActor_4001));
356:                entry.setLargeIcon(entry.getSmallIcon());
357:                return entry;
358:            }
359:
360:            /**
361:             * @generated
362:             */
363:            private static class NodeToolEntry extends ToolEntry {
364:
365:                /**
366:                 * @generated
367:                 */
368:                private final List elementTypes;
369:
370:                /**
371:                 * @generated
372:                 */
373:                private NodeToolEntry(String title, String description,
374:                        List elementTypes) {
375:                    super (title, description, null, null);
376:                    this .elementTypes = elementTypes;
377:                }
378:
379:                /**
380:                 * @generated
381:                 */
382:                public Tool createTool() {
383:                    Tool tool = new UnspecifiedTypeCreationTool(elementTypes);
384:                    tool.setProperties(getToolProperties());
385:                    return tool;
386:                }
387:            }
388:
389:            /**
390:             * @generated
391:             */
392:            private static class LinkToolEntry extends ToolEntry {
393:
394:                /**
395:                 * @generated
396:                 */
397:                private final List relationshipTypes;
398:
399:                /**
400:                 * @generated
401:                 */
402:                private LinkToolEntry(String title, String description,
403:                        List relationshipTypes) {
404:                    super (title, description, null, null);
405:                    this .relationshipTypes = relationshipTypes;
406:                }
407:
408:                /**
409:                 * @generated
410:                 */
411:                public Tool createTool() {
412:                    Tool tool = new UnspecifiedTypeConnectionTool(
413:                            relationshipTypes);
414:                    tool.setProperties(getToolProperties());
415:                    return tool;
416:                }
417:            }
418:
419:            /**
420:             * Create an own Link Tool Class to hook in a special 
421:             * link creation tool.
422:             * @author sh
423:             */
424:            private static class ConditionLinkToolEntry extends ToolEntry {
425:                private final List relationshipTypes;
426:
427:                private ConditionLinkToolEntry(String title,
428:                        String description, List relationshipTypes) {
429:                    super (title, description, null, null);
430:                    this .relationshipTypes = relationshipTypes;
431:                }
432:
433:                public Tool createTool() {
434:                    Tool tool = new ProcessLinkTool(relationshipTypes);
435:                    tool.setProperties(getToolProperties());
436:                    return tool;
437:                }
438:            }
439:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.