Package javafx.animation

Examples of javafx.animation.AnimationTimer


                            final Tab tab = new Tab(xmppSession.getDomain());
                            tab.setContent(debugView);
                            tab.textProperty().bind(title);
                            connectionListenerMap.put(tab, connectionListener);

                            final AnimationTimer animationTimer = new AnimationTimer() {
                                @Override
                                public void handle(long now) {
                                    if (outputStreamIncoming != null) {
                                        String incoming = outputStreamIncoming.toString();
                                        if (!incoming.isEmpty()) {
                                            debugController.appendTextIncoming(incoming);
                                            outputStreamIncoming.reset();
                                        }
                                    }
                                    if (outputStreamOutgoing != null) {
                                        String outgoing = outputStreamOutgoing.toString();
                                        if (!outgoing.isEmpty()) {
                                            debugController.appendTextOutgoing(outgoing);
                                            outputStreamOutgoing.reset();
                                        }
                                    }
                                }
                            };
                            animationTimer.start();

                            tab.setOnClosed(new EventHandler<Event>() {
                                @Override
                                public void handle(Event event) {
                                    xmppSession.removeSessionStatusListener(connectionListenerMap.remove(tab));
                                    xmppSession.removePresenceListener(presenceListener);
                                    animationTimer.stop();
                                }
                            });

                            tabPane.getTabs().add(tab);
                            stage.show();
View Full Code Here


                                    //e.reject();

                                    final FileTransfer fileTransfer = e.accept(outputStream);
                                    fileTransfer.transfer();

                                    AnimationTimer animationTimer = new AnimationTimer() {
                                        @Override
                                        public void handle(long now) {
                                            System.out.println(fileTransfer.getProgress());
                                            if (fileTransfer.isDone()) {
                                                stop();
                                            }
                                        }
                                    };
                                    animationTimer.start();

                                } catch (IOException e1) {
                                    e1.printStackTrace();
                                }
                            }
View Full Code Here

        // create a spot light animation across the letters.
        final double spotlightRadius = 70;
        if (currentSpotlightAnim != null) {
            currentSpotlightAnim.stop();
        }
        currentSpotlightAnim = new AnimationTimer() {
            long startTime = System.currentTimeMillis();
            long duration = 0;
            double x = -spotlightRadius;
            @Override
            public void handle(long now) {
View Full Code Here

                              //.ledColor(Color.CYAN)
                              //.barColor(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) {
                    linear.setValue(RND.nextDouble() * 100);
                    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


    // ******************** Constructors **************************************
    public LedOne() {
        lastTimerCall = System.nanoTime();
        timer = new AnimationTimer() {
            @Override public void handle(final long NOW) {
                if (NOW > lastTimerCall + getInterval()) {
                    setOn(!isOn());
                    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

        };
        minValue          = new SimpleDoubleProperty(this, "minValue", 0);
        maxValue          = new SimpleDoubleProperty(this, "maxValue", 100);
        lastTimerCall     = System.nanoTime();
        animationDuration = 800;
        timer             = new AnimationTimer() {
            @Override public void handle(final long NOW) {
                if (NOW > lastTimerCall + LED_BLINK_INTERVAL) {
                    setLedOn(!isLedOn());
                    lastTimerCall = NOW;
                }
View Full Code Here

        super(CONTROL);
        ledList         = new ArrayList<>(getSkinnable().getNoOfLeds());
        stepSize        = new SimpleDoubleProperty(1.0 / getSkinnable().getNoOfLeds());
        lastTimerCall   = 0l;
        peakLedIndex    = 0;
        timer           = new AnimationTimer() {
            @Override public void handle(final long NOW) {
                if (NOW > lastTimerCall + PEAK_TIMEOUT) {
                    if (Double.compare(peakLedIndex * stepSize.doubleValue(), getSkinnable().getValue()) > 0) {
                        ledList.get(peakLedIndex).setOn(false);
                        peakLedIndex = 0;
View Full Code Here

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


        lastTimerCall = System.nanoTime() + 50_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

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.