I'm writing an Excel import wizard which loads a user's spreadsheet into a ControlsFX SpreadsheetView. The user can then identify the relevant columns (i.e., first and last name, etc.) to be imported into the app via a set of combo boxes. Each combo box contains a list of the available columns. When the user makes a choice in a combo box, the respective column is added to the selection model's range of selections.
Column selection should only be done via the combo boxes, and user clicks on cells in the spreadsheet view should be ignored (i.e, not change the selection model contents).
However, I cannot find a way to disable mouse clicks on cells or column headers. The solution to a related question about how to disable clicks on TableView doesn't provide a satisfactory answer: setMouseTransparent(true)
essentially disables the entire view.
In my case, the user must be able to scroll the view in order to find relevant columns, since not all users of the app have structured their spreadsheet in the same column order and the column may not be visible without scrolling horizontally.
So to re-iterate: I need to consume mouse clicks on cells and column headers to prevent changing the column selections made using the combo boxes. How do I do this? (FYI: consuming mouse events on the spreadsheet view [setOnMousePressed|Released|Clicked(mEvent -> mEvent.consume()
] has no effect.)