problems with ManhattanConnectionRouter [message #184268] |
Sat, 11 June 2005 08:18 |
Ralph Soika Messages: 193 Registered: July 2009 |
Senior Member |
|
|
Hi,
can anyone help me to customize a ManhattanConnection Router.
I have written a GEF Edtitor with some Edit Parts an Connections. I use the
ManhattanConnectionRouter. So far all works fine.
But as my EditParts have fixed positions and the user should only define
which connections he needs, I whant to refine the ManhattanRouting a little
bit ;-)
Just whant to add some smal edges for better look.
My code is now very simple. Where can I influence the routig path?
**************************************
public class AssociationEditPart extends AbstractConnectionEditPart {
PolylineConnection polylineConnection;
protected IFigure createFigure() {
polylineConnection = new PolylineConnection();
polylineConnection.setTargetDecoration(new PolygonDecoration());
ManhattanConnectionRouter manhattanConnectionRouter= new
ManhattanConnectionRouter();
polylineConnection.setConnectionRouter( manhattanConnectionRouter);
return polylineConnection;
}
protected void createEditPolicies() {
installEditPolicy(EditPolicy.CONNECTION_ENDPOINTS_ROLE, new
ConnectionEndpointEditPolicy());
installEditPolicy(EditPolicy.CONNECTION_ROLE, new
ConnectionEditPolicy() {
protected Command getDeleteCommand(final GroupRequest request) {
return new AssociationDeleteCommand((Association)
getModel());
}
});
}
************************************
Thanks for help
Ralph
|
|
|
Powered by
FUDForum. Page generated in 0.06031 seconds