Package com.cburch.logisim.circuit.appear

Examples of com.cburch.logisim.circuit.appear.AppearanceAnchor.translate()


    if (toAdd != null) canvasModel.addObjects(dest, toAdd);

    AppearanceAnchor anchor = findAnchor(canvasModel);
    if (anchor != null && anchorNewLocation != null) {
      anchorOldLocation = anchor.getLocation();
      anchor.translate(anchorNewLocation.getX() - anchorOldLocation.getX(),
          anchorNewLocation.getY() - anchorOldLocation.getY());
    }
    if (anchor != null && anchorNewFacing != null) {
      anchorOldFacing = anchor.getFacing();
      anchor.setValue(AppearanceAnchor.FACING, anchorNewFacing);
View Full Code Here


 
  @Override
  public void undo(Project proj) {
    AppearanceAnchor anchor = findAnchor(canvasModel);
    if (anchor != null && anchorOldLocation != null) {
      anchor.translate(anchorOldLocation.getX() - anchorNewLocation.getX(),
          anchorOldLocation.getY() - anchorNewLocation.getY());
    }
    if (anchor != null && anchorOldFacing != null) {
      anchor.setValue(AppearanceAnchor.FACING, anchorOldFacing);
    }
View Full Code Here


        AppearanceAnchor anchor = findAnchor(canvasModel);
        if (anchor != null && anchorNewLocation != null) {
            anchorOldLocation = anchor.getLocation();
            anchor.translate(anchorNewLocation.getX() - anchorOldLocation.getX(),
                    anchorNewLocation.getY() - anchorOldLocation.getY());
        }
        if (anchor != null && anchorNewFacing != null) {
            anchorOldFacing = anchor.getFacing();
            anchor.setValue(AppearanceAnchor.FACING, anchorNewFacing);
View Full Code Here

    @Override
    public void undo(Project proj) {
        AppearanceAnchor anchor = findAnchor(canvasModel);
        if (anchor != null && anchorOldLocation != null) {
            anchor.translate(anchorOldLocation.getX() - anchorNewLocation.getX(),
                    anchorOldLocation.getY() - anchorNewLocation.getY());
        }
        if (anchor != null && anchorOldFacing != null) {
            anchor.setValue(AppearanceAnchor.FACING, anchorOldFacing);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.