1 12 13 package org.ejtools.jmx.browser.frame; 14 15 16 17 import java.awt.BorderLayout ; 18 19 import java.beans.PropertyChangeEvent ; 20 21 import java.util.ResourceBundle ; 22 23 24 25 import javax.swing.JScrollPane ; 26 27 28 29 import org.ejtools.adwt.service.BeanContextInternalFrame; 30 31 import org.ejtools.jmx.browser.model.service.NotificationServiceProvider; 32 33 34 35 48 49 public class NotificationsInternalFrame extends BeanContextInternalFrame 50 51 { 52 53 54 55 protected NotificationServiceProvider provider = null; 56 57 58 59 private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); 60 61 62 63 64 65 74 75 public NotificationsInternalFrame(NotificationServiceProvider provider) 76 77 { 78 79 super(); 80 81 82 83 this.provider = provider; 84 85 86 87 JScrollPane pane = new JScrollPane (this.provider.getComponent()); 88 89 this.frame.getContentPane().add(BorderLayout.CENTER, pane); 90 91 } 92 93 94 95 96 97 102 103 public void propertyChange(PropertyChangeEvent event) 104 105 { 106 107 if (event.getPropertyName().equals("name")) 108 109 { 110 111 String newName = (String ) event.getNewValue(); 112 113 this.setTitle(resources.getString("notification.text.prefix") + " : " + newName); 114 115 } 116 117 } 118 119 } 120 121 | Popular Tags |