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

TableRowSkinBase fails to correctly virtualise cells in horizontal direction

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 8, 9, 10
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
      None
    • Subcomponent:
    • Understanding:
      Cause Known

      Description

      At some point (yet to be determined) there appears to have been a regression in the TableRowSkinBase code when attempting to virtualise cells in horizontal direction (i.e. when there are more columns than the visible area allows).

      The patch below resolves the issue, but it is not likely the correct solution (we are trying to determine the table width, but we are getting the width and padding on the underlying virtualflow (the width is fine, the padding should really come from tableview directly):

      diff --git a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableRowSkinBase.java b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableRowSkinBase.java
      --- a/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableRowSkinBase.java
      +++ b/modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableRowSkinBase.java
      @@ -680,8 +680,8 @@
               double end = start + col.getWidth();
       
               // determine the width of the table
      - final Insets padding = getSkinnable().getPadding();
      - double headerWidth = getSkinnable().getWidth() - padding.getLeft() + padding.getRight();
      + final Insets padding = getVirtualFlow().getPadding();
      + double headerWidth = getVirtualFlow().getWidth() - padding.getLeft() + padding.getRight();
       
               return (start >= scrollX || end > scrollX) && (start < (headerWidth + scrollX) || end <= (headerWidth + scrollX));
           }

      This patch does however help scrolling performance drastically when there are considerable numbers of columns, e.g. JDK-8166956

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aghaisas Ajit Ghaisas
                Reporter:
                jgiles Jonathan Giles
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: