01: /*
02: * The contents of this file are subject to the
03: * Mozilla Public License Version 1.1 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at http://www.mozilla.org/MPL/
06: *
07: * Software distributed under the License is distributed on an "AS IS"
08: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
09: * See the License for the specific language governing rights and
10: * limitations under the License.
11: *
12: * The Initial Developer of the Original Code is Simulacra Media Ltd.
13: * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14: *
15: * All Rights Reserved.
16: *
17: * Contributor(s):
18: */
19: package org.openharmonise.swing.datefield;
20:
21: /**
22: * The listener interface for reveiving {@link org.openharmonise.swing.datefield.JDateField}
23: * events.
24: *
25: * @author Matthew Large
26: * @version $Revision: 1.1 $
27: *
28: */
29: public interface DateFieldListener {
30:
31: /**
32: * Validation fail identifier for value being above the maximum allowed.
33: */
34: public static final int VALIDATION_FAIL_ABOVE_MAX = 0;
35:
36: /**
37: * Validation fail identifier for value being below the minimum allowed.
38: */
39: public static final int VALIDATION_FAIL_BELOW_MIN = 1;
40:
41: /**
42: * Invoked when validation has failed on a date value.
43: *
44: * @param source The {@link JDateField} that initiated the event
45: * @param nReason Reason for failure
46: */
47: public void validationFailed(JDateField source, int nReason);
48:
49: /**
50: * Invoked when a complete date value has been entered.
51: *
52: * @param source The {@link JDateField} that initiated the event
53: */
54: public void valueChanged(JDateField source);
55:
56: }
|