<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>In https://github.com/openjdk/jfx/pull/1135 I implemented a way to override the behaviour when the table menu button is clicked.</div>
<div> </div>
<div><u>Current behaviour</u></div>
<div>The table menu button is visible when <strong>setTableMenuButtonVisible(true)</strong> is called.</div>
<div>When clicked, a <strong>ContextMenu</strong> is shown with all available columns of the table shown as <strong>MenuItem</strong>.</div>
<div>A user can then click on a <strong>MenuItem</strong> to make the corresponding column (in)visible and the <strong>ContextMenu </strong>closes afterwards.</div>
<div> </div>
<div><u>Problems</u></div>
<div>This comes with some limitations as described here https://bugs.openjdk.org/browse/JDK-8091419, here https://bugs.openjdk.org/browse/JDK-8091153 and here https://bugs.openjdk.org/browse/JDK-8092148.</div>
<div>In short:</div>
<div>- It is not always desired that the <strong>ContextMenu </strong>closes after the user clicked on a <strong>MenuItem</strong>. This is a limitation of the <strong>ContextMenu</strong></div>
<div>- The menu can not be invoked programmatically</div>
<div>- The menu can not overridden in any way</div>
<div> </div>
<div><u>Solution</u></div>
<div>To address these issues, the PR mentioned above adds a new protected method <strong>showColumnMenu(MouseEvent) </strong>which is called when the table menu button is clicked.</div>
<div>Since this new method is protected, it can be overidden by developers. If not overridden, the known default <strong>ContextMenu</strong> is created and shown, as described above.</div>
<div> </div>
<div>This gives every developer the ability to fully customize the behaviour when the table menu button is clicked.</div>
<div>A developer can implement their own Menu if the behaviour of the <strong>ContextMenu </strong>is not desired.</div>
<div>The method can now also be invoked programmatically.</div>
<div> </div>
<div>Feel free to give Feedback and/or checkout the PR.</div>
<div> </div>
<div>-- Marius</div>
<div> </div></div></body></html>