Package org.jfree.data

Examples of org.jfree.data.Range


  private Color bgColor;

  public MeterChart(String title) {
    data = new DefaultValueDataset(0.0);
    meterplot = new MeterPlot(data);
    range = new Range(0,20000);
    bgColor = new Color(238,238,230,255);

    meterplot.setRange(range);
    meterplot.setNormalRange(new Range(0,4000));
    meterplot.setWarningRange(new Range(4000,9000));
    meterplot.setCriticalRange(new Range(9000,20000));

    meterplot.setUnits("");
    meterplot.setDrawBorder(false);
    meterplot.setInsets(new Insets( 2, 2, 2, 2 ));
   
View Full Code Here


   * @return The minimum value.
   */
  public double getDomainLowerBound(final boolean includeInterval)
  {
    double result = Double.NaN;
    final Range r = getDomainBounds(includeInterval);
    if (r != null)
    {
      result = r.getLowerBound();
    }
    return result;
  }
View Full Code Here

   * @return The maximum value.
   */
  public double getDomainUpperBound(final boolean includeInterval)
  {
    double result = Double.NaN;
    final Range r = getDomainBounds(includeInterval);
    if (r != null)
    {
      result = r.getUpperBound();
    }
    return result;
  }
View Full Code Here

    final TimePeriod first = (TimePeriod) keys.get(0);
    final TimePeriod last = (TimePeriod) keys.get(keys.size() - 1);

    if (!includeInterval || this.domainIsPointsInTime)
    {
      return new Range(getXValue(first), getXValue(last));
    }
    else
    {
      return new Range(first.getStart().getTime(),
          last.getEnd().getTime());
    }
  }
View Full Code Here

  public void autoAdjustRange()
  {
    super.autoAdjustRange();
    if (getPlot() instanceof ValueAxisPlot)
    {
      final Range range = this.getRange();
      setRange(new Range(range.getLowerBound() * 10.0, range.getUpperBound() * 10.0), false, false);
      setupSmallLogFlag();
    }
  }
View Full Code Here

    public Range findRangeBounds(final CategoryDataset dataset) {
        if (dataset == null) {
            return null;
        }
        if (this.renderAsPercentages) {
            return new Range(0.0, 1.0);
        }
        else {
            return DatasetUtilities.findStackedRangeBounds(dataset);
        }
    }
View Full Code Here

  public double getDoubleValue() {
    return value;
  }

  public Range getRange() {
    return new Range(min,max);
  }
View Full Code Here

    protected void updateChartProperties() {
      chart.setTitle(tfTitle.getText());
      DatasetDelegatedMeterPlot plot = (DatasetDelegatedMeterPlot)chart.getPlot();
      SourceMeterDataset dst = (SourceMeterDataset)plot.getDataset();
      plot.setAutorange(cbautorange.isSelected());
      if (tfrangemin.isEnabled() && tfrangemax.isEnabled()) plot.setRange(new Range(tfrangemin.getDoubleValue(), tfrangemax.getDoubleValue()));
      if (tfnrangemin.isEnabled() && tfnrangemax.isEnabled()) plot.setNormalRange(new Range(tfnrangemin.getDoubleValue(), tfnrangemax.getDoubleValue()));
      else plot.setNormalRange(null);
      if (tfwrangemin.isEnabled() && tfwrangemax.isEnabled()) plot.setWarningRange(new Range(tfwrangemin.getDoubleValue(), tfwrangemax.getDoubleValue()));
      else plot.setWarningRange(null);
      if (tfcrangemin.isEnabled() && tfcrangemax.isEnabled()) plot.setCriticalRange(new Range(tfcrangemin.getDoubleValue(), tfcrangemax.getDoubleValue()));
      else plot.setCriticalRange(null);
    }
View Full Code Here

      return null;
    }

    Number low = (Number)evaluateExpression(dataRange.getLowExpression());
    Number high = (Number)evaluateExpression(dataRange.getHighExpression());
    return new Range( low != null ? low.doubleValue() : 0.0,
                 high != null ? high.doubleValue() : 100.0);
  }
View Full Code Here

    if (label == null)
    {
      label = "";
    }

    Range range = convertRange(interval.getDataRange());

    Color color = interval.getBackgroundColor() == null ? getChart().getBackcolor() : interval.getBackgroundColor();//FIXMETHEME check this null protection
    float[] components = color.getRGBColorComponents(null);

    float alpha = interval.getAlphaDouble() == null ? (float)JRMeterInterval.DEFAULT_TRANSPARENCY : interval.getAlphaDouble().floatValue();
View Full Code Here

TOP

Related Classes of org.jfree.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.