1 7 package org.ejtools.management.browser.frame; 8 9 import java.awt.BorderLayout ; 10 import java.beans.PropertyChangeEvent ; 11 import java.util.ResourceBundle ; 12 13 import javax.swing.JScrollPane ; 14 15 import org.ejtools.adwt.service.BeanContextInternalFrame; 16 import org.ejtools.management.browser.model.service.NotificationServiceProvider; 17 18 24 public class NotificationsInternalFrame extends BeanContextInternalFrame 25 { 26 27 protected NotificationServiceProvider provider = null; 28 29 private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); 30 31 32 37 public NotificationsInternalFrame(NotificationServiceProvider provider) 38 { 39 super(); 40 41 this.provider = provider; 42 43 JScrollPane pane = new JScrollPane (this.provider.getComponent()); 44 this.frame.getContentPane().add(BorderLayout.CENTER, pane); 45 } 46 47 48 51 public void propertyChange(PropertyChangeEvent event) 52 { 53 if (event.getPropertyName().equals("name")) 54 { 55 String newName = (String ) event.getNewValue(); 56 this.setTitle(resources.getString("notification.text.prefix") + " : " + newName); 57 } 58 } 59 } 60 | Popular Tags |