Source Code Cross Referenced for FTPEditPart.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.FTP;
0093:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.MessageExchange;
0094:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowFactory;
0095:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
0096:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.part.ComponentFlowEditorDiagramEditorPlugin;
0097:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.part.ComponentFlowEditorPaletteFactory;
0098:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.part.ComponentFlowEditorVisualIDRegistry;
0099:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.view.factories.DomainElementInitializer;
0100:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.view.factories.MessageExchangeViewFactory;
0101:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.wizards.FTPPropertyWizard;
0102:        import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.diagram.wizards.WizardUtil;
0103:
0104:        /**
0105:         * @generated
0106:         */
0107:        public class FTPEditPart extends AbstractGraphicalEditPart implements 
0108:                NodeEditPart, IUpdatableEditPart {
0109:
0110:            /**
0111:             * @generated
0112:             */
0113:            public static final int VISUAL_ID = 2005;
0114:
0115:            /**
0116:             * @generated
0117:             */
0118:            protected IFigure contentPane;
0119:
0120:            /**
0121:             * @generated
0122:             */
0123:            protected IFigure primaryShape;
0124:
0125:            /**
0126:             * @generated
0127:             */
0128:            public FTPEditPart(View model) {
0129:                assert model instanceof  Node;
0130:                setModel(model);
0131:            }
0132:
0133:            /**
0134:             * @generated
0135:             */
0136:            protected void createEditPolicies() {
0137:                installEditPolicy(EditPolicy.COMPONENT_ROLE,
0138:                        new ComponentEditPolicy() {
0139:                            protected Command createDeleteCommand(
0140:                                    GroupRequest deleteRequest) {
0141:                                TransactionalEditingDomain editingDomain = TransactionUtil
0142:                                        .getEditingDomain(getDiagramNode()
0143:                                                .getDiagram().getElement());
0144:                                CompoundCommand cc = new CompoundCommand();
0145:                                cc
0146:                                        .append(getDomainModelRemoveCommand(editingDomain));
0147:                                cc.append(RemoveCommand.create(editingDomain,
0148:                                        getDiagramNode()));
0149:                                return new WrappingCommand(editingDomain, cc);
0150:                            }
0151:
0152:                            private org.eclipse.emf.common.command.Command getDomainModelRemoveCommand(
0153:                                    TransactionalEditingDomain editingDomain) {
0154:                                return RemoveCommand
0155:                                        .create(
0156:                                                editingDomain,
0157:                                                getDiagramNode().getElement()
0158:                                                        .eContainer(),
0159:                                                componentflowPackage.eINSTANCE
0160:                                                        .getComponentFlowEditorDocument_ComponentFlowEditorElements(),
0161:                                                getDiagramNode().getElement());
0162:                            }
0163:                        });
0164:                installEditPolicy(EditPolicy.LAYOUT_ROLE,
0165:                        new ConstrainedLayoutEditPolicy() {
0166:                            protected Command getCreateCommand(
0167:                                    CreateRequest request) {
0168:                                return UnexecutableCommand.INSTANCE;
0169:                            }
0170:
0171:                            protected Object getConstraintFor(Rectangle rect) {
0172:                                return null;
0173:                            }
0174:
0175:                            protected Object getConstraintFor(Point point) {
0176:                                return null;
0177:                            }
0178:
0179:                            protected Command createChangeConstraintCommand(
0180:                                    EditPart child, Object constraint) {
0181:                                return UnexecutableCommand.INSTANCE;
0182:                            }
0183:
0184:                            protected EditPolicy createChildEditPolicy(
0185:                                    EditPart child) {
0186:                                return new ResizableEditPolicy() {
0187:                                    public EditPart getTargetEditPart(
0188:                                            Request request) {
0189:                                        if (RequestConstants.REQ_SELECTION
0190:                                                .equals(request.getType())) {
0191:                                            return FTPEditPart.this ;
0192:                                        }
0193:                                        return super .getTargetEditPart(request);
0194:                                    }
0195:                                };
0196:                            }
0197:                        });
0198:                installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE,
0199:                        new GraphicalNodeEditPolicy() {
0200:                            protected Command getReconnectTargetCommand(
0201:                                    ReconnectRequest request) {
0202:                                //XXX: reconnect command
0203:                                return UnexecutableCommand.INSTANCE;
0204:                            }
0205:
0206:                            protected Command getReconnectSourceCommand(
0207:                                    ReconnectRequest request) {
0208:                                //XXX: reconnect command
0209:                                return UnexecutableCommand.INSTANCE;
0210:                            }
0211:
0212:                            protected Command getConnectionCreateCommand(
0213:                                    CreateConnectionRequest request) {
0214:                                if (request instanceof  ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) {
0215:                                    ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx = (ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) request;
0216:                                    int[] visualIds = requestEx.getVisualIds();
0217:                                    CompoundCommand result = new CompoundCommand();
0218:                                    for (int i = 0; i < visualIds.length; i++) {
0219:                                        int nextVisualId = visualIds[i];
0220:                                        switch (nextVisualId) {
0221:                                        case MessageExchangeEditPart.VISUAL_ID:
0222:                                            result
0223:                                                    .append(new CreateMessageExchange4001StartCommand(
0224:                                                            requestEx));
0225:                                            break;
0226:                                        }
0227:                                    }
0228:                                    if (result.getCommandList().size() != 1
0229:                                            || !result.canExecute()) {
0230:                                        //Cannot create several connections at once.
0231:                                        //returning an unexecutable command does not change cursor to "No".
0232:                                        return null;
0233:                                    }
0234:                                    Command wrappedResult = new WrappingCommand(
0235:                                            TransactionUtil
0236:                                                    .getEditingDomain(getDiagramNode()
0237:                                                            .getDiagram()
0238:                                                            .getElement()),
0239:                                            result);
0240:                                    request.setStartCommand(wrappedResult);
0241:                                    return wrappedResult;
0242:                                }
0243:                                return null;
0244:                            }
0245:
0246:                            protected Command getConnectionCompleteCommand(
0247:                                    CreateConnectionRequest request) {
0248:                                if (request.getStartCommand() == null
0249:                                        || !request.getStartCommand()
0250:                                                .canExecute()) {
0251:                                    return UnexecutableCommand.INSTANCE;
0252:                                }
0253:                                if (request instanceof  ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) {
0254:                                    ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx = (ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx) request;
0255:                                    int[] visualIds = requestEx.getVisualIds();
0256:                                    CompoundCommand result = new CompoundCommand();
0257:                                    for (int i = 0; i < visualIds.length; i++) {
0258:                                        int nextVisualId = visualIds[i];
0259:                                        switch (nextVisualId) {
0260:                                        case MessageExchangeEditPart.VISUAL_ID:
0261:                                            result
0262:                                                    .append(new CreateMessageExchange4001Command(
0263:                                                            requestEx));
0264:                                            break;
0265:                                        }
0266:                                    }
0267:                                    if (result.getCommandList().size() != 1) {
0268:                                        //Cannot create several connections at once.
0269:                                        return UnexecutableCommand.INSTANCE;
0270:                                    }
0271:                                    return new WrappingCommand(
0272:                                            TransactionUtil
0273:                                                    .getEditingDomain(getDiagramNode()
0274:                                                            .getDiagram()
0275:                                                            .getElement()),
0276:                                            result);
0277:                                }
0278:                                return UnexecutableCommand.INSTANCE;
0279:                            }
0280:                        });
0281:            }
0282:
0283:            /**
0284:             * @generated NOT
0285:             */
0286:            protected IFigure createFigure() {
0287:                IFigure invisibleRectangle = new Figure();
0288:                invisibleRectangle.setLayoutManager(new BorderLayout());
0289:                IFigure rec = new Figure();
0290:                invisibleRectangle.add(rec, BorderLayout.CENTER);
0291:                rec.setLayoutManager(new StackLayout());
0292:                IFigure shape = createNodeShape();
0293:                rec.add(shape);
0294:                contentPane = setupContentPane(shape);
0295:
0296:                IFigure decorationShape = createDecorationPane();
0297:                if (decorationShape != null) {
0298:                    rec.add(decorationShape);
0299:                }
0300:
0301:                org.eclipse.draw2d.Label fig = new org.eclipse.draw2d.Label();
0302:                fig.setText("");
0303:
0304:                ((BCFigure) shape).setFigureBCNameFigure(fig);
0305:
0306:                invisibleRectangle.add(fig, BorderLayout.BOTTOM);
0307:
0308:                View view = (View) getModel();
0309:                wizardOut(view, true);
0310:
0311:                return invisibleRectangle;
0312:            }
0313:
0314:            /**
0315:             * @generated
0316:             */
0317:            protected IFigure createNodeShape() {
0318:                BCFigure figure = new BCFigure();
0319:                primaryShape = figure;
0320:                return primaryShape;
0321:            }
0322:
0323:            /**
0324:             * @generated
0325:             */
0326:            public BCFigure getPrimaryShape() {
0327:                return (BCFigure) 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/FTP32.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  FTPNameEditPart) {
0388:                    ((FTPNameEditPart) childEditPart)
0389:                            .setLabel(getPrimaryShape().getFigureBCNameFigure());
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) == FTPNameEditPart.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:
0435:                //Figure double clicked
0436:                if (REQ_OPEN.equals(req.getType())) {
0437:                    /*View view = (View) getModel();
0438:                     wizardOut(view, false);
0439:                     super.performRequest(req);*/
0440:                }
0441:
0442:            }
0443:
0444:            /**
0445:             * @generated
0446:             */
0447:            private EditPart getLabelEditPart(DirectEditRequest req) {
0448:                EditPart result = getViewer().findObjectAt(req.getLocation());
0449:                if (result != null) {
0450:                    View view = (View) result.getModel();
0451:                    if (getDiagramNode().getChildren().contains(view)) {
0452:                        int visualId = ComponentFlowEditorVisualIDRegistry
0453:                                .getVisualID(view);
0454:                        switch (visualId) {
0455:                        case FTPNameEditPart.VISUAL_ID:
0456:                            return result;
0457:                        }
0458:                    }
0459:                }
0460:                return getPrimaryLabelEditPart();
0461:            }
0462:
0463:            /**
0464:             * @generated
0465:             */
0466:            protected void addChildVisual(EditPart childEditPart, int index) {
0467:                if (addFixedChild(childEditPart)) {
0468:                    return;
0469:                }
0470:                super .addChildVisual(childEditPart, -1);
0471:            }
0472:
0473:            /**
0474:             * @generated
0475:             */
0476:            protected void removeChildVisual(EditPart childEditPart) {
0477:                if (removeFixedChild(childEditPart)) {
0478:                    return;
0479:                }
0480:                super .removeChildVisual(childEditPart);
0481:            }
0482:
0483:            /**
0484:             * @generated
0485:             */
0486:            protected void refreshVisuals() {
0487:                super .refreshVisuals();
0488:                refreshBounds();
0489:                refreshBackgroundColor();
0490:                refreshForegroundColor();
0491:                refreshFont();
0492:                refreshVisibility();
0493:            }
0494:
0495:            /**
0496:             * @generated
0497:             */
0498:            protected void refreshVisibility() {
0499:                boolean isVisible = getDiagramNode().isVisible();
0500:                boolean wasVisible = getFigure().isVisible();
0501:                if (isVisible == wasVisible) {
0502:                    return;
0503:                }
0504:                if (!isVisible && (getSelected() != SELECTED_NONE)) {
0505:                    getViewer().deselect(this );
0506:                }
0507:
0508:                getFigure().setVisible(isVisible);
0509:                getFigure().revalidate();
0510:            }
0511:
0512:            /**
0513:             * @generated
0514:             */
0515:            protected void refreshBounds() {
0516:                Node node = getDiagramNode();
0517:                assert node.getLayoutConstraint() instanceof  Bounds;
0518:                Bounds bounds = (Bounds) node.getLayoutConstraint();
0519:                ((GraphicalEditPart) getParent()).setLayoutConstraint(this ,
0520:                        getFigure(), new Rectangle(bounds.getX(),
0521:                                bounds.getY(), bounds.getWidth(), bounds
0522:                                        .getHeight()));
0523:            }
0524:
0525:            /**
0526:             * @generated
0527:             */
0528:            protected List getModelChildren() {
0529:                return getDiagramNode().getVisibleChildren();
0530:            }
0531:
0532:            /**
0533:             * @generated
0534:             */
0535:            protected List getModelSourceConnections() {
0536:                return getDiagramNode().getSourceEdges();
0537:            }
0538:
0539:            /**
0540:             * @generated NOT
0541:             */
0542:            protected List getModelTargetConnections() {
0543:
0544:                return getDiagramNode().getTargetEdges();
0545:            }
0546:
0547:            /**
0548:             * @generated NOT
0549:             */
0550:            protected void adjustName() {
0551:                ComponentFlowEditorEditPartFactory.setModelName(this , "FTP");
0552:            }
0553:
0554:            /**
0555:             * @generated NOT
0556:             */
0557:            public void wizardOut(View view, boolean newCom) {
0558:                if (newCom && !WizardUtil.canWizardOut(view))
0559:                    return;
0560:
0561:                final FTPPropertyWizard ftpWizard = new FTPPropertyWizard();
0562:                if (newCom) {
0563:                    ftpWizard
0564:                            .setAddedOperation((ComponentFlowEditorElement) view
0565:                                    .getElement());
0566:                    WizardDialog wizard = new WizardDialog(PlatformUI
0567:                            .getWorkbench().getActiveWorkbenchWindow()
0568:                            .getShell(), ftpWizard);
0569:                    wizard.open();
0570:                } else {
0571:                    ftpWizard
0572:                            .setUpdateOperation((ComponentFlowEditorElement) view
0573:                                    .getElement());
0574:
0575:                    TransactionalEditingDomain domain = TransactionUtil
0576:                            .getEditingDomain(view.getElement());
0577:                    domain.getCommandStack().execute(
0578:                            new RecordingCommand(domain) {
0579:
0580:                                public void doExecute() {
0581:                                    WizardDialog wizard = new WizardDialog(
0582:                                            PlatformUI.getWorkbench()
0583:                                                    .getActiveWorkbenchWindow()
0584:                                                    .getShell(), ftpWizard);
0585:                                    wizard.open();
0586:                                    /*
0587:                                     element.eSet(componentflowPackage.FTP__NAME, (Object)"nihaoftp");*/
0588:                                }
0589:                            });
0590:                }
0591:            }
0592:
0593:            /**
0594:             * @generated
0595:             */
0596:            public ConnectionAnchor getSourceConnectionAnchor(
0597:                    ConnectionEditPart connection) {
0598:                return new ChopboxAnchor(getFigure());
0599:            }
0600:
0601:            /**
0602:             * @generated
0603:             */
0604:            public ConnectionAnchor getSourceConnectionAnchor(Request request) {
0605:                return new ChopboxAnchor(getFigure());
0606:            }
0607:
0608:            /**
0609:             * @generated
0610:             */
0611:            public ConnectionAnchor getTargetConnectionAnchor(
0612:                    ConnectionEditPart connection) {
0613:                return new ChopboxAnchor(getFigure());
0614:            }
0615:
0616:            /**
0617:             * @generated
0618:             */
0619:            public ConnectionAnchor getTargetConnectionAnchor(Request request) {
0620:                return new ChopboxAnchor(getFigure());
0621:            }
0622:
0623:            /**
0624:             * @generated
0625:             */
0626:            public Object getAdapter(Class key) {
0627:                return super .getAdapter(key);
0628:            }
0629:
0630:            /**
0631:             * @generated
0632:             */
0633:            public void activate() {
0634:                super .activate();
0635:                getDiagramNode().getElement().eAdapters().add(
0636:                        domainModelRefresher);
0637:            }
0638:
0639:            /**
0640:             * @generated
0641:             */
0642:            public void deactivate() {
0643:                getDiagramNode().getElement().eAdapters().remove(
0644:                        domainModelRefresher);
0645:                super .deactivate();
0646:            }
0647:
0648:            /**
0649:             * @generated
0650:             */
0651:            private DomainModelRefresher domainModelRefresher = new DomainModelRefresher();
0652:
0653:            /**
0654:             * @generated
0655:             */
0656:            private class DomainModelRefresher extends AdapterImpl {
0657:                /**
0658:                 * @generated NOT
0659:                 */
0660:                public void notifyChanged(Notification msg) {
0661:                    super .notifyChanged(msg);
0662:                    if (msg.isTouch()) {
0663:                        return;
0664:                    }
0665:                    Refresher refresher = getRefresher((EStructuralFeature) msg
0666:                            .getFeature(), msg);
0667:                    if (refresher != null) {
0668:                        refresher.refresh();
0669:                    }
0670:                    adjustName();
0671:                }
0672:            }
0673:
0674:            /**
0675:             * @generated
0676:             */
0677:            public void addRefresher(EStructuralFeature feature,
0678:                    Refresher refresher) {
0679:                CompositeRefresher compositeRefresher = getCompositeRefresher(feature);
0680:                compositeRefresher.addRefresher(refresher);
0681:            }
0682:
0683:            /**
0684:             * @generated
0685:             */
0686:            public void removeRefresher(EStructuralFeature feature,
0687:                    Refresher refresher) {
0688:                CompositeRefresher compositeRefresher = getCompositeRefresher(feature);
0689:                compositeRefresher.removeRefresher(refresher);
0690:            }
0691:
0692:            /**
0693:             * @generated
0694:             */
0695:            private CompositeRefresher getCompositeRefresher(
0696:                    EStructuralFeature feature) {
0697:                if (structuralFeatures2Refresher == null) {
0698:                    createRefreshers();
0699:                }
0700:                Refresher refresher = (Refresher) structuralFeatures2Refresher
0701:                        .get(feature);
0702:                if (refresher instanceof  CompositeRefresher) {
0703:                    return (CompositeRefresher) refresher;
0704:                }
0705:                CompositeRefresher result = new CompositeRefresher();
0706:                if (refresher != null) {
0707:                    result.addRefresher(refresher);
0708:                }
0709:                structuralFeatures2Refresher.put(feature, result);
0710:                return result;
0711:            }
0712:
0713:            /**
0714:             * @generated
0715:             */
0716:            protected void refreshFont() {
0717:                FontStyle style = (FontStyle) getDiagramNode().getStyle(
0718:                        NotationPackage.eINSTANCE.getFontStyle());
0719:                Font toDispose = createdFont;
0720:                if (style != null) {
0721:                    String fontName = style.getFontName();
0722:                    int fontHeight = style.getFontHeight();
0723:                    int fontStyle = SWT.NORMAL;
0724:                    if (style.isBold()) {
0725:                        fontStyle |= SWT.BOLD;
0726:                    }
0727:                    if (style.isItalic()) {
0728:                        fontStyle |= SWT.ITALIC;
0729:                    }
0730:                    Font currentFont = getFigure().getFont();
0731:                    if (currentFont != null) {
0732:                        FontData currentFontData = currentFont.getFontData()[0];
0733:                        if (currentFontData.getName().equals(fontName)
0734:                                && currentFontData.getHeight() == fontHeight
0735:                                && currentFontData.getStyle() == fontStyle) {
0736:                            return;
0737:                        }
0738:                    }
0739:                    createdFont = new Font(null, fontName, fontHeight,
0740:                            fontStyle);
0741:                    getFigure().setFont(createdFont);
0742:                } else {
0743:                    //revert to the default font
0744:                    getFigure().setFont(getViewer().getControl().getFont());
0745:                    createdFont = null;
0746:                }
0747:                if (toDispose != null) {
0748:                    toDispose.dispose();
0749:                }
0750:            }
0751:
0752:            /**
0753:             * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned).
0754:             * Whenever another non-default font is assigned to it, it is safe to dispose the previous one.
0755:             * @generated
0756:             */
0757:            private Font createdFont;
0758:
0759:            /**
0760:             * @generated
0761:             */
0762:            protected void refreshForegroundColor() {
0763:                LineStyle style = (LineStyle) getDiagramNode().getStyle(
0764:                        NotationPackage.eINSTANCE.getLineStyle());
0765:                Color toDispose = createdForegroundColor;
0766:                if (style != null) {
0767:                    int foregroundColor = style.getLineColor();
0768:                    int red = foregroundColor & 0x000000FF;
0769:                    int green = (foregroundColor & 0x0000FF00) >> 8;
0770:                    int blue = (foregroundColor & 0x00FF0000) >> 16;
0771:                    Color currentColor = getFigure().getForegroundColor();
0772:                    if (currentColor != null && currentColor.getRed() == red
0773:                            && currentColor.getGreen() == green
0774:                            && currentColor.getBlue() == blue) {
0775:                        return;
0776:                    }
0777:                    createdForegroundColor = new Color(null, red, green, blue);
0778:                    getFigure().setForegroundColor(createdForegroundColor);
0779:                } else {
0780:                    getFigure().setForegroundColor(
0781:                            getViewer().getControl().getForeground());
0782:                    createdForegroundColor = null;
0783:                }
0784:                if (toDispose != null) {
0785:                    toDispose.dispose();
0786:                }
0787:            }
0788:
0789:            /**
0790:             * The color (created by {@link #refreshForegroundColor()}) currently assigned to the figure.
0791:             * Whenever another color is assigned to it, it is safe to dispose the previous one.
0792:             * @generated
0793:             */
0794:            private Color createdForegroundColor;
0795:
0796:            /**
0797:             * @generated
0798:             */
0799:            protected void refreshBackgroundColor() {
0800:                FillStyle style = (FillStyle) getDiagramNode().getStyle(
0801:                        NotationPackage.eINSTANCE.getFillStyle());
0802:                Color toDispose = createdBackgroundColor;
0803:                if (style != null) {
0804:                    int backgroundColor = style.getFillColor();
0805:                    int red = backgroundColor & 0x000000FF;
0806:                    int green = (backgroundColor & 0x0000FF00) >> 8;
0807:                    int blue = (backgroundColor & 0x00FF0000) >> 16;
0808:                    Color currentColor = getFigure().getBackgroundColor();
0809:                    if (currentColor != null && currentColor.getRed() == red
0810:                            && currentColor.getGreen() == green
0811:                            && currentColor.getBlue() == blue) {
0812:                        return;
0813:                    }
0814:                    createdBackgroundColor = new Color(null, red, green, blue);
0815:                    getFigure().setBackgroundColor(createdBackgroundColor);
0816:                } else {
0817:                    getFigure().setBackgroundColor(
0818:                            getViewer().getControl().getBackground());
0819:                }
0820:                if (toDispose != null) {
0821:                    toDispose.dispose();
0822:                }
0823:            }
0824:
0825:            /**
0826:             * The color (created by {@link #refreshBackgroundColor()}) currently assigned to the figure.
0827:             * Whenever another color is assigned to it, it is safe to dispose the previous one.
0828:             * @generated
0829:             */
0830:            private Color createdBackgroundColor;
0831:
0832:            /**
0833:             * @generated
0834:             */
0835:            private HashMap structuralFeatures2Refresher;
0836:
0837:            /**
0838:             * @generated
0839:             */
0840:            public Refresher getRefresher(EStructuralFeature feature,
0841:                    Notification msg) {
0842:                if (structuralFeatures2Refresher == null) {
0843:                    createRefreshers();
0844:                }
0845:                return (Refresher) structuralFeatures2Refresher.get(feature);
0846:            }
0847:
0848:            /**
0849:             * @generated NOT
0850:             */
0851:            private void createRefreshers() {
0852:                structuralFeatures2Refresher = new HashMap();
0853:                Refresher childrenRefresher = new Refresher() {
0854:                    public void refresh() {
0855:                        refreshChildren();
0856:                    }
0857:                };
0858:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0859:                        .getView_PersistedChildren(), childrenRefresher);
0860:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0861:                        .getView_TransientChildren(), childrenRefresher);
0862:                Refresher boundsRefresher = new Refresher() {
0863:                    public void refresh() {
0864:                        refreshBounds();
0865:                    }
0866:                };
0867:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0868:                        .getNode_LayoutConstraint(), boundsRefresher);
0869:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0870:                        .getSize_Width(), boundsRefresher);
0871:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0872:                        .getSize_Height(), boundsRefresher);
0873:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0874:                        .getLocation_X(), boundsRefresher);
0875:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0876:                        .getLocation_Y(), boundsRefresher);
0877:                Refresher visibilityRefresher = new Refresher() {
0878:                    public void refresh() {
0879:                        refreshVisibility();
0880:                    }
0881:                };
0882:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0883:                        .getView_Visible(), visibilityRefresher);
0884:                Refresher sourceEdgesRefresher = new Refresher() {
0885:                    public void refresh() {
0886:                        refreshSourceConnections();
0887:                    }
0888:                };
0889:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0890:                        .getView_SourceEdges(), sourceEdgesRefresher);
0891:                Refresher targetEdgesRefresher = new Refresher() {
0892:                    public void refresh() {
0893:                        refreshTargetConnections();
0894:                    }
0895:                };
0896:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0897:                        .getView_TargetEdges(), targetEdgesRefresher);
0898:                Refresher fontRefresher = new Refresher() {
0899:                    public void refresh() {
0900:                        refreshFont();
0901:                    }
0902:                };
0903:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0904:                        .getFontStyle_FontHeight(), fontRefresher);
0905:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0906:                        .getFontStyle_FontName(), fontRefresher);
0907:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0908:                        .getFontStyle_Bold(), fontRefresher);
0909:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0910:                        .getFontStyle_Italic(), fontRefresher);
0911:
0912:                Refresher backgroundColorRefresher = new Refresher() {
0913:                    public void refresh() {
0914:                        refreshBackgroundColor();
0915:                    }
0916:                };
0917:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0918:                        .getFillStyle_FillColor(), backgroundColorRefresher);
0919:                Refresher foregroundColorRefresher = new Refresher() {
0920:                    public void refresh() {
0921:                        refreshForegroundColor();
0922:                    }
0923:                };
0924:                structuralFeatures2Refresher.put(NotationPackage.eINSTANCE
0925:                        .getLineStyle_LineColor(), foregroundColorRefresher);
0926:            }
0927:
0928:            /**
0929:             * @generated
0930:             */
0931:            private static class CreateMessageExchange4001StartCommand extends
0932:                    AbstractCommand {
0933:                /**
0934:                 * @generated
0935:                 */
0936:                private View source;
0937:
0938:                /**
0939:                 * @generated
0940:                 */
0941:                public CreateMessageExchange4001StartCommand(
0942:                        ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx) {
0943:                    //Until the mouse button is pressed, the source of the connection is in request.getTargetEditPart(), not in request.getSourceEditPart().
0944:                    source = (View) requestEx.getTargetEditPart().getModel();
0945:                }
0946:
0947:                /**
0948:                 * @generated
0949:                 */
0950:                public void execute() {
0951:                    //This command never gets executed
0952:                }
0953:
0954:                /**
0955:                 * @generated
0956:                 */
0957:                public void undo() {
0958:                    //This command never gets executed
0959:                }
0960:
0961:                /**
0962:                 * @generated
0963:                 */
0964:                public void redo() {
0965:                    //This command never gets executed
0966:                }
0967:
0968:                /**
0969:                 * @generated
0970:                 */
0971:                public boolean canUndo() {
0972:                    return true;
0973:                }
0974:
0975:                /**
0976:                 * @generated
0977:                 */
0978:                protected boolean prepare() {
0979:                    if (source == null) {
0980:                        return false;
0981:                    }
0982:                    ComponentFlowEditorDocument container = (ComponentFlowEditorDocument) getRelationshipContainer(
0983:                            source.getElement(), componentflowPackage.eINSTANCE
0984:                                    .getComponentFlowEditorDocument());
0985:                    if (container == null) {
0986:                        return false;
0987:                    }
0988:
0989:                    return true;
0990:                }
0991:
0992:                /**
0993:                 * Finds container element for the new relationship of the specified type.
0994:                 * Default implementation goes up by containment hierarchy starting from
0995:                 * the specified element and returns the first element that is instance of
0996:                 * the specified container class.
0997:                 * 
0998:                 * @generated
0999:                 */
1000:                protected EObject getRelationshipContainer(EObject element,
1001:                        EClass containerClass) {
1002:                    for (; element != null; element = element.eContainer()) {
1003:                        if (containerClass.isSuperTypeOf(element.eClass())) {
1004:                            return element;
1005:                        }
1006:                    }
1007:                    return null;
1008:                }
1009:
1010:            }
1011:
1012:            /**
1013:             * @generated
1014:             */
1015:            private static class CreateMessageExchange4001Command extends
1016:                    AbstractCommand {
1017:                /**
1018:                 * @generated
1019:                 */
1020:                private final View source;
1021:
1022:                /**
1023:                 * @generated
1024:                 */
1025:                private final View target;
1026:
1027:                /**
1028:                 * @generated
1029:                 */
1030:                private final Edge createdEdge;
1031:
1032:                /**
1033:                 * @generated
1034:                 */
1035:                private final org.eclipse.emf.common.command.Command domainModelAddCommand;
1036:
1037:                /**
1038:                 * @generated
1039:                 */
1040:                public CreateMessageExchange4001Command(
1041:                        ComponentFlowEditorPaletteFactory.CreateConnectionRequestEx requestEx) {
1042:                    if (requestEx.getSourceEditPart().getModel() instanceof  View) {
1043:                        source = (View) requestEx.getSourceEditPart()
1044:                                .getModel();
1045:                    } else {
1046:                        source = null;
1047:                    }
1048:                    if (requestEx.getTargetEditPart().getModel() instanceof  View) {
1049:                        target = (View) requestEx.getTargetEditPart()
1050:                                .getModel();
1051:                    } else {
1052:                        target = null;
1053:                    }
1054:                    if (source == null || target == null) {
1055:                        createdEdge = null;
1056:                        domainModelAddCommand = org.eclipse.emf.common.command.UnexecutableCommand.INSTANCE;
1057:                        return;
1058:                    }
1059:                    createdEdge = NotationFactory.eINSTANCE.createEdge();
1060:                    MessageExchange createdDomainElement = componentflowFactory.eINSTANCE
1061:                            .createMessageExchange();
1062:                    createdEdge.setElement(createdDomainElement);
1063:
1064:                    DomainElementInitializer.MessageExchange_4001
1065:                            .initializeElement(createdDomainElement);
1066:                    MessageExchangeViewFactory.decorateView(createdEdge);
1067:                    TransactionalEditingDomain domainModelEditDomain = TransactionUtil
1068:                            .getEditingDomain(source.getDiagram().getElement());
1069:                    org.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();
1070:                    EObject container = getRelationshipContainer(source
1071:                            .getElement(), componentflowPackage.eINSTANCE
1072:                            .getComponentFlowEditorDocument());
1073:                    if (container == null) {
1074:                        domainModelAddCommand = null;
1075:                        return;
1076:                    }
1077:                    addLinkEndsCommand
1078:                            .append(AddCommand
1079:                                    .create(
1080:                                            domainModelEditDomain,
1081:                                            container,
1082:                                            componentflowPackage.eINSTANCE
1083:                                                    .getComponentFlowEditorDocument_MessageExchanges(),
1084:                                            createdDomainElement));
1085:
1086:                    if (createdDomainElement.getSourceElement() != null) {
1087:                        domainModelAddCommand = null;
1088:                        return;
1089:                    }
1090:                    addLinkEndsCommand.append(SetCommand.create(
1091:                            domainModelEditDomain, createdDomainElement,
1092:                            componentflowPackage.eINSTANCE
1093:                                    .getMessageExchange_SourceElement(), source
1094:                                    .getElement()));
1095:
1096:                    if (createdDomainElement.getTargetElement() != null) {
1097:                        domainModelAddCommand = null;
1098:                        return;
1099:                    }
1100:                    addLinkEndsCommand.append(SetCommand.create(
1101:                            domainModelEditDomain, createdDomainElement,
1102:                            componentflowPackage.eINSTANCE
1103:                                    .getMessageExchange_TargetElement(), target
1104:                                    .getElement()));
1105:                    domainModelAddCommand = addLinkEndsCommand;
1106:                }
1107:
1108:                /**
1109:                 * Finds container element for the new relationship of the specified type.
1110:                 * Default implementation goes up by containment hierarchy starting from
1111:                 * the specified element and returns the first element that is instance of
1112:                 * the specified container class.
1113:                 * 
1114:                 * @generated
1115:                 */
1116:                protected EObject getRelationshipContainer(EObject element,
1117:                        EClass containerClass) {
1118:                    for (; element != null; element = element.eContainer()) {
1119:                        if (containerClass.isSuperTypeOf(element.eClass())) {
1120:                            return element;
1121:                        }
1122:                    }
1123:                    return null;
1124:                }
1125:
1126:                /**
1127:                 * @generated
1128:                 */
1129:                public boolean canExecute() {
1130:                    if (source == null || target == null || createdEdge == null
1131:                            || domainModelAddCommand == null
1132:                            || !domainModelAddCommand.canExecute()) {
1133:                        return false;
1134:                    }
1135:
1136:                    return true;
1137:                }
1138:
1139:                /**
1140:                 * @generated
1141:                 */
1142:                public boolean canUndo() {
1143:                    return source != null && target != null
1144:                            && createdEdge != null
1145:                            && domainModelAddCommand != null
1146:                            && domainModelAddCommand.canUndo();
1147:                }
1148:
1149:                /**
1150:                 * @generated
1151:                 */
1152:                public void execute() {
1153:                    domainModelAddCommand.execute();
1154:                    source.getDiagram().insertEdge(createdEdge);
1155:                    createdEdge.setSource(source);
1156:                    createdEdge.setTarget(target);
1157:                }
1158:
1159:                /**
1160:                 * @generated
1161:                 */
1162:                public void undo() {
1163:                    domainModelAddCommand.undo();
1164:                    source.getDiagram().removeEdge(createdEdge);
1165:                    createdEdge.setSource(null);
1166:                    createdEdge.setTarget(null);
1167:                }
1168:
1169:                /**
1170:                 * @generated
1171:                 */
1172:                public void redo() {
1173:                    execute();
1174:                }
1175:            }
1176:
1177:            /**
1178:             * @generated
1179:             */
1180:            public class BCFigure extends org.eclipse.draw2d.RectangleFigure {
1181:
1182:                /**
1183:                 * @generated
1184:                 */
1185:                public BCFigure() {
1186:
1187:                    this .setPreferredSize(getMapMode().DPtoLP(120),
1188:                            getMapMode().DPtoLP(120));
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:                     fig_0.setSize(120, 60);
1199:
1200:                     setFigureBCNameFigure(fig_0);
1201:
1202:                     Object layData0 = null;
1203:
1204:                     this.add(fig_0, layData0);*/
1205:                }
1206:
1207:                /**
1208:                 * @generated
1209:                 */
1210:                private org.eclipse.draw2d.Label fBCNameFigure;
1211:
1212:                /**
1213:                 * @generated
1214:                 */
1215:                public org.eclipse.draw2d.Label getFigureBCNameFigure() {
1216:                    return fBCNameFigure;
1217:                }
1218:
1219:                /**
1220:                 * @generated
1221:                 */
1222:                private void setFigureBCNameFigure(org.eclipse.draw2d.Label fig) {
1223:                    fBCNameFigure = fig;
1224:                }
1225:
1226:                /**
1227:                 * @generated
1228:                 */
1229:                private boolean myUseLocalCoordinates = false;
1230:
1231:                /**
1232:                 * @generated
1233:                 */
1234:                protected boolean useLocalCoordinates() {
1235:                    return myUseLocalCoordinates;
1236:                }
1237:
1238:                /**
1239:                 * @generated
1240:                 */
1241:                protected void setUseLocalCoordinates(
1242:                        boolean useLocalCoordinates) {
1243:                    myUseLocalCoordinates = useLocalCoordinates;
1244:                }
1245:
1246:            }
1247:
1248:            /**
1249:             * @generated
1250:             */
1251:            private static class MapModeWorkaround {
1252:                /**
1253:                 * @generated
1254:                 */
1255:                public int DPtoLP(int dp) {
1256:                    return dp;
1257:                }
1258:
1259:                /**
1260:                 * @generated
1261:                 */
1262:                public static MapModeWorkaround INSTANCE = new MapModeWorkaround();
1263:            }
1264:
1265:            /**
1266:             * @generated
1267:             */
1268:            private MapModeWorkaround getMapMode() {
1269:                return MapModeWorkaround.INSTANCE;
1270:            }
1271:        }
w__ww_.__ja_va_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.