Class XYZSeries<K extends Comparable<K>>

java.lang.Object
org.jfree.chart3d.data.xyz.XYZSeries<K>
Type Parameters:
K - the type for the series key (it is recommended that this is a class of immutable objects, because the series key should never be modified).
All Implemented Interfaces:
Serializable

public class XYZSeries<K extends Comparable<K>> extends Object implements Serializable
A data series containing a sequence of (x, y, z) data items. The series has an immutable key to identify it, and can be added to an XYZSeriesCollection to create a dataset. When a series is part of an XYZSeriesCollection, the collection will register with the series to receive change events - in this way, the collection can notify its own listeners when a change is made to the series.

NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    XYZSeries(K key)
    Creates a new series with the specified key.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(double x, double y, double z)
    Adds a new data item to the series and sends a Series3DChangeEvent to all registered listeners.
    void
    Adds a new data item to the series and sends a Series3DChangeEvent to all registered listeners.
    void
    Registers an object with this series, to receive notification whenever the series changes.
    boolean
    Tests this series for equality with an arbitrary object.
    void
    General method for signaling to registered listeners that the series has been changed.
    int
    Returns the number of items in the series.
    Returns a list containing all the items for the dataset (a new list is created each time this method is called, so the list can be freely modified without affecting the state of this series).
    Returns the series key.
    boolean
    Returns the flag that controls whether or not change events are sent to registered listeners.
    double
    getXValue(int itemIndex)
    Returns the x-value for the specified item in the series.
    double
    getYValue(int itemIndex)
    Returns the y-value for the specified item in the series.
    double
    getZValue(int itemIndex)
    Returns the z-value for the specified item in the series.
    int
     
    protected void
    Sends a change event to all registered listeners.
    void
    remove(int itemIndex)
    Removes a data item from the series and sends a Series3DChangeEvent to all registered listeners.
    void
    Deregisters an object, so that it not longer receives notification whenever the series changes.
    void
    setNotify(boolean notify)
    Sets the flag that controls whether or not change events are sent to registered listeners.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • XYZSeries

      public XYZSeries(K key)
      Creates a new series with the specified key. Note that the series key cannot be changed after it has been set in the constructor - this is by design, to ensure that each series in a XYZSeriesCollection always has a unique key. For the same reason, the key type should be an immutable class.
      Parameters:
      key - the key (null not permitted).
  • Method Details

    • getKey

      public K getKey()
      Returns the series key.
      Returns:
      The series key (never null).
    • getItemCount

      public int getItemCount()
      Returns the number of items in the series.
      Returns:
      The number of items in the series.
    • getItems

      Returns a list containing all the items for the dataset (a new list is created each time this method is called, so the list can be freely modified without affecting the state of this series).
      Returns:
      A list of all items.
      Since:
      1.6
    • getXValue

      public double getXValue(int itemIndex)
      Returns the x-value for the specified item in the series.
      Parameters:
      itemIndex - the item index.
      Returns:
      The x-value.
    • getYValue

      public double getYValue(int itemIndex)
      Returns the y-value for the specified item in the series.
      Parameters:
      itemIndex - the item index.
      Returns:
      The y-value.
    • getZValue

      public double getZValue(int itemIndex)
      Returns the z-value for the specified item in the series.
      Parameters:
      itemIndex - the item index.
      Returns:
      The z-value.
    • add

      public void add(double x, double y, double z)
      Adds a new data item to the series and sends a Series3DChangeEvent to all registered listeners.
      Parameters:
      x - the x-value.
      y - the y-value.
      z - the z-value.
    • add

      public void add(XYZDataItem item)
      Adds a new data item to the series and sends a Series3DChangeEvent to all registered listeners.
      Parameters:
      item - the data item (null not permitted).
    • remove

      public void remove(int itemIndex)
      Removes a data item from the series and sends a Series3DChangeEvent to all registered listeners.
      Parameters:
      itemIndex - the item index.
      Since:
      1.6
    • addChangeListener

      public void addChangeListener(Series3DChangeListener listener)
      Registers an object with this series, to receive notification whenever the series changes.

      Objects being registered must implement the Series3DChangeListener interface.

      Parameters:
      listener - the listener to register.
      Since:
      1.6
    • removeChangeListener

      Deregisters an object, so that it not longer receives notification whenever the series changes.
      Parameters:
      listener - the listener to deregister.
      Since:
      1.6
    • getNotify

      public boolean getNotify()
      Returns the flag that controls whether or not change events are sent to registered listeners.
      Returns:
      A boolean.
      Since:
      1.6
      See Also:
    • setNotify

      public void setNotify(boolean notify)
      Sets the flag that controls whether or not change events are sent to registered listeners.
      Parameters:
      notify - the new value of the flag.
      Since:
      1.6
      See Also:
    • fireSeriesChanged

      public void fireSeriesChanged()
      General method for signaling to registered listeners that the series has been changed.
      Since:
      1.6
    • notifyListeners

      protected void notifyListeners(Series3DChangeEvent event)
      Sends a change event to all registered listeners.
      Parameters:
      event - contains information about the event that triggered the notification.
      Since:
      1.6
    • equals

      public boolean equals(Object obj)
      Tests this series for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to test (null permitted).
      Returns:
      A boolean.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object