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