This PR changes the `columnPopupMenu`, so that it is created lazily.

The problem here is, that the `columnPopupMenu` is always initialized and 
updated via bindings, even if the table menu button is never shown 
(`setTableMenuButtonVisible(false)`) or the user never clicked on it.
This problem can be solved by creating the `columnPopupMenu` and related 
bindings when it should be shown the first time.

I also added many tests to ensure that everything still works (there are no 
tests for that area as of now).

Side note: There are a bunch of tickets with the wish to customize the Popup 
shown by the table menu button or show it programmatically. This ticket will 
prepare this, as now all Popup related code is on one place and in the future 
we can think of implementing a way to override this behaviour in a way that the 
Popup and all related bindings are never created and therefore do not decrease 
performance.

-------------

Commit messages:
 - JDK-8307960: Create Table Column PopupMenu lazily

Changes: https://git.openjdk.org/jfx/pull/1133/files
 Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1133&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8307960
  Stats: 449 lines in 4 files changed: 440 ins; 6 del; 3 mod
  Patch: https://git.openjdk.org/jfx/pull/1133.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1133/head:pull/1133

PR: https://git.openjdk.org/jfx/pull/1133

Reply via email to