导致TableView无法响应JavaFX 2.0中的鼠标单击 [英] Cause TableView to not respond to mouse clicks in JavaFX 2.0

查看:300
本文介绍了导致TableView无法响应JavaFX 2.0中的鼠标单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个JavaFX 2.0 TableView,但我不希望它响应鼠标点击。当然,我可以禁用控件/小部件,但它似乎已禁用。

I want a JavaFX 2.0 TableView, but I don't want it to respond to mouse clicks. Of course, I can disable the control/widget but then it appears disabled.

tableview.setSelectionModel(null)给出了我想要的行为,但UI转储堆栈跟踪抱怨null。我无法捕捉到null。

tableview.setSelectionModel(null) gives the behavior I'd like, but the UI dumps stack traces complaining about the null. I can't catch the null.

我一直在尝试创建某种SelectionModel或TableViewSelectionModel,它有一些内脏方法,所以它没有响应。我很难扩展这些类或实现摘要。

I've been trying to create some kind of SelectionModel or TableViewSelectionModel that has some methods gutted, so it doesn't respond. I'm having a hard time extending these classes or implementing abstracts.

关于禁用TableViews点击的想法?

Ideas on disabling clicks on TableViews?

推荐答案

tableView.setMouseTransparent(true)

这篇关于导致TableView无法响应JavaFX 2.0中的鼠标单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