public class ModelChangedEvent extends Object implements IModelChangedEvent
IModelChangedEvent
CHANGE, INSERT, REMOVE, WORLD_CHANGED
Constructor and Description |
---|
ModelChangedEvent(IModelChangeProvider provider,
int type,
Object[] objects,
String changedProperty)
The constructor of the event.
|
ModelChangedEvent(IModelChangeProvider provider,
Object object,
String changedProperty,
Object oldValue,
Object newValue)
A costructor that should be used for changes of object properties.
|
Modifier and Type | Method and Description |
---|---|
Object[] |
getChangedObjects()
Returns an array of model objects that are affected by the change.
|
String |
getChangedProperty()
Returns a name of the object's property that has been changed if change
type is CHANGE.
|
IModelChangeProvider |
getChangeProvider()
Returns the provider that fired this event.
|
int |
getChangeType()
Returns the type of change that occured in the model (one of INSERT,
REMOVE, CHANGE or
WORLD_CHANGED ).
|
Object |
getNewValue()
When model change is of type CHANGE, this method is used to
obtain the new value of the property (after the change).
|
Object |
getOldValue()
When model change is of type CHANGE, this method is used to
obtain the old value of the property (before the change).
|
public ModelChangedEvent(IModelChangeProvider provider, int type, Object[] objects, String changedProperty)
provider
- the change providertype
- the event typeobjects
- the changed objectschangedProperty
- or null if not applicablepublic ModelChangedEvent(IModelChangeProvider provider, Object object, String changedProperty, Object oldValue, Object newValue)
provider
- the event providerobject
- affected objectchangedProperty
- changed property of the affected objectoldValue
- the value before the changenewValue
- the value after the changepublic IModelChangeProvider getChangeProvider()
IModelChangedEvent
getChangeProvider
in interface IModelChangedEvent
public Object[] getChangedObjects()
IModelChangedEvent
getChangedObjects
in interface IModelChangedEvent
public String getChangedProperty()
IModelChangedEvent
getChangedProperty
in interface IModelChangedEvent
public Object getOldValue()
IModelChangedEvent
getOldValue
in interface IModelChangedEvent
public Object getNewValue()
IModelChangedEvent
getNewValue
in interface IModelChangedEvent
public int getChangeType()
IModelChangedEvent
getChangeType
in interface IModelChangedEvent
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.