KickJava   Java API By Example, From Geeks To Geeks.

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


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

7 package org.ejtools.management.browser.frame;
8
9 import java.awt.BorderLayout JavaDoc;
10 import java.beans.PropertyChangeEvent JavaDoc;
11 import java.util.ResourceBundle JavaDoc;
12
13 import javax.swing.JScrollPane JavaDoc;
14
15 import org.ejtools.adwt.service.BeanContextInternalFrame;
16 import org.ejtools.management.browser.model.service.NotificationServiceProvider;
17
18 /**
19  * Description of the Class
20  *
21  * @author Laurent Etiemble
22  * @version $Revision: 1.6 $
23  */

24 public class NotificationsInternalFrame extends BeanContextInternalFrame
25 {
26    /** Description of the Field */
27    protected NotificationServiceProvider provider = null;
28    /** Description of the Field */
29    private static ResourceBundle JavaDoc resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources");
30
31
32    /**
33     * Constructor for GraphInternalFrame.
34     *
35     * @param provider Description of the Parameter
36     */

37    public NotificationsInternalFrame(NotificationServiceProvider provider)
38    {
39       super();
40
41       this.provider = provider;
42
43       JScrollPane JavaDoc pane = new JScrollPane JavaDoc(this.provider.getComponent());
44       this.frame.getContentPane().add(BorderLayout.CENTER, pane);
45    }
46
47
48    /**
49     * @param event Description of the Parameter
50     */

51    public void propertyChange(PropertyChangeEvent JavaDoc event)
52    {
53       if (event.getPropertyName().equals("name"))
54       {
55          String JavaDoc newName = (String JavaDoc) event.getNewValue();
56          this.setTitle(resources.getString("notification.text.prefix") + " : " + newName);
57       }
58    }
59 }
60
Popular Tags