1 19 20 package org.apache.cayenne.dataview; 21 22 import java.util.EventListener ; 23 24 import org.apache.cayenne.DataObject; 25 26 public class FieldValueChangeEvent extends DispatchableEvent { 27 private DataObject modifiedObject; 28 private Object oldValue; 29 private Object newValue; 30 31 public FieldValueChangeEvent( 32 ObjEntityViewField source, 33 DataObject modifiedObject, 34 Object oldValue, 35 Object newValue) { 36 super(source); 37 this.modifiedObject = modifiedObject; 38 this.oldValue = oldValue; 39 this.newValue = newValue; 40 } 41 public void dispatch(EventListener listener) { 42 ((FieldValueChangeListener)listener).fieldValueChanged(this); 43 } 44 public ObjEntityViewField getField() { 45 return (ObjEntityViewField)getSource(); 46 } 47 public DataObject getModifiedObject() { 48 return modifiedObject; 49 } 50 public Object getNewValue() { 51 return newValue; 52 } 53 public Object getOldValue() { 54 return oldValue; 55 } 56 } 57 | Popular Tags |