On Thu, 27 Aug 2026 18:07:38 GMT, Michael Strauß <[email protected]> wrote:

> However, I still don't understand the stringly-typed roundtrip when you call 
> `StageBackdropStyle.getPlatformStyleNames()`, from which you then choose a 
> name, and pass it back into `StageBackdropStyle.style(String)`.

As you said, most clients will specify the one they want by name and when 
searching for a backdrop they'll be comparing names no matter what API we 
provide. If a client wants a list of platform backdrops they can build that 
list easily enough. However it's an easy function to write and mirrors 
getStandardBackdrops so I'll add it. Are you proposing we also remove 
getPlatformStyleNames and just provide getPlatformBackdrops?

> For this purpose, I recommend to have `StageBackdropStyle.style(String)` not 
> fail silently by returning `null`. Instead, returning an 
> `Optional<StageBackdropStyle>` would make the API easier to use:

Thanks for the suggestion. Will do.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/2048#issuecomment-5444099268

Reply via email to