Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using PreferencesFX in my application and I'm very happy with it. However, it is a special kind of application that should also be able to work without any GUI support, i.e. it should still work when the JavaFX platform can't be initialized. One major hurdle for that is that the PreferencesFX renderers are are created instantly when creating the field, even though they don't have to.
This instant initialization forces a platform initialization, which fails on headless systems and causes the preferences to not be loaded.
This PR delays the renderer instantiation until it is actually needed. Obviously, this is only a basic pull request meant to get some feedback. If a change of that form would be actually accepted, I would augment this PR to also support the normal renderer initialization such that the interface is fully compatible with previous versions of FormsFX and also create a similar PreferencesFX PR.