create vm combo: delete routine of saving selected profile
authorjihye424.kim <jihye424.kim@samsung.com>
Mon, 16 Nov 2015 07:32:35 +0000 (16:32 +0900)
committerJiHye Kim <jihye424.kim@samsung.com>
Mon, 16 Nov 2015 08:44:27 +0000 (17:44 +0900)
- old: if selected profile, show create emulator view in place of pop up view
- new: always show pop up view
- reason: need to improve UX

Change-Id: I6d9409f6158b6b02318a2de01565df7037676e41
Signed-off-by: jihye424.kim <jihye424.kim@samsung.com>
src/org/tizen/emulator/manager/ui/renewal/widgets/CreateVMCombo.java

index 6c19419..756587c 100644 (file)
@@ -56,7 +56,7 @@ import org.tizen.emulator.manager.ui.renewal.tableviewer.ProfileButton;
 public class CreateVMCombo extends Canvas {
        private static int COMBO_WIDTH = 170; // for wearable text length
        private static int COMBO_HEIGHT = 26;
-       private static int ARROW_WIDTH = 18;
+//     private static int ARROW_WIDTH = 18;
 
        private final Composite parent;
 
@@ -333,18 +333,20 @@ public class CreateVMCombo extends Canvas {
                                        changeComboState(WSTATE.HOVER);
                                        break;
                                case SWT.MouseDown:
-                                       if (!isOutOfBounds(event.x, event.y)) {
-                                               changeComboState(WSTATE.PUSH);
-                                       }
+//                                     if (!isOutOfBounds(event.x, event.y)) {
+//                                             changeComboState(WSTATE.PUSH);
+//                                     }
+                                       changeComboState(WSTATE.PUSH);
                                        break;
                                case SWT.MouseUp:
                                        if (popup.isDispose()) {
                                                changeComboState(WSTATE.SELECTED);
-                                               if (selectComboButton && selectedItem != null) {
-                                                       select(selectedIndex);
-                                               } else {
-                                                       popup.open();
-                                               }
+//                                             if (selectComboButton && selectedItem != null) {
+//                                                     select(selectedIndex);
+//                                             } else {
+//                                                     popup.open();
+//                                             }
+                                               popup.open();
                                        } else {
                                                changeComboState(WSTATE.HOVER);
                                                popup.dispose();
@@ -362,6 +364,11 @@ public class CreateVMCombo extends Canvas {
                }
        };
 
+/*****************************************************************************
+ TODO: need to modify combo box action
+ -> initial: pop up profile list box
+ -> selected profile: show create emulator view
+
        private boolean selectComboButton;
        protected boolean isOutOfBounds(int x, int y) {
                Rectangle rect = this.getBounds();
@@ -377,6 +384,7 @@ public class CreateVMCombo extends Canvas {
                        return false;
                }
        }
+*****************************************************************************/
 
        private void changeComboState(WSTATE s) {
                state = s;