TableSkinUtils should not contain actual code implementation

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • jfx14
    • Affects Version/s: 9
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: