}
}
else if (figure instanceof PolySplineConnection)
{
// Start and end point of the spline have to be within the rectangle
PolySplineConnection con = (PolySplineConnection) figure;
if (selectRect.contains(con.startPoint()) && selectRect.contains(con.endPoint()))
{
selected = figure;
}
}
else if (figure instanceof TextElementFigure)