本文整理汇总了Java中org.jfree.chart.renderer.DefaultPolarItemRenderer类的典型用法代码示例。如果您正苦于以下问题:Java DefaultPolarItemRenderer类的具体用法?Java DefaultPolarItemRenderer怎么用?Java DefaultPolarItemRenderer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultPolarItemRenderer类属于org.jfree.chart.renderer包,在下文中一共展示了DefaultPolarItemRenderer类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPolarChart
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Creates a polar plot for the specified dataset (x-values interpreted as
* angles in degrees). The chart object returned by this method uses a
* {@link PolarPlot} instance as the plot, with a {@link NumberAxis} for
* the radial axis.
*
* @param title the chart title (<code>null</code> permitted).
* @param dataset the dataset (<code>null</code> permitted).
* @param legend legend required?
* @param tooltips tooltips required?
* @param urls URLs required?
*
* @return A chart.
*/
public static JFreeChart createPolarChart(String title,
XYDataset dataset,
boolean legend,
boolean tooltips,
boolean urls) {
PolarPlot plot = new PolarPlot();
plot.setDataset(dataset);
NumberAxis rangeAxis = new NumberAxis();
rangeAxis.setAxisLineVisible(false);
rangeAxis.setTickMarksVisible(false);
rangeAxis.setTickLabelInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));
plot.setAxis(rangeAxis);
plot.setRenderer(new DefaultPolarItemRenderer());
JFreeChart chart = new JFreeChart(
title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
return chart;
}
示例2: createPolarChart
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Creates a polar plot for the specified dataset (x-values interpreted as angles in degrees).
* <P>
* The chart object returned by this method uses a {@link PolarPlot} instance as the
* plot, with a {@link NumberAxis} for the radial axis.
*
* @param title the chart title (<code>null</code> permitted).
* @param dataset the dataset (<code>null</code> permitted).
* @param legend legend required?
* @param tooltips tooltips required?
* @param urls URLs required?
*
* @return A chart.
*/
public static JFreeChart createPolarChart(String title,
XYDataset dataset,
boolean legend,
boolean tooltips,
boolean urls) {
PolarPlot plot = new PolarPlot();
plot.setDataset(dataset);
NumberAxis rangeAxis = new NumberAxis();
rangeAxis.setAxisLineVisible(false);
rangeAxis.setTickMarksVisible(false);
rangeAxis.setTickLabelInsets(new Insets(0, 0, 0, 0));
plot.setRadialAxis(rangeAxis);
plot.setRenderer(new DefaultPolarItemRenderer());
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
return chart;
}
示例3: testGetLegendItems
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Some checks for the getLegendItems() method.
*/
@Test
public void testGetLegendItems() {
XYSeriesCollection d = new XYSeriesCollection();
d.addSeries(new XYSeries("A"));
d.addSeries(new XYSeries("B"));
DefaultPolarItemRenderer r = new DefaultPolarItemRenderer();
PolarPlot plot = new PolarPlot();
plot.setDataset(d);
plot.setRenderer(r);
LegendItemCollection items = plot.getLegendItems();
assertEquals(2, items.getItemCount());
LegendItem item1 = items.get(0);
assertEquals("A", item1.getLabel());
LegendItem item2 = items.get(1);
assertEquals("B", item2.getLabel());
}
示例4: testGetLegendItems2
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Some checks for the getLegendItems() method with multiple datasets.
*/
@Test
public void testGetLegendItems2() {
XYSeriesCollection d1 = new XYSeriesCollection();
d1.addSeries(new XYSeries("A"));
d1.addSeries(new XYSeries("B"));
XYSeriesCollection d2 = new XYSeriesCollection();
d2.addSeries(new XYSeries("C"));
d2.addSeries(new XYSeries("D"));
DefaultPolarItemRenderer r = new DefaultPolarItemRenderer();
PolarPlot plot = new PolarPlot();
plot.setDataset(d1);
plot.setDataset(1, d2);
plot.setRenderer(r);
plot.setRenderer(1, new DefaultPolarItemRenderer());
LegendItemCollection items = plot.getLegendItems();
assertEquals(4, items.getItemCount());
LegendItem item1 = items.get(0);
assertEquals("A", item1.getLabel());
LegendItem item2 = items.get(1);
assertEquals("B", item2.getLabel());
LegendItem item3 = items.get(2);
assertEquals("C", item3.getLabel());
LegendItem item4 = items.get(3);
assertEquals("D", item4.getLabel());
}
示例5: createPolarChart
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Creates a polar plot for the specified dataset (x-values interpreted as
* angles in degrees). The chart object returned by this method uses a
* {@link PolarPlot} instance as the plot, with a {@link NumberAxis} for
* the radial axis.
*
* @param title the chart title (<code>null</code> permitted).
* @param dataset the dataset (<code>null</code> permitted).
* @param legend legend required?
* @param tooltips tooltips required?
* @param urls URLs required?
*
* @return A chart.
*/
public static JFreeChart createPolarChart(String title, XYDataset dataset,
boolean legend, boolean tooltips, boolean urls) {
PolarPlot plot = new PolarPlot();
plot.setDataset(dataset);
NumberAxis rangeAxis = new NumberAxis();
rangeAxis.setAxisLineVisible(false);
rangeAxis.setTickMarksVisible(false);
rangeAxis.setTickLabelInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));
plot.setAxis(rangeAxis);
plot.setRenderer(new DefaultPolarItemRenderer());
JFreeChart chart = new JFreeChart(
title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
currentTheme.apply(chart);
return chart;
}
示例6: createPolarChart
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Creates a polar plot for the specified dataset (x-values interpreted as
* angles in degrees). The chart object returned by this method uses a
* {@link PolarPlot} instance as the plot, with a {@link NumberAxis} for
* the radial axis.
*
* @param title the chart title ({@code null} permitted).
* @param dataset the dataset ({@code null} permitted).
* @param legend legend required?
* @param tooltips tooltips required?
* @param urls URLs required?
*
* @return A chart.
*/
public static JFreeChart createPolarChart(String title, XYDataset dataset,
boolean legend, boolean tooltips, boolean urls) {
PolarPlot plot = new PolarPlot();
plot.setDataset(dataset);
NumberAxis rangeAxis = new NumberAxis();
rangeAxis.setAxisLineVisible(false);
rangeAxis.setTickMarksVisible(false);
rangeAxis.setTickLabelInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));
plot.setAxis(rangeAxis);
plot.setRenderer(new DefaultPolarItemRenderer());
JFreeChart chart = new JFreeChart(
title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
currentTheme.apply(chart);
return chart;
}
示例7: createPolarChart
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Creates a polar plot for the specified dataset (x-values interpreted as
* angles in degrees). The chart object returned by this method uses a
* {@link PolarPlot} instance as the plot, with a {@link NumberAxis} for
* the radial axis.
*
* @param title the chart title (<code>null</code> permitted).
* @param dataset the dataset (<code>null</code> permitted).
* @param legend legend required?
* @param tooltips tooltips required?
* @param urls URLs required?
*
* @return A chart.
*/
public static JFreeChart createPolarChart(String title,
XYDataset dataset,
boolean legend,
boolean tooltips,
boolean urls) {
PolarPlot plot = new PolarPlot();
plot.setDataset(dataset);
NumberAxis rangeAxis = new NumberAxis();
rangeAxis.setAxisLineVisible(false);
rangeAxis.setTickMarksVisible(false);
rangeAxis.setTickLabelInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));
plot.setAxis(rangeAxis);
plot.setRenderer(new DefaultPolarItemRenderer());
JFreeChart chart = new JFreeChart(
title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
currentTheme.apply(chart);
return chart;
}
示例8: createPolarChart
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Creates a polar plot for the specified dataset (x-values interpreted as
* angles in degrees). The chart object returned by this method uses a
* {@link PolarPlot} instance as the plot, with a {@link NumberAxis} for
* the radial axis.
*
* @param title the chart title (<code>null</code> permitted).
* @param dataset the dataset (<code>null</code> permitted).
* @param legend legend required?
*
* @return A chart.
*/
public static JFreeChart createPolarChart(String title, XYDataset dataset,
boolean legend) {
PolarPlot plot = new PolarPlot();
plot.setDataset(dataset);
NumberAxis rangeAxis = new NumberAxis();
rangeAxis.setAxisLineVisible(false);
rangeAxis.setTickMarksVisible(false);
rangeAxis.setTickLabelInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));
plot.setAxis(rangeAxis);
plot.setRenderer(new DefaultPolarItemRenderer());
JFreeChart chart = new JFreeChart(
title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);
currentTheme.apply(chart);
return chart;
}
示例9: createPolarChart
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
private JFreeChart createPolarChart(final XYDataset dataset,String chartName) {
if(chartName == null)
chartName=FunctionToPlot;
final JFreeChart chRt = ChartFactory.createPolarChart(
chartName, dataset, true, true, false
);
final PolarPlot plot = (PolarPlot) chRt.getPlot();
final DefaultPolarItemRenderer renderer = (DefaultPolarItemRenderer) plot.getRenderer();
renderer.setShapesVisible(false);
//renderer.setShapesFilled(false);
// renderer.setSeriesFilled(0, false);
return chRt;
}
示例10: testEquals
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Check that the equals() method distinguishes all fields.
*/
public void testEquals() {
DefaultPolarItemRenderer r1 = new DefaultPolarItemRenderer();
DefaultPolarItemRenderer r2 = new DefaultPolarItemRenderer();
assertEquals(r1, r2);
r1.setSeriesFilled(1, true);
assertFalse(r1.equals(r2));
r2.setSeriesFilled(1, true);
assertTrue(r1.equals(r2));
}
示例11: testHashcode
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Two objects that are equal are required to return the same hashCode.
*/
public void testHashcode() {
DefaultPolarItemRenderer r1 = new DefaultPolarItemRenderer();
DefaultPolarItemRenderer r2 = new DefaultPolarItemRenderer();
assertTrue(r1.equals(r2));
int h1 = r1.hashCode();
int h2 = r2.hashCode();
assertEquals(h1, h2);
}
示例12: testCloning
import org.jfree.chart.renderer.DefaultPolarItemRenderer; //导入依赖的package包/类
/**
* Some basic checks for the clone() method.
*/
@Test
public void testCloning() throws CloneNotSupportedException {
PolarPlot p1 = new PolarPlot();
PolarPlot p2 = (PolarPlot) p1.clone();
assertTrue(p1 != p2);
assertTrue(p1.getClass() == p2.getClass());
assertTrue(p1.equals(p2));
// check independence
p1.addCornerTextItem("XYZ");
assertFalse(p1.equals(p2));
p2.addCornerTextItem("XYZ");
assertTrue(p1.equals(p2));
p1 = new PolarPlot(new DefaultXYDataset(), new NumberAxis("A1"),
new DefaultPolarItemRenderer());
p2 = (PolarPlot) p1.clone();
assertTrue(p1 != p2);
assertTrue(p1.getClass() == p2.getClass());
assertTrue(p1.equals(p2));
// check independence
p1.getAxis().setLabel("ABC");
assertFalse(p1.equals(p2));
p2.getAxis().setLabel("ABC");
assertTrue(p1.equals(p2));
}