Package jadex.tools.comanalyzer.chart
Class ChartGroupedStackedBarRenderer
- java.lang.Object
-
- org.jfree.chart.renderer.AbstractRenderer
-
- org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
-
- org.jfree.chart.renderer.category.BarRenderer
-
- org.jfree.chart.renderer.category.StackedBarRenderer
-
- org.jfree.chart.renderer.category.GroupedStackedBarRenderer
-
- jadex.tools.comanalyzer.chart.ChartGroupedStackedBarRenderer
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,org.jfree.chart.LegendItemSource
,org.jfree.chart.renderer.category.CategoryItemRenderer
,org.jfree.util.PublicCloneable
public class ChartGroupedStackedBarRenderer extends org.jfree.chart.renderer.category.GroupedStackedBarRenderer
Subclass that implements the use of the paint maps for providing the predefined shared colors for all tooltabs by overriding serveral methods.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected org.jfree.chart.plot.DrawingSupplier
drawingSupplier
Standard JFreeChart DrawingSupplier - Not Usedprotected PaintMaps
paintMaps
Supplies stored paint maps for the distributions (e.g.protected int
paintMode
The type of distribution currently usedprotected java.util.Map
sectionPaints
Stored paintMaps for sections.
-
Constructor Summary
Constructors Constructor Description ChartGroupedStackedBarRenderer(PaintMaps paintMaps)
Create the renderer with provided paint maps
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Paint
getItemPaint(int row, int column)
Returns the paint from the paint maps used to fill data items.org.jfree.chart.LegendItem
getLegendItem(int datasetIndex, int series)
Returns a legend item for a series.int
getPaintMode()
java.awt.Paint
lookupSeriesPaint(int series)
Returns the paint from the paint maps for a specific series (row index).java.awt.Paint
lookupSeriesPaint(java.lang.Comparable key)
Returns the paint for the specified key.void
setPaintMode(int paintMode)
-
Methods inherited from class org.jfree.chart.renderer.category.GroupedStackedBarRenderer
calculateBarW0, calculateBarWidth, drawItem, equals, findRangeBounds, setSeriesToGroupMap
-
Methods inherited from class org.jfree.chart.renderer.category.StackedBarRenderer
getPassCount, getRenderAsPercentages, setRenderAsPercentages
-
Methods inherited from class org.jfree.chart.renderer.category.BarRenderer
calculateBarL0L1, calculateSeriesWidth, drawItemLabel, getBarPainter, getBase, getDefaultBarPainter, getGradientPaintTransformer, getIncludeBaseInRange, getItemMargin, getLowerClip, getMaximumBarWidth, getMinimumBarLength, getNegativeItemLabelPositionFallback, getPositiveItemLabelPositionFallback, getShadowPaint, getShadowsVisible, getShadowXOffset, getShadowYOffset, getUpperClip, initialise, isDrawBarOutline, setBarPainter, setBase, setDefaultBarPainter, setDrawBarOutline, setGradientPaintTransformer, setIncludeBaseInRange, setItemMargin, setMaximumBarWidth, setMinimumBarLength, setNegativeItemLabelPositionFallback, setPositiveItemLabelPositionFallback, setShadowPaint, setShadowVisible, setShadowXOffset, setShadowYOffset
-
Methods inherited from class org.jfree.chart.renderer.category.AbstractCategoryItemRenderer
addItemEntity, calculateDomainMarkerTextAnchorPoint, calculateRangeMarkerTextAnchorPoint, clone, createState, drawBackground, drawDomainGridline, drawDomainMarker, drawItemLabel, drawOutline, drawRangeGridline, drawRangeMarker, getBaseItemLabelGenerator, getBaseItemURLGenerator, getBaseToolTipGenerator, getColumnCount, getDomainAxis, getDrawingSupplier, getItemLabelGenerator, getItemMiddle, getItemURLGenerator, getLegendItemLabelGenerator, getLegendItems, getLegendItemToolTipGenerator, getLegendItemURLGenerator, getPlot, getRangeAxis, getRowCount, getSeriesItemLabelGenerator, getSeriesItemURLGenerator, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, hashCode, setBaseItemLabelGenerator, setBaseItemURLGenerator, setBaseToolTipGenerator, setItemLabelGenerator, setItemURLGenerator, setLegendItemLabelGenerator, setLegendItemToolTipGenerator, setLegendItemURLGenerator, setPlot, setSeriesItemLabelGenerator, setSeriesItemURLGenerator, setSeriesToolTipGenerator, setToolTipGenerator, updateCrosshairValues
-
Methods inherited from class org.jfree.chart.renderer.AbstractRenderer
addChangeListener, calculateLabelAnchorPoint, clearSeriesPaints, clearSeriesStrokes, fireChangeEvent, getAutoPopulateSeriesFillPaint, getAutoPopulateSeriesOutlinePaint, getAutoPopulateSeriesOutlineStroke, getAutoPopulateSeriesPaint, getAutoPopulateSeriesShape, getAutoPopulateSeriesStroke, getBaseCreateEntities, getBaseFillPaint, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseLegendShape, getBaseLegendTextFont, getBaseLegendTextPaint, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getCreateEntities, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemShape, getItemStroke, getItemVisible, getLegendShape, getLegendTextFont, getLegendTextPaint, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesCreateEntities, getSeriesFillPaint, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, hasListener, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, lookupLegendShape, lookupLegendTextFont, lookupLegendTextPaint, lookupSeriesFillPaint, lookupSeriesOutlinePaint, lookupSeriesOutlineStroke, lookupSeriesShape, lookupSeriesStroke, notifyListeners, removeChangeListener, setAutoPopulateSeriesFillPaint, setAutoPopulateSeriesOutlinePaint, setAutoPopulateSeriesOutlineStroke, setAutoPopulateSeriesPaint, setAutoPopulateSeriesShape, setAutoPopulateSeriesStroke, setBaseCreateEntities, setBaseCreateEntities, setBaseFillPaint, setBaseFillPaint, setBaseItemLabelFont, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseLegendShape, setBaseLegendTextFont, setBaseLegendTextPaint, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlinePaint, setBaseOutlineStroke, setBaseOutlineStroke, setBasePaint, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseShape, setBaseStroke, setBaseStroke, setCreateEntities, setCreateEntities, setFillPaint, setFillPaint, setItemLabelAnchorOffset, setItemLabelFont, setItemLabelFont, setItemLabelPaint, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setLegendShape, setLegendTextFont, setLegendTextPaint, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlinePaint, setOutlineStroke, setOutlineStroke, setPaint, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesCreateEntities, setSeriesCreateEntities, setSeriesFillPaint, setSeriesFillPaint, setSeriesItemLabelFont, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesShape, setSeriesStroke, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setShape, setStroke, setStroke
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jfree.chart.renderer.category.CategoryItemRenderer
addChangeListener, getBaseItemLabelFont, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemShape, getItemStroke, getItemVisible, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesItemLabelFont, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, removeChangeListener, setBaseItemLabelFont, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlineStroke, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseStroke, setItemLabelFont, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlineStroke, setPaint, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesItemLabelFont, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesStroke, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setStroke
-
-
-
-
Field Detail
-
drawingSupplier
protected org.jfree.chart.plot.DrawingSupplier drawingSupplier
Standard JFreeChart DrawingSupplier - Not Used
-
paintMaps
protected PaintMaps paintMaps
Supplies stored paint maps for the 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
-
ChartGroupedStackedBarRenderer
public ChartGroupedStackedBarRenderer(PaintMaps paintMaps)
Create the renderer with provided paint maps- Parameters:
paintMaps
- The paint maps.
-
-
Method Detail
-
getItemPaint
public java.awt.Paint getItemPaint(int row, int column)
Returns the paint from the paint maps used to fill data items.- Specified by:
getItemPaint
in interfaceorg.jfree.chart.renderer.category.CategoryItemRenderer
- Overrides:
getItemPaint
in classorg.jfree.chart.renderer.AbstractRenderer
- Parameters:
row
- the row (or series) index (zero-based).column
- the column (or category) index (zero-based).- Returns:
- The paint (never
null
).
-
lookupSeriesPaint
public java.awt.Paint lookupSeriesPaint(int series)
Returns the paint from the paint maps for a specific series (row index).- Overrides:
lookupSeriesPaint
in classorg.jfree.chart.renderer.AbstractRenderer
- Parameters:
series
- The row index- Returns:
- The color for the row index
-
getLegendItem
public org.jfree.chart.LegendItem getLegendItem(int datasetIndex, int series)
Returns a legend item for a series. (Not implemented yet)- Specified by:
getLegendItem
in interfaceorg.jfree.chart.renderer.category.CategoryItemRenderer
- Overrides:
getLegendItem
in classorg.jfree.chart.renderer.category.BarRenderer
- Parameters:
datasetIndex
- the dataset index (zero-based).series
- the series index (zero-based).- Returns:
- The legend item (possibly
null
).
-
lookupSeriesPaint
public java.awt.Paint lookupSeriesPaint(java.lang.Comparable key)
Returns the paint for the specified key.- Parameters:
key
- the key used in the paint maps.- Returns:
- The color for the key.
-
getPaintMode
public int getPaintMode()
- Returns:
- The paint mode.
-
setPaintMode
public void setPaintMode(int paintMode)
- Parameters:
paintMode
- The paint mode to set
-
-