[Title] emulator-manager : add checking dpi value
authorjihye kim <jihye1128.kim@samsung.com>
Fri, 18 Jan 2013 08:52:34 +0000 (17:52 +0900)
committerjihye kim <jihye1128.kim@samsung.com>
Fri, 18 Jan 2013 08:52:34 +0000 (17:52 +0900)
[Desc.] add checking dpi value and modify ram-size
[Issue] N_SE-21851

Conflicts:

package/changelog
package/pkginfo.manifest

VERSION
package/changelog
package/pkginfo.manifest
src/org/tizen/emulator/manager/ui/detail/TableWidget.java
src/org/tizen/emulator/manager/ui/detail/VMPropertyView.java
src/org/tizen/emulator/manager/vms/RAM_SIZE.java

diff --git a/VERSION b/VERSION
index 3e32ff6..e47889e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.1.0 RC3
+2.1.0 RC4
index 11c5f37..f3f7832 100644 (file)
@@ -1,3 +1,9 @@
+* 1.3.74
+- update version
+- modify ram-size
+- add checking dpi value
+== jihye kim <jihye1128.kim@samsung.com> 2013-01-18
+
 * 1.3.73
 - update version
 == jihye kim <jihye1128.kim@samsung.com> 2013-01-14
index d157b13..858e98b 100644 (file)
@@ -1,5 +1,5 @@
 Source: emulator-manager
-Version: 1.3.73
+Version: 1.3.74
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
 
 Package: emulator-manager
index 196109c..dd60071 100644 (file)
@@ -464,7 +464,7 @@ class DPISpinner extends TableWidget {
                oldDPI = newDPI = value.dpi;
                dpiSpinner = new Spinner(table, SWT.BORDER);
                dpiSpinner.setValues(oldDPI,
-                               VMPropertyView.MIN_DPI, VMPropertyView.MAX_DPI, 0, 1, 1);
+                               /*VMPropertyView.MIN_DPI*/0, /*VMPropertyView.MAX_DPI*/999, 0, 1, 1);
                dpiSpinner.setTextLimit(3);
 
                return true;
@@ -481,6 +481,7 @@ class DPISpinner extends TableWidget {
                                }
                        }
                });
+
                return true;
        }
 
index da6f3d9..3980ea6 100644 (file)
@@ -166,18 +166,27 @@ public class VMPropertyView implements TableWidgetChangeListener {
                                for (TableWidget widget : createList) {
                                        widget.setValue(newValue);
                                }
-                               p = Creator.create(newValue);
                        }
                        else {
                                for (TableWidget widget : modifyList) {
                                        widget.setValue(newValue);
                                }
+                       }
+                       // dpi check
+                       if (newValue.dpi < VMPropertyView.MIN_DPI || newValue.dpi > VMPropertyView.MAX_DPI) {
+                               throw new VMsWorkerException("Invalid value.\nDisplay Density should be from 100 to 480");
+                       }
+
+                       if (isCreateMode) {
+                               p = Creator.create(newValue);
+                       }
+                       else {
                                property.getWorker().modifyVM(oldValue, newValue);
                                p = property;
                        }
                } catch (VMsWorkerException e) {
                        message = e.getMessage();
-                       msg.openInfoDialog(message);
+                       msg.openWarningDialog(message);
                }
                return p;
        }
index 482dee7..c1d4816 100644 (file)
 
 package org.tizen.emulator.manager.vms;
 
-public enum RAM_SIZE {
-       RAM512("512", 512), RAM768("768", 768), RAM1024("1024", 1024);
+import java.util.ArrayList;
+
+public class RAM_SIZE {
+       public static RAM_SIZE RAM512 = new RAM_SIZE("512", 512);
+       public static RAM_SIZE RAM768 = new RAM_SIZE("768", 768);
+       public static RAM_SIZE RAM1024 = new RAM_SIZE("1024", 1024);
+
+       private static final ArrayList<RAM_SIZE> list;
+       static{
+               list = new ArrayList<RAM_SIZE>();
+               if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1) {
+                       list.add(RAM512);
+               } else {
+                       list.add(RAM512);
+                       list.add(RAM768);
+                       list.add(RAM1024);
+               }
+        }
+
+       public static ArrayList<RAM_SIZE> values() {
+               return list;
+       }
 
        private String id;
        private int size;
 
-       RAM_SIZE(String id, int size) {
+       private RAM_SIZE(String id, int size) {
                this.id = id;
                this.size = size;
        }