Package simtools.diagram.undo

Examples of simtools.diagram.undo.TranslateEdit


    protected void translate(int x, int y){
      CompoundEdit ce = new CompoundEdit();
      for(int i=0;i<ShapesContainer.this.size();i++){
        AbstractShape s=(AbstractShape)elementAt(i);
        s.translate(x,y);
        ce.addEdit(new TranslateEdit(x, y, s));
      }
      ce.end();
      fireUndoableEditUpdate(new UndoableEditEvent(this, ce));
    }
View Full Code Here


    /**
     * @return the translation edit
     */
  public UndoableEdit translateShapeEnd(){
      UndoableEdit res = null;
      res =  new TranslateEdit(currentPoint.x - initPoint.x, currentPoint.y - initPoint.y, element);
     
      initPoint = new Point(currentPoint)
      referencePoint = new Point(initPoint);
      return res;
  }
View Full Code Here

TOP

Related Classes of simtools.diagram.undo.TranslateEdit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.