1 56 package org.objectstyle.cayenne.dataview; 57 58 import java.util.EventListener ; 59 60 import org.objectstyle.cayenne.DataObject; 61 62 public class FieldValueChangeEvent extends DispatchableEvent { 63 private DataObject modifiedObject; 64 private Object oldValue; 65 private Object newValue; 66 67 public FieldValueChangeEvent( 68 ObjEntityViewField source, 69 DataObject modifiedObject, 70 Object oldValue, 71 Object newValue) { 72 super(source); 73 this.modifiedObject = modifiedObject; 74 this.oldValue = oldValue; 75 this.newValue = newValue; 76 } 77 public void dispatch(EventListener listener) { 78 ((FieldValueChangeListener)listener).fieldValueChanged(this); 79 } 80 public ObjEntityViewField getField() { 81 return (ObjEntityViewField)getSource(); 82 } 83 public DataObject getModifiedObject() { 84 return modifiedObject; 85 } 86 public Object getNewValue() { 87 return newValue; 88 } 89 public Object getOldValue() { 90 return oldValue; 91 } 92 } | Popular Tags |