Source Code Cross Referenced for ProcessView.java in  » IDE-Netbeans » bpel » org » netbeans » modules » bpel » design » 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 » IDE Netbeans » bpel » org.netbeans.modules.bpel.design 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * To change this template, choose Tools | Templates
003:         * and open the template in the editor.
004:         */
005:        package org.netbeans.modules.bpel.design;
006:
007:        import java.awt.Graphics2D;
008:        import java.util.ArrayList;
009:        import java.util.Iterator;
010:        import java.util.List;
011:        import org.netbeans.modules.bpel.design.DesignView;
012:        import org.netbeans.modules.bpel.design.geometry.FBounds;
013:        import org.netbeans.modules.bpel.design.model.connections.MessageConnection;
014:        import org.netbeans.modules.bpel.design.model.elements.VisualElement;
015:        import org.netbeans.modules.bpel.design.model.patterns.CompositePattern;
016:        import org.netbeans.modules.bpel.design.model.patterns.PartnerLinksPattern;
017:        import org.netbeans.modules.bpel.design.model.patterns.Pattern;
018:        import org.netbeans.modules.bpel.design.selection.PlaceHolder;
019:        import org.netbeans.modules.bpel.core.helper.api.CoreUtil;
020:
021:        /**
022:         *
023:         * @author Alexey
024:         */
025:        public class ProcessView extends DiagramView {
026:
027:            public ProcessView(DesignView designView) {
028:                super (designView);
029:
030:                // vlv: print
031:                putClientProperty(java.awt.print.Printable.class, CoreUtil
032:                        .getProcessName(designView.getBPELModel()));
033:                putClientProperty(java.lang.Integer.class, new Integer(1));
034:            }
035:
036:            @Override
037:            /**
038:             * Ignores the content of PLs pattern;
039:             * 
040:             */
041:            protected void paintPattern(Graphics2D g2, Graphics2D g2bw,
042:                    Pattern pattern, FBounds clipBounds, boolean printMode) {
043:                if (pattern instanceof  PartnerLinksPattern) {
044:                    return;
045:                }
046:                MessageConnection.resetRoutingInfo();
047:                super .paintPattern(g2, g2bw, pattern, clipBounds, printMode);
048:            }
049:
050:            public FBounds getContentSize() {
051:                Pattern rp = getDesignView().getModel().getRootPattern();
052:                return (rp != null) ? rp.getBounds() : new FBounds(0, 0);
053:            }
054:
055:            @Override
056:            public Iterator<Pattern> getPatterns() {
057:                return new ListBuilder().getList();
058:
059:            }
060:
061:            class ListBuilder {
062:
063:                private ArrayList<Pattern> list;
064:
065:                public Iterator<Pattern> getList() {
066:                    list = new ArrayList<Pattern>();
067:                    buildList(getDesignView().getModel().getRootPattern());
068:                    return list.iterator();
069:                }
070:
071:                private void buildList(Pattern pattern) {
072:                    if (pattern instanceof  PartnerLinksPattern) {
073:                        return;
074:                    }
075:
076:                    list.add(pattern);
077:
078:                    if (pattern instanceof  CompositePattern) {
079:                        for (Pattern p : ((CompositePattern) pattern)
080:                                .getNestedPatterns()) {
081:                            buildList(p);
082:                        }
083:                    }
084:
085:                }
086:            }
087:
088:            @Override
089:            public void getPlaceholders(Pattern draggedPattern,
090:                    List<PlaceHolder> placeHolders) {
091:                //EMPTY. This view does not provide any additional placeholders
092:            }
093:
094:            @Override
095:            public VisualElement findElement(double x, double y) {
096:                Pattern root = getDesignView().getModel().getRootPattern();
097:                return findElement(root, x, y);
098:            }
099:
100:            private VisualElement findElement(Pattern pattern, double x,
101:                    double y) {
102:                if (pattern instanceof  PartnerLinksPattern) {
103:                    return null;
104:                }
105:
106:                if (pattern instanceof  CompositePattern) {
107:                    for (Pattern p : ((CompositePattern) pattern)
108:                            .getNestedPatterns()) {
109:                        VisualElement e = findElement(p, x, y);
110:                        if (e != null) {
111:                            return e;
112:                        }
113:                    }
114:                }
115:                return findElementInPattern(pattern, x, y);
116:            }
117:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.