Package org.jfree.chart.plot

Examples of org.jfree.chart.plot.DefaultDrawingSupplier


    if (i>=sources.size()) return null;
    return (DataSource)sources.remove(i);
  }

  public DrawingSupplier getDrawingSupplier() {
    if (supplier==null) supplier = new DefaultDrawingSupplier() {
      public Paint getNextPaint() {
        Paint p = super.getNextPaint();
        if ((x_ary>1) && (p instanceof Color)) {
          Color c = ((Color)p);
          float[] hsb = Color.RGBtoHSB(c.getRed(),c.getGreen(),c.getBlue(),new float[3]);
View Full Code Here


        // Add the single color to the beginning of the color cycle, using all the default
        // colors.  To replace the defaults you have to specify at least two colors.
        Paint[] colors = new Paint[DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length + 1];
        colors[0] = ((JRSeriesColor)seriesColors.first()).getColor();
        System.arraycopy(DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE, 0, colors, 1, DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE.length);
        plot.setDrawingSupplier(new DefaultDrawingSupplier(colors,
            DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE));
      }
      else if (seriesColors.size() > 1)
      {
        // Set up a custom drawing supplier that cycles through the user's colors
        // instead of the default colors.
        Color[] colors = new Color[seriesColors.size()];
        JRSeriesColor[] colorSequence = new JRSeriesColor[seriesColors.size()];
        seriesColors.toArray(colorSequence);
        for (int i = 0; i < colorSequence.length; i++)
        {
          colors[i] = colorSequence[i].getColor();
        }

        plot.setDrawingSupplier(new DefaultDrawingSupplier(colors,
                      DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
                      DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
                      DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
                      DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE));
      }
View Full Code Here

    else
    {
      colors = DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE;
    }
   
    p.setDrawingSupplier(new DefaultDrawingSupplier(
        colors,
        defaultPlotOutlinePaintSequence,
        defaultPlotStrokeSequence,
        defaultPlotOutlineStrokeSequence,
        defaultPlotShapeSequence
View Full Code Here

//    Shape[] defaultPlotShapeSequence =
//      getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_SHAPE_SEQUENCE) != null ?
//      (Shape[])getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_SHAPE_SEQUENCE) :
//      DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE;

    p.setDrawingSupplier(new DefaultDrawingSupplier(
        paintSequence,
        outlinePaintSequence,
        strokeSequence,
        outlineStrokeSequence,
        DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE
View Full Code Here

        theme.labelLinkPaint = Color.lightGray;
        theme.tickLabelPaint = Color.white;
        theme.axisLabelPaint = Color.white;
        theme.shadowPaint = Color.darkGray;
        theme.itemLabelPaint = Color.white;
        theme.drawingSupplier = new DefaultDrawingSupplier(
                new Paint[] {Color.decode("0xFFFF00"),
                        Color.decode("0x0036CC"), Color.decode("0xFF0000"),
                        Color.decode("0xFFFF7F"), Color.decode("0x6681CC"),
                        Color.decode("0xFF7F7F"), Color.decode("0xFFFFBF"),
                        Color.decode("0x99A6CC"), Color.decode("0xFFBFBF"),
View Full Code Here

        this.titlePaint = Color.black;
        this.subtitlePaint = Color.black;
        this.legendBackgroundPaint = Color.white;
        this.legendItemPaint = Color.darkGray;
        this.chartBackgroundPaint = Color.white;
        this.drawingSupplier = new DefaultDrawingSupplier();
        this.plotBackgroundPaint = Color.lightGray;
        this.plotOutlinePaint = Color.black;
        this.labelLinkPaint = Color.black;
        this.labelLinkStyle = PieLabelLinkStyle.CUBIC_CURVE;
        this.axisOffset = new RectangleInsets(4, 4, 4, 4);
View Full Code Here

        -iOffset, iOffset, iOffset}, 3);
    Shape diamond = new Polygon(new int[] {0, iOffset, 0, -iOffset}, new int[] {
        -iOffset, 0, iOffset, 0}, 4);
    Shape ellipse = new Ellipse2D.Double(-offset, -offset / 2, size, size / 2);

    return new DefaultDrawingSupplier(colors,
        DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
        DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
        DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE, new Shape[] {
            circle, square, triangle, diamond, ellipse});
  }
View Full Code Here

     * Create a new drawing supplier using the current factory settings.
     *
     * @return
     */
    public DrawingSupplier newDrawingSupplier() {
        return new DefaultDrawingSupplier(paintSequence, fillPaintSequence,
                outlinePaintSequence, strokeSequence, outlineStrokeSequence,
                shapeSequence);
    }
View Full Code Here

        }.run();
    }

    private void configureConsistentColors(final PiePlot plot,
            PieDataset pieData) {
        DefaultDrawingSupplier s = new DefaultDrawingSupplier();
        for (Object key : pieData.getKeys()) {
            Paint paint = s.getNextPaint();
            plot.setSectionPaint((Comparable) key, paint);
        }
    }
View Full Code Here

    this.yAxisType = yAxisType;
  }

  private DrawingSupplier getDrawingSupplier() {
    if (drawingSupplier == null) {
      drawingSupplier = new DefaultDrawingSupplier();
    }
    return drawingSupplier;
  }
View Full Code Here

TOP

Related Classes of org.jfree.chart.plot.DefaultDrawingSupplier

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.