[Title] Fixed NotifierDialog position.
authorgyeongseok.seo <gyeongseok.seo@samsung.com>
Fri, 23 Mar 2012 07:50:05 +0000 (16:50 +0900)
committergyeongseok.seo <gyeongseok.seo@samsung.com>
Fri, 23 Mar 2012 07:50:05 +0000 (16:50 +0900)
[Type] Enhancement
[Module] common-eplugin
[Priority] Minor
[Jira#]
[Redmine#] 4666
[Problem] dialog position base Display.
[Cause]
[Solution] position changed.
[TestCase] ide

Change-Id: Id81a9f6de50e9f5e32fdf7ee356d64bcc321e5a4

org.tizen.common/src/org/tizen/common/util/NotifierDialog.java

index f76858c..f092390 100644 (file)
@@ -46,6 +46,7 @@ import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;\r
 import org.eclipse.swt.widgets.Listener;\r
 import org.eclipse.swt.widgets.Shell;\r
+import org.eclipse.ui.PlatformUI;\r
 import org.tizen.common.cache.ColorCache;\r
 import org.tizen.common.cache.FontCache;\r
 \r
@@ -85,7 +86,7 @@ public class NotifierDialog {
     private static Shell       _shell;\r
 \r
     /**\r
-     * Creates and shows a notification dialog with a specific title, message and a\r
+     * Creates and shows a notification dialog with a specific title, message and icon\r
      * \r
      * @param title\r
      * @param message\r
@@ -222,7 +223,11 @@ public class NotifierDialog {
             }\r
         }\r
 \r
-        _shell.setLocation(startX, startY);\r
+        // set notifierDialog position\r
+        @SuppressWarnings("static-access")\r
+        Shell eclipseShell = PlatformUI.getWorkbench().getDisplay().getDefault().getActiveShell();\r
+        //_shell.setLocation(startX, startY);\r
+        _shell.setLocation(eclipseShell.getSize().x-_shell.getSize().x, eclipseShell.getSize().y-_shell.getSize().y);\r
         _shell.setAlpha(0);\r
         _shell.setVisible(true);\r
 \r