Package org.jfree.chart.title

Examples of org.jfree.chart.title.TextTitle


     *
     * @param subtitle  the subtitle.
     * @param font  the subtitle font.
     */
    public void addSubtitle(String subtitle, Font font) {
        this.chart.addSubtitle(new TextTitle(subtitle, font));
    }
View Full Code Here


        ChartFactory.createXYLineChart(title, model.getDomainType()
            .getDescription(), model.getRangeType()
            .getDescription(), model, PlotOrientation.VERTICAL,
            true, true, true), model, permitLogarithmic);

    chartPanel.getChart().addSubtitle(new TextTitle(subtitle));

    return chartPanel;
  }
View Full Code Here

        ChartFactory.createScatterPlot(title, model.getDomainType()
            .getDescription(), model.getRangeType()
            .getDescription(), model, PlotOrientation.VERTICAL,
            true, true, true), model, permitLogarithmic);

    chartPanel.getChart().addSubtitle(new TextTitle(subtitle));

    return chartPanel;
  }
View Full Code Here

    chart2.getXYPlot().setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);

    PeriodAnalysis2DChartPane chartPanel = new PeriodAnalysis2DChartPane(
        chart2, model, permitLogarithmic);

    chartPanel.getChart().addSubtitle(new TextTitle(subtitle));

    return chartPanel;
  }
View Full Code Here

        ChartFactory.createXYLineChart(title, model.getDomainType()
            .getDescription(), model.getRangeType()
            .getDescription(), model, PlotOrientation.VERTICAL,
            true, true, true), model, permitLogarithmic);

    chartPanel.getChart().addSubtitle(new TextTitle(subtitle));

    return chartPanel;
  }
View Full Code Here

        else {
            chart.setTitle(Translator.translate(title));
            String titleFontSize = getSetting("titleFontSize");
            if (titleFontSize != null) try {
                float fontSize = Float.parseFloat(titleFontSize);
                TextTitle t = chart.getTitle();
                t.setFont(t.getFont().deriveFont(fontSize));
            } catch (Exception tfe) {}
        }

        if (chromeless || parameters.get("hideLegend") != null)
            chart.removeLegend();
View Full Code Here

        bounds, retriever);

    // Add sub-title, if any.
    if (subTitle != null && !"".equals(subTitle.trim())) {
      List<Title> subTitles = chart.getSubtitles();
      subTitles.add(new TextTitle(subTitle));
      chart.setSubtitles(subTitles);
    }

    // Format for observation tool-tip.
    xyMsgFormat = "%s (%s), %s";
View Full Code Here

    this.chartPanel.setPreferredSize(bounds);

    this.chart = chartPanel.getChart();

    if (subTitle != null && "".equals(subTitle.trim())) {
      this.chart.addSubtitle(new TextTitle(subTitle));
    }

    this.renderer = new VStarPlotDataRenderer();
    this.renderer.setDrawYError(this.showErrorBars);
View Full Code Here

      else if ("right".equals(alignParam))
        align = HorizontalAlignment.RIGHT;
    }
*/
    if (title != null || "title".equals(type)) {
      TextTitle tt = null;
      if ("subtitle".equals(type)) {
        // search for subtitle
        List subTitles = localChart.getSubtitles();
        Iterator iter = subTitles.iterator();
        while (iter.hasNext()) {
          Object o = iter.next();
          if (o instanceof TextTitle) {
            tt = (TextTitle) o;
            break;
          }
        }

        if (tt == null) {
          tt = new TextTitle(title);
          localChart.addSubtitle(tt);
        }
      } else {
        tt = localChart.getTitle();
      }

      Font font = new Font(fontName,
                (isBold ? Font.BOLD : 0) + (isItalic ? Font.ITALIC : 0),
                fontSize);
      tt.setFont(font);
      if (paint != null)
        tt.setPaint(paint);
      if (backgroundPaint != null)
        tt.setBackgroundPaint(backgroundPaint);
    }
  }
View Full Code Here

        JFreeChart chart = new JFreeChart(plot);
        chart.removeLegend();

        if (width < SMALL_PIC || height < SMALL_PIC) {
        } else {
            chart.setTitle(new TextTitle(this.toString(), new Font("Arial", 0, 12)));
        }

        return chart.createBufferedImage(width, height);
    }
View Full Code Here

TOP

Related Classes of org.jfree.chart.title.TextTitle

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.