Examples of PieSectionLabelGenerator


Examples of org.jfree.chart.labels.PieSectionLabelGenerator

                Arc2D arc = new Arc2D.Double(labelsArea, getStartAngle(),
                        mid - getStartAngle(), Arc2D.OPEN);
                int x = (int) arc.getEndPoint().getX();
                int y = (int) arc.getEndPoint().getY();

                PieSectionLabelGenerator labelGenerator = getLabelGenerator();
                if (labelGenerator == null) {
                    continue;
                }
                String label = labelGenerator.generateSectionLabel(
                        this.dataset, key);
                if (label == null) {
                    continue;
                }
                g2.setFont(this.labelFont);
View Full Code Here

Examples of org.jfree.chart.labels.PieSectionLabelGenerator

    plot.setLabelGap(0.02);

    for (int i = 0; i < manas.length; i++)
      plot.setSectionPaint(new String(manas[i]), manaColors[i]);
   
    plot.setLabelGenerator(new PieSectionLabelGenerator() {

      @SuppressWarnings("unchecked")
      public AttributedString generateAttributedSectionLabel(PieDataset arg0, Comparable arg1) {
        return null;
      }
View Full Code Here

Examples of org.jfree.chart.labels.PieSectionLabelGenerator

            return;

        final ChartLabels labels = legend.getLabels();
        if (labels.getText() != null) {
            // simple text = the same string for every item
            plot.setLegendLabelGenerator(new PieSectionLabelGenerator() {
                public String generateSectionLabel(PieDataset pieDataset, Comparable comparable) {
                    return labels.getText();
                }

                public AttributedString generateAttributedSectionLabel(PieDataset dataset, Comparable key) {
View Full Code Here

Examples of org.jfree.chart.labels.PieSectionLabelGenerator

            return;

        final ChartLabels labels = legend.getLabels();
        if (labels.getText() != null) {
            // simple text = the same string for every item
            plot.setLegendLabelGenerator(new PieSectionLabelGenerator() {
                public String generateSectionLabel(PieDataset pieDataset, Comparable comparable) {
                    return labels.getText();
                }

                public AttributedString generateAttributedSectionLabel(PieDataset dataset, Comparable key) {
View Full Code Here

Examples of org.jfree.chart.labels.PieSectionLabelGenerator

                Arc2D arc = new Arc2D.Double(labelsArea, getStartAngle(),
                        mid - getStartAngle(), Arc2D.OPEN);
                int x = (int) arc.getEndPoint().getX();
                int y = (int) arc.getEndPoint().getY();

                PieSectionLabelGenerator labelGenerator = getLabelGenerator();
                if (labelGenerator == null) {
                    continue;
                }
                String label = labelGenerator.generateSectionLabel(
                        this.dataset, key);
                if (label == null) {
                    continue;
                }
                g2.setFont(this.labelFont);
View Full Code Here

Examples of org.jfree.chart.labels.PieSectionLabelGenerator

                Arc2D arc = new Arc2D.Double(labelsArea, getStartAngle(),
                        mid - getStartAngle(), Arc2D.OPEN);
                int x = (int) arc.getEndPoint().getX();
                int y = (int) arc.getEndPoint().getY();
               
                PieSectionLabelGenerator labelGenerator = getLabelGenerator();
                if (labelGenerator == null) {
                    continue;
                }
                String label = labelGenerator.generateSectionLabel(
                        this.dataset, key);
                if (label == null) {
                    continue;
                }
                g2.setFont(this.labelFont);
View Full Code Here

Examples of org.jfree.chart.labels.PieSectionLabelGenerator

                Arc2D arc = new Arc2D.Double(labelsArea, getStartAngle(),
                        mid - getStartAngle(), Arc2D.OPEN);
                int x = (int) arc.getEndPoint().getX();
                int y = (int) arc.getEndPoint().getY();

                PieSectionLabelGenerator myLabelGenerator = getLabelGenerator();
                if (myLabelGenerator == null) {
                    continue;
                }
                String label = myLabelGenerator.generateSectionLabel(
                        this.dataset, key);
                if (label == null) {
                    continue;
                }
                g2.setFont(this.labelFont);
View Full Code Here

Examples of org.jfree.chart.labels.PieSectionLabelGenerator

    plot.setSectionPaint(3, new Color(69, 138, 55));
    plot.setSectionPaint(2, new Color(239, 210, 10));
    plot.setSectionPaint(1, new Color(242, 116, 33));
    plot.setSectionPaint(0, new Color(247, 40, 12));
   
    PieSectionLabelGenerator generator = new StandardPieSectionLabelGenerator("{0}: {1} ({2})");
    plot.setLabelGenerator(generator);
   
    plot.setLabelBackgroundPaint(new Color(255,255,255));
   
    Font font = new Font(Font.SANS_SERIF, Font.PLAIN, 12);
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.