// relative position from the first boundary
Vector positionVector = new Vector(parent.getNode1().getPosition());
// move it to the middle of the edge
Vector semiLength = new Vector(parent.getDirection());
semiLength.mult(parent.getLength() / 2);
positionVector.add(semiLength);
position = new PointImpl(positionVector);
// set label position above the parent edge