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

Allow disabling of background loading for images loaded from an InputStream

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • javafx
    • None

      JavaFX allows images to load in the background or not when providing a URL as string, but not when providing an input stream. Some images cannot be loaded from a simple URL, for example because they require authentication or a different method or protocol to access. In that case one can fall back to using an InputStream using any access method, however, the option to load the image in the background now can no longer be chosen (even though loading from a URL internally also uses an input stream).

      I propose to provide the missing constructor for this option (similar to the URL one) which offers the backgroundLoading boolean. Aside from the constructor, little needs to be done as the option can be simply delegated to a private constructor that accepts the extra argument already.

      The documentation may also be improved a bit perhaps as it is severely lacking in describing what each constructor does (even referring to "default" values which are not documented).

            kcr Kevin Rushforth
            jhendrikx John Hendrikx
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: