changeset 1144:bad86696aadc

RT-21172: The menu is not appearing on click when TableView's tableMenuButtonVisible property is set to true
author jgiles
date Fri, 25 May 2012 09:00:15 +1200
parents 1e32f8fd3b5d
children 86c489f267b3
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableHeaderRow.java
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableHeaderRow.java	Thu May 24 11:29:28 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableHeaderRow.java	Fri May 25 09:00:15 2012 +1200
@@ -45,7 +45,6 @@
 import javafx.scene.control.Label;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableView;
-import javafx.scene.input.ContextMenuEvent;
 import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.Pane;
 import javafx.scene.layout.Region;
@@ -265,8 +264,8 @@
                 requestLayout();
             }
         });
-        cornerRegion.setOnContextMenuRequested(new EventHandler<ContextMenuEvent>() {
-            @Override public void handle(ContextMenuEvent me) {
+        cornerRegion.setOnMousePressed(new EventHandler<MouseEvent>() {
+            @Override public void handle(MouseEvent me) {
                 // show a popupMenu which lists all columns
                 columnPopupMenu.show(cornerRegion, Side.BOTTOM, 0, 0);
                 me.consume();