changeset 9250:9ea2726cb92f 9-b82

8136486: [ChoiceBox] Can't open ChoiceBox with click.
author leifs
date Mon, 14 Sep 2015 12:21:08 -0700
parents 397ebea6df60
children 26cbf69c3393 241b12c62ac4 4eaacb1abad5
files modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ChoiceBoxBehavior.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ChoiceBoxBehavior.java	Fri Sep 11 17:06:12 2015 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ChoiceBoxBehavior.java	Mon Sep 14 12:21:08 2015 -0700
@@ -34,7 +34,7 @@
 import javafx.scene.input.MouseEvent;
 import static javafx.scene.input.KeyCode.*;
 
-import static com.sun.javafx.scene.control.inputmap.InputMap.KeyMapping;
+import static com.sun.javafx.scene.control.inputmap.InputMap.*;
 
 /**
  * ChoiceBoxBehavior - default implementation
@@ -63,7 +63,10 @@
 
             new KeyMapping(ESCAPE, KeyEvent.KEY_RELEASED, e -> cancel()),
             new KeyMapping(DOWN, KeyEvent.KEY_RELEASED, e -> showPopup()),
-            new KeyMapping(CANCEL, KeyEvent.KEY_RELEASED, e -> cancel())
+            new KeyMapping(CANCEL, KeyEvent.KEY_RELEASED, e -> cancel()),
+
+            new MouseMapping(MouseEvent.MOUSE_PRESSED, this::mousePressed),
+            new MouseMapping(MouseEvent.MOUSE_RELEASED, this::mouseReleased)
         );
 
         // add some special two-level focus mappings