Package org.jfree.chart.title

Examples of org.jfree.chart.title.TextTitle


        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


            "Military Spending 2008 - Top 10 Countries",
            dataset, false, // legend?
            true, // tooltips?
            false // URLs?
            );
        chart.addSubtitle(new TextTitle("http://en.wikipedia.org/wiki/List_of_countries_by_military_expenditures"));
        PiePlot plot = (PiePlot) chart.getPlot();
        plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0} ({2})"));
        plot.setBackgroundPaint(Color.WHITE);
        plot.setOutlinePaint(null);
View Full Code Here

      }
      // 设置副标题
      if (this.subTitle != null && this.subTitle.length() > 0
          && chart != null) {

        chart.addSubtitle(new TextTitle(this.subTitle));

      }

      SetChartExtProperty(chart);
View Full Code Here

                PlotOrientation.VERTICAL,
                true,
                true,
                false);
        if (!title.equals("")) {
            TextTitle source = new TextTitle(fileName);
            source.setFont(new Font("SanSerif", Font.PLAIN, 12));
            source.setPosition(RectangleEdge.TOP);
            chart.addSubtitle(source);
        }
        chart.getTitle().setFont(new Font("Tahoma", Font.PLAIN, 13));
        final XYPlot plot = chart.getXYPlot();
        if (shapeRenderer) {
View Full Code Here

    case "Pasta Dilimi":
      cp = grafikCiz.pastaDilimi(deger, baremAdi, degerIsimleri);
      break;
    }
    TextTitle txtTitle = new TextTitle(chartTitle, new Font("Tahoma",
        Font.BOLD, 18));
    cp.getChart().setTitle(txtTitle);
    chartEklenecekPanel.add(cp);
    chartEklenecekPanel.updateUI();
    cp.setVisible(true);
View Full Code Here

        PlotOrientation.VERTICAL, true, // include legend
        true, // tooltips
        false // urls
        );
   
    chart.addSubtitle(new TextTitle("Only values > 0 are taken into account"));
    //configure domain axis (interval numbers and simulation steps
    final XYPlot plot = chart.getXYPlot();
    NumberAxis stepAxis = (NumberAxis) plot.getDomainAxis();
    stepAxis.setAutoTickUnitSelection(false);
    stepAxis.setTickUnit(new NumberTickUnit(
View Full Code Here

    JFreeChart chart = ChartFactory.createScatterPlot(
        "Dependency Scatter Plot", firstValue.text() + "  " + firstValue.unit(),
        secondValue.text() + "  " + secondValue.unit(), dataCol,
        PlotOrientation.HORIZONTAL, true, true, false);
    chart.addSubtitle(new TextTitle("Each dot represents the value combination of one edge\n" +
        "Only non-zero values are considered"));
    ChartFrame frame = new ChartFrame("Dependency Scatter Plot", chart);
    frame.setIconImage(Toolkit.getDefaultToolkit().getImage(
        GenericGraphs.class.getClassLoader().getResource("chart.png")));
    frame.pack();
View Full Code Here

    }

    chart = ChartFactory.createXYLineChart(title, xAxis, yAxis, data,
        PlotOrientation.VERTICAL, true, false, false);
    if (subTitle != null)
      chart.addSubtitle(new TextTitle(subTitle));
    ChartPanel panel = new ChartPanel(chart);
    JPopupMenu menu = panel.getPopupMenu();
    exportSVG.addActionListener(this);
    menu.add(exportSVG, 2);
    panel.setPopupMenu(menu);
View Full Code Here

        super(parent, style);
        FillLayout layout = new FillLayout();
        layout.marginHeight = layout.marginWidth = 4;
        setLayout(layout);

        TextTitle t = (title != null ? (TextTitle) title
                : new TextTitle(localizationResources.getString("Title")));
        this.showTitle = (title != null);
        this.titleFont = SWTUtils.toSwtFontData(getDisplay(), t.getFont(),
                true);
        this.titleColor = SWTUtils.toSwtColor(getDisplay(), t.getPaint());

        Group general = new Group(this, SWT.NONE);
        general.setLayout(new GridLayout(3, false));
        general.setText(localizationResources.getString("General"));
        // row 1
        Label label = new Label(general, SWT.NONE);
        label.setText(localizationResources.getString("Show_Title"));
        GridData gridData = new GridData();
        gridData.horizontalSpan = 2;
        label.setLayoutData(gridData);
        this.showTitleCheckBox = new Button(general, SWT.CHECK);
        this.showTitleCheckBox.setSelection(this.showTitle);
        this.showTitleCheckBox.setLayoutData(new GridData(SWT.CENTER,
                SWT.CENTER, false, false));
        this.showTitleCheckBox.addSelectionListener(
                new SelectionAdapter() {
                    public void widgetSelected(SelectionEvent event) {
                        SWTTitleEditor.this.showTitle = SWTTitleEditor.this
                                .showTitleCheckBox.getSelection();
                    }
                });
        // row 2
        new Label(general, SWT.NONE).setText(localizationResources.getString(
                "Text"));
        this.titleField = new Text(general, SWT.BORDER);
        this.titleField.setText(t.getText());
        this.titleField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
                false));
        new Label(general, SWT.NONE).setText("");
        // row 3
        new Label(general, SWT.NONE).setText(localizationResources.getString(
View Full Code Here

     *
     * @param chart  the chart whose title is to be modified.
     */
    public void setTitleProperties(JFreeChart chart) {
        if (this.showTitle) {
            TextTitle title = chart.getTitle();
            if (title == null) {
                title = new TextTitle();
                chart.setTitle(title);
            }
            title.setText(getTitleText());
            title.setFont(SWTUtils.toAwtFont(getDisplay(), getTitleFont(),
                    true));
            title.setPaint(SWTUtils.toAwtColor(getTitleColor()));
        }
        else {
            chart.setTitle((TextTitle) null);
        }
    }
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.