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;
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();
}
};
+/*****************************************************************************
+ 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();
return false;
}
}
+*****************************************************************************/
private void changeComboState(WSTATE s) {
state = s;