Source code: org/scopemvc/core/ModelChangeListener.java
1 /*
2 * Scope: a generic MVC framework.
3 * Copyright (c) 2000-2002, Steve Meyfroidt
4 * All rights reserved.
5 * Email: smeyfroi@users.sourceforge.net
6 *
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 *
19 * Neither the name "Scope" nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
22 *
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
28 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
36 *
37 * $Id: ModelChangeListener.java,v 1.2 2002/01/12 09:35:40 smeyfroi Exp $
38 */
39
40
41 package org.scopemvc.core;
42
43
44 /**
45 * <P>
46 * Implemented by objects that can receive notification
47 * when a model object implementing ModelChangeEventSource
48 * changes state.
49 * </P>
50 * <P>
51 * To use:
52 * <UL>
53 * <LI>Implement this interface, responding to the change in
54 * Model state in {@link #modelChanged},</LI>
55 * <LI>Register as a listener to a Model using
56 * {@link ModelChangeEventSource#addModelChangeListener},</LI>
57 * <LI>Deregister as a listener when no longer interested
58 * in receiving notification of changes using
59 * {@link ModelChangeEventSource#removeModelChangeListener}.</LI>
60 * </UL>
61 * </P>
62 *
63 * @author <A HREF="mailto:smeyfroi@users.sourceforge.net">Steve Meyfroidt</A>
64 * @version $Revision: 1.2 $ $Date: 2002/01/12 09:35:40 $
65 * @see ModelChangeEventSource
66 * @see ModelChangeEvent
67 * @see org.scopemvc.model.basic.BasicModel
68 */
69 public interface ModelChangeListener {
70
71
72 /**
73 * <P>
74 * Invoked to notify listeners of a change in the
75 * state of a {@link ModelChangeEventSource}.
76 * </P>
77 *
78 * @param inEvent the {@link ModelChangeEvent} representing the change
79 * in state of the ModelChangeEventSource.
80 */
81 public void modelChanged(ModelChangeEvent inEvent);
82 }