// Path: src/main/java/com/athaydes/logfx/binding/BindableValue.java
// public class BindableValue<T> extends ObservableValueBase<T> {
// 
//     private T value;
// 
//     public BindableValue( T value ) {
//         this.value = value;
//     }
// 
//     public void setValue( T value ) {
//         this.value = value;
//         fireValueChangedEvent();
//     }
// 
//     @Override
//     public T getValue() {
//         return value;
//     }
// 
// }


import com.athaydes.logfx.binding.BindableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.stage.StageStyle;
import static java.util.stream.Collectors.toList;
import static java.util.stream.IntStream.rangeClosed;
import static javafx.collections.FXCollections.observableList;
package com.athaydes.logfx.ui;



public class FontPicker {

    public static Dialog showFontPicker( BindableValue<Font> fontProperty ) {
        ComboBox<String> fontNames = new ComboBox<>(
                observableList( Font.getFontNames().stream().distinct().collect( toList() ) ) );
// Path: src/main/java/com/athaydes/logfx/binding/BindableValue.java
// public class BindableValue<T> extends ObservableValueBase<T> {
// 
//     private T value;
// 
//     public BindableValue( T value ) {
//         this.value = value;
//     }
// 
//     public void setValue( T value ) {
//         this.value = value;
//         fireValueChangedEvent();
//     }
// 
//     @Override
//     public T getValue() {
//         return value;
//     }
// 
// }


// Path: src/main/java/com/athaydes/logfx/ui/FontPicker.java
import com.athaydes.logfx.binding.BindableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.stage.StageStyle;
import static java.util.stream.Collectors.toList;
import static java.util.stream.IntStream.rangeClosed;
import static javafx.collections.FXCollections.observableList;

package com.athaydes.logfx.ui;



public class FontPicker {

    public static Dialog showFontPicker( BindableValue<Font> fontProperty ) {
        ComboBox<String> fontNames = new ComboBox<>(
                observableList( Font.getFontNames().stream().distinct().collect( toList() ) ) );
        fontNames.getSelectionModel().select( fontProperty.getValue().getName() );