public void mouseDragged(MouseEvent e) { if (startPort != null) { mouseMoved(e); } else { super.mouseDragged(e); } }
public void mouseDragged(MouseEvent e) { autoscroll(graph, e.getPoint()); if (graph.isEnabled()) { if (handler != null && handler == marquee) marquee.mouseDragged(e); else if (handler == null && !isEditing(graph) && focus != null) { if (!graph.isCellSelected(focus.getCell())) { selectCellForEvent(focus.getCell(), e); cell = null; } if (handle != null) handle.mousePressed(e); handler = handle; } if (handle != null && handler == handle) handle.mouseDragged(e); } }
/** * Description of the Method * *@param e Description of Parameter */ public void mouseDragged(MouseEvent e) { // If remembered Start Point is Valid if (start != null && !e.isConsumed()) { // Fetch getGraph()ics from Graph Graphics g = getGraph().getGraphics(); // Xor-Paint the old Connector (Hide old Connector) paintConnector(Color.black, getGraph().getBackground(), g); // Reset Remembered Port port = getTargetPortAt(e.getPoint()); // If Port was found then Point to Port Location if (port != null) { current = convert(getGraph().toScreen(port.getLocation(null))); } // Else If no Port was found then Point to Mouse Location else { current = convert(getGraph().snap(e.getPoint())); } // Xor-Paint the new Connector paintConnector(getGraph().getBackground(), Color.black, g); // Consume Event e.consume(); } // Call Superclass super.mouseDragged(e); }