Package javafx.animation

Examples of javafx.animation.AnimationTimer


        ticks      = new ArrayList<>(60);
        tickLabels = new ArrayList<>(12);

        timeline = new Timeline();
        timer = new AnimationTimer() {
            @Override public void handle(final long NOW) {
                if (NOW >= lastTimerCall + INTERVAL) {
                    updateTime(LocalDateTime.now().plus(getSkinnable().getOffset()));                   
                    lastTimerCall = NOW;
                }
View Full Code Here


        alarm         = new SimpleObjectProperty<>(LocalTime.now().minusMinutes(1));
        dateVisible   = new SimpleBooleanProperty(this, "dateVisible", false);
        alarmVisible  = new SimpleBooleanProperty(this, "alarmVisible", false);
        time          = new StringBuilder();
        lastTimerCall = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(long now) {
                if (now > lastTimerCall + 100_000_000l) {
                    time.setLength(0);
                    pm    = LocalTime.now().get(ChronoField.AMPM_OF_DAY) == 1;
                    hours = LocalTime.now().getHour();
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

                                  //.textColor(Color.WHITESMOKE)
                                  //.withFixture(false)
                                  //.darkFixture(false)
                                  .build();
        start = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(long now) {
                if (now > start + 2_000_000_000l) {
                    control.setText("X");
                }
            }
View Full Code Here

    // ******************** Constructors **************************************
    public Led() {
        getStyleClass().add("led");
        toggle        = false;
        lastTimerCall = System.nanoTime();
        timer         = new AnimationTimer() {
            @Override public void handle(final long NOW) {
                if (NOW > lastTimerCall + getInterval()) {
                    toggle ^= true;
                    setOn(toggle);
                    lastTimerCall = NOW;
View Full Code Here

        _frameVisible = FRAME_VISIBLE;
        _interval     = INTERVAL;
        _blinking     = BLINKING;
        toggle        = false;
        lastTimerCall = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(final long NOW) {
                if (NOW > lastTimerCall + getInterval()) {
                    toggle ^= true;
                    setOn(toggle);
                    lastTimerCall = NOW;
View Full Code Here

        //stops.add(new Stop(0.69, Color.YELLOW));
        stops.add(new Stop(1.0, Color.RED));
        control.setBarGradient(stops);

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

                                  .character(0)
                                  .segmentStyle(SevenSegment.SegmentStyle.RED)
                                  .build();

        lastTimerCall = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(long now) {
                if (now > lastTimerCall + 5_000_000_000l) {
                    double v = RND.nextDouble() * 20.0 + 10.0;

                    if (Double.compare(v, 10) > 0 && Double.compare(v, 16) <= 0) {
View Full Code Here

        //marker0.setOnMarkerUnderrun(observable -> System.out.println("Marker underrun"));
        control.addMarker(marker0);


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

                                        .styleClass(SimpleGauge.STYLE_CLASS_GREEN_TO_RED_10)
                                        .build();


        lastTimerCall = System.nanoTime() + 2_000_000_000l;
        timer = new AnimationTimer() {
            @Override public void handle(long now) {
                if (now > lastTimerCall + 5_000_000_000l) {
                    thermoMeter.setValue(RND.nextDouble() * 100);
                    wattMeter.setValue(RND.nextDouble() * 100);
                    energyMeter.setValue(RND.nextDouble() * 100);
 
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.