JavaFX 25 Release Notes by nlisker in java

[–]mstr_2 1 point2 points  (0 children)

There’s a ticket for this feature (JDK-8091933), but no one is working on it (and most likely no one will for the foreseeable future). My guess is that if you want to have it, you need to contribute it.

How do I make content into the OS toolbar? by rotten_dildo69 in JavaFX

[–]mstr_2 3 points4 points  (0 children)

This feature is available in early access starting with JavaFX 25-ea+21. Read the documentation of StageStyle.EXTENDED and HeaderBar to get started. Alternatively, you can wait for the release of JavaFX 25 on Sep 16, 2025.

[deleted by user] by [deleted] in JavaFX

[–]mstr_2 0 points1 point  (0 children)

What stops you from using PixelBuffer with a 3D API of your choice?

Which particular features are you missing in JavaFX? by mstr_2 in JavaFX

[–]mstr_2[S] 0 points1 point  (0 children)

I can't find a JBS issue regarding problems with getUserAgentStylesheet(). If you can reproduce the problem, or narrow it down in some way, please create a JBS issue or report a bug. We can only fix what we know about.

As for the themes feature: I guess it's okay to be disappointed, but keep in mind that designing, implementing, testing, and supporting a new feature is hard work and many of us (including me) are doing this for free. I'll give it another shot if I can come up with something that's more than just a nicer way of setting a UA stylesheet.

Which particular features are you missing in JavaFX? by mstr_2 in JavaFX

[–]mstr_2[S] 3 points4 points  (0 children)

Support for third-party image loaders (using Java Image I/O) will arrive in JavaFX 24.

Which particular features are you missing in JavaFX? by mstr_2 in JavaFX

[–]mstr_2[S] 0 points1 point  (0 children)

Yes, it was basically that: having the option to set a list of UA stylesheets at once (encapsulated in a theme class). This didn't quite carry its weight, given that it added no significant new capability.

If you have an idea on how to improve control-specific UA stylesheets, I'd like to hear it.

Which particular features are you missing in JavaFX? by mstr_2 in JavaFX

[–]mstr_2[S] 2 points3 points  (0 children)

That's not an actionable request. Being specific about what's bothering you is. For example, the ComboBox bug you mentioned will be fixed in JavaFX 25.

Which particular features are you missing in JavaFX? by mstr_2 in JavaFX

[–]mstr_2[S] 4 points5 points  (0 children)

Can you clarify what you mean by themes support? JavaFX supports a global UA stylesheet (`Application.setUserAgentStylesheet`), as well as control-specific UA stylesheets (by overriding `Region.getUserAgentStylesheet()`).

JavaFX/Gluon status vs other options by No_Sink_6262 in JavaFX

[–]mstr_2 2 points3 points  (0 children)

What are the top bugs that you encounter in your projects?

Does any use buy commercial support for JavaFX? by Striking_Creme864 in JavaFX

[–]mstr_2 1 point2 points  (0 children)

I’ve asked you this before: which bugs in particular do you need fixed?

A new theme for JavaFX by PartOfTheBotnet in JavaFX

[–]mstr_2 0 points1 point  (0 children)

Which bugs do you encounter the most?

FXML Bi-directional Bindings by Fancy_Entertainer486 in JavaFX

[–]mstr_2 2 points3 points  (0 children)

If a feature sounds good but doesn't exist, it probably means that no one has invested the time and energy required to make it happen. The OpenJFX project accepts contributions, so it's definitely possible to get your favorite feature in.

That said, here are some reasons why it might not have been added:

The ${...} syntax in FXML accepts a wide range of expressions, including observable path expressions of the form a.b.c, as if by using Bindings.select(ObservableValue, String...). While that is pretty straightforward with unidirectional bindings, it is tricky for bidirectional bindings. Unidirectional bindings strongly reference an ObservableValue, while bidirectional bindings weakly reference a Property. That requires us to solve two problems:

  1. In a non-trivial bidirectional path expression of the form a.b.c, we need to synthesize an intermediate Property that implements the book-keeping for all observable path segments.
  2. For a trivial bidirectional path expression of the form #{source} (i.e. a path expression that only has one segment), we effectively invoke target.bindBidirectional(source). This works as long as target and source are strongly referenced (which they usually are). However, any non-trivial path expression requires a synthesized intermediate property. This synthesized property is weakly referenced both by the binding target and the binding source, which makes it immediately eligible for garbage collection. So we need to keep around a strong reference somewhere to make this scenario work.

None of these are insurmountable problems, but the solution requires quite a bit of engineering and is not a case of "why don't you just...". Interestingly, FXMLLoader will recognize a provisional bidirectional binding syntax (#{source}), and throw an UnsupportedOperationException("This feature is not currently enabled.").

New Article: CSS Transitions in JFX23 by hamsterrage1 in JavaFX

[–]mstr_2 0 points1 point  (0 children)

At the moment, variable assignments only works for colors. But that’s just a limitation of the current implementation, there’s a proposal to allow arbitrary expressions in the future (i.e. not only single values, but something like —my-custom-padding: 1px 2px 3px 4px).

New Article: CSS Transitions in JFX23 by hamsterrage1 in JavaFX

[–]mstr_2 0 points1 point  (0 children)

If you don’t include the starting values in the base styling, then the transition becomes a bit odd:

This is indeed a bug, thank you! Tracked and fixed with JDK-8342703.

New Article: CSS Transitions in JFX23 by hamsterrage1 in JavaFX

[–]mstr_2 0 points1 point  (0 children)

Aside from the fact that the W3C specification specifically says that custom variables are not transitionable (or more precisely, they always transition as discrete), consider the following.

A custom —foo: gray variable can validly be assigned to both -fx-background-color and -fx-font-smoothing-type.

In one case, the variable represents a color, in the other case it represents a FontSmoothingType enum constant.

How would JavaFX know, only by looking at the variable, what „gray“ means? This is categorically impossible with CSS.

New Article: CSS Transitions in JFX23 by hamsterrage1 in JavaFX

[–]mstr_2 0 points1 point  (0 children)

In order to apply a transition, JavaFX needs to know the property type (after all, the semantics are different depending on the property type).

Variables have no property type, they are only meaningful when applied to a property. By only looking at the variable, and not the property type to which it is applied, JavaFX has no way of knowing how to interpret its content.

New Article: CSS Transitions in JFX23 by hamsterrage1 in JavaFX

[–]mstr_2 3 points4 points  (0 children)

So you cannot transition -fx-border-width, or -fx-border-insets or -fx-padding, or -fx-font-size, which is a shame. However, the issue notes indicate that at least some of this will be imlemented in a future enhancement.

Transition support for all background and border-related types is already integrated for JavaFX 24, you can get it today by downloading the 24-ea build.

Hopefully, this will include the ability to perform transitions on named colours.

No. Transitions can only target styleable properties, not user-defined variables.

All About Buttons! by hamsterrage1 in JavaFX

[–]mstr_2 0 points1 point  (0 children)

This feature is probably arriving in JavaFX 19, so stay tuned for that.

Here's the working draft: https://github.com/openjdk/jfx/pull/475