Example usage for org.jfree.chart.title TextTitle DEFAULT_TEXT_PAINT

List of usage examples for org.jfree.chart.title TextTitle DEFAULT_TEXT_PAINT

Introduction

In this page you can find the example usage for org.jfree.chart.title TextTitle DEFAULT_TEXT_PAINT.

Prototype

Paint DEFAULT_TEXT_PAINT

To view the source code for org.jfree.chart.title TextTitle DEFAULT_TEXT_PAINT.

Click Source Link

Document

The default text color.

Usage

From source file:com.xpn.xwiki.plugin.charts.params.DefaultChartParams2.java

void setTitle(String prefix) throws ParamException {
    set(prefix + TITLE_SUFFIX, ""); // ?
    set(prefix + TITLE_BACKGROUND_COLOR_SUFFIX, (Color) null);
    set(prefix + TITLE_POSITION_SUFFIX, Title.DEFAULT_POSITION);
    set(prefix + TITLE_HORIZONTAL_ALIGNMENT_SUFFIX, Title.DEFAULT_HORIZONTAL_ALIGNMENT);
    set(prefix + TITLE_VERTICAL_ALIGNMENT_SUFFIX, Title.DEFAULT_VERTICAL_ALIGNMENT);
    set(prefix + TITLE_COLOR_SUFFIX, TextTitle.DEFAULT_TEXT_PAINT);
    set(prefix + TITLE_FONT_SUFFIX, TextTitle.DEFAULT_FONT);
    set(prefix + TITLE_PADDING_SUFFIX, Title.DEFAULT_PADDING);
}

From source file:org.martus.client.swingui.actions.ActionMenuCharts.java

private void configureBarChartPlot(JFreeChart barChart) {
    CategoryPlot plot = (CategoryPlot) barChart.getPlot();
    NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    TickUnitSource units = NumberAxis.createIntegerTickUnits();
    rangeAxis.setStandardTickUnits(units);

    CategoryAxis domainAxis = plot.getDomainAxis();
    CategoryLabelPositions newPositions = CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 2.0);
    domainAxis.setCategoryLabelPositions(newPositions);

    barChart.addSubtitle(new TextTitle(getLocalization().getFieldLabel("ChartSelectedBulletinsDisclaimerBar"),
            FontHandler.getDefaultFont(), TextTitle.DEFAULT_TEXT_PAINT, RectangleEdge.BOTTOM,
            TextTitle.DEFAULT_HORIZONTAL_ALIGNMENT, TextTitle.DEFAULT_VERTICAL_ALIGNMENT,
            TextTitle.DEFAULT_PADDING));
}

From source file:org.martus.client.swingui.actions.ActionMenuCharts.java

private JFreeChart createPieChart(HashMap<String, Integer> counts, String selectedFieldLabel) throws Exception {
    DefaultPieDataset pieDataset = createPieDataset(counts);

    JFreeChart pieChart = ChartFactory.createPieChart(getChartTitle(selectedFieldLabel), // Title
            pieDataset, // Dataset
            false, // Show legend
            true, // tooltips
            new Locale(getLocalization().getCurrentLanguageCode()));

    pieChart.addSubtitle(new TextTitle(getLocalization().getFieldLabel("ChartSelectedBulletinsDisclaimerPie"),
            TextTitle.DEFAULT_FONT, TextTitle.DEFAULT_TEXT_PAINT, RectangleEdge.BOTTOM,
            TextTitle.DEFAULT_HORIZONTAL_ALIGNMENT, TextTitle.DEFAULT_VERTICAL_ALIGNMENT,
            TextTitle.DEFAULT_PADDING));

    PiePlot piePlot = (PiePlot) pieChart.getPlot();
    piePlot.setLabelGenerator(new MartusPieSectionLabelGenerator(getLocalization()));
    return pieChart;
}