当前位置: 首页>>代码示例>>Java>>正文


Java TimelineBuilder类代码示例

本文整理汇总了Java中javafx.animation.TimelineBuilder的典型用法代码示例。如果您正苦于以下问题:Java TimelineBuilder类的具体用法?Java TimelineBuilder怎么用?Java TimelineBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TimelineBuilder类属于javafx.animation包,在下文中一共展示了TimelineBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: bindUpdates

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
private void bindUpdates() {
    final KeyFrame oneFrame = new KeyFrame(Duration.seconds(1), (ActionEvent evt) -> {
        if (this.batpack != null) {
            this.batpack = BatteryMonitorSystem.getBatpack();
            //System.out.println("layout: battery pack module 5 cell 5 voltage: " + batpack.getModules().get(4).getBatteryCells().get(4).getVoltageAsString());
            checkConnection();
            updateModules();
            updateTotalVoltage();
            updateMaxTemperature();
            updateCriticalValues();
        }

    });
    Timeline timer = TimelineBuilder.create().cycleCount(Animation.INDEFINITE).keyFrames(oneFrame).build();
    timer.playFromStart();
}
 
开发者ID:de-sach,项目名称:BatpackJava,代码行数:17,代码来源:batteryMonitorLayoutController.java

示例2: showLoading

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
private void showLoading() {
    final KeyFrame oneFrame = new KeyFrame(Duration.millis(750), (ActionEvent evt) -> {
           loading.setText(getNextLoadingText());
           //bms.setText(getNextBmsText());
    });
    Timeline timer = TimelineBuilder.create().cycleCount(Animation.INDEFINITE).keyFrames(oneFrame).build();
    timer.playFromStart();
}
 
开发者ID:de-sach,项目名称:BatpackJava,代码行数:9,代码来源:SplashScreenController.java

示例3: FlashTransition

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
/**
 * Create new FlashTransition
 *
 * @param node The node to affect
 */
