Summary
API visibility change is done to facilitate custom VirtualFlow creation in JavaFX skin classes.
Problem
It is impossible to provide a custom VirtualFlow in JavaFX skin classes in JDK 9. On pulling VirtualContainerBase class into public scope in JDK 9, createVirtualFlow() method changed visibility from protected to package-private, thus fighting Its own api intent.
Solution
Following methods in VirtualContainerBase class are made protected to allow custom VirtualFlow creation in JavaFX skin classes - 1. createVirtualFlow() 2. getVirtualFlow()
Specification
/**
* Create the virtualized container that handles the layout and scrolling of
* all the cells. This enables skin subclasses to provide
* a custom {@link VirtualFlow} implementation.
* If not overridden, this method intantiates a default VirtualFlow instance.
* @return newly created VirtualFlow instance
* @since 10
*/
protected VirtualFlow<I> createVirtualFlow() {...}
/**
* Get the virtualized container.
* Subclasses can invoke this method to get the VirtualFlow instance.
* @return the virtualized container
* @since 10
*/
protected final VirtualFlow<I> getVirtualFlow() {...}
- csr of
-
JDK-8187379 VirtualContainerBase: createVirtualFlow must be protected
-
- Resolved
-