-
Enhancement
-
Resolution: Fixed
-
P3
-
9
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.
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.
- csr for
-
JDK-8215554 TableSkinUtils should not contain actual code implementation
- Closed
- relates to
-
JDK-8207942 Add new protected VirtualFlow methods for subclassing
- Resolved
- links to
-
Commit openjdk/jfx/935e99d2
(1 links to)