Package com.google.speedtracer.client.view.DomainRegionSelectionBoundaries

Examples of com.google.speedtracer.client.view.DomainRegionSelectionBoundaries.DomainRegionSelectionBound


   *
   * @param left
   */
  public void setLeftBound(double left) {
    if (!dragging && !boundDragging) {
      DomainRegionSelectionBound selectionLeft = selectionBoundaries.getLeftSelectionBound();
      double domainWidth = overViewTimeLineModel.getRightBound()
          - overViewTimeLineModel.getLeftBound();
      double pixelDelta = ((double) overViewTimeLine.getCurrentGraphWidth())
          / (domainWidth == 0 ? 1 : domainWidth);
      selectionLeft.setDomainValue(left,
          (int) ((left - overViewTimeLineModel.getLeftBound()) * pixelDelta),
          overViewTimeLine.getCurrentGraphWidth());
      leftMask.getStyle().setPropertyPx("width", selectionLeft.getPixelOffset());
    }
  }
View Full Code Here


   *
   * @param right
   */
  public void setRightBound(double right) {
    if (!dragging && !boundDragging) {
      DomainRegionSelectionBound selectionRight = selectionBoundaries.getRightSelectionBound();
      double domainWidth = overViewTimeLineModel.getRightBound()
          - overViewTimeLineModel.getLeftBound();
      double pixelDelta = ((double) overViewTimeLine.getCurrentGraphWidth())
          / (domainWidth == 0 ? 1 : domainWidth);
      selectionRight.setDomainValue(right,
          (int) ((right - overViewTimeLineModel.getLeftBound()) * pixelDelta),
          overViewTimeLine.getCurrentGraphWidth());
      rightMask.getStyle().setPropertyPx(
          "width",
          overViewTimeLine.getCurrentGraphWidth()
View Full Code Here

      int newX = getXOffset(evt.getClientX());
      dragging = true;
      int pixelDelta = newX - mouseX;
      double domainDelta = getDomainDeltaFromPixelDelta(pixelDelta);

      DomainRegionSelectionBound leftBound = selectionBoundaries.getLeftSelectionBound();
      DomainRegionSelectionBound rightBound = selectionBoundaries.getRightSelectionBound();
      double leftDomain = leftBound.getDomainValue() + domainDelta;
      double rightDomain = rightBound.getDomainValue() + domainDelta;
      int leftOffset = leftBound.getPixelOffset() + pixelDelta;
      int rightOffset = rightBound.getPixelOffset() + pixelDelta;

      // Bounds capping so normal dragging cant push selection
      // off the sides.
      int screenWidth = overViewTimeLine.getCurrentGraphWidth();
      if (leftDomain < overViewTimeLineModel.getLeftBound()) {
View Full Code Here

TOP

Related Classes of com.google.speedtracer.client.view.DomainRegionSelectionBoundaries.DomainRegionSelectionBound

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.