JIDE 3.5.15

com.jidesoft.chart.model
Class ChartModelChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.jidesoft.chart.model.ChartModelChangeEvent
All Implemented Interfaces:
Serializable

public class ChartModelChangeEvent
extends EventObject

An event object to signify a change in a ChartModel

See Also:
ChartModelChangeListener, Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ChartModelChangeEvent(Object source, ChartModelChangeType changeType, int index)
          Create a ChartModelChangeEvent and indicate the index in the model at which the change occurred
ChartModelChangeEvent(Object source, ChartModelChangeType changeType, int index, int size)
          Create a ChartModelChangeEvent and indicate the index in the model at which the change occurred as well as the number of points affected.
 
Method Summary
 boolean equals(Object obj)
           
 ChartModelChangeType getChangeType()
          The type of the change: Was it an insertion, deletion or modification?
 int getIndex()
           
 int getSize()
           
 int hashCode()
           
 void setChangeType(ChartModelChangeType changeType)
          Specify the type of the change
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChartModelChangeEvent

public ChartModelChangeEvent(Object source,
                             ChartModelChangeType changeType,
                             int index)
Create a ChartModelChangeEvent and indicate the index in the model at which the change occurred

Parameters:
source - the ChartModel object that is the source of the change
index - the index at which the change occurred

ChartModelChangeEvent

public ChartModelChangeEvent(Object source,
                             ChartModelChangeType changeType,
                             int index,
                             int size)
Create a ChartModelChangeEvent and indicate the index in the model at which the change occurred as well as the number of points affected.

Parameters:
source - the ChartModel object that is the source of the change
index - the index at which the change occurred
size - the number of points affected by the change
Method Detail

getChangeType

public ChartModelChangeType getChangeType()
The type of the change: Was it an insertion, deletion or modification?

Returns:
the change type

setChangeType

public void setChangeType(ChartModelChangeType changeType)
Specify the type of the change

Parameters:
changeType - the change type

getIndex

public int getIndex()
Returns:
the index of the model where the change occurred (prior to the change). By default this is set to 0.

getSize

public int getSize()
Returns:
the number of points affected by the change; for example the number of points inserted or deleted. By default this is set at 1.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class EventObject

JIDE 3.5.15