lt.monarch.chart.models
Class ArrayDataModelChangeEvent

java.lang.Object
  extended by lt.monarch.chart.models.DataModelChangeEvent
      extended by lt.monarch.chart.models.ArrayDataModelChangeEvent

public class ArrayDataModelChangeEvent
extends DataModelChangeEvent

Array data model change event class.


Nested Class Summary
Modifier and Type Class and Description
 
Nested classes/interfaces inherited from class lt.monarch.chart.models.DataModelChangeEvent
DataModelChangeEvent.DataModelEvent
 
Field Summary
Modifier and Type Field and Description
protected  int firstIndex
           
protected  int lastIndex
           
 
Fields inherited from class lt.monarch.chart.models.DataModelChangeEvent
action, olddValues, source
 
Constructor Summary
Constructor and Description
ArrayDataModelChangeEvent(DataModel source, DataModelChangeEvent.DataModelEvent action, int firstIndex, int lastIndex)
          Array data model change event constructor
ArrayDataModelChangeEvent(DataModel source, DataModelChangeEvent.DataModelEvent action, int firstIndex, int lastIndex, java.lang.Object[] previousValues)
          Array data model change event constructor.
 
Method Summary
Modifier and Type Method and Description
 int getFirstIndex()
          Gets first index of changed data point in the data model
 int getLastIndex()
          Gets last index of changed data point in the data model
 
Methods inherited from class lt.monarch.chart.models.DataModelChangeEvent
getAction, getOldValues, getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstIndex

protected int firstIndex

lastIndex

protected int lastIndex
Constructor Detail

ArrayDataModelChangeEvent

public ArrayDataModelChangeEvent(DataModel source,
                                 DataModelChangeEvent.DataModelEvent action,
                                 int firstIndex,
                                 int lastIndex,
                                 java.lang.Object[] previousValues)
Array data model change event constructor. If previous values are supplied as one dimensional array, then it will be used as one point data, if two dimensional array, then as a list of points in the data model

Parameters:
source - source of the data model, where the changes were made
action - action type made in the data model
firstIndex - first index of changed point in the data model
lastIndex - last index of changed data point in the data model
previousValues - array of previous values that has been deleted or changed

ArrayDataModelChangeEvent

public ArrayDataModelChangeEvent(DataModel source,
                                 DataModelChangeEvent.DataModelEvent action,
                                 int firstIndex,
                                 int lastIndex)
Array data model change event constructor

Parameters:
source - source of the data model, where the changes were made
action - action type made in the data model
firstIndex - first index of changed point in the data model
lastIndex - last index of changed data point in the data model
Method Detail

getFirstIndex

public int getFirstIndex()
Gets first index of changed data point in the data model

Returns:
the first index value

getLastIndex

public int getLastIndex()
Gets last index of changed data point in the data model

Returns:
the last index value