01: /**
02: *
03: */package newprocess.diagram.cust.figures;
04:
05: import newprocess.diagram.edit.parts.ConditionTermEditPart;
06:
07: import org.eclipse.draw2d.geometry.Dimension;
08: import org.eclipse.gef.EditPart;
09: import org.eclipse.gef.RootEditPart;
10: import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
11:
12: /**
13: *
14: * defines a reference to its EditPart and the getter/setter methods.
15: * its ugly but needed to do untangling of prox connections.
16: *
17: * @author ts
18: *
19: */
20: public class TermDefaultSizeNodeFigure extends DefaultSizeNodeFigure {
21:
22: private EditPart myPort = null;
23:
24: /**
25: * @param defSize
26: */
27: public TermDefaultSizeNodeFigure(Dimension defSize) {
28: super (defSize);
29: }
30:
31: /**
32: * @param width
33: * @param height
34: */
35: public TermDefaultSizeNodeFigure(int width, int height) {
36: super (width, height);
37: }
38:
39: /**
40: * @return the myPort
41: */
42: public EditPart getMyPort() {
43: return myPort;
44: }
45:
46: /**
47: * @param myPort the myPort to set
48: */
49: public void setMyPort(EditPart myPort) {
50: if (myPort instanceof RootEditPart
51: || myPort instanceof ConditionTermEditPart)
52: this.myPort = myPort;
53: }
54: }
|