Package org.jfree.chart.renderer.xy
Class XYItemRendererState
- java.lang.Object
-
- org.jfree.chart.renderer.RendererState
-
- org.jfree.chart.renderer.xy.XYItemRendererState
-
- Direct Known Subclasses:
SamplingXYLineRenderer.State
,StackedXYAreaRenderer.StackedXYAreaRendererState
,StandardXYItemRenderer.State
,XYAreaRenderer.XYAreaRendererState
,XYBarRenderer.XYBarRendererState
,XYLineAndShapeRenderer.State
public class XYItemRendererState extends RendererState
The state for anXYItemRenderer
.
-
-
Field Summary
Fields Modifier and Type Field Description private int
firstItemIndex
The first item in the series that will be displayed.private int
lastItemIndex
The last item in the current series that will be displayed.private boolean
processVisibleItemsOnly
A flag that controls whether the plot should pass ALL data items to the renderer, or just the items that will be visible.java.awt.geom.Line2D
workingLine
A line object that the renderer can reuse to save instantiating a lot of objects.
-
Constructor Summary
Constructors Constructor Description XYItemRendererState(PlotRenderingInfo info)
Creates a new state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endSeriesPass(XYDataset dataset, int series, int firstItem, int lastItem, int pass, int passCount)
This method is called by theXYPlot
when it ends a pass through the (visible) items in a series.int
getFirstItemIndex()
Returns the first item index (this is updated with each call tostartSeriesPass(XYDataset, int, int, int, int, int)
.int
getLastItemIndex()
Returns the last item index (this is updated with each call tostartSeriesPass(XYDataset, int, int, int, int, int)
.boolean
getProcessVisibleItemsOnly()
Returns the flag that controls whether the plot passes all data items in each series to the renderer, or just the visible items.void
setProcessVisibleItemsOnly(boolean flag)
Sets the flag that controls whether the plot passes all data items in each series to the renderer, or just the visible items.void
startSeriesPass(XYDataset dataset, int series, int firstItem, int lastItem, int pass, int passCount)
This method is called by theXYPlot
when it starts a pass through the (visible) items in a series.-
Methods inherited from class org.jfree.chart.renderer.RendererState
getElementHinting, getEntityCollection, getInfo, setElementHinting
-
-
-
-
Field Detail
-
firstItemIndex
private int firstItemIndex
The first item in the series that will be displayed.
-
lastItemIndex
private int lastItemIndex
The last item in the current series that will be displayed.
-
workingLine
public java.awt.geom.Line2D workingLine
A line object that the renderer can reuse to save instantiating a lot of objects.
-
processVisibleItemsOnly
private boolean processVisibleItemsOnly
A flag that controls whether the plot should pass ALL data items to the renderer, or just the items that will be visible.
-
-
Constructor Detail
-
XYItemRendererState
public XYItemRendererState(PlotRenderingInfo info)
Creates a new state.- Parameters:
info
- the plot rendering info.
-
-
Method Detail
-
getProcessVisibleItemsOnly
public boolean getProcessVisibleItemsOnly()
Returns the flag that controls whether the plot passes all data items in each series to the renderer, or just the visible items. The default value istrue
.- Returns:
- A boolean.
- See Also:
setProcessVisibleItemsOnly(boolean)
-
setProcessVisibleItemsOnly
public void setProcessVisibleItemsOnly(boolean flag)
Sets the flag that controls whether the plot passes all data items in each series to the renderer, or just the visible items.- Parameters:
flag
- the new flag value.
-
getFirstItemIndex
public int getFirstItemIndex()
Returns the first item index (this is updated with each call tostartSeriesPass(XYDataset, int, int, int, int, int)
.- Returns:
- The first item index.
-
getLastItemIndex
public int getLastItemIndex()
Returns the last item index (this is updated with each call tostartSeriesPass(XYDataset, int, int, int, int, int)
.- Returns:
- The last item index.
-
startSeriesPass
public void startSeriesPass(XYDataset dataset, int series, int firstItem, int lastItem, int pass, int passCount)
This method is called by theXYPlot
when it starts a pass through the (visible) items in a series. The default implementation records the first and last item indices - override this method to implement additional specialised behaviour.- Parameters:
dataset
- the dataset.series
- the series index.firstItem
- the index of the first item in the series.lastItem
- the index of the last item in the series.pass
- the pass index.passCount
- the number of passes.- See Also:
endSeriesPass(XYDataset, int, int, int, int, int)
-
endSeriesPass
public void endSeriesPass(XYDataset dataset, int series, int firstItem, int lastItem, int pass, int passCount)
This method is called by theXYPlot
when it ends a pass through the (visible) items in a series. The default implementation does nothing, but you can override this method to implement specialised behaviour.- Parameters:
dataset
- the dataset.series
- the series index.firstItem
- the index of the first item in the series.lastItem
- the index of the last item in the series.pass
- the pass index.passCount
- the number of passes.- See Also:
startSeriesPass(XYDataset, int, int, int, int, int)
-
-