JSci.awt
Class GraphDataEvent

java.lang.Object
  extended by java.util.EventObject
      extended by JSci.awt.GraphDataEvent
All Implemented Interfaces:
java.io.Serializable

public final class GraphDataEvent
extends java.util.EventObject

Defines an event that encapsulates changes to a graph.

See Also:
Serialized Form

Field Summary
static int ALL_SERIES
          Specifies all series.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GraphDataEvent(java.lang.Object src)
          All series data in the graph has changed.
GraphDataEvent(java.lang.Object src, int seriesChanged)
          This series has changed.
GraphDataEvent(java.lang.Object src, int seriesChanged, boolean isIncrementalChange)
          This series has changed incrementally.
 
Method Summary
 int getSeries()
          Returns the series that has changed.
 boolean isIncremental()
          Returns whether the change was incremental.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL_SERIES

public static final int ALL_SERIES
Specifies all series.

See Also:
Constant Field Values
Constructor Detail

GraphDataEvent

public GraphDataEvent(java.lang.Object src)
All series data in the graph has changed.


GraphDataEvent

public GraphDataEvent(java.lang.Object src,
                      int seriesChanged)
This series has changed.

Parameters:
seriesChanged - The index of the series that may have changed.

GraphDataEvent

public GraphDataEvent(java.lang.Object src,
                      int seriesChanged,
                      boolean isIncrementalChange)
This series has changed incrementally. Useful for streaming data to a graph.

Parameters:
seriesChanged - The index of the series that may have changed.
isIncrementalChange - True indicates an extra data point has been added.
Method Detail

getSeries

public int getSeries()
Returns the series that has changed.

Returns:
The index of the series that may have changed or ALL_SERIES.

isIncremental

public boolean isIncremental()
Returns whether the change was incremental.

Returns:
True if an extra data point has been added.