Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8307960

Create Table Column PopupMenu lazily

    XMLWordPrintable

Details

    • b18
    • generic
    • generic

    Backports

      Description

        A (Tree)TableView has the opportunity to show a column popup menu where the user can control the visibility of the columns.
        To activate this feature, the developer needs to use the method: setTableMenuButtonVisible(true). The default of the table menu button visibility is false.

        The TableHeaderRow is responsible for showing the table menu button, which when clicked shows a context menu with all available columns as MenuItem.

        A problem here is, that the Column PopupMenu is always initialized and updated via bindings, even if the table menu button is never shown or the user never clicked on it.

        The goal if this ticket is to create the Popup lazily, so that we do not do anything with the popup until really needed.
        This can save performance, especially for tables with many columns.

        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.

        Attachments

          Issue Links

            Activity

              People

                mhanl Marius Hanl
                mhanl Marius Hanl
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: