當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。