コード例 #1
0
 @Override
 public void undo() {
   for (ViewDragableInterface v : viewReprezentations) {
     v.setLocation(new Point(v.getX() - dx, v.getY() - dy));
     v.update();
   }
   Session.getSelectedSheet().repaint(Session.getSelectedSheet().getVisibleRect());
 }
コード例 #2
0
  public boolean execute() {
    if (!isValid()) {
      Session.st_postErrorMessage(Strings.RELOCATE_ERROR);
      return false;
    }

    for (ViewDragableInterface v : viewReprezentations) {
      v.setLocation(new Point(v.getX() + dx, v.getY() + dy));
      v.update();
    }

    Session.getSelectedSheet().repaint(Session.getSelectedSheet().getVisibleRect());
    return true;
  }