01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.core;
11:
12: /**
13: * Classes that implement this interface are capable of notifying listeners
14: * about model changes. Interested parties should implement
15: * <samp>IModelChangedListener </samp> and add as listeners to be able to
16: * receive change notification.
17: *
18: * @since 2.0
19: */
20: public interface IModelChangeProvider {
21: /**
22: * Adds the listener to the list of listeners that will be notified on model
23: * changes.
24: *
25: * @param listener
26: * a model change listener to be added
27: */
28: public void addModelChangedListener(IModelChangedListener listener);
29:
30: /**
31: * Delivers change event to all the registered listeners.
32: *
33: * @param event
34: * a change event that will be passed to all the listeners
35: */
36: public void fireModelChanged(IModelChangedEvent event);
37:
38: /**
39: * Notifies listeners that a property of a model object changed. This is a
40: * utility method that will create a model event and fire it.
41: *
42: * @param object
43: * an affected model object
44: * @param property
45: * name of the property that has changed
46: * @param oldValue
47: * the old value of the property
48: * @param newValue
49: * the new value of the property
50: */
51: public void fireModelObjectChanged(Object object, String property,
52: Object oldValue, Object newValue);
53:
54: /**
55: * Takes the listener off the list of registered change listeners.
56: *
57: * @param listener
58: * a model change listener to be removed
59: */
60: public void removeModelChangedListener(
61: IModelChangedListener listener);
62: }
|