|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject com.bea.p13n.model.Model.ChangeEvent
public static class Model.ChangeEvent
A model change event.
getModel() will return the model that was changed. getSource() will generally be either the Model (if the listener was added to the model) or the DocumentModel containing the model that changed (if the listener was added to the DocumentModel.
If getType() is Type.PROPERTY_CHANGE, then getPropertyName() will return the name of the property that changed, and getOldValue() and getNewValue() will return the appropriate values.
If getType() is Type.CHILD_CHANGE, then getPropertyName() will return null; if the child was added, getNewValue() will return the added child; if the child was removed, getOldValue() will return the removed child.
If getType() is Type.PARENT_CHANGE, then getNewValue() will be the new parent, and getOldValue() will be the old parent.
If getType() is Type.ROOT_MODEL_CHANGE, then getPropertyName() will return null, getModel() and getNewValue() will return the new root model, and getOldValue() will return the previous root model.
Nested Class Summary | |
---|---|
static class |
Model.ChangeEvent.Type
Enumeration of the possible types of changes. |
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
Model.ChangeEvent(Object src,
Model oldRoot,
Model newRoot)
Construct a root model change event. |
|
Model.ChangeEvent(Object src,
Model parent,
Model child,
boolean added)
Construct a model child added/removed change event. |
|
Model.ChangeEvent(Object src,
Model model,
Model oldParent,
Model newParent)
Construct a model parent change event. |
|
Model.ChangeEvent(Object src,
Model model,
String propName,
Object oldVal,
Object newVal)
Construct a model property change event. |
Method Summary | |
---|---|
Model |
getModel()
Get the model that changed. |
Object |
getNewValue()
Get the new value or the added child or the new parent. |
Object |
getOldValue()
Get the old value or the removed child or the previous parent. |
String |
getPropertyName()
|
Model.ChangeEvent.Type |
getType()
Get the type. |
String |
toString()
|
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Model.ChangeEvent(Object src, Model model, String propName, Object oldVal, Object newVal)
src
- the orginator of the change (cannot be null).model
- the model that changed (cannot be null).propName
- the property that changed (cannot be null).oldVal
- the old value (null is valid).newVal
- the new value (null is valid).public Model.ChangeEvent(Object src, Model model, Model oldParent, Model newParent)
src
- the orginator of the change (cannot be null).model
- the model that changed (cannot be null).propName
- the property that changed (cannot be null).oldParent
- the old value (null is valid).newParent
- the new value (null is valid).public Model.ChangeEvent(Object src, Model parent, Model child, boolean added)
src
- the orginator of the change (cannot be null).parent
- the parent model that changed (cannot be null).child
- the child model (cannot be null).added
- true if the child was added, false if removed.public Model.ChangeEvent(Object src, Model oldRoot, Model newRoot)
src
- the DocumentModel originator (cannot be null).oldRoot
- the previous root model (null is valid).newRoot
- the new root model (null is valid).Method Detail |
---|
public Model getModel()
public Model.ChangeEvent.Type getType()
public String getPropertyName()
public Object getOldValue()
public Object getNewValue()
public String toString()
toString
in class EventObject
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |