KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > viewers > provisional > IModelProxy


1 /*******************************************************************************
2  * Copyright (c) 2005, 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.debug.internal.ui.viewers.provisional;
12
13 /**
14  * A model proxy represents a model for a specific presentation context and
15  * fires deltas to notify listeners of changes in the model. A model proxy
16  * is created by a model proxy factory.
17  * <p>
18  * When an element is added to an asynchronous viewer, its associated model proxy
19  * factory is queried to create a model proxy for that element. The model proxy
20  * is then installed into the viewer and the viewer listens to model deltas
21  * in order to update that element. Generally, a model proxy factory creates
22  * model proxies for root elements in a model, and then represents all elements
23  * within that model for a specific presentation context.
24  * </p>
25  * <p>
26  * Clients may implement this interface. Implementation of this interface
27  * must subclass {@link AbstractModelProxy}.
28  * </p>
29  * @see IModelDelta
30  * @see IModelProxyFactoryAdapter
31  * @see IModelChangedListener
32  * @since 3.2
33  */

34 public interface IModelProxy {
35
36     /**
37      * Notification this model proxy has been created and is about to be installed
38      * in the following context. This is the first method called after a model proxy
39      * is created.
40      * <p>
41      * This method is called by the asynchronous viewer framework and should not
42      * be called by clients.
43      * </p>
44      * @param context presentation context in which the proxy will be installed
45      */

46     public void init(IPresentationContext context);
47     
48     /**
49      * Notification this model proxy has been installed in its presentation
50      * context. This indicates that the model proxy has been created and registered
51      * model change listeners are ready to process deltas.
52      * <p>
53      * This method is called by the asynchronous viewer framework and should not
54      * be called by clients.
55      * </p>
56      */

57     public void installed();
58     
59     /**
60      * Disposes this model proxy.
61      * <p>
62      * This method is called by the asynchronous viewer framework and should not
63      * be called by clients.
64      * </p>
65      */

66     public void dispose();
67     
68     /**
69      * Registers the given listener for model delta notification.
70      *
71      * @param listener model delta listener
72      */

73     public void addModelChangedListener(IModelChangedListener listener);
74     
75     /**
76      * Unregisters the given listener from model delta notification.
77      *
78      * @param listener model delta listener
79      */

80     public void removeModelChangedListener(IModelChangedListener listener);
81     
82 }
83
Popular Tags