Package net.sf.jasperreports.charts.design

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


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

    MeterShapeEnum shape = MeterShapeEnum.getByName(atts.getValue(ATTRIBUTE_shape));
    if (shape != null)
    {
      meterPlot.setShape(shape);
    }

    String angle = atts.getValue(ATTRIBUTE_angle);
    if (angle != null && angle.length() > 0)
    {
      meterPlot.setMeterAngle(Integer.valueOf(angle));
    }

    String units = atts.getValue(ATTRIBUTE_units);
    if (units != null && units.length() > 0)
    {
      meterPlot.setUnits(units);
    }

    String tickInterval = atts.getValue(ATTRIBUTE_tickInterval);
    if (tickInterval != null && tickInterval.length() > 0)
    {
      meterPlot.setTickInterval(Double.valueOf(tickInterval));
    }

    String meterColor = atts.getValue(ATTRIBUTE_meterColor);
    if (meterColor != null && meterColor.length() > 0)
    {
      meterPlot.setMeterBackgroundColor(JRColorUtil.getColor(meterColor, null));
    }

    String needleColor = atts.getValue(ATTRIBUTE_needleColor);
    if (needleColor != null && needleColor.length() > 0)
    {
      meterPlot.setNeedleColor(JRColorUtil.getColor(needleColor, null));
    }

    String tickColor = atts.getValue(ATTRIBUTE_tickColor);
    if (tickColor != null && tickColor.length() > 0)
    {
      meterPlot.setTickColor(JRColorUtil.getColor(tickColor, null));
    }

    return meterPlot;
  }
View Full Code Here


        dataset = new JRDesignCategoryDataset(dataset);
        plot = new JRDesignLinePlot(plot, this);
        break;
      case CHART_TYPE_METER:
        dataset = new JRDesignValueDataset(dataset);
        plot = new JRDesignMeterPlot(plot, this);
        break;
      case CHART_TYPE_MULTI_AXIS:
        plot = new JRDesignMultiAxisPlot(plot, this);
        dataset = null;
        break;
View Full Code Here

TOP

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

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.