Package org.jfree.chart

Examples of org.jfree.chart.ChartRenderingInfo


    buggyDrawArea = ClassicEngineBoot.getInstance().getExtendedConfig().
        getBoolProperty("org.pentaho.plugin.jfreereport.reportcharts.DrawAreaBug");
    this.chart = chart;
    if (collectRenderingInfo)
    {
      this.chartRenderingInfo = new ChartRenderingInfo();
    }
  }
View Full Code Here


  }

  public void draw(Graphics2D g) {
    Color c = g.getColor();
    Stroke stroke = g.getStroke();
    if (chartRenderingInfo==null) chartRenderingInfo = new ChartRenderingInfo();
    chart.draw(g, new Rectangle2D.Double(_ox,_oy-_h,_w,_h), chartRenderingInfo);
    g.setStroke(stroke);
    g.setColor(c);
  }
View Full Code Here

  {
    List areaHyperlinks = null;
   
    if (chartHyperlinkProvider != null && chartHyperlinkProvider.hasHyperlinks())
    {
      ChartRenderingInfo renderingInfo = new ChartRenderingInfo();

      if (grx == null)
      {
        chart.createBufferedImage((int) renderingArea.getWidth(), (intrenderingArea.getHeight(), renderingInfo);
      }
      else
      {
        chart.draw(grx, renderingArea, renderingInfo);
      }
     
      EntityCollection entityCollection = renderingInfo.getEntityCollection();
      if (entityCollection != null && entityCollection.getEntityCount() > 0)
      {
        areaHyperlinks = new ArrayList(entityCollection.getEntityCount());
       
        for (Iterator it = entityCollection.iterator(); it.hasNext();)
View Full Code Here

    }

    public static String renderChart(JFreeChart chart, String fileName) {
        String imageFile = "";
        try {
            final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
            TempDir tempDir = TempDirUtils.createTempDir();
            File file1 = tempDir.createFile(fileName);
            imageFile = "<IMG SRC=\"file:" + file1.getAbsolutePath() + "\" " + "WIDTH=\"600\" HEIGHT=\"400\" BORDER=\"0\" USEMAP=\"#chart\"></IMG>";
            ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info);
        } catch (IOException e) {
View Full Code Here

     * Renders a clickable map.
     */
    public void doMap(StaplerRequest req, StaplerResponse rsp) throws IOException {
        if (req.checkIfModified(timestamp, rsp)) return;

        ChartRenderingInfo info = new ChartRenderingInfo();
        render(req,info);

        rsp.setContentType("text/plain;charset=UTF-8");
        rsp.getWriter().println(ChartUtilities.getImageMap( "map", info ));
    }
View Full Code Here

    buggyDrawArea = ClassicEngineBoot.getInstance().getExtendedConfig().
        getBoolProperty("org.pentaho.plugin.jfreereport.reportcharts.DrawAreaBug");
    this.chart = chart;
    if (collectRenderingInfo)
    {
      this.chartRenderingInfo = new ChartRenderingInfo();
    }
  }
View Full Code Here

                    p = (Paint) this.sectionPaints.get(key);
                }
                piePlot.setSectionPaint(key, p);
            }

            ChartRenderingInfo subinfo = null;
            if (info != null) {
                subinfo = new ChartRenderingInfo();
            }
            this.pieChart.draw(g2, rect, subinfo);
            if (info != null) {
                info.getOwner().getEntityCollection().addAll(
                        subinfo.getEntityCollection());
                info.addSubplotInfo(subinfo.getPlotInfo());
            }

            ++column;
            if (column == displayCols) {
                column = 0;
View Full Code Here

      int x = evt.getTrigger().getX();
      int y = evt.getTrigger().getY();

      Point2D p = ((GfrChartPanelDstAbs) super._tot).translateScreenToJava2D(new java.awt.Point(x, y));
      ChartRenderingInfo info = ((GfrChartPanelDstAbs) super._tot).getChartRenderingInfo();
      Rectangle2D dataArea = info.getPlotInfo().getDataArea();


      //-- Min max
      ValueAxis axisDomain = plt.getDomainAxis();
View Full Code Here

     * @return The entity collection (possibly <code>null</code>).
     */
    public EntityCollection getEntityCollection() {
        EntityCollection result = null;
        if (this.info != null) {
            ChartRenderingInfo owner = this.info.getOwner();
            if (owner != null) {
                result = owner.getEntityCollection();
            }
        }
        return result;
    }
View Full Code Here

                xAxis.setLabelFont(xAxis.getLabelFont().deriveFont(fontSize));
            if (yAxis != null)
                yAxis.setLabelFont(yAxis.getLabelFont().deriveFont(fontSize));
        } catch (Exception afs) {}

        ChartRenderingInfo info =
                (isHtmlMode() ? new ChartRenderingInfo() : null);
        BufferedImage img = new BufferedImage
            (width, height, BufferedImage.TYPE_INT_RGB);
        Graphics2D g2 = img.createGraphics();
        if ("auto".equals(getSetting("titleFontSize")))
            maybeAdjustTitleFontSize(chart, g2, width);
View Full Code Here

TOP

Related Classes of org.jfree.chart.ChartRenderingInfo

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.