- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.3K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 466 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
JavaFX TableView Issues Moving from Swing
We are currently migrating a swing application to JavaFX. The application makes heavy use of TableViews. We have 17 table views that are updated constantly many times a second each.
Users can scroll, and select as the table views are being updated.
In JavaFX we have the following blockers:
- Very slow ui behaviour when these tables are being updated. We have had to slow down the rate of updates to the table views as otherwise the whole ui slows to a crawl.
- Single Cell selection flickers every time a row is added to a table view which looks very unprofessional - http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8177945
- If you scroll down a table view and let go of the mouse, every additional row to the table view causes the table to scroll slightly. This makes the table view appear as if it is slowly scrolling when new rows are being added when it should be completely still. http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8178297
- The JavaFX table view does not provide the drag selection behaviour of the swing table view out of the box.
We have been forced to use a java agent with a ClassFileTransformer to intercept class loading to replace the VirtualFlow class with our modified version but this is less than ideal.
More details to the above bullet points:
- It seems that JavaFX calls layoutChildren every time a row is added, whether that row is within the view port or not which seems excessive when you have multiple table views being dynamically updated.
- We have raised a bug but has been given very low priority P3 targeted for v10 so don’t imagine this being fixed quickly. We have temporarily fixed this by doing a Toolkit.getToolkit().firePulse(); at the end of VirtualFlow.layoutChildren.
- We have raised a bug but has been given very low priority P3 targeted for v10 so don’t imagine this being fixed quickly. This seems to be caused by the code in VirtualFlow starting at 1159 where the function adjustPixelAmount is being called with floating point values. Take a look at the firstCellOffset and viewportTopToCellTop double variables. We have temporarily fixed this by rounding these values to integers.
- Our customers are used to being able to drag square selections in table views and to extend these selections by dragging outside of the boundary of the tableView. We have tried to implement a similar but incomplete behaviour by overriding TableColumn cellFactories and intercepting dragEntered events for table cells. But it is near impossible to mirror the dragging outside of the table view to extend the selection behaviour of the Swing table view.
My questions are:
Are these issues likely to be fixed? it doesn’t seem that JavaFX TableViews have been tested with tables that are being dynamically updated.
Is there a better way to patch issue 2 and 3 other than replacing the VirtualFlow class at class load time using a Java Agent?