KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > core > IModelChangeProvider


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.pde.core;
12
13 /**
14  * Classes that implement this interface are capable of notifying listeners
15  * about model changes. Interested parties should implement
16  * <samp>IModelChangedListener </samp> and add as listeners to be able to
17  * receive change notification.
18  *
19  * @since 2.0
20  */

21 public interface IModelChangeProvider {
22     /**
23      * Adds the listener to the list of listeners that will be notified on model
24      * changes.
25      *
26      * @param listener
27      * a model change listener to be added
28      */

29     public void addModelChangedListener(IModelChangedListener listener);
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      * Notifies listeners that a property of a model object changed. This is a
39      * utility method that will create a model event and fire it.
40      *
41      * @param object
42      * an affected model object
43      * @param property
44      * name of the property that has changed
45      * @param oldValue
46      * the old value of the property
47      * @param newValue
48      * the new value of the property
49      */

50     public void fireModelObjectChanged(Object JavaDoc object, String JavaDoc property,
51             Object JavaDoc oldValue, Object JavaDoc newValue);
52     /**
53      * Takes the listener off the list of registered change listeners.
54      *
55      * @param listener
56      * a model change listener to be removed
57      */

58     public void removeModelChangedListener(IModelChangedListener listener);
59 }
60
Popular Tags