use of com.fxexperience.javafx.scene.control.sbcolorpicker.ColorPickerControl in project fxexperience2 by EricCanull.
the class PaintPickerController method initialize.
@FXML
public void initialize() {
assert root_vbox != null;
assert colorToggleButton != null;
assert linearToggleButton != null;
assert radialToggleButton != null;
colorPicker = new ColorPickerControl(this);
gradientPicker = new GradientPicker(this);
// Default value
setPaintProperty(DEFAULT_COLOR);
// Resize the window so it matches the selected editor size
root_vbox.heightProperty().addListener((ov, t, t1) -> {
final Window window = root_vbox.getScene().getWindow();
window.sizeToScene();
});
root_vbox.getChildren().add(colorPicker);
}
use of com.fxexperience.javafx.scene.control.sbcolorpicker.ColorPickerControl in project fxexperience2 by EricCanull.
the class GradientPickerStop method thumbMousePressed.
@FXML
void thumbMousePressed(MouseEvent event) {
gradientPicker.setSelectedStop(this);
startDragX = event.getSceneX();
origX = getLayoutX();
// make sure this stop is in highest z-order
toFront();
// showHUD();
pixelsToValue();
// Called when selecting a gradient stop :
// - update color preview accordingly
// - do not update the model
final PaintPickerController paintPicker = gradientPicker.getPaintPickerController();
final ColorPickerControl colorPicker = paintPicker.getColorPicker();
colorPicker.updateUI(color);
stop_button.requestFocus();
}
Aggregations