[Title] added screenshot window label
authorgiwoong.kim <giwoong.kim@samsung.com>
Fri, 18 May 2012 09:24:15 +0000 (18:24 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Fri, 18 May 2012 09:24:15 +0000 (18:24 +0900)
[Type]
[Module] Emulator / skin
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java
tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/ScreenShotDialog.java

index 886d1587c874f76cb48e8bd3340b5ed0d1c142ab..bac71ce95f475673613fd4e8aa4bb737fc855c0f 100755 (executable)
@@ -1,5 +1,5 @@
 /**
- * 
+ * Emulator Skin Process
  *
  * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
  *
@@ -172,7 +172,12 @@ public class EmulatorSkin {
        private MenuDetectListener canvasMenuDetectListener;
 
        private EmulatorSkin reopenSkin;
-       
+
+       /**
+        * @brief constructor
+        * @param config : configuration of emulator skin
+        * @param isOnTop : always on top flag
+       */
        protected EmulatorSkin( EmulatorConfig config, boolean isOnTop ) {
                this.config = config;
                this.isDefaultHoverColor = true;
index 84d353a5c2f5bd1a942554213797c9edae2f1036..92e2310c7bb70a5e8010d9fac193b83b388d65cd 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * 
+ * Capture a screenshot of the Emulator framebuffer
  *
  * Copyright ( C ) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
  *
@@ -52,6 +52,7 @@ import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.ImageData;
 import org.eclipse.swt.graphics.ImageLoader;
 import org.eclipse.swt.graphics.PaletteData;
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -109,6 +110,10 @@ public class ScreenShotDialog {
        private ToolItem refreshItem;
        private ToolItem copyItem;
 
+       /**
+        * @brief constructor
+        * @param Image icon : screenshot window icon resource
+       */
        public ScreenShotDialog( Shell parent, SocketCommunicator communicator, EmulatorSkin emulatorSkin,
                        EmulatorConfig config, Image icon ) throws ScreenShotException {
 
@@ -179,7 +184,9 @@ public class ScreenShotDialog {
                        throw e;
                }
 
-               label = new Label(shell, SWT.BORDER);
+               label = new Label(shell, SWT.BORDER | SWT.WRAP);
+               label.setText(" Resolution : " + config.getArgInt(ArgsConstants.RESOLUTION_WIDTH) +
+                                               "x" + config.getArgInt(ArgsConstants.RESOLUTION_HEIGHT) + " ");
 
                shell.pack();
 
@@ -472,12 +479,19 @@ public class ScreenShotDialog {
                                        }
                                });
 
+                               Point dialogSize = shell.getSize();
+
                                try {
                                        clickShutter();
                                } catch ( ScreenShotException ex ) {
                                        logger.log( Level.SEVERE, "Fail to create a screen shot.", ex );
                                        SkinUtil.openMessage( shell, null, "Fail to create a screen shot.", SWT.ERROR, config );
                                }
+
+                               /* restoration */
+                               if (shell.getSize() != dialogSize) {
+                                       shell.setSize(dialogSize);
+                               }
                        }
 
                } );