Documentation of 'org.jfree.chart.renderer.xy.XYSplineRenderer' Java class
XYSplineRenderer
org.jfree.chart.renderer.xy

Class XYSplineRenderer

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.EventListener, AnnotationChangeListener, LegendItemSource, XYItemRenderer, org.jfree.util.PublicCloneable


    public class XYSplineRenderer
    extends XYLineAndShapeRenderer
    A renderer that connects data points with natural cubic splines and/or draws shapes at each data point. This renderer is designed for use with the XYPlot class. The example shown here is generated by the XYSplineRendererDemo1.java program included in the JFreeChart demo collection:

    XYSplineRendererSample.png
    Since:
    1.0.7
    See Also:
    Serialized Form
    • Constructor Detail

      • XYSplineRenderer

        public XYSplineRenderer()
        Creates a new instance with the precision attribute defaulting to 5 and no fill of the area 'under' the spline.
      • XYSplineRenderer

        public XYSplineRenderer(int precision)
        Creates a new renderer with the specified precision and no fill of the area 'under' (between '0' and) the spline.
        Parameters:
        precision - the number of points between data items.
      • XYSplineRenderer

        public XYSplineRenderer(int precision,
                                XYSplineRenderer.FillType fillType)
        Creates a new renderer with the specified precision and specified fill of the area 'under' (between '0' and) the spline.
        Parameters:
        precision - the number of points between data items.
        fillType - the type of fill beneath the curve (null not permitted).
        Since:
        1.0.17
    • Method Detail

      • getPrecision

        public int getPrecision()
        Returns the number of line segments used to approximate the spline curve between data points.
        Returns:
        The number of line segments.
        See Also:
        setPrecision(int)
      • setPrecision

        public void setPrecision(int p)
        Set the resolution of splines and sends a RendererChangeEvent to all registered listeners.
        Parameters:
        p - number of line segments between points (must be > 0).
        See Also:
        getPrecision()
      • getGradientPaintTransformer

        public org.jfree.ui.GradientPaintTransformer getGradientPaintTransformer()
        Returns the gradient paint transformer, or null.
        Returns:
        The gradient paint transformer (possibly null).
        Since:
        1.0.17
      • setGradientPaintTransformer

        public void setGradientPaintTransformer(org.jfree.ui.GradientPaintTransformer gpt)
        Sets the gradient paint transformer and sends a RendererChangeEvent to all registered listeners.
        Parameters:
        gpt - the transformer (null permitted).
        Since:
        1.0.17
      • initialise

        public XYItemRendererState initialise(java.awt.Graphics2D g2,
                                              java.awt.geom.Rectangle2D dataArea,
                                              XYPlot plot,
                                              XYDataset data,
                                              PlotRenderingInfo info)
        Initialises the renderer.

        This method will be called before the first item is rendered, giving the renderer an opportunity to initialise any state information it wants to maintain. The renderer can do nothing if it chooses.

        Specified by:
        initialise in interface XYItemRenderer
        Overrides:
        initialise in class XYLineAndShapeRenderer
        Parameters:
        g2 - the graphics device.
        dataArea - the area inside the axes.
        plot - the plot.
        data - the data.
        info - an optional info collection object to return data back to the caller.
        Returns:
        The renderer state.
      • equals

        public boolean equals(java.lang.Object obj)
        Tests this renderer for equality with an arbitrary object.
        Overrides:
        equals in class XYLineAndShapeRenderer
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.