return imageView;
}
}
public static GridPane createOptionGridPane(Carousel<?> carousel) {
final DoubleProperty alignment = new SimpleDoubleProperty(0.8);
final BooleanProperty reflectionEnabled = new SimpleBooleanProperty(true);
final BooleanProperty clipReflections = new SimpleBooleanProperty(true);
final DoubleProperty fieldOfViewRatio = new SimpleDoubleProperty(0.5);
final DoubleProperty radiusRatio = new SimpleDoubleProperty(0.5);
final DoubleProperty viewDistanceRatio = new SimpleDoubleProperty(0.5);
final DoubleProperty density = new SimpleDoubleProperty(0.01);
final DoubleProperty cellSizeRatio = new SimpleDoubleProperty(0.6);
GridPane gridPane = new GridPane();
gridPane.add(new Label("Alignment (0.0 - 1.0)"), 1, 1);
gridPane.add(new Slider(0.0, 1.0, 0.8) {{
valueProperty().bindBidirectional(alignment);
setBlockIncrement(0.1);
}}, 2, 1);
gridPane.add(new Label() {{
textProperty().bind(alignment.asString("%4.2f"));
}}, 3, 1);
gridPane.add(new CheckBox("Reflection?") {{
selectedProperty().bindBidirectional(reflectionEnabled);
}}, 2, 2);
gridPane.add(new CheckBox("Clip Reflections?") {{
selectedProperty().bindBidirectional(clipReflections);
}}, 2, 3);
gridPane.add(new Label("fieldOfViewRatio (0.0 - 2.0)"), 1, 4);
gridPane.add(new Slider(0.0, 2.0, 0.5) {{
valueProperty().bindBidirectional(fieldOfViewRatio);
setBlockIncrement(0.1);
}}, 2, 4);
gridPane.add(new Label() {{
textProperty().bind(fieldOfViewRatio.asString("%4.2f"));
}}, 3, 4);
gridPane.add(new Label("radiusRatio (0.0 - 2.0)"), 1, 5);
gridPane.add(new Slider(0.0, 2.0, 0.5) {{
valueProperty().bindBidirectional(radiusRatio);
setBlockIncrement(0.1);
}}, 2, 5);
gridPane.add(new Label() {{
textProperty().bind(radiusRatio.asString("%4.2f"));
}}, 3, 5);
gridPane.add(new Label("viewDistanceRatio (0.0 - 4.0)"), 1, 6);
gridPane.add(new Slider(0.0, 4.0, 0.5) {{
valueProperty().bindBidirectional(viewDistanceRatio);
setBlockIncrement(0.1);
}}, 2, 6);
gridPane.add(new Label() {{
textProperty().bind(viewDistanceRatio.asString("%4.2f"));
}}, 3, 6);
gridPane.add(new Label("density (0.001 - 0.1)"), 1, 7);
gridPane.add(new Slider(0.001, 0.1, 0.01) {{
valueProperty().bindBidirectional(density);
setBlockIncrement(0.0025);
}}, 2, 7);
gridPane.add(new Label() {{
textProperty().bind(density.asString("%6.4f"));
}}, 3, 7);
gridPane.add(new Label("cellSizeRatio (0.1 - 1.0)"), 1, 8);
gridPane.add(new Slider(0.1, 1.0, 0.6) {{
valueProperty().bindBidirectional(cellSizeRatio);
setBlockIncrement(0.05);
}}, 2, 8);
gridPane.add(new Label() {{
textProperty().bind(cellSizeRatio.asString("%4.2f"));
}}, 3, 8);
carousel.cellAlignmentProperty().bind(alignment);
carousel.reflectionEnabledProperty().bind(reflectionEnabled);
carousel.clipReflectionsProperty().bind(clipReflections);