public FlashTransition(final Node node) {
    super(
            node,
            TimelineBuilder.create()
                    .keyFrames(
                            new KeyFrame(Duration.millis(0),    new KeyValue(node.opacityProperty(), 1, WEB_EASE)),
                            new KeyFrame(Duration.millis(250),  new KeyValue(node.opacityProperty(), 0, WEB_EASE)),
                            new KeyFrame(Duration.millis(500),  new KeyValue(node.opacityProperty(), 1, WEB_EASE)),
                            new KeyFrame(Duration.millis(750),  new KeyValue(node.opacityProperty(), 0, WEB_EASE)),
                            new KeyFrame(Duration.millis(1000),  new KeyValue(node.opacityProperty(), 1, WEB_EASE))
                    )
                    .build()
    );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:22,代码来源:FlashTransition.java

示例4: takeHit

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
public void takeHit() {
    if (!invincible) {
        if (!small) {
            setSmall();
            invincible = true;
            getNode().setOpacity(0.5);
            TimelineBuilder.create()
                    .keyFrames(new KeyFrame(Duration.seconds(1), new EventHandler<ActionEvent>() {
                        @Override
                        public void handle(ActionEvent t) {
                            invincible = false;
                            getNode().setOpacity(1);
                        }
                    }))
                    .build()
                    .play();
        } else {
            state = new Dead(this);
        }
    }
}
 
开发者ID:svanimpe,项目名称:fx-jumpman,代码行数:22,代码来源:Jumpman.java

示例5: run

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
public void run()
{
    _isRunning = true;

    final Duration oneFrameAmt = Duration.millis(1000 / _fps);
    final KeyFrame oneFrame = new KeyFrame(oneFrameAmt,
            new EventHandler<ActionEvent>()
            {
                @Override
                public void handle(ActionEvent event)
                {
                    _update();
                }
            }
    );

    _loop = TimelineBuilder.create().cycleCount(Animation.INDEFINITE).keyFrames(oneFrame).build();

    play();
}
 
开发者ID:tonybeltramelli,项目名称:Connected-Mind-Neural-Network,代码行数:21,代码来源:Engine.java

示例6: FlipInXTransition

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
/**
 * Create new FlipInXTransition
 * 
 * @param node The node to affect
 */
public FlipInXTransition(final Node node) {
    super(
        node,
        TimelineBuilder.create()
            .keyFrames(
                new KeyFrame(Duration.millis(0), 
                    new KeyValue(node.rotateProperty(), -90, WEB_EASE),
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(400), 
                    new KeyValue(node.rotateProperty(), 10, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(700), 
                    new KeyValue(node.rotateProperty(), -10, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000), 
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE),
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE)
                )
            )
            .build()
        );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
开发者ID:adv0r,项目名称:botcoin,代码行数:31,代码来源:FlipInXTransition.java

示例7: ShakeTransition

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
/**
 * Create new ShakeTransition
 * 
 * @param node The node to affect
 */
public ShakeTransition(final Node node) {
    super(
        node,
        TimelineBuilder.create()
            .keyFrames(
                new KeyFrame(Duration.millis(0), new KeyValue(node.translateXProperty(), 0, WEB_EASE)),
                new KeyFrame(Duration.millis(100), new KeyValue(node.translateXProperty(), -10, WEB_EASE)),
                new KeyFrame(Duration.millis(200), new KeyValue(node.translateXProperty(), 10, WEB_EASE)),
                new KeyFrame(Duration.millis(300), new KeyValue(node.translateXProperty(), -10, WEB_EASE)),
                new KeyFrame(Duration.millis(400), new KeyValue(node.translateXProperty(), 10, WEB_EASE)),
                new KeyFrame(Duration.millis(500), new KeyValue(node.translateXProperty(), -10, WEB_EASE)),
                new KeyFrame(Duration.millis(600), new KeyValue(node.translateXProperty(), 10, WEB_EASE)),
                new KeyFrame(Duration.millis(700), new KeyValue(node.translateXProperty(), -10, WEB_EASE)),
                new KeyFrame(Duration.millis(800), new KeyValue(node.translateXProperty(), 10, WEB_EASE)),
                new KeyFrame(Duration.millis(900), new KeyValue(node.translateXProperty(), -10, WEB_EASE)),
                new KeyFrame(Duration.millis(1000), new KeyValue(node.translateXProperty(), 0, WEB_EASE))
            )
            .build()
        );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
开发者ID:adv0r,项目名称:botcoin,代码行数:28,代码来源:ShakeTransition.java

示例8: starting

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
@Override protected void starting() {
    double startY = -node.localToScene(0, 0).getY() -node.getBoundsInParent().getHeight();
    timeline = TimelineBuilder.create()
            .keyFrames(
                new KeyFrame(Duration.millis(0),    
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                    new KeyValue(node.translateYProperty(), startY, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(600),    
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                    new KeyValue(node.translateYProperty(), 30, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(800),    
                    new KeyValue(node.translateYProperty(), -10, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000),    
                    new KeyValue(node.translateYProperty(), 0, WEB_EASE)
                )
            )
            .build();
    super.starting();
}
 
开发者ID:adv0r,项目名称:botcoin,代码行数:23,代码来源:BounceInDownTransition.java

示例9: FlipOutXTransition

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
/**
 * Create new FlipOutXTransition
 * 
 * @param node The node to affect
 */
public FlipOutXTransition(final Node node) {
    super(
        node,
        TimelineBuilder.create()
            .keyFrames(
                new KeyFrame(Duration.millis(0), 
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE),
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000), 
                    new KeyValue(node.rotateProperty(), -90, WEB_EASE),
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE)
                )
            )
            .build()
        );
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
开发者ID:adv0r,项目名称:botcoin,代码行数:25,代码来源:FlipOutXTransition.java

示例10: RotateOutTransition

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
/**
 * Create new RotateOutTransition
 * 
 * @param node The node to affect
 */
public RotateOutTransition(final Node node) {
    super(
        node,
        TimelineBuilder.create()
            .keyFrames(
                new KeyFrame(Duration.millis(0),    
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 0, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000),    
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                    new KeyValue(node.rotateProperty(), 200, WEB_EASE)
                )
            )
            .build());
    setCycleDuration(Duration.seconds(1));
    setDelay(Duration.seconds(0.2));
}
 
开发者ID:adv0r,项目名称:botcoin,代码行数:24,代码来源:RotateOutTransition.java

示例11: starting

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
@Override protected void starting() {
    double endX = -node.localToScene(0, 0).getX() -node.getBoundsInParent().getWidth();
    timeline = TimelineBuilder.create()
            .keyFrames(
                new KeyFrame(Duration.millis(0),    
                    new KeyValue(node.translateXProperty(), 0, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(200),    
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                    new KeyValue(node.translateXProperty(), 20, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000),    
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                    new KeyValue(node.translateXProperty(), endX, WEB_EASE)
                )
            )
            .build();
    super.starting();
}
 
开发者ID:adv0r,项目名称:botcoin,代码行数:20,代码来源:BounceOutLeftTransition.java

示例12: starting

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
@Override protected void starting() {
    double endX = node.getScene().getWidth() - node.localToScene(0, 0).getX();
    timeline = TimelineBuilder.create()
            .keyFrames(
                new KeyFrame(Duration.millis(0),    
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                    new KeyValue(node.translateXProperty(), 0, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000),    
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                    new KeyValue(node.translateXProperty(), endX, WEB_EASE)
                )
            )
            .build();
    super.starting();
}
 
开发者ID:adv0r,项目名称:botcoin,代码行数:17,代码来源:FadeOutRightBigTransition.java

示例13: starting

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
@Override protected void starting() {
    double endX = -node.localToScene(0, 0).getX() -node.getBoundsInParent().getWidth();
    timeline = TimelineBuilder.create()
            .keyFrames(
                new KeyFrame(Duration.millis(0),    
                    new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                    new KeyValue(node.translateXProperty(), 0, WEB_EASE)
                ),
                new KeyFrame(Duration.millis(1000),    
                    new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                    new KeyValue(node.translateXProperty(), endX, WEB_EASE)
                )
            )
            .build();
    super.starting();
}
 
开发者ID:adv0r,项目名称:botcoin,代码行数:17,代码来源:FadeOutLeftBigTransition.java

示例14: starting

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
@Override protected void starting() {
    super.starting();
    rotate = new Rotate(0,0,node.getBoundsInLocal().getHeight());
    timeline = TimelineBuilder.create()
        .keyFrames(
            new KeyFrame(Duration.millis(0),    
                new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                new KeyValue(rotate.angleProperty(), -90, WEB_EASE)
            ),
            new KeyFrame(Duration.millis(1000),    
                new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 0, WEB_EASE)
            )
        )
        .build();
    node.getTransforms().add(rotate);
}
 
开发者ID:adv0r,项目名称:botcoin,代码行数:18,代码来源:RotateInDownLeftTransition.java

示例15: starting

import javafx.animation.TimelineBuilder; //导入依赖的package包/类
@Override protected void starting() {
    super.starting();
    rotate = new Rotate(0,
            node.getBoundsInLocal().getWidth(),
            node.getBoundsInLocal().getHeight());
    timeline = TimelineBuilder.create()
        .keyFrames(
            new KeyFrame(Duration.millis(0),    
                new KeyValue(node.opacityProperty(), 0, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 90, WEB_EASE)
            ),
            new KeyFrame(Duration.millis(1000),    
                new KeyValue(node.opacityProperty(), 1, WEB_EASE),
                new KeyValue(rotate.angleProperty(), 0, WEB_EASE)
            )
        )
        .build();
    node.getTransforms().add(rotate);
}
 
开发者ID:adv0r,项目名称:botcoin,代码行数:20,代码来源:RotateInDownRightTransition.java


注:本文中的javafx.animation.TimelineBuilder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。