Slider brightnessSlider = SliderBuilder.create().min(0).max(100).id("BrightnessSlider").build();
brightnessSlider.valueProperty().bindBidirectional(bright);
GridPane.setConstraints(brightnessSlider, 1, 0);
IntegerField brightnessField = new IntegerField();
brightnessField.valueProperty().bindBidirectional(bright);
brightnessField.setPrefColumnCount(7);
GridPane.setConstraints(brightnessField, 2, 0);
Label saturationLabel = new Label("Saturation:");
saturationLabel.setMinWidth(Control.USE_PREF_SIZE);
GridPane.setConstraints(saturationLabel, 0, 1);
Slider saturationSlider = SliderBuilder.create().min(0).max(100).id("SaturationSlider").build();
saturationSlider.valueProperty().bindBidirectional(sat);
GridPane.setConstraints(saturationSlider, 1, 1);
saturationSlider.styleProperty().bind(new StringBinding() {
{ bind(color); }
@Override protected String computeValue() {
return "picker-color: hsb("+hue.get()+",100%,100%);";
}
});
IntegerField saturationField = new IntegerField();
saturationField.valueProperty().bindBidirectional(sat);
saturationField.setPrefColumnCount(7);
GridPane.setConstraints(saturationField, 2, 1);
Label webLabel = new Label("Web:");
webLabel.setMinWidth(Control.USE_PREF_SIZE);
GridPane.setConstraints(webLabel, 0, 2);