KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > gui > model > ConfigurationListener


1 /***
2  * FractalGUI: a graphical tool to edit Fractal component configurations.
3  * Copyright (C) 2003 France Telecom R&D
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: fractal@objectweb.org
20  *
21  * Authors: Eric Bruneton, Patrice Fauvel
22  */

23
24 package org.objectweb.fractal.gui.model;
25
26 /**
27  * An interface to be notified of changes in a {@link Configuration} model.
28  */

29
30 public interface ConfigurationListener {
31
32   /**
33    * Notifies this listener that the root component has changed.
34    *
35    * @param oldValue the old root component of the configuration.
36    */

37
38   void rootComponentChanged (Component oldValue);
39
40   /**
41    * Notifies this listener that all the change count of the configuration has
42    * changed.
43    *
44    * @param changeCount the new change count of the configuration.
45    */

46
47   void changeCountChanged (Component component, long changeCount);
48
49   // -------------------------------------------------------------------------
50
// Name, Type, Implementation
51
// -------------------------------------------------------------------------
52

53   /**
54    * Notifies this listener that the name of a component has changed.
55    *
56    * @param component the component whose name has changed.
57    * @param oldValue the old name of the component.
58    */

59
60   void nameChanged (Component component, String JavaDoc oldValue);
61
62   /**
63    * Notifies this listener that the type of a component has changed.
64    *
65    * @param component the component whose type has changed.
66    * @param oldValue the old type of the component.
67    */

68
69   void typeChanged (Component component, String JavaDoc oldValue);
70
71   /**
72    * Notifies this listener that the implementation of a component has changed.
73    *
74    * @param component the component whose implementation has changed.
75    * @param oldValue the old implementation of the component.
76    */

77
78   void implementationChanged (Component component, String JavaDoc oldValue);
79
80   // -------------------------------------------------------------------------
81
// Client and server interfaces
82
// -------------------------------------------------------------------------
83

84   /**
85    * Notifies this listener that the name of an interface has changed.
86    *
87    * @param i the interface whose name has changed.
88    * @param oldValue the old name of the interface.
89    */

90
91   void interfaceNameChanged (Interface i, String JavaDoc oldValue);
92
93   /**
94    * Notifies this listener that the signature of an interface has changed.
95    *
96    * @param i the interface whose signature has changed.
97    * @param oldValue the old signature of the interface.
98    */

99
100   void interfaceSignatureChanged (Interface i, String JavaDoc oldValue);
101
102   /**
103    * Notifies this listener that the contigency of an interface has changed.
104    *
105    * @param i the interface whose contingency has changed.
106    * @param oldValue the old contingency of the interface.
107    */

108
109   void interfaceContingencyChanged (Interface i, boolean oldValue);
110
111   /**
112    * Notifies this listener that the cardinality of an interface has changed.
113    *
114    * @param i the interface whose cardinality has changed.
115    * @param oldValue the old cardinality of the interface.
116    */

117
118   void interfaceCardinalityChanged (Interface i, boolean oldValue);
119
120   /**
121    * Notifies this listener that a client interface has been added to a
122    * component.
123    *
124    * @param component the component into which the new interface has been added.
125    * @param i the interface that has been added.
126    * @param index the index of this interface in the client interface list of
127    * the component.
128    */

129
130   void clientInterfaceAdded (Component component, ClientInterface i, int index);
131
132   /**
133    * Notifies this listener that a client interface has been removed from a
134    * component.
135    *
136    * @param component the component from which the interface has been removed.
137    * @param i the interface that has been removed.
138    * @param index the index of this interface in the client interface list of
139    * the component.
140    */

141
142   void clientInterfaceRemoved (
143     Component component,
144     ClientInterface i,
145     int index);
146
147   /**
148    * Notifies this listener that a server interface has been added to a
149    * component.
150    *
151    * @param component the component into which the new interface has been added.
152    * @param i the interface that has been added.
153    * @param index the index of this interface in the server interface list of
154    * the component.
155    */

156
157   void serverInterfaceAdded (Component component, ServerInterface i, int index);
158
159   /**
160    * Notifies this listener that a server interface has been removed from a
161    * component.
162    *
163    * @param component the component from which the interface has been removed.
164    * @param i the interface that has been removed.
165    * @param index the index of this interface in the server interface list of
166    * the component.
167    */

168
169   void serverInterfaceRemoved (
170     Component component,
171     ServerInterface i,
172     int index);
173
174   // -------------------------------------------------------------------------
175
// Bindings
176
// -------------------------------------------------------------------------
177

178   /**
179    * Notifies this listener that an interface has been bound.
180    *
181    * @param citf the client interface that has been bound.
182    * @param sitf the server interface to which it has been bound.
183    */

184
185   void interfaceBound (ClientInterface citf, ServerInterface sitf);
186
187   /**
188    * Notifies this listener that an interface has been rebound.
189    *
190    * @param citf the client interface that has been rebound.
191    * @param oldSitf the server interface to which it <i>was</i> bound.
192    */

193
194   void interfaceRebound (ClientInterface citf, ServerInterface oldSitf);
195
196   /**
197    * Notifies this listener that an interface has been unbound.
198    *
199    * @param citf the client interface that has been unbound.
200    * @param sitf the server interface to which it <i>was</i> bound.
201    */

202
203   void interfaceUnbound (ClientInterface citf, ServerInterface sitf);
204
205   // -------------------------------------------------------------------------
206
// Attributes
207
// -------------------------------------------------------------------------
208

209   /**
210    * Notifies this listener that the attribute controller of a component has
211    * changed.
212    *
213    * @param component the component whose attribute controller has changed.
214    * @param oldValue the old attribute controller of the component.
215    */

216
217   void attributeControllerChanged (Component component, String JavaDoc oldValue);
218
219   /**
220    * Notifies this listener that the value of an attribute has changed.
221    *
222    * @param component the component whose attribute has changed.
223    * @param attributeName the name of the attribute whose value has changed.
224    * @param oldValue the old value of the attribute.
225    */

226
227   void attributeChanged (
228     Component component,
229     String JavaDoc attributeName,
230     String JavaDoc oldValue);
231
232   // -------------------------------------------------------------------------
233
// Controller descriptors
234
// -------------------------------------------------------------------------
235

236   /**
237    * Notifies this listener that the template controller descriptor of a
238    * component has changed.
239    *
240    * @param component the component whose template contoller descriptor has
241    * changed.
242    * @param oldValue the old value of the template controller descriptor.
243    */

244
245   void templateControllerDescriptorChanged (
246     Component component,
247     String JavaDoc oldValue);
248
249   /**
250    * Notifies this listener that the component controller descriptor of a
251    * component has changed.
252    *
253    * @param component the component whose component contoller descriptor has
254    * changed.
255    * @param oldValue the old value of the component controller descriptor.
256    */

257
258   void componentControllerDescriptorChanged (
259     Component component,
260     String JavaDoc oldValue);
261
262   // -------------------------------------------------------------------------
263
// Composite specific informations
264
// -------------------------------------------------------------------------
265

266   /**
267    * Notifies this listener that a sub component has been added to a
268    * component.
269    *
270    * @param parent the component into which the sub component has been added.
271    * @param child the sub component that has been added.
272    * @param index the index of this sub component in the sub component list of
273    * the parent component.
274    */

275
276   void subComponentAdded (Component parent, Component child, int index);
277
278   /**
279    * Notifies this listener that a sub component has been removed from a
280    * component.
281    *
282    * @param parent the component from which the sub component has been removed.
283    * @param child the sub component that has been removed.
284    * @param index the index of this sub component in the sub component list of
285    * the parent component.
286    */

287
288   void subComponentRemoved (Component parent, Component child, int index);
289 }
290
Popular Tags