|
Lines 18-24
Link Here
|
| 18 |
import org.eclipse.draw2d.ConnectionAnchor; |
18 |
import org.eclipse.draw2d.ConnectionAnchor; |
| 19 |
import org.eclipse.draw2d.IFigure; |
19 |
import org.eclipse.draw2d.IFigure; |
| 20 |
import org.eclipse.draw2d.PolylineConnection; |
20 |
import org.eclipse.draw2d.PolylineConnection; |
| 21 |
import org.eclipse.draw2d.XYAnchor; |
|
|
| 22 |
import org.eclipse.draw2d.geometry.Point; |
21 |
import org.eclipse.draw2d.geometry.Point; |
| 23 |
|
22 |
|
| 24 |
import org.eclipse.gef.AccessibleAnchorProvider; |
23 |
import org.eclipse.gef.AccessibleAnchorProvider; |
|
Lines 29-34
Link Here
|
| 29 |
import org.eclipse.gef.LayerConstants; |
28 |
import org.eclipse.gef.LayerConstants; |
| 30 |
import org.eclipse.gef.NodeEditPart; |
29 |
import org.eclipse.gef.NodeEditPart; |
| 31 |
import org.eclipse.gef.Request; |
30 |
import org.eclipse.gef.Request; |
|
|
31 |
import org.eclipse.gef.internal.GEFSingleton; |
| 32 |
import org.eclipse.gef.tools.SelectEditPartTracker; |
32 |
import org.eclipse.gef.tools.SelectEditPartTracker; |
| 33 |
|
33 |
|
| 34 |
/** |
34 |
/** |
|
Lines 37-46
Link Here
|
| 37 |
public abstract class AbstractConnectionEditPart extends |
37 |
public abstract class AbstractConnectionEditPart extends |
| 38 |
AbstractGraphicalEditPart implements ConnectionEditPart, LayerConstants { |
38 |
AbstractGraphicalEditPart implements ConnectionEditPart, LayerConstants { |
| 39 |
|
39 |
|
| 40 |
private static final ConnectionAnchor DEFAULT_SOURCE_ANCHOR = new XYAnchor( |
40 |
// private static final ConnectionAnchor DEFAULT_SOURCE_ANCHOR = new |
| 41 |
new Point(10, 10)); |
41 |
// XYAnchor( |
| 42 |
private static final ConnectionAnchor DEFAULT_TARGET_ANCHOR = new XYAnchor( |
42 |
// new Point(10, 10)); |
| 43 |
new Point(100, 100)); |
43 |
// private static final ConnectionAnchor DEFAULT_TARGET_ANCHOR = new |
|
|
44 |
// XYAnchor( |
| 45 |
// new Point(100, 100)); |
| 44 |
|
46 |
|
| 45 |
/** |
47 |
/** |
| 46 |
* Provides accessibility support for when connections are also themselves |
48 |
* Provides accessibility support for when connections are also themselves |
|
Lines 189-195
Link Here
|
| 189 |
IFigure f = ((GraphicalEditPart) getSource()).getFigure(); |
191 |
IFigure f = ((GraphicalEditPart) getSource()).getFigure(); |
| 190 |
return new ChopboxAnchor(f); |
192 |
return new ChopboxAnchor(f); |
| 191 |
} |
193 |
} |
| 192 |
return DEFAULT_SOURCE_ANCHOR; |
194 |
return GEFSingleton.getInstance().getDefaultSourceAnchor(); |
| 193 |
} |
195 |
} |
| 194 |
|
196 |
|
| 195 |
/** |
197 |
/** |
|
Lines 212-218
Link Here
|
| 212 |
IFigure f = ((GraphicalEditPart) getTarget()).getFigure(); |
214 |
IFigure f = ((GraphicalEditPart) getTarget()).getFigure(); |
| 213 |
return new ChopboxAnchor(f); |
215 |
return new ChopboxAnchor(f); |
| 214 |
} |
216 |
} |
| 215 |
return DEFAULT_TARGET_ANCHOR; |
217 |
return GEFSingleton.getInstance().getDefaultTargetAnchor(); |
| 216 |
} |
218 |
} |
| 217 |
|
219 |
|
| 218 |
/** |
220 |
/** |