JavaFX Utils library is built based on components.
Component is a class that implements IComponent which mounts some utilities on Node object.
Imagine that we want to trigger some code on double click of a Button. With JavaFX you can do something like:
Button button = new Button();
button.setOnMouseClicked((event)->{
if(event.getClickCount() == 2)
this.onDoubleClick();
});
On JavaFX Utils there is DoubleClickable which deal with click count for you, so you can write the equivalent to the above code like:
Button button = new Button();
new DoubleClickable<>(button, this::onDoubleClick).mount();
It is usual to mount different components over the same node for example
which will result in code like:
Button button;
new ButtonMagnifier<>(button).mount();
new Tip<>(button, "Button with Tip").mount();
new DoubleClickable<>(button, this::OnDoubleClick).mount();
To avoid pass always the same node and invoke mount for all components there is ComponentMounter and some extensions like ButtonMounter. This components permit to chain various components and mount them over the same node. This classes permits to write the equivalent to the above code like:
Button button;
new ButtonMounter<>(button)
.buttonMagnifier()
.tip("Button with Tip")
.doubleClickable(this::onDoubleClick)
.mount();