|
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 36-46
Link Here
|
| 36 |
*/ |
36 |
*/ |
| 37 |
public abstract class AbstractConnectionEditPart extends |
37 |
public abstract class AbstractConnectionEditPart extends |
| 38 |
AbstractGraphicalEditPart implements ConnectionEditPart, LayerConstants { |
38 |
AbstractGraphicalEditPart implements ConnectionEditPart, LayerConstants { |
| 39 |
|
|
|
| 40 |
private static final ConnectionAnchor DEFAULT_SOURCE_ANCHOR = new XYAnchor( |
| 41 |
new Point(10, 10)); |
| 42 |
private static final ConnectionAnchor DEFAULT_TARGET_ANCHOR = new XYAnchor( |
| 43 |
new Point(100, 100)); |
| 44 |
|
39 |
|
| 45 |
/** |
40 |
/** |
| 46 |
* Provides accessibility support for when connections are also themselves |
41 |
* Provides accessibility support for when connections are also themselves |
|
Lines 189-195
Link Here
|
| 189 |
IFigure f = ((GraphicalEditPart) getSource()).getFigure(); |
184 |
IFigure f = ((GraphicalEditPart) getSource()).getFigure(); |
| 190 |
return new ChopboxAnchor(f); |
185 |
return new ChopboxAnchor(f); |
| 191 |
} |
186 |
} |
| 192 |
return DEFAULT_SOURCE_ANCHOR; |
187 |
return GEFSingleton.getInstance().getDefaultSourceAnchor(); |
| 193 |
} |
188 |
} |
| 194 |
|
189 |
|
| 195 |
/** |
190 |
/** |
|
Lines 212-218
Link Here
|
| 212 |
IFigure f = ((GraphicalEditPart) getTarget()).getFigure(); |
207 |
IFigure f = ((GraphicalEditPart) getTarget()).getFigure(); |
| 213 |
return new ChopboxAnchor(f); |
208 |
return new ChopboxAnchor(f); |
| 214 |
} |
209 |
} |
| 215 |
return DEFAULT_TARGET_ANCHOR; |
210 |
return GEFSingleton.getInstance().getDefaultTargetAnchor(); |
| 216 |
} |
211 |
} |
| 217 |
|
212 |
|
| 218 |
/** |
213 |
/** |