Examples of JRDesignChart


Examples of net.sf.jasperreports.engine.design.JRDesignChart

   */
  public static class JRChartTitleFactory extends JRBaseFactory
  {
    public Object createObject(Attributes atts)
    {
      JRDesignChart chart = (JRDesignChart) digester.peek();

      EdgeEnum position = EdgeEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_position));
      if (position != null)
      {
        chart.setTitlePosition(position);
      }
     
      Color color = JRColorUtil.getColor(atts.getValue(JRXmlConstants.ATTRIBUTE_color), Color.black);
      if (color != null)
      {
        chart.setTitleColor(color);
      }

      return chart;
    }
View Full Code Here

Examples of net.sf.jasperreports.engine.design.JRDesignChart

      Collection charts = (Collection) mmap.get(key);
      ArrayList l = new ArrayList(charts);
      //Reverse iteration of the charts to meet insertion order
      for (int i = l.size(); i > 0; i--) {
        DJChart djChart = (DJChart) l.get(i-1);
        JRDesignChart chart = createChart(djChart);

        //Charts has their own band, so they are added in the band at Y=0
        JRDesignBand band = createGroupForChartAndGetBand(djChart);
        band.addElement(chart);
      }
View Full Code Here

Examples of net.sf.jasperreports.engine.design.JRDesignChart

   * @return
   */
  protected JRDesignChart createChart(DJChart djChart){
      JRDesignGroup jrGroupChart = getJRGroupFromDJGroup(djChart.getColumnsGroup());

      JRDesignChart chart = new JRDesignChart(new JRDesignStyle().getDefaultStyleProvider(), djChart.getType());
      JRDesignGroup parentGroup = getParent(jrGroupChart);
      List chartVariables = registerChartVariable(djChart);
      JRDesignChartDataset chartDataset = DataSetFactory.getDataset(djChart, jrGroupChart, parentGroup, chartVariables);
      chart.setDataset(chartDataset);
      interpeterOptions(djChart, chart);

      chart.setEvaluationTime(JRExpression.EVALUATION_TIME_GROUP);
      chart.setEvaluationGroup(jrGroupChart);
      return chart;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.design.JRDesignChart

   * Takes all the report's charts and inserts them in their corresponding bands
   */
  protected void layoutCharts() {
    for (Iterator iter = getReport().getCharts().iterator(); iter.hasNext();) {
      DJChart djChart = (DJChart) iter.next();
      JRDesignChart chart = createChart(djChart);
      JRDesignBand band = getPositionBand(djChart);
     
      //If it is a HEADER chart, then Y remains 0. If FOOTER chart, need yOffset
      int yOffset = 0;
      if (djChart.getOptions().getPosition() == DJChartOptions.POSITION_FOOTER)
        yOffset = findVerticalOffset(band);     
      chart.setY(yOffset); //The chart will be located at the very end of the band so far
     
      band.addElement(chart);
    }
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.design.JRDesignChart

  private JRDesignChart createChart(DJChart djChart){

      JRDesignGroup jrGroup = getGroupFromColumnsGroup(djChart.getColumnsGroup());

      JRDesignChart chart = new JRDesignChart(new JRDesignStyle().getDefaultStyleProvider(), djChart.getType());
      chart.setDataset(DataSetFactory.getDataset(djChart.getType(), jrGroup, getParent(jrGroup), registerChartVariable(djChart)));
      interpeterOptions(djChart, chart);
     
      chart.setEvaluationTime(JRExpression.EVALUATION_TIME_GROUP);
      chart.setEvaluationGroup(jrGroup);
      return chart;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.design.JRDesignChart

      Collection charts = (Collection) mmap.get(key);
      ArrayList l = new ArrayList(charts);
      //Reverse iteration of the charts to meet insertion order
      for (int i = l.size(); i > 0; i--) {
        DJChart djChart = (DJChart) l.get(i-1);
        JRDesignChart chart = createChart(djChart);

        //Charts has their own band, so they are added in the band at Y=0
        JRDesignBand band = createGroupForChartAndGetBand(djChart);
        band.addElement(chart);
      }
View Full Code Here

Examples of net.sf.jasperreports.engine.design.JRDesignChart

   * @return
   */
  protected JRDesignChart createChart(DJChart djChart){
      JRDesignGroup jrGroupChart = getJRGroupFromDJGroup(djChart.getColumnsGroup());

      JRDesignChart chart = new JRDesignChart(new JRDesignStyle().getDefaultStyleProvider(), djChart.getType());
      JRDesignGroup parentGroup = getParent(jrGroupChart);
      List chartVariables = registerChartVariable(djChart);
      JRDesignChartDataset chartDataset = DataSetFactory.getDataset(djChart, jrGroupChart, parentGroup, chartVariables);
      chart.setDataset(chartDataset);
      interpeterOptions(djChart, chart);

      chart.setEvaluationTime(JRExpression.EVALUATION_TIME_GROUP);
      chart.setEvaluationGroup(jrGroupChart);
      return chart;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.design.JRDesignChart

   * Takes all the report's charts and inserts them in their corresponding bands
   */
  protected void layoutCharts() {
    for (Iterator iter = getReport().getCharts().iterator(); iter.hasNext();) {
      DJChart djChart = (DJChart) iter.next();
      JRDesignChart chart = createChart(djChart);
      JRDesignBand band = getPositionBand(djChart);
      int yOffset = findVerticalOffset(band);
      chart.setY(yOffset); //The chart will be located at the very end of the band so far
      band.addElement(chart);
    }
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.design.JRDesignChart

  private JRDesignChart createChart(DJChart djChart){

      JRDesignGroup jrGroup = getGroupFromColumnsGroup(djChart.getColumnsGroup());

      JRDesignChart chart = new JRDesignChart(new JRDesignStyle().getDefaultStyleProvider(), djChart.getType());
      chart.setDataset(DataSetFactory.getDataset(djChart.getType(), jrGroup, getParent(jrGroup), registerChartVariable(djChart)));
      interpeterOptions(djChart, chart);
     
      chart.setEvaluationTime(JRExpression.EVALUATION_TIME_GROUP);
      chart.setEvaluationGroup(jrGroup);
      return chart;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.design.JRDesignChart

      Collection charts = (Collection) mmap.get(key);
      ArrayList l = new ArrayList(charts);
      //Reverse iteration of the charts to meet insertion order
      for (int i = l.size(); i > 0; i--) {
        DJChart djChart = (DJChart) l.get(i-1);
        JRDesignChart chart = createChart(djChart);

        //Charts has their own band, so they are added in the band at Y=0
        JRDesignBand band = createGroupForChartAndGetBand(djChart);
        band.addElement(chart);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.