/** * Returns a clone of the renderer. * * @return A clone. * * @throws CloneNotSupportedException if the renderer cannot be cloned. */ @Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
/** * Sets a flag that controls whether or not outlines of the areas are drawn * and sends a {@link RendererChangeEvent} to all registered listeners. * * @param show the flag. * * @see #isOutline() */ public void setOutline(boolean show) { this.showOutline = show; fireChangeEvent(); }
if (!getItemVisible(series, item)) { return; plot.getRangeAxisEdge()); if (plot.getOrientation().isVertical()) { moveTo(areaState.area, transX1, zero); } else if (plot.getOrientation().isHorizontal()) { moveTo(areaState.area, zero, transX1); lineTo(areaState.area, transX1, transY1); } else if (plot.getOrientation().isHorizontal()) { lineTo(areaState.area, transY1, transX1); Paint paint = getItemPaint(series, item); Stroke stroke = getItemStroke(series, item); g2.setPaint(paint); g2.setStroke(stroke); if (getPlotShapes()) { shape = getItemShape(series, item); if (orientation == PlotOrientation.VERTICAL) { shape = ShapeUtils.createTranslatedShape(shape, transX1, if (getPlotLines()) { if (item > 0) { if (plot.getOrientation() == PlotOrientation.VERTICAL) { if (getPlotArea() && item > 0 && item == (itemCount - 1)) {
public LegendItem getLegendItem(int datasetIndex, int series) { LegendItem result = null; XYPlot xyplot = getPlot(); if (xyplot != null) { XYDataset dataset = xyplot.getDataset(datasetIndex); if (dataset != null) { XYSeriesLabelGenerator lg = getLegendItemLabelGenerator(); String label = lg.generateLabel(dataset, series); String description = label; String toolTipText = null; if (getLegendItemToolTipGenerator() != null) { toolTipText = getLegendItemToolTipGenerator().generateLabel( dataset, series); if (getLegendItemURLGenerator() != null) { urlText = getLegendItemURLGenerator().generateLabel( dataset, series); Paint paint = lookupSeriesPaint(series); result = new LegendItem(label, description, toolTipText, urlText, this.legendArea, paint); result.setLabelFont(lookupLegendTextFont(series)); Paint labelPaint = lookupLegendTextPaint(series); if (labelPaint != null) { result.setLabelPaint(labelPaint);
renderer = new XYAreaRenderer();
/** * Tests the renderer for equality with an arbitrary object. * * @param obj the object ({@code null} permitted). * * @return A boolean. */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StackedXYAreaRenderer) || !super.equals(obj)) { return false; } StackedXYAreaRenderer that = (StackedXYAreaRenderer) obj; if (!PaintUtils.equal(this.shapePaint, that.shapePaint)) { return false; } if (!ObjectUtils.equal(this.shapeStroke, that.shapeStroke)) { return false; } return true; }
if (!getItemVisible(series, item)) { return; Paint paint = getItemPaint(series, item); Stroke stroke = getItemStroke(series, item); g2.setPaint(paint); g2.setStroke(stroke); if (getPlotShapes()) { shape = getItemShape(series, item); if (orientation == PlotOrientation.VERTICAL) { shape = ShapeUtilities.createTranslatedShape(shape, transX1, if (getPlotLines()) { if (item > 0) { if (plot.getOrientation() == PlotOrientation.VERTICAL) { if (getPlotArea() && item > 0 && item == (itemCount - 1)) { paint = lookupSeriesFillPaint(series); if (isOutline()) { Shape area = areaState.area; Stroke outlineStroke = lookupSeriesOutlineStroke(series); if (outlineStroke instanceof BasicStroke) { BasicStroke bs = (BasicStroke) outlineStroke; g2.setPaint(lookupSeriesOutlinePaint(series));
XYPlot xyplot = getPlot(); if (xyplot != null) { XYDataset dataset = xyplot.getDataset(datasetIndex); if (dataset != null) { XYSeriesLabelGenerator lg = getLegendItemLabelGenerator(); String label = lg.generateLabel(dataset, series); String description = label; String toolTipText = null; if (getLegendItemToolTipGenerator() != null) { toolTipText = getLegendItemToolTipGenerator().generateLabel( dataset, series); if (getLegendItemURLGenerator() != null) { urlText = getLegendItemURLGenerator().generateLabel( dataset, series); Paint paint = lookupSeriesPaint(series); result = new LegendItem(label, description, toolTipText, urlText, this.legendArea, paint); result.setLabelFont(lookupLegendTextFont(series)); Paint labelPaint = lookupLegendTextPaint(series); if (labelPaint != null) { result.setLabelPaint(labelPaint);
switch ( chartDefinition.getChartType() ) { case AREA_CHART_TYPE: renderer = chartDefinition.isStacked() ? new StackedXYAreaRenderer2() : new XYAreaRenderer(); break; default:
/** * Tests the renderer for equality with an arbitrary object. * * @param obj the object (<code>null</code> permitted). * * @return A boolean. */ public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StackedXYAreaRenderer) || !super.equals(obj)) { return false; } StackedXYAreaRenderer that = (StackedXYAreaRenderer) obj; if (!PaintUtilities.equal(this.shapePaint, that.shapePaint)) { return false; } if (!ObjectUtilities.equal(this.shapeStroke, that.shapeStroke)) { return false; } return true; }
plot.setRenderer(new XYAreaRenderer(XYAreaRenderer.AREA, tipGenerator, urlGenerator)); JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
/** * Sets a flag that controls whether or not outlines of the areas are drawn * and sends a {@link RendererChangeEvent} to all registered listeners. * * @param show the flag. * * @see #isOutline() */ public void setOutline(boolean show) { this.showOutline = show; fireChangeEvent(); }
/** * Returns a clone of the renderer. * * @return A clone. * * @throws CloneNotSupportedException if the renderer cannot be cloned. */ public Object clone() throws CloneNotSupportedException { return super.clone(); }
break; case AREA_CHART_TYPE: renderer = new XYAreaRenderer(); break; case STEP_CHART_TYPE:
/** * Sets the flag that controls whether or not the series fill paint is * used to fill the area under the line and sends a * {@link RendererChangeEvent} to all listeners. * * @param use the new flag value. * * @since 1.0.14 */ public void setUseFillPaint(boolean use) { this.useFillPaint = use; fireChangeEvent(); }
plot.setRenderer(datasetIndex, new XYAreaRenderer());
/** * Sets the flag that controls whether or not the series fill paint is * used to fill the area under the line and sends a * {@link RendererChangeEvent} to all listeners. * * @param use the new flag value. * * @since 1.0.14 */ public void setUseFillPaint(boolean use) { this.useFillPaint = use; fireChangeEvent(); }
plot.setRenderer(new XYAreaRenderer(XYAreaRenderer.AREA, tipGenerator, urlGenerator)); JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
/** * Sets the shape used as an area in each legend item and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param area the area (<code>null</code> not permitted). */ public void setLegendArea(Shape area) { if (area == null) { throw new IllegalArgumentException("Null 'area' argument."); } this.legendArea = area; fireChangeEvent(); }
break; case AREA_CHART_TYPE: renderer = new XYAreaRenderer(); break; case STEP_CHART_TYPE: