Then go to the editpart you wish the connection to stick to and just write the following code -
public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connEditPart) {
if (fixedAnchor == null)
{
fixedAnchor = new FixedConnectionAnchor(getNodeFigure());
getNodeFigure().addAncestorListener(fixedAnchor);
}
return fixedAnchor;
}
public ConnectionAnchor getTargetConnectionAnchor(Request request) {
if (fixedAnchor == null)
{
fixedAnchor = new FixedConnectionAnchor(getNodeFigure());
getNodeFigure().addAncestorListener(fixedAnchor);
}
return fixedAnchor;
}
0 comments:
Post a Comment