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

VirtualContainerBase: createVirtualFlow must be protected

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 10
    • javafx
    • None
    • minimal
    • Java API
    • JDK

      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() {...}

            aghaisas Ajit Ghaisas
            fastegal Jeanette Winzenburg
            Kevin Rushforth, Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: