Package geom

Examples of geom.Offset


  }

  private void paintAndSaveFrames() throws InterruptedException {
    Box afterRootBox = treeDiff.getAfter().toBox(0L, COLOUR_SCHEME);
    afterRootBox.setupInnerRectangle(FONT_SIZE);
    Offset windowWithoutLabel = getWindowWithoutLabel(afterRootBox);
    Box beforeRootBox = getBeforeRootBox(windowWithoutLabel);
    afterRootBox.setupOuterRectangle(windowWithoutLabel);
    afterRootBox.calcRootOffset();
    int animationStart = initialFrameNumber + START_NUMBER;
    int animationEnd = animationStart + TRANSITION_NUMBER;
View Full Code Here


  }

  private Offset calcEquationRectangle(Offset panelRectangle) {
    double shapeWidth = panelRectangle.width - KetPanel.BORDER_OFFSET.width;
    double minimumHeight = equationBox.getInnerRectangle().height;
    return new Offset(shapeWidth, minimumHeight);
  }
View Full Code Here

    double minimumHeight = equationBox.getInnerRectangle().height;
    return new Offset(shapeWidth, minimumHeight);
  }

  private Offset calcWindowWithoutLabel(Offset equationRectangle) {
    return new Offset(equationRectangle.width-labelBox.getInnerRectangle().width, equationRectangle.height);
  }
View Full Code Here

    this.innerRectangle = null;
    this.outerRectangle = null;

    // If the parent does not move the box, or there is no parent,
    // this defaults to zero shift.
    this.parentalShift = new Offset(0.0, 0.0);
    this.alignmentShift = null;
  }
View Full Code Here

    return outerRectangle;
  }
 
  protected void setActualWidth(double width) {
    if (outerRectangle==null) {
      outerRectangle = new Offset(width, Double.NaN);
    } else {
      outerRectangle.width = width;
    }
  }
View Full Code Here

    }
  }

  protected void setActualHeight(double height) {
    if (outerRectangle==null) {
      outerRectangle = new Offset(Double.NaN, height);
    } else {
      outerRectangle.height = height;
    }
  }
View Full Code Here

    return scrollBar;
  }

  public double getModeBoxHeight() {
     if (modeBox==null) return 0.0;
     Offset inner = modeBox.getInnerRectangle();
     if (inner==null) return 0.0;
     return inner.height;
  }
View Full Code Here

   * available region which aligns according to the settings.
   */
  public void setupOuterRectangle(Offset outerRectangle) {
    this.outerRectangle = outerRectangle;

    alignmentShift = new Offset(0.0, 0.0);

    switch (horizontalAlignment) {
      case HORIZONTAL_STRETCH:
        alignmentShift.width = 0.0;
        break;
View Full Code Here

    Position topLeft = this.topLeft!=null ? this.topLeft : new Position(0, 0);
    //- if (this.getTopLeft()==null) return false; //D false
    //- if (that.getTopLeft()==null) return false; //D false
    Position rA = this.getPosition(topLeft);
    Position rB = that.getPosition(topLeft);
    Offset iA = this.getInnerRectangle();
    Offset iB = that.getInnerRectangle();
    return rA.x<(rB.x + iB.width) && (rA.x+iA.width)>rB.x && rA.y<(rB.y+iB.height) && (rA.y+iA.height)>rB.y;
  }
View Full Code Here

  /**
   * Assign an offset to the top of the box hierarchy.
   */
  public void calcRootOffset() {
    calcRootOffset(new Offset(0.0, 0.0));
  }
View Full Code Here

TOP

Related Classes of geom.Offset

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.