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


001:        package newprocess.diagram.edit.parts;
002:
003:        import newprocess.diagram.cust.figures.TermDefaultSizeNodeFigure;
004:        import newprocess.diagram.cust.policies.HighlightEditPolicy;
005:        import newprocess.diagram.edit.policies.ConditionTermItemSemanticEditPolicy;
006:
007:        import org.eclipse.draw2d.Graphics;
008:        import org.eclipse.draw2d.IFigure;
009:        import org.eclipse.draw2d.RectangleFigure;
010:        import org.eclipse.draw2d.StackLayout;
011:        import org.eclipse.draw2d.geometry.Dimension;
012:        import org.eclipse.gef.EditPart;
013:        import org.eclipse.gef.EditPolicy;
014:        import org.eclipse.gef.Request;
015:        import org.eclipse.gef.commands.Command;
016:        import org.eclipse.gef.editpolicies.LayoutEditPolicy;
017:        import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
018:        import org.eclipse.gef.requests.CreateRequest;
019:        import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart;
020:        import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
021:        import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
022:        import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
023:        import org.eclipse.gmf.runtime.notation.View;
024:        import org.eclipse.swt.graphics.Color;
025:
026:        /**
027:         * @generated
028:         */
029:        public class ConditionTermEditPart extends AbstractBorderItemEditPart {
030:
031:            /**
032:             * @generated
033:             */
034:            public static final int VISUAL_ID = 3005;
035:
036:            /**
037:             * @generated
038:             */
039:            protected IFigure contentPane;
040:
041:            /**
042:             * @generated
043:             */
044:            protected IFigure primaryShape;
045:
046:            /**
047:             * @generated
048:             */
049:            public ConditionTermEditPart(View view) {
050:                super (view);
051:            }
052:
053:            /**
054:             * @generated NOT
055:             * @author sh
056:             */
057:            protected void createDefaultEditPolicies() {
058:                super .createDefaultEditPolicies();
059:
060:                installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE,
061:                        getPrimaryDragEditPolicy());
062:                installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
063:                        new ConditionTermItemSemanticEditPolicy());
064:                installEditPolicy(EditPolicy.LAYOUT_ROLE,
065:                        createLayoutEditPolicy());
066:                installEditPolicy(EditPolicyRoles.SNAP_FEEDBACK_ROLE,
067:                        new HighlightEditPolicy());
068:            }
069:
070:            /**
071:             * @generated
072:             */
073:            protected LayoutEditPolicy createLayoutEditPolicy() {
074:                LayoutEditPolicy lep = new LayoutEditPolicy() {
075:
076:                    protected EditPolicy createChildEditPolicy(EditPart child) {
077:                        EditPolicy result = child
078:                                .getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
079:                        if (result == null) {
080:                            result = new NonResizableEditPolicy();
081:                        }
082:                        return result;
083:                    }
084:
085:                    protected Command getMoveChildrenCommand(Request request) {
086:                        return null;
087:                    }
088:
089:                    protected Command getCreateCommand(CreateRequest request) {
090:                        return null;
091:                    }
092:                };
093:                return lep;
094:            }
095:
096:            /**
097:             * @generated
098:             */
099:            protected IFigure createNodeShape() {
100:                ConditionTermFigure figure = new ConditionTermFigure();
101:                return primaryShape = figure;
102:            }
103:
104:            /**
105:             * @generated
106:             */
107:            public ConditionTermFigure getPrimaryShape() {
108:                return (ConditionTermFigure) primaryShape;
109:            }
110:
111:            /**
112:             * @generated NOT
113:             * @author sh
114:             */
115:            protected NodeFigure createNodePlate() {
116:                TermDefaultSizeNodeFigure result = new TermDefaultSizeNodeFigure(
117:                        getMapMode().DPtoLP(10), getMapMode().DPtoLP(5));
118:                // tell the Editpart to it�s figure. It�s ugly and not MVC but allows to 
119:                // untagle prot connections
120:                result.setMyPort(this );
121:                //FIXME: workaround for #154536
122:                result.getBounds().setSize(result.getPreferredSize());
123:                return result;
124:            }
125:
126:            /**
127:             * Creates figure for this edit part.
128:             * 
129:             * Body of this method does not depend on settings in generation model
130:             * so you may safely remove <i>generated</i> tag and modify it.
131:             * 
132:             * @generated
133:             */
134:            protected NodeFigure createNodeFigure() {
135:                NodeFigure figure = createNodePlate();
136:                figure.setLayoutManager(new StackLayout());
137:                IFigure shape = createNodeShape();
138:                figure.add(shape);
139:                contentPane = setupContentPane(shape);
140:                return figure;
141:            }
142:
143:            /**
144:             * Default implementation treats passed figure as content pane.
145:             * Respects layout one may have set for generated figure.
146:             * @param nodeShape instance of generated figure class
147:             * @generated
148:             */
149:            protected IFigure setupContentPane(IFigure nodeShape) {
150:                if (nodeShape.getLayoutManager() == null) {
151:                    ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
152:                    layout.setSpacing(getMapMode().DPtoLP(5));
153:                    nodeShape.setLayoutManager(layout);
154:                }
155:                return nodeShape; // use nodeShape itself as contentPane
156:            }
157:
158:            /**
159:             * @generated
160:             */
161:            public IFigure getContentPane() {
162:                if (contentPane != null) {
163:                    return contentPane;
164:                }
165:                return super .getContentPane();
166:            }
167:
168:            /**
169:             * @generated
170:             */
171:            public class ConditionTermFigure extends RectangleFigure {
172:                /**
173:                 * @generated
174:                 */
175:                public ConditionTermFigure() {
176:                    this .setFill(true);
177:                    this .setFillXOR(false);
178:                    this .setOutline(true);
179:                    this .setOutlineXOR(false);
180:                    this .setLineWidth(1);
181:                    this .setLineStyle(Graphics.LINE_SOLID);
182:                    this .setBackgroundColor(CONDITIONTERMFIGURE_BACK);
183:                    this .setPreferredSize(new Dimension(
184:                            getMapMode().DPtoLP(10), getMapMode().DPtoLP(5)));
185:                    this .setMaximumSize(new Dimension(getMapMode().DPtoLP(10),
186:                            getMapMode().DPtoLP(5)));
187:                    this .setMinimumSize(new Dimension(getMapMode().DPtoLP(10),
188:                            getMapMode().DPtoLP(5)));
189:                }
190:
191:                /**
192:                 * @generated
193:                 */
194:                private boolean myUseLocalCoordinates = false;
195:
196:                /**
197:                 * @generated
198:                 */
199:                protected boolean useLocalCoordinates() {
200:                    return myUseLocalCoordinates;
201:                }
202:
203:                /**
204:                 * @generated
205:                 */
206:                protected void setUseLocalCoordinates(
207:                        boolean useLocalCoordinates) {
208:                    myUseLocalCoordinates = useLocalCoordinates;
209:                }
210:
211:            }
212:
213:            /**
214:             * @generated
215:             */
216:            static final Color CONDITIONTERMFIGURE_BACK = new Color(null, 49,
217:                    106, 197);
218:
219:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.