}
final Point2D normalizedSelectionRectangleTarget = normalize(e.getPoint());
normalizedSelectionRectangleTarget.setLocation(Math.max(0, normalizedSelectionRectangleTarget.getX()), Math.max(0, normalizedSelectionRectangleTarget
.getY()));
final ElementRenderer rendererRoot = getElementRenderer();
final ReportDocumentContext renderContext = getRenderContext();
if (clearSelectionOnDrag)
{
final DocumentContextSelectionModel selectionModel = renderContext.getSelectionModel();
selectionModel.clearSelection();
clearSelectionOnDrag = false;
}
selectionRectangleTarget = e.getPoint();
// Calculate the bounding box for the selection
final double y1 = Math.min(normalizedSelectionRectangleOrigin.getY(), normalizedSelectionRectangleTarget.getY());
final double x1 = Math.min(normalizedSelectionRectangleOrigin.getX(), normalizedSelectionRectangleTarget.getX());
final double y2 = Math.max(normalizedSelectionRectangleOrigin.getY(), normalizedSelectionRectangleTarget.getY());
final double x2 = Math.max(normalizedSelectionRectangleOrigin.getX(), normalizedSelectionRectangleTarget.getX());
final Element[] allNodes = rendererRoot.getElementsAt(x1, y1, x2 - x1, y2 - y1);
final DocumentContextSelectionModel selectionModel = renderContext.getSelectionModel();
// Convert between points to micro-points (1 point X 100K is a micro-point)
final StrictBounds rect1 = StrictGeomUtility.createBounds(x1, y1, x2 - x1, y2 - y1);
final StrictBounds rect2 = new StrictBounds();