/**
* Creates and shows a notification dialog with a specific title, message and icon
- *
+ *
* @param title
* @param message
* @param type
*/
public static void notify(String title, String message, NotificationType type) {
+ notify(title, message, type, true);
+ }
+
+ /**
+ * Creates and shows a notification dialog with a specific title, message, icon and fade effect
+ *
+ * @param title
+ * @param message
+ * @param type
+ * @param fade
+ */
+ public static void notify(String title, String message, NotificationType type, boolean fade) {
Shell eclipseShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
_shell = new Shell(eclipseShell, SWT.NO_FOCUS | SWT.NO_TRIM);
//_shell = new Shell(Display.getDefault().getActiveShell(), SWT.NO_FOCUS | SWT.NO_TRIM);
_activeShells.add(_shell);
- fadeIn(_shell);
+ fadeIn(_shell, fade);
}
private static void addLabelButtonListner (Label button) {
}
}
- private static void fadeIn(final Shell _shell) {
+ private static void fadeIn(final Shell _shell, final boolean fade) {
Runnable run = new Runnable() {
@Override
if (cur > FINAL_ALPHA) {
_shell.setAlpha(FINAL_ALPHA);
- startTimer(_shell);
+ if (fade) {
+ startTimer(_shell);
+ }
return;
}