Package org.jfree.chart.renderer.xy
Class XYLine3DRenderer
java.lang.Object
org.jfree.chart.renderer.AbstractRenderer
org.jfree.chart.renderer.xy.AbstractXYItemRenderer
org.jfree.chart.renderer.xy.XYLineAndShapeRenderer
org.jfree.chart.renderer.xy.XYLine3DRenderer
- All Implemented Interfaces:
Serializable
,Cloneable
,EventListener
,Effect3D
,AnnotationChangeListener
,LegendItemSource
,XYItemRenderer
,org.jfree.util.PublicCloneable
A XYLineAndShapeRenderer that adds a shadow line to the graph
to emulate a 3D-effect.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jfree.chart.renderer.xy.XYLineAndShapeRenderer
XYLineAndShapeRenderer.State
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Paint
The default wall paint.static final double
The default x-offset for the 3D effect.static final double
The default y-offset for the 3D effect.private static final long
For serialization.private Paint
The paint used to shade the left and lower 3D wall.private double
The size of x-offset for the 3D effect.private double
The size of y-offset for the 3D effect.Fields inherited from class org.jfree.chart.renderer.AbstractRenderer
DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE, DEFAULT_VALUE_LABEL_FONT, DEFAULT_VALUE_LABEL_PAINT, ZERO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
drawFirstPassShape
(Graphics2D g2, int pass, int series, int item, Shape shape) Overrides the method in the subclass to draw a shadow in the first pass.boolean
Tests this renderer for equality with an arbitrary object.int
Returns the number of passes through the data that the renderer requires in order to draw the chart.Returns the paint used to highlight the left and bottom wall in the plot background.double
Returns the x-offset for the 3D effect.double
Returns the y-offset for the 3D effect.protected boolean
isItemPass
(int pass) Returnstrue
if the specified pass involves drawing items.protected boolean
isLinePass
(int pass) Returnstrue
if the specified pass involves drawing lines.protected boolean
isShadowPass
(int pass) Returnstrue
if the specified pass involves drawing shadows.private void
readObject
(ObjectInputStream stream) Provides serialization support.void
setWallPaint
(Paint paint) Sets the paint used to hightlight the left and bottom walls in the plot background and sends aRendererChangeEvent
to all registered listeners.void
setXOffset
(double xOffset) Sets the x-offset and sends aRendererChangeEvent
to all registered listeners.void
setYOffset
(double yOffset) Sets the y-offset and sends aRendererChangeEvent
to all registered listeners.private void
writeObject
(ObjectOutputStream stream) Provides serialization support.Methods inherited from class org.jfree.chart.renderer.xy.XYLineAndShapeRenderer
clone, drawItem, drawPrimaryLine, drawPrimaryLineAsPath, drawSecondaryPass, getBaseLinesVisible, getBaseShapesFilled, getBaseShapesVisible, getDrawOutlines, getDrawSeriesLineAsPath, getItemLineVisible, getItemShapeFilled, getItemShapeVisible, getLegendItem, getLegendLine, getLinesVisible, getSeriesLinesVisible, getSeriesShapesFilled, getSeriesShapesVisible, getShapesVisible, getUseFillPaint, getUseOutlinePaint, initialise, setBaseLinesVisible, setBaseShapesFilled, setBaseShapesVisible, setDrawOutlines, setDrawSeriesLineAsPath, setLegendLine, setLinesVisible, setLinesVisible, setSeriesLinesVisible, setSeriesLinesVisible, setSeriesShapesFilled, setSeriesShapesFilled, setSeriesShapesVisible, setSeriesShapesVisible, setShapesFilled, setShapesFilled, setShapesVisible, setShapesVisible, setUseFillPaint, setUseOutlinePaint
Methods inherited from class org.jfree.chart.renderer.xy.AbstractXYItemRenderer
addAnnotation, addAnnotation, addEntity, annotationChanged, calculateDomainMarkerTextAnchorPoint, drawAnnotations, drawDomainGridLine, drawDomainLine, drawDomainMarker, drawItemLabel, drawRangeLine, drawRangeMarker, fillDomainGridBand, fillRangeGridBand, findDomainBounds, findDomainBounds, findRangeBounds, findRangeBounds, getAnnotations, getBaseItemLabelGenerator, getBaseToolTipGenerator, getDrawingSupplier, getItemLabelGenerator, getItemLabelGenerator, getLegendItemLabelGenerator, getLegendItems, getLegendItemToolTipGenerator, getLegendItemURLGenerator, getPlot, getSeriesItemLabelGenerator, getSeriesToolTipGenerator, getToolTipGenerator, getToolTipGenerator, getURLGenerator, isPointInRect, lineTo, moveTo, removeAnnotation, removeAnnotations, setBaseItemLabelGenerator, setBaseToolTipGenerator, setItemLabelGenerator, setLegendItemLabelGenerator, setLegendItemToolTipGenerator, setLegendItemURLGenerator, setPlot, setSeriesItemLabelGenerator, setSeriesToolTipGenerator, setToolTipGenerator, setURLGenerator, updateCrosshairValues, 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, getDataBoundsIncludesVisibleSeriesOnly, getDefaultEntityRadius, getItemCreateEntity, getItemFillPaint, getItemLabelAnchorOffset, getItemLabelFont, getItemLabelFont, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, 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, getTreatLegendShapeAsLine, hashCode, hasListener, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, lookupLegendShape, lookupLegendTextFont, lookupLegendTextPaint, lookupSeriesFillPaint, lookupSeriesOutlinePaint, lookupSeriesOutlineStroke, lookupSeriesPaint, 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, setDataBoundsIncludesVisibleSeriesOnly, setDefaultEntityRadius, 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, setTreatLegendShapeAsLine
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jfree.chart.LegendItemSource
getLegendItems
Methods inherited from interface org.jfree.chart.renderer.xy.XYItemRenderer
addAnnotation, addAnnotation, addChangeListener, drawAnnotations, drawDomainGridLine, drawDomainMarker, drawRangeLine, drawRangeMarker, fillDomainGridBand, fillRangeGridBand, findDomainBounds, findRangeBounds, getBaseItemLabelFont, getBaseItemLabelGenerator, getBaseItemLabelPaint, getBaseItemLabelsVisible, getBaseNegativeItemLabelPosition, getBaseOutlinePaint, getBaseOutlineStroke, getBasePaint, getBasePositiveItemLabelPosition, getBaseSeriesVisible, getBaseSeriesVisibleInLegend, getBaseShape, getBaseStroke, getBaseToolTipGenerator, getItemLabelFont, getItemLabelFont, getItemLabelGenerator, getItemLabelPaint, getItemLabelPaint, getItemOutlinePaint, getItemOutlineStroke, getItemPaint, getItemShape, getItemStroke, getItemVisible, getLegendItemLabelGenerator, getNegativeItemLabelPosition, getNegativeItemLabelPosition, getPlot, getPositiveItemLabelPosition, getPositiveItemLabelPosition, getSeriesItemLabelFont, getSeriesItemLabelGenerator, getSeriesItemLabelPaint, getSeriesNegativeItemLabelPosition, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesPositiveItemLabelPosition, getSeriesShape, getSeriesStroke, getSeriesToolTipGenerator, getSeriesVisible, getSeriesVisible, getSeriesVisibleInLegend, getSeriesVisibleInLegend, getToolTipGenerator, getURLGenerator, isItemLabelVisible, isSeriesItemLabelsVisible, isSeriesVisible, isSeriesVisibleInLegend, removeAnnotation, removeAnnotations, removeChangeListener, setBaseItemLabelFont, setBaseItemLabelGenerator, setBaseItemLabelPaint, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseItemLabelsVisible, setBaseNegativeItemLabelPosition, setBaseNegativeItemLabelPosition, setBaseOutlinePaint, setBaseOutlineStroke, setBasePaint, setBasePositiveItemLabelPosition, setBasePositiveItemLabelPosition, setBaseSeriesVisible, setBaseSeriesVisible, setBaseSeriesVisibleInLegend, setBaseSeriesVisibleInLegend, setBaseShape, setBaseStroke, setBaseToolTipGenerator, setItemLabelFont, setItemLabelGenerator, setItemLabelPaint, setItemLabelsVisible, setItemLabelsVisible, setItemLabelsVisible, setLegendItemLabelGenerator, setNegativeItemLabelPosition, setNegativeItemLabelPosition, setOutlinePaint, setOutlineStroke, setPaint, setPlot, setPositiveItemLabelPosition, setPositiveItemLabelPosition, setSeriesItemLabelFont, setSeriesItemLabelGenerator, setSeriesItemLabelPaint, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesItemLabelsVisible, setSeriesNegativeItemLabelPosition, setSeriesNegativeItemLabelPosition, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesPaint, setSeriesPositiveItemLabelPosition, setSeriesPositiveItemLabelPosition, setSeriesShape, setSeriesStroke, setSeriesToolTipGenerator, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisible, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setSeriesVisibleInLegend, setShape, setStroke, setToolTipGenerator, setURLGenerator
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
DEFAULT_X_OFFSET
public static final double DEFAULT_X_OFFSETThe default x-offset for the 3D effect.- See Also:
-
DEFAULT_Y_OFFSET
public static final double DEFAULT_Y_OFFSETThe default y-offset for the 3D effect.- See Also:
-
DEFAULT_WALL_PAINT
The default wall paint. -
xOffset
private double xOffsetThe size of x-offset for the 3D effect. -
yOffset
private double yOffsetThe size of y-offset for the 3D effect. -
wallPaint
The paint used to shade the left and lower 3D wall.
-
-
Constructor Details
-
XYLine3DRenderer
public XYLine3DRenderer()Creates a new renderer.
-
-
Method Details
-
getXOffset
public double getXOffset()Returns the x-offset for the 3D effect.- Specified by:
getXOffset
in interfaceEffect3D
- Returns:
- The 3D effect.
-
getYOffset
public double getYOffset()Returns the y-offset for the 3D effect.- Specified by:
getYOffset
in interfaceEffect3D
- Returns:
- The 3D effect.
-
setXOffset
public void setXOffset(double xOffset) Sets the x-offset and sends aRendererChangeEvent
to all registered listeners.- Parameters:
xOffset
- the x-offset.
-
setYOffset
public void setYOffset(double yOffset) Sets the y-offset and sends aRendererChangeEvent
to all registered listeners.- Parameters:
yOffset
- the y-offset.
-
getWallPaint
Returns the paint used to highlight the left and bottom wall in the plot background.- Returns:
- The paint.
-
setWallPaint
Sets the paint used to hightlight the left and bottom walls in the plot background and sends aRendererChangeEvent
to all registered listeners.- Parameters:
paint
- the paint.
-
getPassCount
public int getPassCount()Returns the number of passes through the data that the renderer requires in order to draw the chart. Most charts will require a single pass, but some require two passes.- Specified by:
getPassCount
in interfaceXYItemRenderer
- Overrides:
getPassCount
in classXYLineAndShapeRenderer
- Returns:
- The pass count.
-
isLinePass
protected boolean isLinePass(int pass) Returnstrue
if the specified pass involves drawing lines.- Overrides:
isLinePass
in classXYLineAndShapeRenderer
- Parameters:
pass
- the pass.- Returns:
- A boolean.
-
isItemPass
protected boolean isItemPass(int pass) Returnstrue
if the specified pass involves drawing items.- Overrides:
isItemPass
in classXYLineAndShapeRenderer
- Parameters:
pass
- the pass.- Returns:
- A boolean.
-
isShadowPass
protected boolean isShadowPass(int pass) Returnstrue
if the specified pass involves drawing shadows.- Parameters:
pass
- the pass.- Returns:
- A boolean.
-
drawFirstPassShape
Overrides the method in the subclass to draw a shadow in the first pass.- Overrides:
drawFirstPassShape
in classXYLineAndShapeRenderer
- Parameters:
g2
- the graphics device.pass
- the pass.series
- the series index (zero-based).item
- the item index (zero-based).shape
- the shape.
-
equals
Tests this renderer for equality with an arbitrary object.- Overrides:
equals
in classXYLineAndShapeRenderer
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-
readObject
Provides serialization support.- Parameters:
stream
- the input stream.- Throws:
IOException
- if there is an I/O error.ClassNotFoundException
- if there is a classpath problem.
-
writeObject
Provides serialization support.- Parameters:
stream
- the output stream.- Throws:
IOException
- if there is an I/O error.
-