Class ChartMultiplePiePlot

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.EventListener, org.jfree.chart.event.AxisChangeListener, org.jfree.chart.event.MarkerChangeListener, org.jfree.chart.LegendItemSource, org.jfree.data.general.DatasetChangeListener, org.jfree.util.PublicCloneable

    public class ChartMultiplePiePlot
    extends org.jfree.chart.plot.MultiplePiePlot
    Subclass that implements the use of the paint maps for providing the predefined shared colors for all tooltabs by overriding serveral methods. In addition the use of label generators was introduced, cause the superclass dont support that facility.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.jfree.chart.plot.DrawingSupplier drawingSupplier
      JFreeChart Sandard DrawingSupplier (Not used)
      protected PaintMaps paintMaps
      Supplies stored paint maps for the other distributions (e.g.
      protected int paintMode
      The type of distribution currently used
      protected java.util.Map sectionPaints
      Stored paintMaps for sections.
      • Fields inherited from class org.jfree.chart.plot.Plot

        DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO
    • Constructor Summary

      Constructors 
      Constructor Description
      ChartMultiplePiePlot​(org.jfree.data.category.CategoryDataset dataset, PaintMaps paintMaps)
      Creates a new plot with a given dataset and paint maps.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void draw​(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, java.awt.geom.Point2D anchor, org.jfree.chart.plot.PlotState parentState, org.jfree.chart.plot.PlotRenderingInfo info)
      Draws the plot on a Java 2D graphics device (such as the screen or a printer).
      org.jfree.chart.labels.CategoryItemLabelGenerator getBaseItemLabelGenerator()  
      org.jfree.chart.urls.CategoryURLGenerator getBaseItemURLGenerator()  
      org.jfree.chart.labels.CategoryToolTipGenerator getBaseToolTipGenerator()  
      org.jfree.chart.labels.CategoryItemLabelGenerator getLegendItemLabelGenerator()  
      org.jfree.chart.LegendItemCollection getLegendItems()
      Returns a collection of legend items for the pie chart.
      int getPaintMode()  
      org.jfree.chart.plot.PiePlot getPiePlot()  
      protected java.awt.Paint lookupSectionPaint​(java.lang.Comparable key)
      Returns the paint for the specified key from the paint maps.
      void setBaseItemLabelGenerator​(org.jfree.chart.labels.CategoryItemLabelGenerator baseItemLabelGenerator)  
      void setBaseItemURLGenerator​(org.jfree.chart.urls.CategoryURLGenerator baseItemURLGenerator)  
      void setBaseToolTipGenerator​(org.jfree.chart.labels.CategoryToolTipGenerator baseToolTipGenerator)  
      void setLegendItemLabelGenerator​(org.jfree.chart.labels.CategoryItemLabelGenerator legendItemLabelGenerator)  
      void setPaintMode​(int paintMode)  
      • Methods inherited from class org.jfree.chart.plot.MultiplePiePlot

        clone, equals, getAggregatedItemsKey, getAggregatedItemsPaint, getDataExtractOrder, getDataset, getLegendItemShape, getLimit, getPieChart, getPlotType, setAggregatedItemsKey, setAggregatedItemsPaint, setDataExtractOrder, setDataset, setLegendItemShape, setLimit, setPieChart
      • Methods inherited from class org.jfree.chart.plot.Plot

        addChangeListener, axisChanged, datasetChanged, drawBackground, drawBackgroundImage, drawNoDataMessage, drawOutline, fillBackground, fillBackground, fireChangeEvent, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, handleClick, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDatasetGroup, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent, zoom
      • Methods inherited from class java.lang.Object

        finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • drawingSupplier

        protected org.jfree.chart.plot.DrawingSupplier drawingSupplier
        JFreeChart Sandard DrawingSupplier (Not used)
      • paintMaps

        protected PaintMaps paintMaps
        Supplies stored paint maps for the other distributions (e.g. performativ)
      • paintMode

        protected int paintMode
        The type of distribution currently used
      • sectionPaints

        protected java.util.Map sectionPaints
        Stored paintMaps for sections.
    • Constructor Detail

      • ChartMultiplePiePlot

        public ChartMultiplePiePlot​(org.jfree.data.category.CategoryDataset dataset,
                                    PaintMaps paintMaps)
        Creates a new plot with a given dataset and paint maps.
        Parameters:
        dataset - The dataset.
        paintMaps - The paint maps..
    • Method Detail

      • draw

        public void draw​(java.awt.Graphics2D g2,
                         java.awt.geom.Rectangle2D area,
                         java.awt.geom.Point2D anchor,
                         org.jfree.chart.plot.PlotState parentState,
                         org.jfree.chart.plot.PlotRenderingInfo info)
        Draws the plot on a Java 2D graphics device (such as the screen or a printer).
        Overrides:
        draw in class org.jfree.chart.plot.MultiplePiePlot
        Parameters:
        g2 - the graphics device.
        area - the area within which the plot should be drawn.
        anchor - the anchor point (null permitted).
        parentState - the state from the parent plot, if there is one.
        info - collects info about the drawing.
      • getLegendItems

        public org.jfree.chart.LegendItemCollection getLegendItems()
        Returns a collection of legend items for the pie chart. The text for the labels is generated by the provided label generators
        Specified by:
        getLegendItems in interface org.jfree.chart.LegendItemSource
        Overrides:
        getLegendItems in class org.jfree.chart.plot.MultiplePiePlot
        Returns:
        The legend items.
      • lookupSectionPaint

        protected java.awt.Paint lookupSectionPaint​(java.lang.Comparable key)
        Returns the paint for the specified key from the paint maps.
        Parameters:
        key - The key.
        Returns:
        The paint.
      • getPiePlot

        public org.jfree.chart.plot.PiePlot getPiePlot()
        Returns:
        The pieplot from the piechart.
      • getPaintMode

        public int getPaintMode()
        Returns:
        The paint mode.
      • setPaintMode

        public void setPaintMode​(int paintMode)
        Parameters:
        paintMode - The paint mode to set.
      • getBaseItemLabelGenerator

        public org.jfree.chart.labels.CategoryItemLabelGenerator getBaseItemLabelGenerator()
        Returns:
        The BaseItemLabelGenerator.
      • setBaseItemLabelGenerator

        public void setBaseItemLabelGenerator​(org.jfree.chart.labels.CategoryItemLabelGenerator baseItemLabelGenerator)
        Parameters:
        baseItemLabelGenerator - The BaseItemLabelGenerator to set.
      • getBaseItemURLGenerator

        public org.jfree.chart.urls.CategoryURLGenerator getBaseItemURLGenerator()
        Returns:
        The BaseItemURLGenerator.
      • setBaseItemURLGenerator

        public void setBaseItemURLGenerator​(org.jfree.chart.urls.CategoryURLGenerator baseItemURLGenerator)
        Parameters:
        baseItemURLGenerator - The BaseItemURLGenerator to set.
      • getBaseToolTipGenerator

        public org.jfree.chart.labels.CategoryToolTipGenerator getBaseToolTipGenerator()
        Returns:
        The BaseToolTipGenerator.
      • setBaseToolTipGenerator

        public void setBaseToolTipGenerator​(org.jfree.chart.labels.CategoryToolTipGenerator baseToolTipGenerator)
        Parameters:
        baseToolTipGenerator - The BaseToolTipGenerator to set.
      • getLegendItemLabelGenerator

        public org.jfree.chart.labels.CategoryItemLabelGenerator getLegendItemLabelGenerator()
        Returns:
        The LegendItemLabelGenerator.
      • setLegendItemLabelGenerator

        public void setLegendItemLabelGenerator​(org.jfree.chart.labels.CategoryItemLabelGenerator legendItemLabelGenerator)
        Parameters:
        legendItemLabelGenerator - The LegendItemLabelGenerator to set.