Examples of TextTitle


Examples of org.jfree.chart.title.TextTitle

        data = new DefaultPieDataset();
        for (Part p : partition.getParts()) {
            data.setValue(p.getDisplayName(), p.getPercentage());
        }
        final JFreeChart chart = ChartFactory.createPieChart("test", data, false, false, false);
        chart.setTitle(new TextTitle());
        chart.setBackgroundPaint(null);
        PiePlot plot = (PiePlot) chart.getPlot();
        plot.setShadowPaint(null);
        //plot.setSimpleLabels(true);
        plot.setLabelBackgroundPaint(Color.WHITE);
View Full Code Here

Examples of org.jfree.chart.title.TextTitle

    // renderer.setShapesFilled(true);
    XYPlot plot = new XYPlot(xyDataset, timeAxis, valueAxis, renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
        plot, true);
    chart.setBackgroundPaint(java.awt.Color.white);
    TextTitle chartTitle = chart.getTitle();
    String fontName = chartTitle.getFont().getFontName();
    java.awt.Font newFont = new java.awt.Font(fontName, java.awt.Font.PLAIN, 12);
    chartTitle.setFont(newFont);

    return chart;
  }
View Full Code Here

Examples of org.jfree.chart.title.TextTitle

    // renderer.setShapesFilled(true);
    XYPlot plot = new XYPlot(xyDataset, timeAxis, valueAxis, renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
        plot, true);
    chart.setBackgroundPaint(java.awt.Color.white);
    TextTitle chartTitle = chart.getTitle();
    String fontName = chartTitle.getFont().getFontName();
    java.awt.Font newFont = new java.awt.Font(fontName, java.awt.Font.PLAIN, 12);
    chartTitle.setFont(newFont);

    return chart;
  }
View Full Code Here

Examples of org.jfree.chart.title.TextTitle

    renderer.setDrawYError(true);

    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
        plot, true);
    chart.setBackgroundPaint(java.awt.Color.white);
    TextTitle chartTitle = chart.getTitle();
    String fontName = chartTitle.getFont().getFontName();
    java.awt.Font newFont = new java.awt.Font(fontName, java.awt.Font.PLAIN, 12);
    chartTitle.setFont(newFont);

    return chart;
  }
View Full Code Here

Examples of org.jfree.chart.title.TextTitle

    }
  }

  protected void configureSubChart(final JFreeChart chart)
  {
    final TextTitle chartTitle = chart.getTitle();
    if (chartTitle != null)
    {
      if (getPieTitleFont() != null)
      {
        chartTitle.setFont(getPieTitleFont());
      }
      else
      {
        final Font titleFont = Font.decode(getTitleFont());
        chartTitle.setFont(titleFont);
      }
    }

    if (isAntiAlias() == false)
    {
View Full Code Here

Examples of org.jfree.chart.title.TextTitle

  }

  protected void configureChart(final JFreeChart chart)
  {
    // Misc Properties
    final TextTitle chartTitle = chart.getTitle();
    if (chartTitle != null)
    {
      final Font titleFont = Font.decode(getTitleFont());
      chartTitle.setFont(titleFont);
    }

    if (isAntiAlias() == false)
    {
      chart.setAntiAlias(false);
View Full Code Here

Examples of org.jfree.chart.title.TextTitle

    plot.setForegroundAlpha(1.0f);  
    // 指定显示的饼图上圆形(false)还椭圆形(true)  
    plot.setCircular(true);  
    // 设置图标题的字体  
    Font font = new Font("黑体",Font.CENTER_BASELINE,20);  
    TextTitle title = new TextTitle(name);  
    title.setFont(font);   
    chart.setTitle(title);  
    FileOutputStream output = null;  
    try {  
      output = new FileOutputStream(outputFileName);  
        ChartUtilities.writeChartAsJPEG(output, 100, chart, 640, 480, null);  
View Full Code Here

Examples of org.jfree.chart.title.TextTitle

     */
    public void apply(JFreeChart chart) {
        if (chart == null) {
            throw new IllegalArgumentException("Null 'chart' argument.");
        }
        TextTitle title = chart.getTitle();
        if (title != null) {
            title.setFont(this.extraLargeFont);
            title.setPaint(this.titlePaint);
        }

        int subtitleCount = chart.getSubtitleCount();
        for (int i = 0; i < subtitleCount; i++) {
            applyToTitle(chart.getSubtitle(i));
View Full Code Here

Examples of org.jfree.chart.title.TextTitle

     *
     * @param title  the title.
     */
    protected void applyToTitle(Title title) {
        if (title instanceof TextTitle) {
            TextTitle tt = (TextTitle) title;
            tt.setFont(this.largeFont);
            tt.setPaint(this.subtitlePaint);
        }
        else if (title instanceof LegendTitle) {
            LegendTitle lt = (LegendTitle) title;
            if (lt.getBackgroundPaint() != null) {
                lt.setBackgroundPaint(this.legendBackgroundPaint);
View Full Code Here

Examples of org.jfree.chart.title.TextTitle

        piePlot.setIgnoreNullValues(true);
        this.pieChart = new JFreeChart(piePlot);
        this.pieChart.removeLegend();
        this.dataExtractOrder = TableOrder.BY_COLUMN;
        this.pieChart.setBackgroundPaint(null);
        TextTitle seriesTitle = new TextTitle("Series Title",
                new Font("SansSerif", Font.BOLD, 12));
        seriesTitle.setPosition(RectangleEdge.BOTTOM);
        this.pieChart.setTitle(seriesTitle);
        this.aggregatedItemsKey = "Other";
        this.aggregatedItemsPaint = Color.lightGray;
        this.sectionPaints = new HashMap();
        this.legendItemShape = new Ellipse2D.Double(-4.0, -4.0, 8.0, 8.0);
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.