use of javafx.scene.layout.Background in project cryptomator by cryptomator.
the class PasswordStrengthUtil method getBackgroundWithStrengthColor.
public Background getBackgroundWithStrengthColor(Number score) {
Color c = this.getStrengthColor(score);
BackgroundFill fill = new BackgroundFill(c, CornerRadii.EMPTY, Insets.EMPTY);
return new Background(fill);
}
use of javafx.scene.layout.Background in project JFoenix by jfoenixadmin.
the class JFXSliderSkin method initializeVariables.
private void initializeVariables() {
shifting = 30 + thumb.getWidth();
if (getSkinnable().getOrientation() != Orientation.HORIZONTAL)
horizontalRotation = -90;
if (((JFXSlider) getSkinnable()).getIndicatorPosition() != IndicatorPosition.LEFT) {
indicatorRotation = 180;
shifting = -shifting;
}
sliderValue.setRotate(rotationAngle + indicatorRotation + 3 * horizontalRotation);
animatedThumb.setRotate(-rotationAngle + indicatorRotation + horizontalRotation);
thumb.backgroundProperty().addListener((o, oldVal, newVal) -> {
if (animatedThumb.getBackground() != null) {
animatedThumb.setBackground(new Background(new BackgroundFill(newVal.getFills().get(0).getFill(), animatedThumb.getBackground().getFills().get(0).getRadii(), animatedThumb.getBackground().getFills().get(0).getInsets())));
} else {
animatedThumb.setBackground(new Background(new BackgroundFill(newVal.getFills().get(0).getFill(), new CornerRadii(50, 50, 50, 0, true), null)));
}
});
}
use of javafx.scene.layout.Background in project JFoenix by jfoenixadmin.
the class JFXSliderSkinOLD method initializeVariables.
private void initializeVariables() {
double stroke = thumb.getStrokeWidth();
double radius = thumb.getRadius();
thumbRadius = stroke > radius ? stroke : radius;
trackColor = (Color) track.getStroke();
thumbColor = (Color) thumb.getStroke();
track.strokeProperty().addListener((o, oldVal, newVal) -> {
// prevent internal color change
if (!internalChange)
trackColor = newVal;
});
thumb.strokeProperty().addListener((o, oldVal, newVal) -> {
// prevent internal color change
if (!internalChange) {
thumbColor = newVal;
if (getSkinnable().getValue() == 0) {
internalChange = true;
thumb.setFill(trackColor);
thumb.setStroke(trackColor);
internalChange = false;
}
}
});
shifting = 30 + thumbRadius;
if (!isHorizontal) {
horizontalRotation = -90;
}
if (!isIndicatorLeft) {
indicatorRotation = 180;
shifting = -shifting;
}
sliderValue.setRotate(rotationAngle + indicatorRotation + 3 * horizontalRotation);
animatedThumb.resize(30, 30);
animatedThumb.setRotate(-rotationAngle + indicatorRotation + horizontalRotation);
animatedThumb.backgroundProperty().bind(Bindings.createObjectBinding(() -> new Background(new BackgroundFill(thumb.getStroke(), new CornerRadii(50, 50, 50, 0, true), null)), thumb.strokeProperty()));
animatedThumb.setScaleX(0);
animatedThumb.setScaleY(0);
}
use of javafx.scene.layout.Background in project JFoenix by jfoenixadmin.
the class JFXTimePicker method initialize.
private void initialize() {
getStyleClass().add(DEFAULT_STYLE_CLASS);
setAccessibleRole(AccessibleRole.DATE_PICKER);
setBackground(new Background(new BackgroundFill(Color.TRANSPARENT, CornerRadii.EMPTY, Insets.EMPTY)));
setEditable(true);
}
use of javafx.scene.layout.Background in project Smartcity-Smarthouse by TechnionYP5777.
the class TempDashboard method start.
@Override
public void start(Stage stage) throws Exception {
pane = new FlowPane(Orientation.HORIZONTAL, 1, 1, textTile);
pane.setPadding(new Insets(5));
pane.setPrefSize(150, 150);
pane.setBackground(new Background(new BackgroundFill(Tile.BACKGROUND.darker(), CornerRadii.EMPTY, Insets.EMPTY)));
Scene scene = new Scene(pane);
stage.setTitle("Dashboard Configuration in Action");
stage.setScene(scene);
stage.show();
}
Aggregations