KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejtools > jmx > browser > frame > NotificationsInternalFrame


1 /*
2
3  * EJTools, the Enterprise Java Tools
4
5  *
6
7  * Distributable under LGPL license.
8
9  * See terms of license at www.gnu.org.
10
11  */

12
13 package org.ejtools.jmx.browser.frame;
14
15
16
17 import java.awt.BorderLayout JavaDoc;
18
19 import java.beans.PropertyChangeEvent JavaDoc;
20
21 import java.util.ResourceBundle JavaDoc;
22
23
24
25 import javax.swing.JScrollPane JavaDoc;
26
27
28
29 import org.ejtools.adwt.service.BeanContextInternalFrame;
30
31 import org.ejtools.jmx.browser.model.service.NotificationServiceProvider;
32
33
34
35 /**
36
37  * Description of the Class
38
39  *
40
41  * @author <a HREF="mailto:letiemble@users.sourceforge.net">Laurent Etiemble</a>
42
43  * @created 5 septembre 2002
44
45  * @version $Revision: 1.6 $
46
47  */

48
49 public class NotificationsInternalFrame extends BeanContextInternalFrame
50
51 {
52
53    /** Description of the Field */
54
55    protected NotificationServiceProvider provider = null;
56
57    /** Description of the Field */
58
59    private static ResourceBundle JavaDoc resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources");
60
61
62
63
64
65    /**
66
67     * Constructor for GraphInternalFrame.
68
69     *
70
71     * @param provider Description of the Parameter
72
73     */

74
75    public NotificationsInternalFrame(NotificationServiceProvider provider)
76
77    {
78
79       super();
80
81
82
83       this.provider = provider;
84
85
86
87       JScrollPane JavaDoc pane = new JScrollPane JavaDoc(this.provider.getComponent());
88
89       this.frame.getContentPane().add(BorderLayout.CENTER, pane);
90
91    }
92
93
94
95
96
97    /**
98
99     * @param event Description of the Parameter
100
101     */

102
103    public void propertyChange(PropertyChangeEvent JavaDoc event)
104
105    {
106
107       if (event.getPropertyName().equals("name"))
108
109       {
110
111          String JavaDoc newName = (String JavaDoc) event.getNewValue();
112
113          this.setTitle(resources.getString("notification.text.prefix") + " : " + newName);
114
115       }
116
117    }
118
119 }
120
121
Popular Tags