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


Java Timeline.playFromStart方法代码示例

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


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

示例1: bindUpdates

import javafx.animation.Timeline; //导入方法依赖的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.Timeline; //导入方法依赖的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: startPanAnimation

import javafx.animation.Timeline; //导入方法依赖的package包/类
private void startPanAnimation(double velocity, Timeline timeline, DoubleProperty animatedPan, DoubleProperty pan) {
    if (isRunning(timeline)) {
        return;
    }
    double durationInMillis = 1e10;
    double distance = velocity * durationInMillis;
    animatedPan.set(pan.get());
    KeyValue keyValue = new KeyValue(animatedPan, animatedPan.get() - distance);
    KeyFrame keyFrame = new KeyFrame(Duration.millis(durationInMillis), keyValue);
    timeline.getKeyFrames().setAll(keyFrame);
    timeline.playFromStart();
}
 
开发者ID:rmfisher,项目名称:fx-animation-editor,代码行数:13,代码来源:DragBehavior.java

示例4: addSampleEditorTab

import javafx.animation.Timeline; //导入方法依赖的package包/类
private void addSampleEditorTab() {
    Timeline sample = new Timeline(new KeyFrame(Duration.ONE, event -> createAndAddNewEditorTab(new File(Utils.getDefaultFileName()), Utils.getSampleText())));
    sample.playFromStart();
}
 
开发者ID:jdesive,项目名称:textmd,代码行数:5,代码来源:TabFactory.java

示例5: timelineController

import javafx.animation.Timeline; //导入方法依赖的package包/类
private Timeline timelineController(){

		Timeline timeline = new Timeline();

		timeline.getKeyFrames().add(new KeyFrame(Duration.seconds(START_TIME), e -> eventHandle()));

		timeline.getKeyFrames().add(

				new KeyFrame(Duration.seconds(START_TIME),
						new KeyValue(timeSeconds, 0)));
		timeline.playFromStart();
		return timeline;
	}
 
开发者ID:LtubSalad,项目名称:voogasalad-ltub,代码行数:14,代码来源:Loader.java


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