| /* |
| * Created on 13.11.2007 |
| * |
| * To change the template for this generated file go to |
| * Window - Preferences - Java - Code Generation - Code and Comments |
| */ |
| |
| package org.eclipse.mylyn.tests.manual; |
| |
| import org.eclipse.mylyn.internal.tasks.ui.notifications.AbstractNotificationPopup; |
| import org.eclipse.swt.events.ShellAdapter; |
| import org.eclipse.swt.events.ShellEvent; |
| import org.eclipse.swt.layout.FillLayout; |
| import org.eclipse.swt.widgets.Display; |
| import org.eclipse.swt.widgets.Shell; |
| |
| /** |
| * @author Benjamin Pasero |
| * @author Mik Kersten |
| */ |
| public class NoticicationPopupMain { |
| |
| public static void main(String[] args) { |
| Display display = new Display(); |
| Shell shell = new Shell(display); |
| shell.setLayout(new FillLayout()); |
| |
| shell.open(); |
| |
| final AbstractNotificationPopup popup = new SampleNotificationPopup(display); |
| |
| shell.addShellListener(new ShellAdapter() { |
| @Override |
| public void shellClosed(ShellEvent e) { |
| popup.close(); |
| } |
| }); |
| |
| popup.open(); |
| |
| while (!shell.isDisposed()) { |
| if (!display.readAndDispatch()) { |
| display.sleep(); |
| } |
| } |
| } |
| } |