Search in sources :

Example 1 with BackgroundFill

use of javafx.scene.layout.BackgroundFill 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);
}
Also used : Background(javafx.scene.layout.Background) Color(javafx.scene.paint.Color) BackgroundFill(javafx.scene.layout.BackgroundFill)

Example 2 with BackgroundFill

use of javafx.scene.layout.BackgroundFill 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)));
        }
    });
}
Also used : Background(javafx.scene.layout.Background) BackgroundFill(javafx.scene.layout.BackgroundFill) CornerRadii(javafx.scene.layout.CornerRadii)

Example 3 with BackgroundFill

use of javafx.scene.layout.BackgroundFill 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);
}
Also used : Background(javafx.scene.layout.Background) BackgroundFill(javafx.scene.layout.BackgroundFill) CornerRadii(javafx.scene.layout.CornerRadii)

Example 4 with BackgroundFill

use of javafx.scene.layout.BackgroundFill 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);
}
Also used : Background(javafx.scene.layout.Background) BackgroundFill(javafx.scene.layout.BackgroundFill)

Example 5 with BackgroundFill

use of javafx.scene.layout.BackgroundFill in project JFoenix by jfoenixadmin.

the class JFXDatePicker method initialize.

private void initialize() {
    this.getStyleClass().add(DEFAULT_STYLE_CLASS);
    setBackground(new Background(new BackgroundFill(Color.TRANSPARENT, CornerRadii.EMPTY, Insets.EMPTY)));
}
Also used : Background(javafx.scene.layout.Background) BackgroundFill(javafx.scene.layout.BackgroundFill)

Aggregations

Background (javafx.scene.layout.Background)15 BackgroundFill (javafx.scene.layout.BackgroundFill)15 Insets (javafx.geometry.Insets)6 CornerRadii (javafx.scene.layout.CornerRadii)6 Color (javafx.scene.paint.Color)4 ArrayList (java.util.ArrayList)3 StackPane (javafx.scene.layout.StackPane)3 Tile (eu.hansolo.tilesfx.Tile)2 List (java.util.List)2 Optional (java.util.Optional)2 Collectors (java.util.stream.Collectors)2 Platform (javafx.application.Platform)2 FXCollections (javafx.collections.FXCollections)2 Node (javafx.scene.Node)2 Scene (javafx.scene.Scene)2 Label (javafx.scene.control.Label)2 FlowPane (javafx.scene.layout.FlowPane)2 VBox (javafx.scene.layout.VBox)2 XYLocation (aima.core.util.datastructure.XYLocation)1 NodeConverter (com.jfoenix.converters.base.NodeConverter)1