01: package newprocess.diagram.edit.parts;
02:
03: import newprocess.diagram.cust.policies.HighlightEditPolicy;
04: import newprocess.diagram.edit.policies.RootTermItemSemanticEditPolicy;
05:
06: import org.eclipse.draw2d.Connection;
07: import org.eclipse.draw2d.Graphics;
08: import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart;
09: import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
10: import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
11: import org.eclipse.gmf.runtime.notation.View;
12:
13: /**
14: * @generated
15: */
16: public class RootTermEditPart extends ConnectionNodeEditPart {
17:
18: /**
19: * @generated
20: */
21: public static final int VISUAL_ID = 4002;
22:
23: /**
24: * @generated
25: */
26: public RootTermEditPart(View view) {
27: super (view);
28: }
29:
30: /**
31: * @generated NOT
32: * @author sh
33: */
34: protected void createDefaultEditPolicies() {
35: super .createDefaultEditPolicies();
36: installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE,
37: new RootTermItemSemanticEditPolicy());
38: installEditPolicy(EditPolicyRoles.SNAP_FEEDBACK_ROLE,
39: new HighlightEditPolicy());
40: }
41:
42: /**
43: * Creates figure for this edit part.
44: *
45: * Body of this method does not depend on settings in generation model
46: * so you may safely remove <i>generated</i> tag and modify it.
47: *
48: * @generated
49: */
50: protected Connection createConnectionFigure() {
51:
52: return new ConnectionFigure();
53: }
54:
55: /**
56: * @generated
57: */
58: public class ConnectionFigure extends PolylineConnectionEx {
59:
60: /**
61: * @generated NOT
62: * @author sh
63: */
64: public ConnectionFigure() {
65: this .setFill(true);
66: this .setFillXOR(false);
67: this .setOutline(true);
68: this .setOutlineXOR(false);
69: this .setLineWidth(2);
70: this.setLineStyle(Graphics.LINE_SOLID);
71:
72: }
73:
74: }
75:
76: }
|