public void layoutAndAdjustConnection()
{
TagConnector startConnector = (TagConnector) getStartConnector();
TagConnector endConnector = (TagConnector) getEndConnector();
Orientation startOrientation = startConnector.getOrientation();
Orientation endOrientation = endConnector.getOrientation();
SocketFigure startSocketFigure = (SocketFigure) ((ParamFigure) startFigure()).getParent();
SocketFigure endSocketFigure = (SocketFigure) ((ParamFigure) endFigure()).getParent();
Figure startNodeFigure = startSocketFigure.getParent();
Figure endNodeFigure = endSocketFigure.getParent();
Point startCenter = startSocketFigure.center();
Point endCenter = endSocketFigure.center();
Orientation startSocketOrientation = CircleConstants.determineOrientation(startSocketFigure.getAngle(), startNodeFigure.displayBox());
Orientation endSocketOrientation = CircleConstants.determineOrientation(endSocketFigure.getAngle(), endNodeFigure.displayBox());
boolean startSocketIsVertical = startSocketOrientation == Orientation.TOP || startSocketOrientation == Orientation.BOTTOM;
boolean endSocketIsVertical = endSocketOrientation == Orientation.TOP || endSocketOrientation == Orientation.BOTTOM;
boolean socketsInSync = startSocketIsVertical == endSocketIsVertical;
// TODO Fix 4: Param autoconnector orientation doesn't work optimal, test...