org.jfree.chart.labels.PieToolTipGenerator Java Examples

The following examples show how to use org.jfree.chart.labels.PieToolTipGenerator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChartFactory.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;

}
 
Example #2
Source File: ChartFactory.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;

}
 
Example #3
Source File: PiePlot.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * 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();
}
 
Example #4
Source File: PiePlot.java    From openstock with GNU General Public License v3.0 2 votes vote down vote up
/**
 * 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;
}
 
Example #5
Source File: PiePlot.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * 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;
}
 
Example #6
Source File: PiePlot.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * 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();
}
 
Example #7
Source File: PiePlot.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * 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;
}
 
Example #8
Source File: PiePlot.java    From opensim-gui with Apache License 2.0 2 votes vote down vote up
/**
 * 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));
}
 
Example #9
Source File: PiePlot.java    From opensim-gui with Apache License 2.0 2 votes vote down vote up
/**
 * 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;
}
 
Example #10
Source File: PiePlot.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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();
}
 
Example #11
Source File: PiePlot.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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;
}
 
Example #12
Source File: PiePlot.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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();
}
 
Example #13
Source File: PiePlot.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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;
}
 
Example #14
Source File: PiePlot.java    From ECG-Viewer with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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();
}
 
Example #15
Source File: PiePlot.java    From ECG-Viewer with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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;
}
 
Example #16
Source File: Chart_15_PiePlot_t.java    From coming with MIT License 2 votes vote down vote up
/**
 * 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));
}
 
Example #17
Source File: Chart_15_PiePlot_t.java    From coming with MIT License 2 votes vote down vote up
/**
 * 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;
}
 
Example #18
Source File: Chart_15_PiePlot_s.java    From coming with MIT License 2 votes vote down vote up
/**
 * 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));
}
 
Example #19
Source File: Chart_15_PiePlot_s.java    From coming with MIT License 2 votes vote down vote up
/**
 * 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;
}
 
Example #20
Source File: PiePlot.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * 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();
}
 
Example #21
Source File: PiePlot.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * 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;
}
 
Example #22
Source File: PiePlot.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * 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();
}
 
Example #23
Source File: PiePlot.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * 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;
}
 
Example #24
Source File: PiePlot.java    From openstock with GNU General Public License v3.0 2 votes vote down vote up
/**
 * 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();
}