Documentation of 'edu.rit.numeric.plot.impl.PlotSeries' Java class
PlotSeries
edu.rit.numeric.plot.impl

Class PlotSeries

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable
    Direct Known Subclasses:
    SegmentedPlotSeries, XYPlotSeries


    public abstract class PlotSeries
    extends java.lang.Object
    implements java.io.Externalizable
    Class PlotSeries is the abstract base class for a plot series for an XYPlot.

    Class PlotSeries provides operations to tell where to plot data points as well as which Drawable object to use to plot the points. Class Dots provides several shapes of drawable objects for plotting data points.

    Class PlotSeries provides operations to tell where to plot line segments as well as which stroke and color objects to use to plot the line segments. Class Strokes provides several kinds of strokes for drawing lines.

    Class PlotSeries provides an operation to tell whether to plot a smooth curve instead of straight line segments.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      PlotSeries()
      Construct a new plot series.
      PlotSeries(XYSeries theDataSeries, Dots theDots, java.awt.BasicStroke theStroke, java.awt.Color theColor, boolean isSmooth)
      Construct a new plot series.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      java.awt.Color getColor()
      Returns the color for drawing line segments for this plot series.
      XYSeries getDataSeries()
      Returns the data series for this plot series.
      abstract int getDotCount()
      Returns the number of dots to be plotted.
      Dots getDots()
      Returns the drawable object for plotting data points for this XY plot series.
      abstract double getDotX(int i)
      Returns the X coordinate of the given dot.
      abstract double getDotY(int i)
      Returns the Y coordinate of the given dot.
      abstract int getLineCount()
      Returns the number of line segments to be plotted.
      abstract double getLineX1(int i)
      Returns the starting X coordinate of the given line segment.
      abstract double getLineX2(int i)
      Returns the ending X coordinate of the given line segment.
      abstract double getLineY1(int i)
      Returns the starting Y coordinate of the given line segment.
      abstract double getLineY2(int i)
      Returns the ending Y coordinate of the given line segment.
      java.awt.BasicStroke getStroke()
      Returns the stroke for drawing line segments for this plot series.
      boolean isSmooth()
      Determine whether to plot a smooth curve or straight line segments.
      void readExternal(java.io.ObjectInput in)
      Read this plot series from the given object input stream.
      void writeExternal(java.io.ObjectOutput out)
      Write this plot series to the given object output stream.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PlotSeries

        public PlotSeries()
        Construct a new plot series. This constructor is intended for use only by object deserialization.
      • PlotSeries

        public PlotSeries(XYSeries theDataSeries,
                          Dots theDots,
                          java.awt.BasicStroke theStroke,
                          java.awt.Color theColor,
                          boolean isSmooth)
        Construct a new plot series. Dots are plotted on the data points using the given drawable object. Line segments are drawn using the given stroke and color.
        Parameters:
        theDataSeries - Data series.
        theDots - Drawable object for plotting data points. If null, dots are not plotted on the data points.
        theStroke - Stroke for drawing line segments. If null, line segments are not drawn.
        theColor - Color for drawing line segments. If null, line segments are not drawn.
        isSmooth - True to plot a smooth curve, false to plot straight line segments.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theDataSeries is null.
    • Method Detail

      • getDataSeries

        public XYSeries getDataSeries()
        Returns the data series for this plot series.
      • getDots

        public Dots getDots()
        Returns the drawable object for plotting data points for this XY plot series. If dots are not to be plotted, null is returned.
      • getStroke

        public java.awt.BasicStroke getStroke()
        Returns the stroke for drawing line segments for this plot series. If line segments are not to be drawn, null is returned.
      • getColor

        public java.awt.Color getColor()
        Returns the color for drawing line segments for this plot series. If line segments are not to be drawn, null is returned.
      • isSmooth

        public boolean isSmooth()
        Determine whether to plot a smooth curve or straight line segments.
        Returns:
        True to plot a smooth curve, false to plot straight line segments.
      • getDotCount

        public abstract int getDotCount()
        Returns the number of dots to be plotted.

        This method must be overridden in a subclass.

      • getDotX

        public abstract double getDotX(int i)
        Returns the X coordinate of the given dot.

        This method must be overridden in a subclass.

        Parameters:
        i - Dot index.
        Returns:
        X coordinate.
        Throws:
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range 0 .. getDotCount()-1.
      • getDotY

        public abstract double getDotY(int i)
        Returns the Y coordinate of the given dot.

        This method must be overridden in a subclass.

        Parameters:
        i - Dot index.
        Returns:
        Y coordinate.
        Throws:
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range 0 .. getDotCount()-1.
      • getLineCount

        public abstract int getLineCount()
        Returns the number of line segments to be plotted.

        This method must be overridden in a subclass.

      • getLineX1

        public abstract double getLineX1(int i)
        Returns the starting X coordinate of the given line segment.

        This method must be overridden in a subclass.

        Parameters:
        i - Line segment index.
        Returns:
        Starting X coordinate.
        Throws:
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range 0 .. getLineCount()-1.
      • getLineY1

        public abstract double getLineY1(int i)
        Returns the starting Y coordinate of the given line segment.

        This method must be overridden in a subclass.

        Parameters:
        i - Line segment index.
        Returns:
        Starting Y coordinate.
        Throws:
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range 0 .. getLineCount()-1.
      • getLineX2

        public abstract double getLineX2(int i)
        Returns the ending X coordinate of the given line segment.

        This method must be overridden in a subclass.

        Parameters:
        i - Line segment index.
        Returns:
        Ending X coordinate.
        Throws:
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range 0 .. getLineCount()-1.
      • getLineY2

        public abstract double getLineY2(int i)
        Returns the ending Y coordinate of the given line segment.

        This method must be overridden in a subclass.

        Parameters:
        i - Line segment index.
        Returns:
        Ending Y coordinate.
        Throws:
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if i is not in the range 0 .. getLineCount()-1.
      • writeExternal

        public void writeExternal(java.io.ObjectOutput out)
                           throws java.io.IOException
        Write this plot series to the given object output stream.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Parameters:
        out - Object output stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • readExternal

        public void readExternal(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Read this plot series from the given object input stream.
        Specified by:
        readExternal in interface java.io.Externalizable
        Parameters:
        in - Object input stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
        java.lang.ClassNotFoundException - Thrown if a class needed to deserialize this plot series was not found.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.