Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed deprecated PiePlot3D #348

Open
wants to merge 4 commits into
base: v1.5.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 0 additions & 136 deletions src/main/java/org/jfree/chart/ChartFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
import org.jfree.chart.plot.Marker;
import org.jfree.chart.plot.MultiplePiePlot;
import org.jfree.chart.plot.PiePlot;
import org.jfree.chart.plot.PiePlot3D;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.PolarPlot;
import org.jfree.chart.plot.RingPlot;
Expand Down Expand Up @@ -107,7 +106,6 @@
import org.jfree.chart.renderer.xy.XYStepRenderer;
import org.jfree.chart.title.TextTitle;
import org.jfree.chart.ui.Layer;
import org.jfree.chart.ui.RectangleEdge;
import org.jfree.chart.ui.RectangleInsets;
import org.jfree.chart.ui.TextAnchor;
import org.jfree.chart.urls.PieURLGenerator;
Expand Down Expand Up @@ -604,140 +602,6 @@ public static JFreeChart createMultiplePieChart(String title,

}

/**
* Creates a 3D pie chart using the specified dataset. The chart object
* returned by this method uses a {@link PiePlot3D} instance as the
* plot.
*
* @param title the chart title ({@code null} permitted).
* @param dataset the dataset for the chart ({@code null} permitted).
* @param legend a flag specifying whether or not a legend is required.
* @param tooltips configure chart to generate tool tips?
* @param locale the locale ({@code null} not permitted).
*
* @return A pie chart.
*
* @deprecated For 3D pie charts, use Orson Charts (https://github.com/jfree/orson-charts).
*/
public static JFreeChart createPieChart3D(String title, PieDataset dataset,
boolean legend, boolean tooltips, Locale locale) {

Args.nullNotPermitted(locale, "locale");
PiePlot3D plot = new PiePlot3D(dataset);
plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
if (tooltips) {
plot.setToolTipGenerator(new StandardPieToolTipGenerator(locale));
}
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
plot, legend);
currentTheme.apply(chart);
return chart;

}

/**
* Creates a 3D pie chart using the specified dataset. The chart object
* returned by this method uses a {@link PiePlot3D} instance as the
* plot.
*
* @param title the chart title ({@code null} permitted).
* @param dataset the dataset for the chart ({@code null} permitted).
*
* @return A pie chart.
*
* @deprecated For 3D pie charts, use Orson Charts (https://github.com/jfree/orson-charts).
*/
public static JFreeChart createPieChart3D(String title,
PieDataset dataset) {
return createPieChart3D(title, dataset, true, true, false);
}

/**
* Creates a 3D pie chart using the specified dataset. The chart object
* returned by this method uses a {@link PiePlot3D} instance as the
* plot.
*
* @param title the chart title ({@code null} permitted).
* @param dataset the dataset for the chart ({@code null} permitted).
* @param legend a flag specifying whether or not a legend is required.
* @param tooltips configure chart to generate tool tips?
* @param urls configure chart to generate URLs?
*
* @return A pie chart.
* @deprecated For 3D pie charts, use Orson Charts (https://github.com/jfree/orson-charts).
*/
public static JFreeChart createPieChart3D(String title, PieDataset dataset,
boolean legend, boolean tooltips, boolean urls) {

PiePlot3D plot = new PiePlot3D(dataset);
plot.setInsets(new RectangleInsets(0.0, 5.0, 5.0, 5.0));
if (tooltips) {
plot.setToolTipGenerator(new StandardPieToolTipGenerator());
}
if (urls) {
plot.setURLGenerator(new StandardPieURLGenerator());
}
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
plot, legend);
currentTheme.apply(chart);
return chart;

}

