com.extjs.gxt.ui.client.data
Class ChangeEvent

java.lang.Object
  extended by com.extjs.gxt.ui.client.data.ChangeEvent
Direct Known Subclasses:
PropertyChangeEvent

public class ChangeEvent
extends java.lang.Object

Instances of this class are sent as a result of model changes.

See Also:
ChangeEventSource

Constructor Summary
ChangeEvent(int type, Model source)
          Creates a new instance.
ChangeEvent(int type, Model source, Model item)
          Creates a new instance.
 
Method Summary
 int getIndex()
          Returns the index.
 ModelData getItem()
          Returns the item being added or removed.
 Model getParent()
          Returns the parent.
 Model getSource()
          Returns the source model.
 int getType()
          Returns the type.
 void setIndex(int index)
          Sets the index.
 void setItem(ModelData item)
          Sets the item being added or removed.
 void setParent(Model parent)
          Sets the parent.
 void setSource(Model source)
          Sets the source model.
 void setType(int type)
          Sets the type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeEvent

public ChangeEvent(int type,
                   Model source)
Creates a new instance.

Parameters:
type - the change type
source - the object that was changed

ChangeEvent

public ChangeEvent(int type,
                   Model source,
                   Model item)
Creates a new instance.

Parameters:
type - the change type
source - the object that has changed
item - the item that was added or removed
Method Detail

getType

public int getType()
Returns the type.

Returns:
the type
See Also:
ChangeEventSource.Add, ChangeEventSource.Remove, ChangeEventSource.Update

setType

public void setType(int type)
Sets the type.

Parameters:
type - the type

getSource

public Model getSource()
Returns the source model.

Returns:
the source model.

setSource

public void setSource(Model source)
Sets the source model.

Parameters:
source - the source

getItem

public ModelData getItem()
Returns the item being added or removed.

Returns:
the item

setItem

public void setItem(ModelData item)
Sets the item being added or removed.

Parameters:
item - the item

getParent

public Model getParent()
Returns the parent.

Returns:
the parent

setParent

public void setParent(Model parent)
Sets the parent.

Parameters:
parent - the parent

getIndex

public int getIndex()
Returns the index.

Returns:
the index

setIndex

public void setIndex(int index)
Sets the index.

Parameters:
index - the index