mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-14 05:15:03 -05:00
ac9473ff07
* added SeriesNameMatcher * added SeasonEpisodeMatcher * access Preferences via new Settings class * adapt TVDotComClient to site changes (episodes no longer ordered in reverse) * added ActionPopup (inspired by the eclipse quickfix popup) refactoring: * renamed *Util classes to *Utilities * renamed HyperlinkLabel to LinkButton as it extends JButton now * refactored FileBotUtilities and FileUtilities
49 lines
862 B
Java
49 lines
862 B
Java
/*
|
|
* Created on 19.03.2005
|
|
*
|
|
*/
|
|
|
|
package net.sourceforge.tuned.ui.notification;
|
|
|
|
|
|
import java.awt.event.WindowAdapter;
|
|
import java.awt.event.WindowEvent;
|
|
|
|
import net.sourceforge.tuned.ui.TunedUtilities;
|
|
|
|
|
|
public class NotificationManager {
|
|
|
|
private final NotificationLayout layout;
|
|
|
|
|
|
public NotificationManager() {
|
|
this(new QueueNotificationLayout());
|
|
}
|
|
|
|
|
|
public NotificationManager(NotificationLayout layout) {
|
|
this.layout = layout;
|
|
}
|
|
|
|
|
|
public void show(NotificationWindow notification) {
|
|
TunedUtilities.checkEventDispatchThread();
|
|
|
|
notification.addWindowListener(new RemoveListener());
|
|
layout.add(notification);
|
|
|
|
notification.setVisible(true);
|
|
}
|
|
|
|
|
|
private class RemoveListener extends WindowAdapter {
|
|
|
|
@Override
|
|
public void windowClosing(WindowEvent e) {
|
|
layout.remove((NotificationWindow) e.getWindow());
|
|
}
|
|
}
|
|
|
|
}
|