/** * Start the marquee at the specified startPoint. This invokes * expandMarqueeToPoint to initialize marquee selection. */ public void mousePressed(MouseEvent e) { startPoint = e.getPoint(); marqueeBounds = new Rectangle2D.Double(startPoint.getX(), startPoint .getY(), 0, 0); if (!(e.getSource() instanceof JGraph)) throw new IllegalArgumentException( "MarqueeHandler cannot handle event from unknown source: " + e); JGraph graph = (JGraph) e.getSource(); if (isMarqueeTriggerEvent(e, graph)) { previousCursor = graph.getCursor(); graph.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); } }