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

Callback missing to custom constrained resize policy when drag event finishes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • None
    • javafx
    • None

      When using a custom constrained resize policy in a TableView/TreeTableView control, after JDK-8293119, that extends ConstrainedColumnResizeBase and implements Callback<TableView.ResizeFeatures, Boolean> (like com.sun.javafx.scene.control.ConstrainedColumnResize.TablePolicy), if the user starts a drag event to resize a column header, there is a call from TableSkinUtils::resizeColumn (coming from NestedTableColumnHeader::columnResizing, from the rectMouseDragged event handler) and the policy can use the passed TableView.ResizeFeatures value to perform any needed calculation, as expected.

      However, when the drag event ends, the rectMouseReleased event handler calls NestedTableColumnHeader::columnResizingComplete, which does not call TableSkinUtils::resizeColumn, and therefore, the custom policy doesn't get informed that the drag event ended.

      This information could be needed in some occasions, should the developer need to make some calculations based on the deltas received from the TableView.ResizeFeatures value, for instance, during the drag event.

      As the delta values are absolute in terms of variance from the original width of the column header, which doesn't change during the drag event, if this width is used for any calculation, it needs to be reset when the drag event ends.

      So far, there is no way of knowing when this happens.

            Unassigned Unassigned
            jpereda Jose Pereda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: