Esempio n. 1
0
 public void mouseReleased(MouseEvent e) {
   if (e.isPopupTrigger()) {
     showPopup(e);
     return;
   }
   cpoint = null;
   repainter.requestRepaint();
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 public void changed(ControlPoint pt) {
   repainter.requestRepaint();
 }
Esempio n. 4
0
 private void setSelectedControlPoint(ControlPoint cpoint) {
   this.cpoint = cpoint;
   repainter.requestRepaint();
 }
Esempio n. 5
0
 public void attachRepainter(Repainter repainter) {
   this.repainter = repainter;
   if (layer != null) {
     repainter.requestRepaint(layer.getBounds());
   }
 }