KickJava   Java API By Example, From Geeks To Geeks.

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


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.model.provisional;
12
13 import org.eclipse.jface.util.IPropertyChangeListener;
14
15 /**
16  * Context in which an asynchronous request has been made.
17  * <p>
18  * Clients may implement and extend this interface to provide
19  * special contexts. Implementations must subclass {@link PresentationContext}.
20  * </p>
21  * @since 3.2
22  */

23 public interface IPresentationContext {
24     
25     /**
26      * Property name used for property change notification when the columns
27      * in a presentation context change.
28      */

29     public static final String JavaDoc PROPERTY_COLUMNS = "PROPERTY_COLUMNS"; //$NON-NLS-1$
30

31     /**
32      * Returns identifiers of the visible columns in the order
33      * labels should be provided, or <code>null</code> if columns
34      * are not being displayed. Label providers use this
35      * information.
36      *
37      * @return visible column identifiers or <code>null</code>
38      * @see IColumnPresentation
39      */

40     public String JavaDoc[] getColumns();
41     
42     /**
43      * Registers the given listener for property change notification.
44      *
45      * @param listener property listener
46      */

47     public void addPropertyChangeListener(IPropertyChangeListener listener);
48     
49     /**
50      * Unregisters the given listener from property change notification.
51      *
52      * @param listener property listener.
53      */

54     public void removePropertyChangeListener(IPropertyChangeListener listener);
55     
56     /**
57      * Returns the id of this presentation context. Usually this is the id of
58      * the associated part. However, when no part is associated with this context,
59      * the id may exist on its own. Allows for a context that is not tied to a part.
60      *
61      * @return id
62      * @since 3.3
63      */

64     public String JavaDoc getId();
65     
66     /**
67      * Sets the specified property and notifies listeners of changes.
68      *
69      * @param property property name
70      * @param value property value
71      */

72     public void setProperty(String JavaDoc property, Object JavaDoc value);
73     
74     /**
75      * Returns the property with the specified name or <code>null</code>
76      * if none.
77      *
78      * @param property property name
79      * @return property value or <code>null</code>
80      */

81     public Object JavaDoc getProperty(String JavaDoc property);
82     
83     /**
84      * Disposes this presentation context. Called by the framework
85      * when the associated viewer is disposed.
86      */

87     public void dispose();
88     
89 }
90
Popular Tags