001: package newprocess.diagram.edit.parts;
002:
003: import newprocess.diagram.edit.policies.ExpansionExpansionProxyItemSemanticEditPolicy;
004:
005: import org.eclipse.draw2d.Connection;
006: import org.eclipse.draw2d.Graphics;
007: import org.eclipse.draw2d.PolylineDecoration;
008: import org.eclipse.draw2d.RotatableDecoration;
009: import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
010: import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
011: import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
012: import org.eclipse.gmf.runtime.notation.View;
013:
014: /**
015: * @generated
016: */
017: public class ExpansionExpansionProxyEditPart extends
018: ConnectionNodeEditPart {
019:
020: /**
021: * @generated
022: */
023: public static final int VISUAL_ID = 4006;
024:
025: /**
026: * @generated
027: */
028: public ExpansionExpansionProxyEditPart(View view) {
029: super (view);
030: }
031:
032: /**
033: * @generated
034: */
035: protected void createDefaultEditPolicies() {
036: super .createDefaultEditPolicies();
037: installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
038: new ExpansionExpansionProxyItemSemanticEditPolicy());
039: }
040:
041: /**
042: * Creates figure for this edit part.
043: *
044: * Body of this method does not depend on settings in generation model
045: * so you may safely remove <i>generated</i> tag and modify it.
046: *
047: * @generated
048: */
049: protected Connection createConnectionFigure() {
050:
051: return new ExpansionConclusionConnectionFigure();
052: }
053:
054: /**
055: * @generated
056: */
057: public class ExpansionConclusionConnectionFigure extends
058: PolylineConnectionEx {
059:
060: /**
061: * @generated NOT
062: * @author sh
063: */
064: public ExpansionConclusionConnectionFigure() {
065: this .setFill(true);
066: this .setFillXOR(false);
067: this .setOutline(true);
068: this .setOutlineXOR(false);
069: this .setLineWidth(2);
070: this .setLineStyle(Graphics.LINE_SOLID);
071: setSourceDecoration(createSourceDecoration());
072: }
073:
074: /**
075: * @generated
076: */
077: private RotatableDecoration createSourceDecoration() {
078: PolylineDecoration df = new PolylineDecoration();
079: df.setFill(true);
080: df.setFillXOR(false);
081: df.setOutline(true);
082: df.setOutlineXOR(false);
083: df.setLineWidth(2);
084: df.setLineStyle(Graphics.LINE_SOLID);
085: return df;
086: }
087:
088: /**
089: * @generated
090: */
091: private RotatableDecoration createTargetDecoration() {
092: PolylineDecoration df = new PolylineDecoration();
093: df.setFill(true);
094: df.setFillXOR(false);
095: df.setOutline(true);
096: df.setOutlineXOR(false);
097: df.setLineWidth(2);
098: df.setLineStyle(Graphics.LINE_SOLID);
099: return df;
100: }
101:
102: }
103:
104: }
|