public BypassSegment(final EObject eObject, final ISegmentFigure child,
final PrimitiveFigureFactory primitiveFactory) {
super(eObject);
setEntry(primitiveFactory.createCrossPoint(this));
CrossPointSegment crossPointSegment = new CrossPointSegment(eObject, primitiveFactory);
if (ILayoutConstants.routeOptionalTop()) {
add(crossPointSegment);
add(child);
} else {
add(child);
add(crossPointSegment);
}
setExit(primitiveFactory.createCrossPoint(this));
primitiveFactory.createConnection(getEntry(), crossPointSegment.getEntry(), this,
ILayoutConstants.CONCAVE_START);
primitiveFactory.createConnection(crossPointSegment.getExit(), getExit(), this,
ILayoutConstants.CONCAVE_END);
primitiveFactory.createConnection(getEntry(), child.getEntry(), this,
ILayoutConstants.CONCAVE_START);
primitiveFactory.createConnection(child.getExit(), getExit(), this,
ILayoutConstants.CONCAVE_END);