Package com.positive.charts.data

Examples of com.positive.charts.data.Range


    return this.autoScroll;
  }

  public void scrollToSee(final long lastMoment) {
    if (this.autoScroll) {
      final Range range = this.axis.getRange();
      if ((this.getMaximum() - this.getMinimum() > this.thumb)
          || (lastMoment > range.getUpperBound())) {
        this.setLastMoment(lastMoment);
      }
    }
  }
View Full Code Here


    final double hh = area.height;
    if (hh <= 0.0) {
      return null;
    }
    final RectangleConstraint constraint = new RectangleConstraint(ww,
        new Range(0.0, ww), LengthConstraintType.RANGE, hh, new Range(
            0.0, hh), LengthConstraintType.RANGE);
    Object retValue = null;
    final BlockParams p = new BlockParams();
    p.setGenerateEntities(entities);
    if (position == RectangleEdge.TOP) {
View Full Code Here

    }
    if (c.equals(RectangleConstraint.NONE)) {
      return c;
    }
    final double w = c.getWidth();
    final Range wr = c.getWidthRange();
    final double h = c.getHeight();
    final Range hr = c.getHeightRange();
    final double ww = this.trimToContentWidth(w);
    final double hh = this.trimToContentHeight(h);
    final Range wwr = this.trimToContentWidth(wr);
    final Range hhr = this.trimToContentHeight(hr);
    return new RectangleConstraint(ww, wwr, c.getWidthConstraintType(), hh,
        hhr, c.getHeightConstraintType());
  }
View Full Code Here

      lowerBound = this.trimToContentHeight(r.getLowerBound());
    }
    if (r.getUpperBound() < Double.POSITIVE_INFINITY) {
      upperBound = this.trimToContentHeight(r.getUpperBound());
    }
    return new Range(lowerBound, upperBound);
  }
View Full Code Here

   * @return The content size.
   *
   * @since 1.0.9
   */
  protected Size2D arrangeNN(final GC g2) {
    final Range max = new Range(0.0, Float.MAX_VALUE);
    return this.arrangeRR(g2, max, max);
  }
View Full Code Here

      lowerBound = this.trimToContentWidth(r.getLowerBound());
    }
    if (r.getUpperBound() < Double.POSITIVE_INFINITY) {
      upperBound = this.trimToContentWidth(r.getUpperBound());
    }
    return new Range(lowerBound, upperBound);
  }
View Full Code Here

    final double[] w = new double[5];
    final double[] h = new double[5];
    w[0] = constraint.getWidth();
    if (this.topBlock != null) {
      final RectangleConstraint c1 = new RectangleConstraint(w[0], null,
          LengthConstraintType.FIXED, 0.0, new Range(0.0, constraint
              .getHeight()), LengthConstraintType.RANGE);
      final Size2D size = this.topBlock.arrange(g2, c1);
      h[0] = size.height;
    }
    w[1] = w[0];
    if (this.bottomBlock != null) {
      final RectangleConstraint c2 = new RectangleConstraint(w[0], null,
          LengthConstraintType.FIXED, 0.0, new Range(0.0, constraint
              .getHeight()
              - h[0]), LengthConstraintType.RANGE);
      final Size2D size = this.bottomBlock.arrange(g2, c2);
      h[1] = size.height;
    }
    h[2] = constraint.getHeight() - h[1] - h[0];
    if (this.leftBlock != null) {
      final RectangleConstraint c3 = new RectangleConstraint(0.0,
          new Range(0.0, constraint.getWidth()),
          LengthConstraintType.RANGE, h[2], null,
          LengthConstraintType.FIXED);
      final Size2D size = this.leftBlock.arrange(g2, c3);
      w[2] = size.width;
    }
    h[3] = h[2];
    if (this.rightBlock != null) {
      final RectangleConstraint c4 = new RectangleConstraint(
          0.0,
          new Range(0.0, Math.max(constraint.getWidth() - w[2], 0.0)),
          LengthConstraintType.RANGE, h[2], null,
          LengthConstraintType.FIXED);
      final Size2D size = this.rightBlock.arrange(g2, c4);
      w[3] = size.width;
    }
View Full Code Here

    if (this.bottomBlock != null) {
      final Size2D size = this.bottomBlock.arrange(g2, c1);
      w[1] = size.width;
      h[1] = size.height;
    }
    final RectangleConstraint c2 = new RectangleConstraint(0.0, new Range(
        0.0, width), LengthConstraintType.RANGE, 0.0, null,
        LengthConstraintType.NONE);
    if (this.leftBlock != null) {
      final Size2D size = this.leftBlock.arrange(g2, c2);
      w[2] = size.width;
      h[2] = size.height;
    }
    if (this.rightBlock != null) {
      final double maxW = Math.max(width - w[2], 0.0);
      final RectangleConstraint c3 = new RectangleConstraint(0.0,
          new Range(Math.min(w[2], maxW), maxW),
          LengthConstraintType.RANGE, 0.0, null,
          LengthConstraintType.NONE);
      final Size2D size = this.rightBlock.arrange(g2, c3);
      w[3] = size.width;
      h[3] = size.height;
View Full Code Here

      final Size2D size = this.topBlock.arrange(g2, c1);
      w[0] = size.width;
      h[0] = size.height;
    }
    if (this.bottomBlock != null) {
      final Range heightRange2 = Range.shift(heightRange, -h[0], false);
      final RectangleConstraint c2 = new RectangleConstraint(widthRange,
          heightRange2);
      final Size2D size = this.bottomBlock.arrange(g2, c2);
      w[1] = size.width;
      h[1] = size.height;
    }
    final Range heightRange3 = Range.shift(heightRange, -(h[0] + h[1]));
    if (this.leftBlock != null) {
      final RectangleConstraint c3 = new RectangleConstraint(widthRange,
          heightRange3);
      final Size2D size = this.leftBlock.arrange(g2, c3);
      w[2] = size.width;
      h[2] = size.height;
    }
    final Range widthRange2 = Range.shift(widthRange, -w[2], false);
    if (this.rightBlock != null) {
      final RectangleConstraint c4 = new RectangleConstraint(widthRange2,
          heightRange3);
      final Size2D size = this.rightBlock.arrange(g2, c4);
      w[3] = size.width;
      h[3] = size.height;
    }

    h[2] = Math.max(h[2], h[3]);
    h[3] = h[2];
    final Range widthRange3 = Range
        .shift(widthRange, -(w[2] + w[3]), false);
    if (this.centerBlock != null) {
      final RectangleConstraint c5 = new RectangleConstraint(widthRange3,
          heightRange3);
      final Size2D size = this.centerBlock.arrange(g2, c5);
View Full Code Here

   *            the axis.
   *
   * @return The range.
   */
  public Range getDataRange(final ValueAxis axis) {
    Range result = null;
    final List mappedDatasets = new ArrayList();
    boolean isDomainAxis = true;

    // is it a domain axis?
    final int domainIndex = this.getDomainAxisIndex(axis);
View Full Code Here

TOP

Related Classes of com.positive.charts.data.Range

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.