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

TableSkinUtils should not contain actual code implementation

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: In Progress
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shadzic Samir Hadzic
                Reporter:
                shadzic Samir Hadzic
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: