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

Add proper support for fixed cell height in VirtualFlow-based controls

    Details

      Description

      It was found that fixed cell height results in a massive performance gain, so we should now turn the proof of concept implementations into proper API / implementation.

      The proposal is to add a 'fixedCellSize' double property to ListView, TreeView, TreeTableView and TableView controls. By default the value will be -1, to indicate that the fixed size is not set. Any positive value will be used as the fixed size, ignoring the preferred heights / padding / etc of all cells. To improve readability, the default -1 value is the same as the Region.USE_COMPUTED_SIZE symbolic field. This allows developers to return to the default size calculations whilst retaining readability in their code.This will be the recommended approach of resetting the fixed cell size to its 'off' state.

      Additionally, a -fx-fixed-cell-size property will be added to allow for the fixed cell size to be specified by CSS. This property will differ from -fx-cell-size in that whilst -fx-cell-size also sets the height of all cells, it does not enforce that this will be the only height. This is what -fx-fixed-cell-size does. In other words, developers would use only -fx-cell-size or -fx-fixed-cell-size - there would be no point in using both.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jgiles Jonathan Giles
                Reporter:
                jgiles Jonathan Giles
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:
                  Imported: