public void mouseReleased(MouseEvent e) { if (e.isPopupTrigger()) { showPopup(e); return; } cpoint = null; repainter.requestRepaint(); }
public void mouseDragged(MouseEvent e) { Point p = e.getPoint(); if (cpoint != null) { cpoint.set(p.x, p.y); } else if (shape instanceof Vector) { int xoff = p.x - mousePressPoint.x; int yoff = p.y - mousePressPoint.y; Vector v = (Vector) shape; Pt loc = v.getLocation(); v.setLocation(loc.x + xoff, loc.y + yoff); repainter.requestRepaint(); } mousePressPoint = p; }
public void changed(ControlPoint pt) { repainter.requestRepaint(); }
private void setSelectedControlPoint(ControlPoint cpoint) { this.cpoint = cpoint; repainter.requestRepaint(); }
public void attachRepainter(Repainter repainter) { this.repainter = repainter; if (layer != null) { repainter.requestRepaint(layer.getBounds()); } }