コード例 #1
0
 @Override
 public boolean isValid() {
   for (ViewDragableInterface v : viewReprezentations) {
     if (!v.validNewPosition(dx, dy)) return false;
   }
   return true;
 }
コード例 #2
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());
 }
コード例 #3
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;
  }