Package net.sf.jasperreports.charts.design

Examples of net.sf.jasperreports.charts.design.JRDesignThermometerPlot


   *
   */
  public Object createObject(Attributes atts) throws JRException
  {
    JRChart chart = (JRChart)digester.peek();
    JRDesignThermometerPlot thermometerPlot = (JRDesignThermometerPlot)chart.getPlot();

    String location = atts.getValue(ATTRIBUTE_valueLocation);
    ValueLocationEnum loc = ValueLocationEnum.getByName(atts.getValue(ATTRIBUTE_valueLocation));
    if (loc == null)
    {
      throw new JRException("Invalid thermometer value location: " + location);
    }
    else
    {
      thermometerPlot.setValueLocation(loc);
    }

    String mercuryColor = atts.getValue(ATTRIBUTE_mercuryColor);
    if (mercuryColor != null && mercuryColor.length() > 0)
    {
      thermometerPlot.setMercuryColor(JRColorUtil.getColor(mercuryColor, null));
    }

    return thermometerPlot;
  }
View Full Code Here


        dataset = new JRDesignCategoryDataset(dataset);
        plot = new JRDesignBar3DPlot(plot, this);
        break;
      case CHART_TYPE_THERMOMETER:
        dataset = new JRDesignValueDataset(dataset);
        plot = new JRDesignThermometerPlot(plot, this);
        break;
      case CHART_TYPE_TIMESERIES:
        dataset = new JRDesignTimeSeriesDataset(dataset);//other datasets could be supported
        plot = new JRDesignTimeSeriesPlot(plot, this);
        break;
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.charts.design.JRDesignThermometerPlot

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.