1

How can I display a set of data in a tile like structure? I know I can use a TilePane but it is not a virtualized control and displaying over 1000+ images can slow it down.

I have looked into ControlFX's GridView control which is a virtualized control for displaying data in a tile/grid like fashion but unfortunately it lacks selection support.

Is there another control I can use that is similar to a GridView or is there a version of the GridView control that has selection support?

Zocp
  • 97
  • 1
  • 6
  • Have you tried rolling your own selection model for a `GridView`? To give you enough for what you specifically need is probably not too hard. – James_D Dec 31 '16 at 04:22
  • @James_D I did but I was wondering if there was more of a proper implementation. Is one way by using the MultipleSelectionModel that JavaFX offers? – Zocp Dec 31 '16 at 05:21
  • That's one way, but it's quite a lot of work and might provide more functionality than you need. If you want single selection, just defining an `ObjectProperty`, some mouse handlers on the cell produced by the cell factory, and some CSS to indicate what's selected is enough. For multiple selection, an `ObservableList` for the selected items in addition to the `ObjectProperty` might be enough. If you want to support key strokes, etc, then you have more work to do and implementing the complete model (`selectAll`, `selectNext`, etc) might be easier at that point. – James_D Dec 31 '16 at 05:25
  • @James_D Thanks for your input. I think what you have suggested is enough for me since I don't need to support key strokes. – Zocp Dec 31 '16 at 17:50

0 Answers0