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

TableSkinUtils should not contain actual code implementation

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • jfx14
    • 9
    • javafx

      The class javafx.scene.control.skin.TableSkinUtils is doing a link between the skin of a class and its skinnable in order to access some methods.

      For example, the PlaceHolderProperty is done like that :
       public static ObjectProperty<Node> placeholderProperty(TableViewSkinBase<?,?,?,?,?> tableSkin) {
              Object control = tableSkin.getSkinnable();
              if (control instanceof TableView) {
                  return ((TableView)control).placeholderProperty();
              } else if (control instanceof TreeTableView) {
                  return ((TreeTableView)control).placeholderProperty();
              }
              return null;
          }


      But the methods :
      resizeColumn()
       resizeColumnToFitContent(TableViewSkinBase<?,?,?,?,?> tableSkin, TableColumnBase<?,?> tc, int maxRows)

      are directly implemented within TableSkinUtils. Thus it prevents any developer working on the TableView or TreeTableView to actually override or tweak its behavior. In JDK 8, these methods were included inside the TableViewSkinBase and it was possible to override them.

      We should find a way to give back the access to these methods for a subClass of TableViewSkin.

            shadzic Samir Hadzic
            shadzic Samir Hadzic
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: