01: /*
02: * GWT-Ext Widget Library
03: * Copyright(c) 2007-2008, GWT-Ext.
04: * licensing@gwt-ext.com
05: *
06: * http://www.gwt-ext.com/license
07: */
08:
09: package com.gwtext.client.widgets.form.event;
10:
11: import com.gwtext.client.core.EventObject;
12: import com.gwtext.client.widgets.form.Field;
13: import com.gwtext.client.widgets.event.BoxComponentListener;
14:
15: public interface FieldListener extends BoxComponentListener {
16:
17: /**
18: * Fires when this field loses input focus.
19: *
20: * @param field this
21: */
22: void onBlur(Field field);
23:
24: /**
25: * Fires just before the field blurs if the field value has changed.
26: *
27: * @param field this
28: * @param newVal the new value
29: * @param oldVal the old value
30: */
31: void onChange(Field field, Object newVal, Object oldVal);
32:
33: /**
34: * Fires when this field receives input focus.
35: *
36: * @param field this
37: */
38: void onFocus(Field field);
39:
40: /**
41: * Fires after the field has been marked as invalid.
42: *
43: * @param field this
44: * @param msg the validation message
45: */
46: void onInvalid(Field field, String msg);
47:
48: /**
49: * Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. You can check
50: * {@link EventObject#getKey} to determine which key was pressed.
51: *
52: * @param field this
53: * @param e the event object
54: */
55: void onSpecialKey(Field field, EventObject e);
56:
57: /**
58: * Fires after the field has been validated with no errors.
59: *
60: * @param field this
61: */
62: void onValid(Field field);
63: }
|