Package javafx.animation

Examples of javafx.animation.AnimationTimer


    @Override public void init() {
        control       = SimpleIndicatorBuilder.create().indicatorStyle(SimpleIndicator.IndicatorStyle.CYAN).build();
        toggle        = false;
        lastTimerCall = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(final long NOW) {
                if (NOW > lastTimerCall + 1_000_000_000l) {
                    toggle ^= true;                   
                    if (toggle) {
                        //control.getStyleClass().setAll("indicator", SimpleIndicator.STYLE_CLASS_PURPLE);
View Full Code Here


                              .ledColor(Color.CYAN)
                              //.needleColor(Color.PURPLE)
                              .build();

        lastTimerCall = System.nanoTime() + 2_000_000_000l;
        timer = new AnimationTimer() {
            @Override public void handle(long now) {
                if (now > lastTimerCall + 5_000_000_000l) {
                    radial.setValue(RND.nextDouble() * 100);
                    lastTimerCall = now;
                }
View Full Code Here

                                              .unit("Dark")
                                              .style("-body: black; -tick-mark-fill: white; -tick-label-fill: white;")
                                              .build();

        lastTimerCall = System.nanoTime() + 50_000_000l;
        timer = new AnimationTimer() {
            @Override public void handle(long now) {
                if (now > lastTimerCall + 2_000_000_000l) {
                    leftControl.setValue(RND.nextDouble() * 100);
                    rightControl.setValue(RND.nextDouble() * 100);
                    lastTimerCall = now;
View Full Code Here

        alarmsToRemove = new ArrayList<>();
        initialized    = false;
        firstTime      = true;
        keepAspect     = true;
        lastTimerCall  = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(final long NOW) {
                if (NOW > lastTimerCall + 1_000_000_000l) {
                    time.set(LocalDateTime.now(clock.get()));
                    lastTimerCall = NOW;
                }
View Full Code Here

        control.addEventHandler(ValueEvent.VALUE_EXCEEDED, valueEvent -> System.out.println("exceeded"));

        charge = 0.0;
        styleClassCounter = 0;
        lastTimerCall = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(long now) {
                if (now > lastTimerCall + 5_000_000_000l) {
                    styleClassCounter ++;
                    if (styleClassCounter >= STYLE_CLASSES.length) {
                        styleClassCounter = 0;
View Full Code Here

                                       .prefWidth(64)
                                       .prefHeight(64)
                                       .build();
        toggle             = false;
        lastTimerCall      = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(long now) {
                if (now > lastTimerCall + 500_000_000l) {
                    toggle ^= true;
                    led.setOn(toggle);
                    lastTimerCall = now;
View Full Code Here

        minLeft    = SplitFlapBuilder.create().prefWidth(200).prefHeight(343).flipTime(300).selection(SplitFlap.TIME_0_TO_5).textColor(Color.WHITESMOKE).build();
        minRight   = SplitFlapBuilder.create().prefWidth(200).prefHeight(343).flipTime(300).selection(SplitFlap.TIME_0_TO_9).textColor(Color.WHITESMOKE).build();
        secLeft    = SplitFlapBuilder.create().prefWidth(200).prefHeight(343).flipTime(300).selection(SplitFlap.TIME_0_TO_5).textColor(Color.WHITESMOKE).build();
        secRight   = SplitFlapBuilder.create().prefWidth(200).prefHeight(343).flipTime(300).selection(SplitFlap.TIME_0_TO_9).textColor(Color.WHITESMOKE).build();
        lastTimerCall = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(long now) {
                if (now > lastTimerCall + 500_000_000l) {
                    String day = WEEK_DAYS[LocalDateTime.now().getDayOfWeek().getValue()];
                    if (day.equals("SAT") || day.equals("SUN")) {
                        if (!dayLeft.getTextColor().equals(Color.CRIMSON)) {
View Full Code Here

    @Override public void init() {               
        control = new SplitFlap();
        control.setSelection(SplitFlap.ALPHANUMERIC);
        control.setFlipTime(100);
        lastTimerCall = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(long now) {
                if (now > lastTimerCall + 1_000_000_000l) {
                    //control.setText(Integer.toString(RND.nextInt(9)));
                    control.textProperty().set(Integer.toString(RND.nextInt(9)));
                    lastTimerCall = now;
View Full Code Here

        previousSelectionIndex = selectedSet.size() - 1;
        rotateFlap = new Rotate(0, Rotate.X_AXIS);
        flipTime = Duration.millis(100);
        flipping = false;
        angleStep = 180.0 / ((flipTime.toMillis() * 1_000_000) / (MIN_FLIP_TIME));
        timer = new AnimationTimer() {
            @Override public void handle(long now) { flip(angleStep); }
        };
        init();
        initGraphics();
        registerListeners();
View Full Code Here

                                                        .stop(1.0)
                                                        .styleClass("led-section-2")
                                                        .build())
                                .build();       
        lastTimerCall = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(final long NOW) {
                if (NOW > lastTimerCall + 100_000_000l) {
                    control.setValue(RND.nextDouble());                   
                    lastTimerCall = NOW;
                }
View Full Code Here

TOP

Related Classes of javafx.animation.AnimationTimer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.