yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale)); XYPlot plot = new XYPlot(null, xAxis, yAxis, null); DrawingSupplier drawingSupplier = new DefaultDrawingSupplier(); plot.setOrientation(PlotOrientation.VERTICAL);
xpoints = intArray(0.0, delta, -delta); ypoints = intArray(-delta, delta, delta); result[2] = new Polygon(xpoints, ypoints, 3); xpoints = intArray(0.0, delta, 0.0, -delta); ypoints = intArray(-delta, 0.0, delta, 0.0); result[3] = new Polygon(xpoints, ypoints, 4); xpoints = intArray(-delta, +delta, 0.0); ypoints = intArray(-delta, -delta, delta); result[5] = new Polygon(xpoints, ypoints, 3); xpoints = intArray(-delta, delta, -delta); ypoints = intArray(-delta, 0.0, delta); result[7] = new Polygon(xpoints, ypoints, 3); xpoints = intArray(-delta, delta, delta); ypoints = intArray(0.0, -delta, +delta); result[9] = new Polygon(xpoints, ypoints, 3);
return false; if (!equalShapes(this.shapeSequence, that.shapeSequence)) { return false;
@Override protected void init() { Shape[] shapes = DefaultDrawingSupplier.createStandardSeriesShapes(); addChoice("square", shapes[0]); addChoice("circle", shapes[1]); addChoice("triangle-up", shapes[2]); addChoice("diamond", shapes[3]); addChoice("rectangle-horizontal", shapes[4]); addChoice("triangle-down", shapes[5]); addChoice("ellipse", shapes[6]); addChoice("triangle-right", shapes[7]); addChoice("rectangle-vertical", shapes[8]); addChoice("triangle-left", shapes[9]); }
xpoints = intArray(0.0, delta, -delta); ypoints = intArray(-delta, delta, delta); result[2] = new Polygon(xpoints, ypoints, 3); xpoints = intArray(0.0, delta, 0.0, -delta); ypoints = intArray(-delta, 0.0, delta, 0.0); result[3] = new Polygon(xpoints, ypoints, 4); xpoints = intArray(-delta, +delta, 0.0); ypoints = intArray(-delta, -delta, delta); result[5] = new Polygon(xpoints, ypoints, 3); xpoints = intArray(-delta, delta, -delta); ypoints = intArray(-delta, 0.0, delta); result[7] = new Polygon(xpoints, ypoints, 3); xpoints = intArray(-delta, delta, delta); ypoints = intArray(0.0, -delta, +delta); result[9] = new Polygon(xpoints, ypoints, 3);
return false; if (!equalShapes(this.shapeSequence, that.shapeSequence)) { return false;
/** * @param paintMode The paint mode to set */ public void setPaintMode(int paintMode) { this.paintMode = paintMode; // clear paintMaps and use a new "reset" drawing supplier this.sectionPaints.clear(); this.drawingSupplier = new DefaultDrawingSupplier(); }
/** * @param paintMode The paint mode to set. */ public void setPaintMode(int paintMode) { this.paintMode = paintMode; // clear paintMaps and use a new "reset" drawing supplier this.sectionPaints.clear(); this.drawingSupplier = new DefaultDrawingSupplier(); }
/** * @param paintMode The paint mode to set */ public void setPaintMode(int paintMode) { this.paintMode = paintMode; // clear paintMaps and use a new "reset" drawing supplier sectionPaints.clear(); this.drawingSupplier = new DefaultDrawingSupplier(); }
/** * Create the renderer with provided paint maps * * @param paintMaps The paint maps. */ public ChartGroupedStackedBarRenderer(PaintMaps paintMaps) { this.paintMaps = paintMaps; this.sectionPaints = new HashMap(); this.drawingSupplier = new DefaultDrawingSupplier(); }
/** * Create a plot with given dataset, paint maps and paint mode. * * @param dataset The datset. * @param paintMaps The paint maps. * @param paintMode The paint mode to use. */ public ChartPiePlot(PieDataset dataset, PaintMaps paintMaps, int paintMode) { super(dataset); this.paintMaps = paintMaps; this.paintMode = paintMode; this.sectionPaints = new HashMap(); this.drawingSupplier = new DefaultDrawingSupplier(); }
/** * Creates a new plot. */ protected Plot() { this.chart = null; this.parent = null; this.insets = DEFAULT_INSETS; this.backgroundPaint = DEFAULT_BACKGROUND_PAINT; this.backgroundAlpha = DEFAULT_BACKGROUND_ALPHA; this.backgroundImage = null; this.outlineVisible = true; this.outlineStroke = DEFAULT_OUTLINE_STROKE; this.outlinePaint = DEFAULT_OUTLINE_PAINT; this.foregroundAlpha = DEFAULT_FOREGROUND_ALPHA; this.noDataMessage = null; this.noDataMessageFont = new Font("SansSerif", Font.PLAIN, 12); this.noDataMessagePaint = Color.BLACK; this.drawingSupplier = new DefaultDrawingSupplier(); this.notify = true; this.listenerList = new EventListenerList(); }
/** * Creates a new plot. */ protected Plot() { this.parent = null; this.insets = DEFAULT_INSETS; this.backgroundPaint = DEFAULT_BACKGROUND_PAINT; this.backgroundAlpha = DEFAULT_BACKGROUND_ALPHA; this.backgroundImage = null; this.outlineVisible = true; this.outlineStroke = DEFAULT_OUTLINE_STROKE; this.outlinePaint = DEFAULT_OUTLINE_PAINT; this.foregroundAlpha = DEFAULT_FOREGROUND_ALPHA; this.noDataMessage = null; this.noDataMessageFont = new Font("SansSerif", Font.PLAIN, 12); this.noDataMessagePaint = Color.black; this.drawingSupplier = new DefaultDrawingSupplier(); this.notify = true; this.listenerList = new EventListenerList(); }
theme.shadowPaint = Color.DARK_GRAY; theme.itemLabelPaint = Color.WHITE; theme.drawingSupplier = new DefaultDrawingSupplier( new Paint[] {Color.decode("0xFFFF00"), Color.decode("0x0036CC"), Color.decode("0xFF0000"),
theme.shadowPaint = Color.darkGray; theme.itemLabelPaint = Color.white; theme.drawingSupplier = new DefaultDrawingSupplier( new Paint[] {Color.decode("0xFFFF00"), Color.decode("0x0036CC"), Color.decode("0xFF0000"),
/** * Creates a new plot with a given dataset and paint maps. * * @param dataset The dataset. * @param paintMaps The paint maps.. */ public ChartMultiplePiePlot(CategoryDataset dataset, PaintMaps paintMaps) { super(dataset); this.paintMaps = paintMaps; this.sectionPaints = new HashMap(); this.drawingSupplier = new DefaultDrawingSupplier(); this.baseItemLabelGenerator = new StandardCategoryItemLabelGenerator(); this.legendItemLabelGenerator = new StandardCategoryItemLabelGenerator(); // important: listen to change events from dataset dataset.addChangeListener(this); }
this.legendItemPaint = Color.darkGray; this.chartBackgroundPaint = Color.white; this.drawingSupplier = new DefaultDrawingSupplier(); this.plotBackgroundPaint = Color.lightGray; this.plotOutlinePaint = Color.black;
static private void configureLineChart(JFreeChart chart) { CategoryPlot plot = chart.getCategoryPlot(); final DrawingSupplier supplier = new DefaultDrawingSupplier( DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE, DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE, // Draw a small diamond new Shape[] { new Polygon(new int[] {3, 0, -3, 0}, new int[] {0, 3, 0, -3}, 4) } ); plot.setDomainGridlinePaint(Color.black); plot.setRangeGridlinePaint(Color.black); plot.setDrawingSupplier(supplier); LineAndShapeRenderer renderer = (LineAndShapeRenderer) plot.getRenderer(); renderer.setShapesVisible(true); renderer.setStroke(new BasicStroke(2.0f)); }
this.legendItemPaint = Color.DARK_GRAY; this.chartBackgroundPaint = Color.WHITE; this.drawingSupplier = new DefaultDrawingSupplier(); this.plotBackgroundPaint = Color.LIGHT_GRAY; this.plotOutlinePaint = Color.BLACK;
static protected void configureLineChart(JFreeChart chart) { CategoryPlot plot = chart.getCategoryPlot(); final DrawingSupplier supplier = new DefaultDrawingSupplier( DefaultDrawingSupplier.DEFAULT_PAINT_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE, DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE, // Draw a small diamond new Shape[] { new Polygon(new int[] {3, 0, -3, 0}, new int[] {0, 3, 0, -3}, 4) } ); plot.setDomainGridlinePaint(Color.black); plot.setRangeGridlinePaint(Color.black); plot.setDrawingSupplier(supplier); LineAndShapeRenderer renderer = (LineAndShapeRenderer) plot.getRenderer(); renderer.setShapesVisible(true); renderer.setStroke(new BasicStroke(2.0f)); CategoryAxis axis = plot.getDomainAxis(); axis.setCategoryLabelPositions(CategoryLabelPositions.DOWN_90); }