Source Code Cross Referenced for JDBCEditPart.java in  » ESB » cbesb-1.2 » com » bostechcorp » cbesb » ui » componentflow » componentFlowEditor » 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 » ESB » cbesb 1.2 » com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.edit.parts 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * ChainBuilder ESB
0003:         *          Visual Enterprise Integration
0004:         * 
0005:         * Copyright (C) 2006 Bostech Corporation
0006:         * 
0007:         * This program is free software; you can redistribute it and/or modify it 
0008:         * under the terms of the GNU General Public License as published by the 
0009:         * Free Software Foundation; either version 2 of the License, or (at your option) 
0010:         * any later version.
0011:         *
0012:         * This program is distributed in the hope that it will be useful, 
0013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
0014:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
0015:         * for more details.
0016:         * 
0017:         * You should have received a copy of the GNU General Public License along with 
0018:         * this program; if not, write to the Free Software Foundation, Inc., 
0019:         * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0020:         *
0021:         *
0022:         * $Id$
0023:         */
0024:        package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.edit.parts;
0025:
0026:        import java.util.HashMap;
0027:        import java.util.Iterator;
0028:        import java.util.List;
0029:
0030:        import org.eclipse.draw2d.BorderLayout;
0031:        import org.eclipse.draw2d.ChopboxAnchor;
0032:        import org.eclipse.draw2d.ConnectionAnchor;
0033:        import org.eclipse.draw2d.Figure;
0034:        import org.eclipse.draw2d.IFigure;
0035:        import org.eclipse.draw2d.ImageFigure;
0036:        import org.eclipse.draw2d.PositionConstants;
0037:        import org.eclipse.draw2d.StackLayout;
0038:        import org.eclipse.draw2d.ToolbarLayout;
0039:        import org.eclipse.draw2d.geometry.Point;
0040:        import org.eclipse.draw2d.geometry.Rectangle;
0041:        import org.eclipse.emf.common.command.AbstractCommand;
0042:        import org.eclipse.emf.common.command.CompoundCommand;
0043:        import org.eclipse.emf.common.notify.Notification;
0044:        import org.eclipse.emf.common.notify.impl.AdapterImpl;
0045:        import org.eclipse.emf.ecore.EAnnotation;
0046:        import org.eclipse.emf.ecore.EClass;
0047:        import org.eclipse.emf.ecore.EObject;
0048:        import org.eclipse.emf.ecore.EStructuralFeature;
0049:        import org.eclipse.emf.edit.command.AddCommand;
0050:        import org.eclipse.emf.edit.command.RemoveCommand;
0051:        import org.eclipse.emf.edit.command.SetCommand;
0052:        import org.eclipse.emf.transaction.RecordingCommand;
0053:        import org.eclipse.emf.transaction.TransactionalEditingDomain;
0054:        import org.eclipse.emf.transaction.util.TransactionUtil;
0055:        import org.eclipse.gef.ConnectionEditPart;
0056:        import org.eclipse.gef.EditPart;
0057:        import org.eclipse.gef.EditPolicy;
0058:        import org.eclipse.gef.GraphicalEditPart;
0059:        import org.eclipse.gef.NodeEditPart;
0060:        import org.eclipse.gef.Request;
0061:        import org.eclipse.gef.RequestConstants;
0062:        import org.eclipse.gef.commands.Command;
0063:        import org.eclipse.gef.commands.UnexecutableCommand;
0064:        import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
0065:        import org.eclipse.gef.editpolicies.ComponentEditPolicy;
0066:        import org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy;
0067:        import org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy;
0068:        import org.eclipse.gef.editpolicies.ResizableEditPolicy;
0069:        import org.eclipse.gef.requests.CreateConnectionRequest;
0070:        import org.eclipse.gef.requests.CreateRequest;
0071:        import org.eclipse.gef.requests.DirectEditRequest;
0072:        import org.eclipse.gef.requests.GroupRequest;
0073:        import org.eclipse.gef.requests.ReconnectRequest;
0074:        import org.eclipse.gmf.runtime.notation.Bounds;
0075:        import org.eclipse.gmf.runtime.notation.Edge;
0076:        import org.eclipse.gmf.runtime.notation.FillStyle;
0077:        import org.eclipse.gmf.runtime.notation.FontStyle;
0078:        import org.eclipse.gmf.runtime.notation.LineStyle;
0079:        import org.eclipse.gmf.runtime.notation.Node;
0080:        import org.eclipse.gmf.runtime.notation.NotationFactory;
0081:        import org.eclipse.gmf.runtime.notation.NotationPackage;
0082:        import org.eclipse.gmf.runtime.notation.View;
0083:        import org.eclipse.jface.wizard.WizardDialog;
0084:        import org.eclipse.swt.SWT;
0085:        import org.eclipse.swt.graphics.Color;
0086:        import org.eclipse.swt.graphics.Font;
0087:        import org.eclipse.swt.graphics.FontData;
0088:        import org.eclipse.ui.PlatformUI;
0089:
0090:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ComponentFlowEditorDocument;
0091:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ComponentFlowEditorElement;
0092:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.MessageExchange;
0093:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowFactory;
0094:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
0095:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.part.ComponentFlowEditorDiagramEditorPlugin;
0096:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.part.ComponentFlowEditorPaletteFactory;
0097:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.part.ComponentFlowEditorVisualIDRegistry;
0098:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.view.factories.DomainElementInitializer;
0099:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.view.factories.MessageExchangeViewFactory;
0100:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.wizards.JDBCPropertyWizard;
0101:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.wizards.WizardUtil;
0102:
0103:        /**
0104:         * @generated
0105:         */
0106:        public class JDBCEditPart extends AbstractGraphicalEditPart implements 
0107:                NodeEditPart, IUpdatableEditPart {
0108:
0109:            /**
0110:             * @generated
0111:             */
0112:            public static final int VISUAL_ID = 2011;
0113:
0114:            /**
0115:             * @generated
0116:             */
0117:            protected IFigure contentPane;
0118:
0119:            /**
0120:             * @generated
0121:             */
0122:            protected IFigure primaryShape;
0123:
0124:            /**
0125:             * @generated
0126:             */
0127:            public JDBCEditPart(View model) {
0128:                assert model instanceof  Node;
0129:                setModel(model);
0130:            }
0131:
0132:            /**
0133:             * @generated
0134:             */
0135:            protected void createEditPolicies() {
0136:                installEditPolicy(EditPolicy.COMPONENT_ROLE,
0137:                        new ComponentEditPolicy() {
0138:                            protected Command createDeleteCommand(
0139:                                    GroupRequest deleteRequest) {
0140:                                TransactionalEditingDomain editingDomain = TransactionUtil
0141:                                        .getEditingDomain(getDiagramNode()
0142:                                                .getDiagram().getElement());
0143:                                CompoundCommand cc = new CompoundCommand();
0144:                                cc
0145:                                        .append(getDomainModelRemoveCommand(editingDomain));
0146:                                cc.append(RemoveCommand.create(editingDomain,
0147:                                        getDiagramNode()));
0148:                                return new WrappingCommand(editingDomain, cc);
0149:                            }
0150:
0151:                            private org.eclipse.emf.common.command.Command getDomainModelRemoveCommand(
0152:                                    TransactionalEditingDomain editingDomain) {
0153:                                return RemoveCommand
0154:                                        .create(
0155:                                                editingDomain,
0156:                                                getDiagramNode().getElement()
0157:                                                        .eContainer(),
0158:                                                componentflowPackage.eINSTANCE
0159:                                                        .getComponentFlowEditorDocument_ComponentFlowEditorElements(),
0160:                                                getDiagramNode().getElement());
0161:                            }
0162:                        });
0163:                installEditPolicy(EditPolicy.LAYOUT_ROLE,
0164:                        new ConstrainedLayoutEditPolicy() {
0165:                            protected Command getCreateCommand(
0166:                                    CreateRequest request) {
0167:                                return UnexecutableCommand.INSTANCE;
0168:                            }
0169:
0170:                            protected Object getConstraintFor(Rectangle rect) {
0171:                                return null;
0172:                            }
0173:
0174:                            protected Object getConstraintFor(Point point) {
0175:                                return null;
0176:                            }
0177:
0178:                            protected Command createChangeConstraintCommand(
0179:                                    EditPart child, Object constraint) {
0180:                                return UnexecutableCommand.INSTANCE;
0181:                            }
0182:
0183:                            protected EditPolicy createChildEditPolicy(
0184:                                    EditPart child) {
0185:                                return new ResizableEditPolicy() {
0186:                                    public EditPart getTargetEditPart(
0187:                                            Request request) {
0188:                                        if (RequestConstants.REQ_SELECTION
0189:                                                .equals(request.getType())) {
0190:                                            return JDBCEditPart.this ;
0191:                                        }
0192:                                        return super .getTargetEditPart(request);
0193:                                    }
0194:                                };
0195:                            }
0196:                        });
0197:                installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE,
0198:                        new GraphicalNodeEditPolicy() {
0199:                            protected Command getReconnectTargetCommand(
0200:                                    ReconnectRequest request) {
0201:                                //XXX: reconnect command
0202:                                return UnexecutableCommand.INSTANCE;
0203:                            }
0204:
0205:                            protected Command getReconnectSourceCommand(
0206:                                    ReconnectRequest request) {
0207:                                //XXX: reconnect command
0208:                                return UnexecutableCommand.INSTANCE;
0209:                            }
0210:
0211:                            protected Command getConnectionCreateCommand(
0212:                                    CreateConnectionRequest request) {
0213:                                if (request instanceof  ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) {
0214:                                    ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx = (ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) request;
0215:                                    int[] visualIds = requestEx.getVisualIds();
0216:                                    CompoundCommand result = new CompoundCommand();
0217:                                    for (int i = 0; i < visualIds.length; i++) {
0218:                                        int nextVisualId = visualIds[i];
0219:                                        switch (nextVisualId) {
0220:                                        case MessageExchangeEditPart.VISUAL_ID:
0221:                                            result
0222:                                                    .append(new CreateMessageExchange4001StartCommand(
0223:                                                            requestEx));
0224:                                            break;
0225:                                        }
0226:                                    }
0227:                                    if (result.getCommandList().size() != 1
0228:                                            || !result.canExecute()) {
0229:                                        //Cannot create several connections at once.
0230:                                        //returning an unexecutable command does not change cursor to "No".
0231:                                        return null;
0232:                                    }
0233:                                    Command wrappedResult = new WrappingCommand(
0234:                                            TransactionUtil
0235:                                                    .getEditingDomain(getDiagramNode()
0236:                                                            .getDiagram()
0237:                                                            .getElement()),
0238:                                            result);
0239:                                    request.setStartCommand(wrappedResult);
0240:                                    return wrappedResult;
0241:                                }
0242:                                return null;
0243:                            }
0244:
0245:                            protected Command getConnectionCompleteCommand(
0246:                                    CreateConnectionRequest request) {
0247:                                if (request.getStartCommand() == null
0248:                                        || !request.getStartCommand()
0249:                                                .canExecute()) {
0250:                                    return UnexecutableCommand.INSTANCE;
0251:                                }
0252:                                if (request instanceof  ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) {
0253:                                    ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx = (ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) request;
0254:                                    int[] visualIds = requestEx.getVisualIds();
0255:                                    CompoundCommand result = new CompoundCommand();
0256:                                    for (int i = 0; i < visualIds.length; i++) {
0257:                                        int nextVisualId = visualIds[i];
0258:                                        switch (nextVisualId) {
0259:                                        case MessageExchangeEditPart.VISUAL_ID:
0260:                                            result
0261:                                                    .append(new CreateMessageExchange4001Command(
0262:                                                            requestEx));
0263:                                            break;
0264:                                        }
0265:                                    }
0266:                                    if (result.getCommandList().size() != 1) {
0267:                                        //Cannot create several connections at once.
0268:                                        return UnexecutableCommand.INSTANCE;
0269:                                    }
0270:                                    return new WrappingCommand(
0271:                                            TransactionUtil
0272:                                                    .getEditingDomain(getDiagramNode()
0273:                                                            .getDiagram()
0274:                                                            .getElement()),
0275:                                            result);
0276:                                }
0277:                                return UnexecutableCommand.INSTANCE;
0278:                            }
0279:                        });
0280:            }
0281:
0282:            /**
0283:             * @generated NOT
0284:             */
0285:            protected IFigure createFigure() {
0286:                IFigure invisibleRectangle = new Figure();
0287:                invisibleRectangle.setLayoutManager(new BorderLayout());
0288:                IFigure rec = new Figure();
0289:                invisibleRectangle.add(rec, BorderLayout.CENTER);
0290:                rec.setLayoutManager(new StackLayout());
0291:                IFigure shape = createNodeShape();
0292:                rec.add(shape);
0293:                contentPane = setupContentPane(shape);
0294:
0295:                IFigure decorationShape = createDecorationPane();
0296:                if (decorationShape != null) {
0297:                    rec.add(decorationShape);
0298:                }
0299:                // add----------------------------
0300:                org.eclipse.draw2d.Label fig = new org.eclipse.draw2d.Label();
0301:                fig.setText("");
0302:
0303:                ((SEFigure) shape).setFigureSENameFigure(fig);
0304:
0305:                invisibleRectangle.add(fig, BorderLayout.BOTTOM);
0306:                //---------------------------------------------------
0307:                View view = (View) getModel();
0308:
0309:                wizardOut(view, true);
0310:
0311:                return invisibleRectangle;
0312:            }
0313:
0314:            /**
0315:             * @generated
0316:             */
0317:            protected IFigure createNodeShape() {
0318:                SEFigure figure = new SEFigure();
0319:                primaryShape = figure;
0320:                return primaryShape;
0321:            }
0322:
0323:            /**
0324:             * @generated
0325:             */
0326:            public SEFigure getPrimaryShape() {
0327:                return (SEFigure) primaryShape;
0328:            }
0329:
0330:            /**
0331:             * @generated NOT
0332:             */
0333:            private IFigure createDecorationPane() {
0334:                View view = (View) getModel();
0335:                EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
0336:                /*if (annotation == null) {
0337:                 return null;
0338:                 }*/
0339:
0340:                Figure decorationPane = new Figure();
0341:                decorationPane.setLayoutManager(new BorderLayout());
0342:
0343:                ImageFigure imageFigure = new ImageFigure(
0344:                        ComponentFlowEditorDiagramEditorPlugin.getInstance()
0345:                                .getBundledImage("icons/JDBC32.ico"),
0346:                        PositionConstants.CENTER);
0347:                decorationPane.add(imageFigure, BorderLayout.TOP);
0348:                return decorationPane;
0349:            }
0350:
0351:            /**
0352:             * Default implementation treats passed figure as content pane.
0353:             * Respects layout one may have set for generated figure.
0354:             * @param nodeShape instance of generated figure class
0355:             * @generated
0356:             */
0357:            protected IFigure setupContentPane(IFigure nodeShape) {
0358:                if (nodeShape.getLayoutManager() == null) {
0359:                    ToolbarLayout layout = new ToolbarLayout();
0360:                    layout.setSpacing(5);
0361:                    nodeShape.setLayoutManager(layout);
0362:                }
0363:                return nodeShape; // use nodeShape itself as contentPane
0364:            }
0365:
0366:            /**
0367:             * @generated
0368:             */
0369:            public IFigure getContentPane() {
0370:                if (contentPane == null) {
0371:                    return super .getContentPane();
0372:                }
0373:                return contentPane;
0374:            }
0375:
0376:            /**
0377:             * @generated
0378:             */
0379:            public Node getDiagramNode() {
0380:                return (Node) getModel();
0381:            }
0382:
0383:            /**
0384:             * @generated
0385:             */
0386:            protected boolean addFixedChild(EditPart childEditPart) {
0387:                if (childEditPart instanceof  JDBCNameEditPart) {
0388:                    ((JDBCNameEditPart) childEditPart)
0389:                            .setLabel(getPrimaryShape().getFigureSENameFigure());
0390:                    return true;
0391:                }
0392:                return false;
0393:            }
0394:
0395:            /**
0396:             * @generated
0397:             */
0398:            protected boolean removeFixedChild(EditPart childEditPart) {
0399:                return false;
0400:            }
0401:
0402:            /**
0403:             * Returns the label which should be direct-edited by default.
0404:             * @generated
0405:             */
0406:            private EditPart getPrimaryLabelEditPart() {
0407:                for (Iterator it = getDiagramNode().getChildren().iterator(); it
0408:                        .hasNext();) {
0409:                    View nextChild = (View) it.next();
0410:                    if (ComponentFlowEditorVisualIDRegistry
0411:                            .getVisualID(nextChild) == JDBCNameEditPart.VISUAL_ID) {
0412:                        return (EditPart) getViewer().getEditPartRegistry()
0413:                                .get(nextChild);
0414:                    }
0415:                }
0416:                return null;
0417:            }
0418:
0419:            /**
0420:             * @generated NOT
0421:             */
0422:            public void performRequest(Request req) {
0423:                if (RequestConstants.REQ_DIRECT_EDIT == req.getType()) {
0424:                    EditPart labelToEdit;
0425:                    if (req instanceof  DirectEditRequest) {
0426:                        labelToEdit = getLabelEditPart((DirectEditRequest) req);
0427:                    } else {
0428:                        labelToEdit = getPrimaryLabelEditPart();
0429:                    }
0430:                    if (labelToEdit != null) {
0431:                        labelToEdit.performRequest(req);
0432:                    }
0433:                }
0434:                //	Figure double clicked
0435:                if (REQ_OPEN.equals(req.getType())) {
0436:                    /*View view = (View) getModel();
0437:                     wizardOut(view, false);
0438:                     super.performRequest(req);*/
0439:                }
0440:            }
0441:
0442:            /**
0443:             * @generated
0444:             */
0445:            private EditPart getLabelEditPart(DirectEditRequest req) {
0446:                EditPart result = getViewer().findObjectAt(req.getLocation());
0447:                if (result != null) {
0448:                    View view = (View) result.getModel();
0449:                    if (getDiagramNode().getChildren().contains(view)) {
0450:                        int visualId = ComponentFlowEditorVisualIDRegistry
0451:                                .getVisualID(view);
0452:                        switch (visualId) {
0453:                        case JDBCNameEditPart.VISUAL_ID:
0454:                            return result;
0455:                        }
0456:                    }
0457:                }
0458:                return getPrimaryLabelEditPart();
0459:            }
0460:
0461:            /**
0462:             * @generated
0463:             */
0464:            protected void addChildVisual(EditPart childEditPart, int index) {
0465:                if (addFixedChild(childEditPart)) {
0466:                    return;
0467:                }
0468:                super .addChildVisual(childEditPart, -1);
0469:            }
0470:
0471:            /**
0472:             * @generated
0473:             */
0474:            protected void removeChildVisual(EditPart childEditPart) {
0475:                if (removeFixedChild(childEditPart)) {
0476:                    return;
0477:                }
0478:                super .removeChildVisual(childEditPart);
0479:            }
0480:
0481:            /**
0482:             * @generated
0483:             */
0484:            protected void refreshVisuals() {
0485:                super .refreshVisuals();
0486:                refreshBounds();
0487:                refreshBackgroundColor();
0488:                refreshForegroundColor();
0489:                refreshFont();
0490:                refreshVisibility();
0491:            }
0492:
0493:            /**
0494:             * @generated
0495:             */
0496:            protected void refreshVisibility() {
0497:                boolean isVisible = getDiagramNode().isVisible();
0498:                boolean wasVisible = getFigure().isVisible();
0499:                if (isVisible == wasVisible) {
0500:                    return;
0501:                }
0502:                if (!isVisible && (getSelected() != SELECTED_NONE)) {
0503:                    getViewer().deselect(this );
0504:                }
0505:
0506:                getFigure().setVisible(isVisible);
0507:                getFigure().revalidate();
0508:            }
0509:
0510:            /**
0511:             * @generated
0512:             */
0513:            protected void refreshBounds() {
0514:                Node node = getDiagramNode();
0515:                assert node.getLayoutConstraint() instanceof  Bounds;
0516:                Bounds bounds = (Bounds) node.getLayoutConstraint();
0517:                ((GraphicalEditPart) getParent()).setLayoutConstraint(this ,
0518:                        getFigure(), new Rectangle(bounds.getX(),
0519:                                bounds.getY(), bounds.getWidth(), bounds
0520:                                        .getHeight()));
0521:            }
0522:
0523:            /**
0524:             * @generated
0525:             */
0526:            protected List getModelChildren() {
0527:                return getDiagramNode().getVisibleChildren();
0528:            }
0529:
0530:            /**
0531:             * @generated
0532:             */
0533:            protected List getModelSourceConnections() {
0534:                return getDiagramNode().getSourceEdges();
0535:            }
0536:
0537:            /**
0538:             * @generated NOT
0539:             */
0540:            protected List getModelTargetConnections() {
0541:
0542:                return getDiagramNode().getTargetEdges();
0543:            }
0544:
0545:            /**
0546:             * @generated NOT
0547:             */
0548:            protected void adjustName() {
0549:                ComponentFlowEditorEditPartFactory.setModelName(this , "JDBC");
0550:            }
0551:
0552:            /**
0553:             * @generated NOT
0554:             */
0555:            public void wizardOut(View view, boolean newCom) {
0556:                if (newCom && !WizardUtil.canWizardOut(view))
0557:                    return;
0558:
0559:                final JDBCPropertyWizard JDBCWizard = new JDBCPropertyWizard();
0560:                if (newCom) {
0561:                    JDBCWizard
0562:                            .setAddedOperation((ComponentFlowEditorElement) view
0563:                                    .getElement());
0564:                    WizardDialog wizard = new WizardDialog(PlatformUI
0565:                            .getWorkbench().getActiveWorkbenchWindow()
0566:                            .getShell(), JDBCWizard);
0567:                    wizard.open();
0568:                } else {
0569:                    JDBCWizard
0570:                            .setUpdateOperation((ComponentFlowEditorElement) view
0571:                                    .getElement());
0572:
0573:                    TransactionalEditingDomain domain = TransactionUtil
0574:                            .getEditingDomain(view.getElement());
0575:                    domain.getCommandStack().execute(
0576:                            new RecordingCommand(domain) {
0577:
0578:                                public void doExecute() {
0579:                                    WizardDialog wizard = new WizardDialog(
0580:                                            PlatformUI.getWorkbench()
0581:                                                    .getActiveWorkbenchWindow()
0582:                                                    .getShell(), JDBCWizard);
0583:                                    wizard.open();
0584:                                }
0585:                            });
0586:                }
0587:            }
0588:
0589:            /**
0590:             * @generated
0591:             */
0592:            public ConnectionAnchor getSourceConnectionAnchor(
0593:                    ConnectionEditPart connection) {
0594:                return new ChopboxAnchor(getFigure());
0595:            }
0596:
0597:            /**
0598:             * @generated
0599:             */
0600:            public ConnectionAnchor getSourceConnectionAnchor(Request request) {
0601:                return new ChopboxAnchor(getFigure());
0602:            }
0603:
0604:            /**
0605:             * @generated
0606:             */
0607:            public ConnectionAnchor getTargetConnectionAnchor(
0608:                    ConnectionEditPart connection) {
0609:                return new ChopboxAnchor(getFigure());
0610:            }
0611:
0612:            /**
0613:             * @generated
0614:             */
0615:            public ConnectionAnchor getTargetConnectionAnchor(Request request) {
0616:                return new ChopboxAnchor(getFigure());
0617:            }
0618:
0619:            /**
0620:             * @generated
0621:             */
0622:            public Object getAdapter(Class key) {
0623:                return super .getAdapter(key);
0624:            }
0625:
0626:            /**
0627:             * @generated
0628:             */
0629:            public void activate() {
0630:                super .activate();
0631:                getDiagramNode().getElement().eAdapters().add(
0632:                        domainModelRefresher);
0633:            }
0634:
0635:            /**
0636:             * @generated
0637:             */
0638:            public void deactivate() {
0639:                getDiagramNode().getElement().eAdapters().remove(
0640:                        domainModelRefresher);
0641:                super .deactivate();
0642:            }
0643:
0644:            /**
0645:             * @generated
0646:             */
0647:            private DomainModelRefresher domainModelRefresher = new DomainModelRefresher();
0648:
0649:            /**
0650:             * @generated
0651:             */
0652:            private class DomainModelRefresher extends AdapterImpl {
0653:                /**
0654:                 * @generated NOT
0655:                 */
0656:                public void notifyChanged(Notification msg) {
0657:                    super .notifyChanged(msg);
0658:                    if (msg.isTouch()) {
0659:                        return;
0660:                    }
0661:                    Refresher refresher = getRefresher((EStructuralFeature) msg
0662:                            .getFeature(), msg);
0663:                    if (refresher != null) {
0664:                        refresher.refresh();
0665:                    }
0666:                    adjustName();
0667:                }
0668:            }
0669:
0670:            /**
0671:             * @generated
0672:             */
0673:            public void addRefresher(EStructuralFeature feature,
0674:                    Refresher refresher) {
0675:                CompositeRefresher compositeRefresher = getCompositeRefresher(feature);
0676:                compositeRefresher.addRefresher(refresher);
0677:            }
0678:
0679:            /**
0680:             * @generated
0681:             */
0682:            public void removeRefresher(EStructuralFeature feature,
0683:                    Refresher refresher) {
0684:                CompositeRefresher compositeRefresher = getCompositeRefresher(feature);
0685:                compositeRefresher.removeRefresher(refresher);
0686:            }
0687:
0688:            /**
0689:             * @generated
0690:             */
0691:            private CompositeRefresher getCompositeRefresher(
0692:                    EStructuralFeature feature) {
0693:                if (structuralFeatures2Refresher == null) {
0694:                    createRefreshers();
0695:                }
0696:                Refresher refresher = (Refresher) structuralFeatures2Refresher
0697:                        .get(feature);
0698:                if (refresher instanceof  CompositeRefresher) {
0699:                    return (CompositeRefresher) refresher;
0700:                }
0701:                CompositeRefresher result = new CompositeRefresher();
0702:                if (refresher != null) {
0703:                    result.addRefresher(refresher);
0704:                }
0705:                structuralFeatures2Refresher.put(feature, result);
0706:                return result;
0707:            }
0708:
0709:            /**
0710:             * @generated
0711:             */
0712:            protected void refreshFont() {
0713:                FontStyle style = (FontStyle) getDiagramNode().getStyle(
0714:                        NotationPackage.eINSTANCE.getFontStyle());
0715:                Font toDispose = createdFont;
0716:                if (style != null) {
0717:                    String fontName = style.getFontName();
0718:                    int fontHeight = style.getFontHeight();
0719:                    int fontStyle = SWT.NORMAL;
0720:                    if (style.isBold()) {
0721:                        fontStyle |= SWT.BOLD;
0722:                    }
0723:                    if (style.isItalic()) {
0724:                        fontStyle |= SWT.ITALIC;
0725:                    }
0726:                    Font currentFont = getFigure().getFont();
0727:                    if (currentFont != null) {
0728:                        FontData currentFontData = currentFont.getFontData()[0];
0729:                        if (currentFontData.getName().equals(fontName)
0730:                                && currentFontData.getHeight() == fontHeight
0731:                                && currentFontData.getStyle() == fontStyle) {
0732:                            return;
0733:                        }
0734:                    }
0735:                    createdFont = new Font(null, fontName, fontHeight,
0736:                            fontStyle);
0737:                    getFigure().setFont(createdFont);
0738:                } else {
0739:                    //revert to the default font
0740:                    getFigure().setFont(getViewer().getControl().getFont());
0741:                    createdFont = null;
0742:                }
0743:                if (toDispose != null) {
0744:                    toDispose.dispose();
0745:                }
0746:            }
0747:
0748:            /**
0749:             * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned).
0750:             * Whenever another non-default font is assigned to it, it is safe to dispose the previous one.
0751:             * @generated
0752:             */
0753:            private Font createdFont;
0754:
0755:            /**
0756:             * @generated
0757:             */
0758:            protected void refreshForegroundColor() {
0759:                LineStyle style = (LineStyle) getDiagramNode().getStyle(
0760:                        NotationPackage.eINSTANCE.getLineStyle());
0761:                Color toDispose = createdForegroundColor;
0762:                if (style != null) {
0763:                    int foregroundColor = style.getLineColor();
0764:                    int red = foregroundColor & 0x000000FF;
0765:                    int green = (foregroundColor & 0x0000FF00) >> 8;
0766:                    int blue = (foregroundColor & 0x00FF0000) >> 16;
0767:                    Color currentColor = getFigure().getForegroundColor();
0768:                    if (currentColor != null && currentColor.getRed() == red
0769:                            && currentColor.getGreen() == green
0770:                            && currentColor.getBlue() == blue) {
0771:                        return;
0772:                    }
0773:                    createdForegroundColor = new Color(null, red, green, blue);
0774:                    getFigure().setForegroundColor(createdForegroundColor);
0775:                } else {
0776:                    getFigure().setForegroundColor(
0777:                            getViewer().getControl().getForeground());
0778:                    createdForegroundColor = null;
0779:                }
0780:                if (toDispose != null) {
0781:                    toDispose.dispose();
0782:                }
0783:            }
0784:
0785:            /**
0786:             * The color (created by {@link #refreshForegroundColor()}) currently assigned to the figure.
0787:             * Whenever another color is assigned to it, it is safe to dispose the previous one.
0788:             * @generated
0789:             */
0790:            private Color createdForegroundColor;
0791:
0792:            /**
0793:             * @generated
0794:             */
0795:            protected void refreshBackgroundColor() {
0796:                FillStyle style = (FillStyle) getDiagramNode().getStyle(
0797:                        NotationPackage.eINSTANCE.getFillStyle());
0798:                Color toDispose = createdBackgroundColor;
0799:                if (style != null) {
0800:                    int backgroundColor = style.getFillColor();
0801:                    int red = backgroundColor & 0x000000FF;
0802:                    int green = (backgroundColor & 0x0000FF00) >> 8;
0803:                    int blue = (backgroundColor & 0x00FF0000) >> 16;
0804:                    Color currentColor = getFigure().getBackgroundColor();
0805:                    if (currentColor != null && currentColor.getRed() == red
0806:                            && currentColor.getGreen() == green
0807:                            && currentColor.getBlue() == blue) {
0808:                        return;
0809:                    }
0810:                    createdBackgroundColor = new Color(null, red, green, blue);
0811:                    getFigure().setBackgroundColor(createdBackgroundColor);
0812:                } else {
0813:                    getFigure().setBackgroundColor(
0814:                            getViewer().getControl().getBackground());
0815:                }
0816:                if (toDispose != null) {
0817:                    toDispose.dispose();
0818:                }
0819:            }
0820:
0821:            /**
0822:             * The color (created by {@link #refreshBackgroundColor()}) currently assigned to the figure.
0823:             * Whenever another color is assigned to it, it is safe to dispose the previous one.
0824:             * @generated
0825:             */
0826:            private Color createdBackgroundColor;
0827:
0828:            /**
0829:             * @generated
0830:             */
0831:            private HashMap structuralFeatures2Refresher;
0832:
0833:            /**
0834:             * @generated
0835:             */
0836:            public Refresher getRefresher(EStructuralFeature feature,
0837:                    Notification msg) {
0838:                if (structuralFeatures2Refresher == null) {
0839:                    createRefreshers();
0840:                }
0841:                return (Refresher) structuralFeatures2Refresher.get(feature);
0842:            }
0843:
0844:            /**
0845:             * @generated NOT
0846:             */
0847:            private void createRefreshers() {
0848:                structuralFeatures2Refresher = new HashMap();
0849:                Refresher childrenRefresher = new Refresher() {
0850:                    public void refresh() {
0851:                        refreshChildren();
0852:                    }
0853:                };
0854:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0855:                        .getView_PersistedChildren(), childrenRefresher);
0856:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0857:                        .getView_TransientChildren(), childrenRefresher);
0858:                Refresher boundsRefresher = new Refresher() {
0859:                    public void refresh() {
0860:                        refreshBounds();
0861:                    }
0862:                };
0863:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0864:                        .getNode_LayoutConstraint(), boundsRefresher);
0865:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0866:                        .getSize_Width(), boundsRefresher);
0867:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0868:                        .getSize_Height(), boundsRefresher);
0869:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0870:                        .getLocation_X(), boundsRefresher);
0871:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0872:                        .getLocation_Y(), boundsRefresher);
0873:                Refresher visibilityRefresher = new Refresher() {
0874:                    public void refresh() {
0875:                        refreshVisibility();
0876:                    }
0877:                };
0878:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0879:                        .getView_Visible(), visibilityRefresher);
0880:                Refresher sourceEdgesRefresher = new Refresher() {
0881:                    public void refresh() {
0882:                        refreshSourceConnections();
0883:                    }
0884:                };
0885:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0886:                        .getView_SourceEdges(), sourceEdgesRefresher);
0887:                Refresher targetEdgesRefresher = new Refresher() {
0888:                    public void refresh() {
0889:                        refreshTargetConnections();
0890:                    }
0891:                };
0892:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0893:                        .getView_TargetEdges(), targetEdgesRefresher);
0894:                Refresher fontRefresher = new Refresher() {
0895:                    public void refresh() {
0896:                        refreshFont();
0897:                    }
0898:                };
0899:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0900:                        .getFontStyle_FontHeight(), fontRefresher);
0901:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0902:                        .getFontStyle_FontName(), fontRefresher);
0903:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0904:                        .getFontStyle_Bold(), fontRefresher);
0905:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0906:                        .getFontStyle_Italic(), fontRefresher);
0907:
0908:                Refresher backgroundColorRefresher = new Refresher() {
0909:                    public void refresh() {
0910:                        refreshBackgroundColor();
0911:                    }
0912:                };
0913:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0914:                        .getFillStyle_FillColor(), backgroundColorRefresher);
0915:                Refresher foregroundColorRefresher = new Refresher() {
0916:                    public void refresh() {
0917:                        refreshForegroundColor();
0918:                    }
0919:                };
0920:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0921:                        .getLineStyle_LineColor(), foregroundColorRefresher);
0922:            }
0923:
0924:            /**
0925:             * @generated
0926:             */
0927:            private static class CreateMessageExchange4001StartCommand extends
0928:                    AbstractCommand {
0929:                /**
0930:                 * @generated
0931:                 */
0932:                private View source;
0933:
0934:                /**
0935:                 * @generated
0936:                 */
0937:                public CreateMessageExchange4001StartCommand(
0938:                        ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx) {
0939:                    //Until the mouse button is pressed, the source of the connection is in request.getTargetEditPart(), not in request.getSourceEditPart().
0940:                    source = (View) requestEx.getTargetEditPart().getModel();
0941:                }
0942:
0943:                /**
0944:                 * @generated
0945:                 */
0946:                public void execute() {
0947:                    //This command never gets executed
0948:                }
0949:
0950:                /**
0951:                 * @generated
0952:                 */
0953:                public void undo() {
0954:                    //This command never gets executed
0955:                }
0956:
0957:                /**
0958:                 * @generated
0959:                 */
0960:                public void redo() {
0961:                    //This command never gets executed
0962:                }
0963:
0964:                /**
0965:                 * @generated
0966:                 */
0967:                public boolean canUndo() {
0968:                    return true;
0969:                }
0970:
0971:                /**
0972:                 * @generated
0973:                 */
0974:                protected boolean prepare() {
0975:                    if (source == null) {
0976:                        return false;
0977:                    }
0978:                    ComponentFlowEditorDocument container = (ComponentFlowEditorDocument) getRelationshipContainer(
0979:                            source.getElement(), componentflowPackage.eINSTANCE
0980:                                    .getComponentFlowEditorDocument());
0981:                    if (container == null) {
0982:                        return false;
0983:                    }
0984:
0985:                    return true;
0986:                }
0987:
0988:                /**
0989:                 * Finds container element for the new relationship of the specified type.
0990:                 * Default implementation goes up by containment hierarchy starting from
0991:                 * the specified element and returns the first element that is instance of
0992:                 * the specified container class.
0993:                 * 
0994:                 * @generated
0995:                 */
0996:                protected EObject getRelationshipContainer(EObject element,
0997:                        EClass containerClass) {
0998:                    for (; element != null; element = element.eContainer()) {
0999:                        if (containerClass.isSuperTypeOf(element.eClass())) {
1000:                            return element;
1001:                        }
1002:                    }
1003:                    return null;
1004:                }
1005:
1006:            }
1007:
1008:            /**
1009:             * @generated
1010:             */
1011:            private static class CreateMessageExchange4001Command extends
1012:                    AbstractCommand {
1013:                /**
1014:                 * @generated
1015:                 */
1016:                private final View source;
1017:
1018:                /**
1019:                 * @generated
1020:                 */
1021:                private final View target;
1022:
1023:                /**
1024:                 * @generated
1025:                 */
1026:                private final Edge createdEdge;
1027:
1028:                /**
1029:                 * @generated
1030:                 */
1031:                private final org.eclipse.emf.common.command.Command domainModelAddCommand;
1032:
1033:                /**
1034:                 * @generated
1035:                 */
1036:                public CreateMessageExchange4001Command(
1037:                        ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx) {
1038:                    if (requestEx.getSourceEditPart().getModel() instanceof  View) {
1039:                        source = (View) requestEx.getSourceEditPart()
1040:                                .getModel();
1041:                    } else {
1042:                        source = null;
1043:                    }
1044:                    if (requestEx.getTargetEditPart().getModel() instanceof  View) {
1045:                        target = (View) requestEx.getTargetEditPart()
1046:                                .getModel();
1047:                    } else {
1048:                        target = null;
1049:                    }
1050:                    if (source == null || target == null) {
1051:                        createdEdge = null;
1052:                        domainModelAddCommand = org.eclipse.emf.common.command.UnexecutableCommand.INSTANCE;
1053:                        return;
1054:                    }
1055:                    createdEdge = NotationFactory.eINSTANCE.createEdge();
1056:                    MessageExchange createdDomainElement = componentflowFactory.eINSTANCE
1057:                            .createMessageExchange();
1058:                    createdEdge.setElement(createdDomainElement);
1059:
1060:                    DomainElementInitializer.MessageExchange_4001
1061:                            .initializeElement(createdDomainElement);
1062:                    MessageExchangeViewFactory.decorateView(createdEdge);
1063:                    TransactionalEditingDomain domainModelEditDomain = TransactionUtil
1064:                            .getEditingDomain(source.getDiagram().getElement());
1065:                    org.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();
1066:                    EObject container = getRelationshipContainer(source
1067:                            .getElement(), componentflowPackage.eINSTANCE
1068:                            .getComponentFlowEditorDocument());
1069:                    if (container == null) {
1070:                        domainModelAddCommand = null;
1071:                        return;
1072:                    }
1073:                    addLinkEndsCommand
1074:                            .append(AddCommand
1075:                                    .create(
1076:                                            domainModelEditDomain,
1077:                                            container,
1078:                                            componentflowPackage.eINSTANCE
1079:                                                    .getComponentFlowEditorDocument_MessageExchanges(),
1080:                                            createdDomainElement));
1081:
1082:                    if (createdDomainElement.getSourceElement() != null) {
1083:                        domainModelAddCommand = null;
1084:                        return;
1085:                    }
1086:                    addLinkEndsCommand.append(SetCommand.create(
1087:                            domainModelEditDomain, createdDomainElement,
1088:                            componentflowPackage.eINSTANCE
1089:                                    .getMessageExchange_SourceElement(), source
1090:                                    .getElement()));
1091:
1092:                    if (createdDomainElement.getTargetElement() != null) {
1093:                        domainModelAddCommand = null;
1094:                        return;
1095:                    }
1096:                    addLinkEndsCommand.append(SetCommand.create(
1097:                            domainModelEditDomain, createdDomainElement,
1098:                            componentflowPackage.eINSTANCE
1099:                                    .getMessageExchange_TargetElement(), target
1100:                                    .getElement()));
1101:                    domainModelAddCommand = addLinkEndsCommand;
1102:                }
1103:
1104:                /**
1105:                 * Finds container element for the new relationship of the specified type.
1106:                 * Default implementation goes up by containment hierarchy starting from
1107:                 * the specified element and returns the first element that is instance of
1108:                 * the specified container class.
1109:                 * 
1110:                 * @generated
1111:                 */
1112:                protected EObject getRelationshipContainer(EObject element,
1113:                        EClass containerClass) {
1114:                    for (; element != null; element = element.eContainer()) {
1115:                        if (containerClass.isSuperTypeOf(element.eClass())) {
1116:                            return element;
1117:                        }
1118:                    }
1119:                    return null;
1120:                }
1121:
1122:                /**
1123:                 * @generated
1124:                 */
1125:                public boolean canExecute() {
1126:                    if (source == null || target == null || createdEdge == null
1127:                            || domainModelAddCommand == null
1128:                            || !domainModelAddCommand.canExecute()) {
1129:                        return false;
1130:                    }
1131:
1132:                    return true;
1133:                }
1134:
1135:                /**
1136:                 * @generated
1137:                 */
1138:                public boolean canUndo() {
1139:                    return source != null && target != null
1140:                            && createdEdge != null
1141:                            && domainModelAddCommand != null
1142:                            && domainModelAddCommand.canUndo();
1143:                }
1144:
1145:                /**
1146:                 * @generated
1147:                 */
1148:                public void execute() {
1149:                    domainModelAddCommand.execute();
1150:                    source.getDiagram().insertEdge(createdEdge);
1151:                    createdEdge.setSource(source);
1152:                    createdEdge.setTarget(target);
1153:                }
1154:
1155:                /**
1156:                 * @generated
1157:                 */
1158:                public void undo() {
1159:                    domainModelAddCommand.undo();
1160:                    source.getDiagram().removeEdge(createdEdge);
1161:                    createdEdge.setSource(null);
1162:                    createdEdge.setTarget(null);
1163:                }
1164:
1165:                /**
1166:                 * @generated
1167:                 */
1168:                public void redo() {
1169:                    execute();
1170:                }
1171:            }
1172:
1173:            /**
1174:             * @generated
1175:             */
1176:            public class SEFigure extends org.eclipse.draw2d.RectangleFigure {
1177:
1178:                /**
1179:                 * @generated
1180:                 */
1181:                public SEFigure() {
1182:
1183:                    this 
1184:                            .setBackgroundColor(org.eclipse.draw2d.ColorConstants.orange
1185:
1186:                            );
1187:                    this .setPreferredSize(getMapMode().DPtoLP(80), getMapMode()
1188:                            .DPtoLP(50));
1189:                    createContents();
1190:                }
1191:
1192:                /**
1193:                 * @generated NOT
1194:                 */
1195:                private void createContents() {
1196:                    /*org.eclipse.draw2d.Label fig_0 = new org.eclipse.draw2d.Label();
1197:                     fig_0.setText("<...>");
1198:
1199:                     setFigureSENameFigure(fig_0);
1200:
1201:                     Object layData0 = null;
1202:
1203:                     this.add(fig_0, layData0);*/
1204:                }
1205:
1206:                /**
1207:                 * @generated
1208:                 */
1209:                private org.eclipse.draw2d.Label fSENameFigure;
1210:
1211:                /**
1212:                 * @generated
1213:                 */
1214:                public org.eclipse.draw2d.Label getFigureSENameFigure() {
1215:                    return fSENameFigure;
1216:                }
1217:
1218:                /**
1219:                 * @generated
1220:                 */
1221:                private void setFigureSENameFigure(org.eclipse.draw2d.Label fig) {
1222:                    fSENameFigure = fig;
1223:                }
1224:
1225:                /**
1226:                 * @generated
1227:                 */
1228:                private boolean myUseLocalCoordinates = false;
1229:
1230:                /**
1231:                 * @generated
1232:                 */
1233:                protected boolean useLocalCoordinates() {
1234:                    return myUseLocalCoordinates;
1235:                }
1236:
1237:                /**
1238:                 * @generated
1239:                 */
1240:                protected void setUseLocalCoordinates(
1241:                        boolean useLocalCoordinates) {
1242:                    myUseLocalCoordinates = useLocalCoordinates;
1243:                }
1244:
1245:            }
1246:
1247:            /**
1248:             * @generated
1249:             */
1250:            private static class MapModeWorkaround {
1251:                /**
1252:                 * @generated
1253:                 */
1254:                public int DPtoLP(int dp) {
1255:                    return dp;
1256:                }
1257:
1258:                /**
1259:                 * @generated
1260:                 */
1261:                public static MapModeWorkaround INSTANCE = new MapModeWorkaround();
1262:            }
1263:
1264:            /**
1265:             * @generated
1266:             */
1267:            private MapModeWorkaround getMapMode() {
1268:                return MapModeWorkaround.INSTANCE;
1269:            }
1270:        }
w___w__w.ja__v__a__2_s.c__o___m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.