本文整理汇总了Java中org.jfree.chart.labels.PieToolTipGenerator类的典型用法代码示例。如果您正苦于以下问题:Java PieToolTipGenerator类的具体用法?Java PieToolTipGenerator怎么用?Java PieToolTipGenerator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PieToolTipGenerator类属于org.jfree.chart.labels包,在下文中一共展示了PieToolTipGenerator类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMultiplePieChart
import org.jfree.chart.labels.PieToolTipGenerator; //导入依赖的package包/类
/**
* 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</code> permitted).
* @param dataset the dataset (<code>null</code> permitted).
* @param order the order that the data is extracted (by row or by column)
* (<code>null</code> not permitted).
* @param legend include a legend?
*
* @return A chart.
*/
public static JFreeChart createMultiplePieChart(String title,
CategoryDataset dataset, TableOrder order, boolean legend) {
if (order == null) {
throw new IllegalArgumentException("Null 'order' argument.");
}
MultiplePiePlot plot = new MultiplePiePlot(dataset);
plot.setDataExtractOrder(order);
plot.setBackgroundPaint(null);
plot.setOutlineStroke(null);
PieToolTipGenerator tooltipGenerator
= new StandardPieToolTipGenerator();
PiePlot pp = (PiePlot) plot.getPieChart().getPlot();
pp.setToolTipGenerator(tooltipGenerator);
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
plot, legend);
currentTheme.apply(chart);
return chart;
}
示例2: createMultiplePieChart3D
import org.jfree.chart.labels.PieToolTipGenerator; //导入依赖的package包/类
/**
* 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</code> permitted).
* @param dataset the dataset (<code>null</code> permitted).
* @param order the order that the data is extracted (by row or by column)
* (<code>null</code> not permitted).
* @param legend include a legend?
*
* @return A chart.
*/
public static JFreeChart createMultiplePieChart3D(String title,
CategoryDataset dataset, TableOrder order, boolean legend) {
if (order == null) {
throw new IllegalArgumentException("Null 'order' argument.");
}
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("Tahoma", Font.BOLD, 12));
seriesTitle.setPosition(RectangleEdge.BOTTOM);
pieChart.setTitle(seriesTitle);
pieChart.removeLegend();
pieChart.setBackgroundPaint(null);
plot.setPieChart(pieChart);
PieToolTipGenerator tooltipGenerator
= new StandardPieToolTipGenerator();
PiePlot pp = (PiePlot) plot.getPieChart().getPlot();
pp.setToolTipGenerator(tooltipGenerator);
JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
plot, legend);
currentTheme.apply(chart);
return chart;
}
示例3: getToolTipGenerator
import org.jfree.chart.labels.PieToolTipGenerator; //导入依赖的package包/类
/**
* Returns the tool tip generator, an object that is responsible for generating the text items
* used for tool tips by the plot. If the generator is <code>null</code>, no tool tips will be
* created.
*
* @return The generator (possibly <code>null</code>).
*/
public PieToolTipGenerator getToolTipGenerator() {
return this.toolTipGenerator;
}
示例4: setToolTipGenerator
import org.jfree.chart.labels.PieToolTipGenerator; //导入依赖的package包/类
/**
* Sets the tool tip generator and sends a {@link PlotChangeEvent} to all registered listeners.
* Set the generator to <code>null</code> if you don't want any tool tips.
*
* @param generator the generator (<code>null</code> permitted).
*/
public void setToolTipGenerator(PieToolTipGenerator generator) {
this.toolTipGenerator = generator;
notifyListeners(new PlotChangeEvent(this));
}
示例5: getToolTipGenerator
import org.jfree.chart.labels.PieToolTipGenerator; //导入依赖的package包/类
/**
* Returns the tool tip generator, an object that is responsible for
* generating the text items used for tool tips by the plot. If the
* generator is <code>null</code>, no tool tips will be created.
*
* @return The generator (possibly <code>null</code>).
*
* @see #setToolTipGenerator(PieToolTipGenerator)
*/
public PieToolTipGenerator getToolTipGenerator() {
return this.toolTipGenerator;
}
示例6: setToolTipGenerator
import org.jfree.chart.labels.PieToolTipGenerator; //导入依赖的package包/类
/**
* Sets the tool tip generator and sends a {@link PlotChangeEvent} to all
* registered listeners. Set the generator to <code>null</code> if you
* don't want any tool tips.
*
* @param generator the generator (<code>null</code> permitted).
*
* @see #getToolTipGenerator()
*/
public void setToolTipGenerator(PieToolTipGenerator generator) {
this.toolTipGenerator = generator;
notifyListeners(new PlotChangeEvent(this));
}
示例7: getToolTipGenerator
import org.jfree.chart.labels.PieToolTipGenerator; //导入依赖的package包/类
/**
* Returns the tool tip generator, an object that is responsible for
* generating the text items used for tool tips by the plot. If the
* generator is <code>null</code>, no tool tips will be created.
*
* @return The generator (possibly <code>null</code>).
*
* @see #setToolTipGenerator(PieToolTipGenerator)
*/
public PieToolTipGenerator getToolTipGenerator() {
return this.toolTipGenerator;
}
示例8: setToolTipGenerator
import org.jfree.chart.labels.PieToolTipGenerator; //导入依赖的package包/类
/**
* Sets the tool tip generator and sends a {@link PlotChangeEvent} to all
* registered listeners. Set the generator to <code>null</code> if you
* don't want any tool tips.
*
* @param generator the generator (<code>null</code> permitted).
*
* @see #getToolTipGenerator()
*/
public void setToolTipGenerator(PieToolTipGenerator generator) {
this.toolTipGenerator = generator;
fireChangeEvent();
}
示例9: getToolTipGenerator
import org.jfree.chart.labels.PieToolTipGenerator; //导入依赖的package包/类
/**
* Returns the tool tip generator, an object that is responsible for
* generating the text items used for tool tips by the plot. If the
* generator is {@code null}, no tool tips will be created.
*
* @return The generator (possibly {@code null}).
*
* @see #setToolTipGenerator(PieToolTipGenerator)
*/
public PieToolTipGenerator getToolTipGenerator() {
return this.toolTipGenerator;
}
示例10: setToolTipGenerator
import org.jfree.chart.labels.PieToolTipGenerator; //导入依赖的package包/类
/**
* Sets the tool tip generator and sends a {@link PlotChangeEvent} to all
* registered listeners. Set the generator to {@code null} if you
* don't want any tool tips.
*
* @param generator the generator ({@code null} permitted).
*
* @see #getToolTipGenerator()
*/
public void setToolTipGenerator(PieToolTipGenerator generator) {
this.toolTipGenerator = generator;
fireChangeEvent();
}