Source Code Cross Referenced for AndOperatorEditPart.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.edit.policies.AndOperatorItemSemanticEditPolicy;
004:
005:        import org.eclipse.draw2d.ColorConstants;
006:        import org.eclipse.draw2d.Ellipse;
007:        import org.eclipse.draw2d.Graphics;
008:        import org.eclipse.draw2d.IFigure;
009:        import org.eclipse.draw2d.PositionConstants;
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.editpolicies.ResizableEditPolicy;
019:        import org.eclipse.gef.requests.CreateRequest;
020:        import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
021:        import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
022:        import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
023:        import org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel;
024:        import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
025:        import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
026:        import org.eclipse.gmf.runtime.notation.View;
027:
028:        /**
029:         * @generated
030:         */
031:        public class AndOperatorEditPart extends ShapeNodeEditPart {
032:
033:            /**
034:             * @generated
035:             */
036:            public static final int VISUAL_ID = 3004;
037:
038:            /**
039:             * @generated
040:             */
041:            protected IFigure contentPane;
042:
043:            /**
044:             * @generated
045:             */
046:            protected IFigure primaryShape;
047:
048:            /**
049:             * @generated
050:             */
051:            public AndOperatorEditPart(View view) {
052:                super (view);
053:            }
054:
055:            /**
056:             * @generated
057:             */
058:            protected void createDefaultEditPolicies() {
059:                super .createDefaultEditPolicies();
060:
061:                installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
062:                        new AndOperatorItemSemanticEditPolicy());
063:                installEditPolicy(EditPolicy.LAYOUT_ROLE,
064:                        createLayoutEditPolicy());
065:            }
066:
067:            /**
068:             * @generated
069:             */
070:            protected LayoutEditPolicy createLayoutEditPolicy() {
071:                LayoutEditPolicy lep = new LayoutEditPolicy() {
072:
073:                    protected EditPolicy createChildEditPolicy(EditPart child) {
074:                        EditPolicy result = child
075:                                .getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
076:                        if (result == null) {
077:                            result = new NonResizableEditPolicy();
078:                        }
079:                        return result;
080:                    }
081:
082:                    protected Command getMoveChildrenCommand(Request request) {
083:                        return null;
084:                    }
085:
086:                    protected Command getCreateCommand(CreateRequest request) {
087:                        return null;
088:                    }
089:                };
090:                return lep;
091:            }
092:
093:            /**
094:             * @generated
095:             */
096:            protected IFigure createNodeShape() {
097:                AndOperatorFigure figure = new AndOperatorFigure();
098:                return primaryShape = figure;
099:            }
100:
101:            /**
102:             * @generated
103:             */
104:            public AndOperatorFigure getPrimaryShape() {
105:                return (AndOperatorFigure) primaryShape;
106:            }
107:
108:            /**
109:             * @generated
110:             */
111:            protected NodeFigure createNodePlate() {
112:                DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(
113:                        getMapMode().DPtoLP(20), getMapMode().DPtoLP(20));
114:
115:                return result;
116:            }
117:
118:            /**
119:             * @generated
120:             */
121:            public EditPolicy getPrimaryDragEditPolicy() {
122:                EditPolicy result = super .getPrimaryDragEditPolicy();
123:                if (result instanceof  ResizableEditPolicy) {
124:                    ResizableEditPolicy ep = (ResizableEditPolicy) result;
125:                    ep.setResizeDirections(PositionConstants.NONE);
126:                }
127:                return result;
128:            }
129:
130:            /**
131:             * Creates figure for this edit part.
132:             * 
133:             * Body of this method does not depend on settings in generation model
134:             * so you may safely remove <i>generated</i> tag and modify it.
135:             * 
136:             * @generated
137:             */
138:            protected NodeFigure createNodeFigure() {
139:                NodeFigure figure = createNodePlate();
140:                figure.setLayoutManager(new StackLayout());
141:                IFigure shape = createNodeShape();
142:                figure.add(shape);
143:                contentPane = setupContentPane(shape);
144:                return figure;
145:            }
146:
147:            /**
148:             * Default implementation treats passed figure as content pane.
149:             * Respects layout one may have set for generated figure.
150:             * @param nodeShape instance of generated figure class
151:             * @generated
152:             */
153:            protected IFigure setupContentPane(IFigure nodeShape) {
154:                if (nodeShape.getLayoutManager() == null) {
155:                    ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
156:                    layout.setSpacing(getMapMode().DPtoLP(5));
157:                    nodeShape.setLayoutManager(layout);
158:                }
159:                return nodeShape; // use nodeShape itself as contentPane
160:            }
161:
162:            /**
163:             * @generated
164:             */
165:            public IFigure getContentPane() {
166:                if (contentPane != null) {
167:                    return contentPane;
168:                }
169:                return super .getContentPane();
170:            }
171:
172:            /**
173:             * @generated
174:             */
175:            public class AndOperatorFigure extends Ellipse {
176:                /**
177:                 * @generated
178:                 */
179:                public AndOperatorFigure() {
180:                    this .setFill(true);
181:                    this .setFillXOR(false);
182:                    this .setOutline(true);
183:                    this .setOutlineXOR(false);
184:                    this .setLineWidth(1);
185:                    this .setLineStyle(Graphics.LINE_SOLID);
186:                    this .setForegroundColor(ColorConstants.black);
187:                    this .setBackgroundColor(ColorConstants.white);
188:                    this .setPreferredSize(new Dimension(
189:                            getMapMode().DPtoLP(20), getMapMode().DPtoLP(20)));
190:                    this .setMaximumSize(new Dimension(getMapMode().DPtoLP(20),
191:                            getMapMode().DPtoLP(20)));
192:                    this .setMinimumSize(new Dimension(getMapMode().DPtoLP(20),
193:                            getMapMode().DPtoLP(20)));
194:                    createContents();
195:                }
196:
197:                /**
198:                 * @generated
199:                 */
200:                private void createContents() {
201:
202:                    WrapLabel andOperatorNameFigure0 = new WrapLabel();
203:                    andOperatorNameFigure0.setText("&&");
204:
205:                    this .add(andOperatorNameFigure0);
206:                    setFigureAndOperatorNameFigure(andOperatorNameFigure0);
207:
208:                }
209:
210:                /**
211:                 * @generated
212:                 */
213:                private WrapLabel fAndOperatorNameFigure;
214:
215:                /**
216:                 * @generated
217:                 */
218:                public WrapLabel getFigureAndOperatorNameFigure() {
219:                    return fAndOperatorNameFigure;
220:                }
221:
222:                /**
223:                 * @generated
224:                 */
225:                private void setFigureAndOperatorNameFigure(WrapLabel fig) {
226:                    fAndOperatorNameFigure = fig;
227:                }
228:
229:                /**
230:                 * @generated
231:                 */
232:                private boolean myUseLocalCoordinates = false;
233:
234:                /**
235:                 * @generated
236:                 */
237:                protected boolean useLocalCoordinates() {
238:                    return myUseLocalCoordinates;
239:                }
240:
241:                /**
242:                 * @generated
243:                 */
244:                protected void setUseLocalCoordinates(
245:                        boolean useLocalCoordinates) {
246:                    myUseLocalCoordinates = useLocalCoordinates;
247:                }
248:
249:            }
250:
251:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.