KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > navigator > IExtensionStateModel


1 /*******************************************************************************
2  * Copyright (c) 2003, 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.ui.navigator;
12
13 import org.eclipse.jface.util.IPropertyChangeListener;
14
15 /**
16  *
17  * Allows clients to coordinate state across components that are part of the
18  * same logical extension.
19  *
20  * <p>
21  * That is, a content provider might vary how it exposes its content based on
22  * the state of a specific property in the model. Interested parties may add
23  * themselves as {@link IPropertyChangeListener}s to track changes in the state
24  * model.
25  * </p>
26  *
27  * <p>
28  * This interface is not intended to be implemented by clients.
29  * </p>
30  *
31  * @since 3.2
32  *
33  */

34 public interface IExtensionStateModel {
35
36     /**
37      * The id is used to look up the state model across different components of
38      * the same logical extension. Generally, the id of the content extension is
39      * used.
40      *
41      * @return The unique identifier of this state model.
42      */

43     String JavaDoc getId();
44
45     /**
46      *
47      * @return The viewer id that this state model is associated with.
48      */

49     String JavaDoc getViewerId();
50
51     /**
52      *
53      * @param aPropertyName
54      * The name of a given property
55      * @return The current value of the property.
56      */

57     String JavaDoc getStringProperty(String JavaDoc aPropertyName);
58
59     /**
60      *
61      * @param aPropertyName
62      * The name of a given property
63      * @return The current value of the property.
64      */

65     boolean getBooleanProperty(String JavaDoc aPropertyName);
66
67     /**
68      *
69      * @param aPropertyName
70      * The name of a given property
71      * @return The current value of the property.
72      */

73     int getIntProperty(String JavaDoc aPropertyName);
74
75     /**
76      *
77      * @param aPropertyName
78      * The name of a given property
79      * @return The current value of the property.
80      */

81     Object JavaDoc getProperty(String JavaDoc aPropertyName);
82
83     /**
84      *
85      * @param aPropertyName
86      * The name of a given property
87      * @param aPropertyValue
88      * The new value of a the given property.
89      */

90     void setStringProperty(String JavaDoc aPropertyName, String JavaDoc aPropertyValue);
91
92     /**
93      *
94      * @param aPropertyName
95      * The name of a given property
96      * @param aPropertyValue
97      * The new value of a the given property.
98      */

99     void setBooleanProperty(String JavaDoc aPropertyName, boolean aPropertyValue);
100
101     /**
102      *
103      * @param aPropertyName
104      * The name of a given property
105      * @param aPropertyValue
106      * The new value of a the given property.
107      */

108     void setIntProperty(String JavaDoc aPropertyName, int aPropertyValue);
109
110     /**
111      *
112      * @param aPropertyName
113      * The name of a given property
114      * @param aPropertyValue
115      * The new value of a the given property.
116      */

117     void setProperty(String JavaDoc aPropertyName, Object JavaDoc aPropertyValue);
118
119     /**
120      *
121      * @param aListener
122      * An implementation of {@link IPropertyChangeListener} that
123      * should be notified when changes occur in this model.
124      */

125     void addPropertyChangeListener(IPropertyChangeListener aListener);
126
127     /**
128      *
129      * @param aListener
130      * An implementation of {@link IPropertyChangeListener} that
131      * should no longer be notified when changes occur in this model.
132      */

133     void removePropertyChangeListener(IPropertyChangeListener aListener);
134 }
135
Popular Tags