/**
* Creates a chart that displays multiple pie plots. The chart object
* returned by this method uses a {@link MultiplePiePlot} instance as the
* plot.
*
* @param title the chart title ({@code null} permitted).
* @param dataset the dataset ({@code null} permitted).
* @param order the order that the data is extracted (by row or by column)
* ({@code null} not permitted).
* @param legend include a legend?
* @param tooltips generate tooltips?
* @param urls generate URLs?
*
* @return A chart.
*/
public static JFreeChart createMultiplePieChart3D(String title,
CategoryDataset dataset, TableOrder order, boolean legend,
boolean tooltips, boolean urls) {

Args.nullNotPermitted(order, "order");
MultiplePiePlot plot = new MultiplePiePlot(dataset);
plot.setDataExtractOrder(order);
plot.setBackgroundPaint(null);
plot.setOutlineStroke(null);

JFreeChart pieChart = new JFreeChart(new PiePlot3D(null));
TextTitle seriesTitle = new TextTitle("Series Title",
new Font("SansSerif", Font.BOLD, 12));
seriesTitle.setPosition(RectangleEdge.BOTTOM);
pieChart.setTitle(seriesTitle);
pieChart.removeLegend();
pieChart.setBackgroundPaint(null);
plot.setPieChart(pieChart);

if (tooltips) {
PieToolTipGenerator tooltipGenerator
= new StandardPieToolTipGenerator();
PiePlot pp = (PiePlot) plot.getPieChart().getPlot();
pp.setToolTipGenerator(tooltipGenerator);
}

if (urls) {
PieURLGenerator urlGenerator = new StandardPieURLGenerator();
PiePlot pp = (PiePlot) plot.getPieChart().getPlot();
pp.setURLGenerator(urlGenerator);
}

JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
plot, legend);
currentTheme.apply(chart);
return chart;

}

/**
* Creates a bar chart with a vertical orientation. The chart object
* returned by this method uses a {@link CategoryPlot} instance as the
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/org/jfree/chart/annotations/Annotation.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@

package org.jfree.chart.annotations;

import org.jfree.chart.event.AnnotationChangeEvent;
import org.jfree.chart.event.AnnotationChangeListener;

/**
* The base interface for annotations. All annotations should support the
* {@link AnnotationChangeEvent} mechanism by allowing listeners to register
* and receive notification of any changes to the annotation.
* The base interface for annotations. All annotations should support
* {@link AnnotationChangeListener} via the addChangeListener and
* removeChangeListener methods.
*/
public interface Annotation {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import org.jfree.chart.axis.CategoryAnchor;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.event.AnnotationChangeEvent;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.PlotOrientation;
Expand Down Expand Up @@ -133,8 +132,8 @@ public Comparable getCategory1() {
}

/**
* Sets the category for the start of the line and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
* Sets the category for the start of the line and calls
* {@link #fireAnnotationChanged()}.
*
* @param category the category ({@code null} not permitted).
*
Expand All @@ -158,8 +157,8 @@ public double getValue1() {
}

/**
* Sets the y-value for the start of the line and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
* Sets the y-value for the start of the line and calls
* {@link #fireAnnotationChanged()}.
*
* @param value the value (must be finite).
*
Expand All @@ -183,8 +182,8 @@ public Comparable getCategory2() {
}

/**
* Sets the category for the end of the line and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
* Sets the category for the end of the line and calls
* {@link #fireAnnotationChanged()}.
*
* @param category the category ({@code null} not permitted).
*
Expand All @@ -208,8 +207,8 @@ public double getValue2() {
}

/**
* Sets the y-value for the end of the line and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
* Sets the y-value for the end of the line and calls
* {@link #fireAnnotationChanged()}.
*
* @param value the value (must be finite).
*
Expand All @@ -233,8 +232,8 @@ public Paint getPaint() {
}

/**
* Sets the paint used to draw the connecting line and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
* Sets the paint used to draw the connecting line and calls
* {@link #fireAnnotationChanged()}.
*
* @param paint the paint ({@code null} not permitted).
*
Expand All @@ -258,8 +257,8 @@ public Stroke getStroke() {
}

/**
* Sets the stroke used to draw the connecting line and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
* Sets the stroke used to draw the connecting line and calls
* {@link #fireAnnotationChanged()}.
*
* @param stroke the stroke ({@code null} not permitted).
*
Expand Down
Loading