當前位置: 首頁>>代碼示例>>Java>>正文


Java ParallelTransition.setCycleCount方法代碼示例

本文整理匯總了Java中javafx.animation.ParallelTransition.setCycleCount方法的典型用法代碼示例。如果您正苦於以下問題:Java ParallelTransition.setCycleCount方法的具體用法?Java ParallelTransition.setCycleCount怎麽用?Java ParallelTransition.setCycleCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.animation.ParallelTransition的用法示例。


在下文中一共展示了ParallelTransition.setCycleCount方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createWalletHideAnimation

import javafx.animation.ParallelTransition; //導入方法依賴的package包/類
private Animation createWalletHideAnimation() {
   	try {
   		FadeTransition fade = new FadeTransition(Duration.millis(1000), this.knownWalletDetailContainer);
   		fade.setFromValue(1.0);
   		fade.setToValue(0.0);
   		fade.setCycleCount(1);
   		
   		ScaleTransition scale = new ScaleTransition(Duration.millis(1000), this.knownWalletDetailContainer);
   		scale.setFromX(1.0);
   		scale.setToX(0.1);
   		scale.setFromY(1.0);
   		scale.setToY(0.1);
   		scale.setCycleCount(1);
   		
   		ParallelTransition parallel = new ParallelTransition();
   		parallel.getChildren().addAll(fade, scale);
   		parallel.setCycleCount(1);
   		
   		return parallel;		
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		return null;
	}    	
}
 
開發者ID:crypto-coder,項目名稱:firstlight,代碼行數:26,代碼來源:KnownWalletController.java

示例2: createWalletShowAnimation

import javafx.animation.ParallelTransition; //導入方法依賴的package包/類
private Animation createWalletShowAnimation() {
   	try {
   		FadeTransition fade = new FadeTransition(Duration.millis(1000), this.knownWalletDetailContainer);
   		fade.setFromValue(0.0);
   		fade.setToValue(1.0);
   		fade.setCycleCount(1);
   		
   		ScaleTransition scale = new ScaleTransition(Duration.millis(1000), this.knownWalletDetailContainer);
   		scale.setFromX(0.1);
   		scale.setToX(1.0);
   		scale.setFromY(0.1);
   		scale.setToY(1.0);
   		scale.setCycleCount(1);
   		
   		ParallelTransition parallel = new ParallelTransition();
   		parallel.getChildren().addAll(fade, scale);
   		parallel.setCycleCount(1);
   		
   		return parallel;		
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		return null;
	}    	
}
 
開發者ID:crypto-coder,項目名稱:firstlight,代碼行數:26,代碼來源:KnownWalletController.java

示例3: readyToGoAnimation

import javafx.animation.ParallelTransition; //導入方法依賴的package包/類
public void readyToGoAnimation() {
    // Buttons slide in and clickable address appears simultaneously.
    TranslateTransition arrive = new TranslateTransition(Duration.millis(1200), controlsBox);
    arrive.setInterpolator(new ElasticInterpolator(EasingMode.EASE_OUT, 1, 2));
    arrive.setToY(0.0);
    FadeTransition reveal = new FadeTransition(Duration.millis(1200), addressControl);
    reveal.setToValue(1.0);
    ParallelTransition group = new ParallelTransition(arrive, reveal);
    group.setDelay(NotificationBarPane.ANIM_OUT_DURATION);
    group.setCycleCount(1);
    group.play();
}
 
開發者ID:creativechain,項目名稱:creacoinj,代碼行數:13,代碼來源:MainController.java

示例4: initialize

import javafx.animation.ParallelTransition; //導入方法依賴的package包/類
@FXML
public void initialize() {
	
	TranslateTransition translateTransition =
            new TranslateTransition(Duration.millis(10000), background1);
	translateTransition.setFromX(0);
	translateTransition.setToX(-1 * BACKGROUND_WIDTH);
	translateTransition.setInterpolator(Interpolator.LINEAR);

	TranslateTransition translateTransition2 =
           new TranslateTransition(Duration.millis(10000), background2);
	translateTransition2.setFromX(0);
	translateTransition2.setToX(-1 * BACKGROUND_WIDTH);
	translateTransition2.setInterpolator(Interpolator.LINEAR);

	parallelTransition = 
		new ParallelTransition( translateTransition, translateTransition2 );
	parallelTransition.setCycleCount(Animation.INDEFINITE);

	//
	// Sets the label of the Button based on the animation state
	//
	parallelTransition.statusProperty().addListener((obs, oldValue, newValue) -> {
		if( newValue == Animation.Status.RUNNING ) {
			btnControl.setText( "||" );
		} else {
			btnControl.setText( ">" );
		}
	});
}
 
開發者ID:bekwam,項目名稱:examples-javafx-repos1,代碼行數:31,代碼來源:BackgroundController.java

示例5: createDefaultShowAnimation

import javafx.animation.ParallelTransition; //導入方法依賴的package包/類
private Animation createDefaultShowAnimation(Node nodeToShow) {
   	try {
   		//Make sure the node is in the proper disposition
   		nodeToShow.setOpacity(0.0);
   		nodeToShow.setScaleX(0.9);
   		nodeToShow.setScaleY(0.9);
   		
   		//Create and set the animations
   		FadeTransition fade = new FadeTransition(Duration.millis(500), nodeToShow);
   		fade.setFromValue(0.0);
   		fade.setToValue(1.0);
   		fade.setCycleCount(1);
   		
   		ScaleTransition scale = new ScaleTransition(Duration.millis(500), nodeToShow);
   		scale.setFromX(0.9);
   		scale.setToX(1.0);
   		scale.setFromY(0.9);
   		scale.setToY(1.0);
   		scale.setCycleCount(1);
   		
   		ParallelTransition parallel = new ParallelTransition();
   		parallel.getChildren().addAll(fade, scale);
   		parallel.setCycleCount(1);
   		
   		return parallel;		
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		return null;
	}    	
}
 
開發者ID:crypto-coder,項目名稱:firstlight,代碼行數:32,代碼來源:ApplicationShellController.java

示例6: createDefaultHideAnimation

import javafx.animation.ParallelTransition; //導入方法依賴的package包/類
private Animation createDefaultHideAnimation(Node nodeToHide) {
   	try {
   		//Make sure the node is in the proper disposition
   		nodeToHide.setOpacity(1.0);
   		nodeToHide.setScaleX(1.0);
   		nodeToHide.setScaleY(1.0);
   		
   		//Create and set the animations
   		FadeTransition fade = new FadeTransition(Duration.millis(500), nodeToHide);
   		fade.setFromValue(1.0);
   		fade.setToValue(0.0);
   		fade.setCycleCount(1);
   		
   		ScaleTransition scale = new ScaleTransition(Duration.millis(500), nodeToHide);
   		scale.setFromX(1.0);
   		scale.setToX(0.9);
   		scale.setFromY(1.0);
   		scale.setToY(0.9);
   		scale.setCycleCount(1);
   		
   		ParallelTransition parallel = new ParallelTransition();
   		parallel.getChildren().addAll(fade, scale);
   		parallel.setCycleCount(1);
   		
   		return parallel;		
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		return null;
	}    	
}
 
開發者ID:crypto-coder,項目名稱:firstlight,代碼行數:32,代碼來源:ApplicationShellController.java

示例7: initialize

import javafx.animation.ParallelTransition; //導入方法依賴的package包/類
@FXML
public void initialize() {
	
	TranslateTransition background1Transition =
            new TranslateTransition(Duration.millis(8000), background1);
	background1Transition.setFromX(0);
	background1Transition.setToX(-1 * BACKGROUND_WIDTH);
	background1Transition.setInterpolator(Interpolator.LINEAR);

	TranslateTransition background2Transition =
           new TranslateTransition(Duration.millis(8000), background2);
	background2Transition.setFromX(0);
	background2Transition.setToX(-1 * BACKGROUND_WIDTH);
	background2Transition.setInterpolator(Interpolator.LINEAR);

	ParallelTransition backgroundWrapper = new ParallelTransition(
			background1Transition, background2Transition
			);
	backgroundWrapper.setCycleCount(Animation.INDEFINITE);
	
	TranslateTransition clouds1Transition =
            new TranslateTransition(Duration.millis(20000), clouds1);
	clouds1Transition.setFromX(0);
	clouds1Transition.setToX(-1 * BACKGROUND_WIDTH);
	clouds1Transition.setInterpolator(Interpolator.LINEAR);

	TranslateTransition clouds2Transition =
           new TranslateTransition(Duration.millis(20000), clouds2);
	clouds2Transition.setFromX(0);
	clouds2Transition.setToX(-1 * BACKGROUND_WIDTH);
	clouds2Transition.setInterpolator(Interpolator.LINEAR);

	ParallelTransition cloudsWrapper = new ParallelTransition(
			clouds1Transition, clouds2Transition
			);
	cloudsWrapper.setCycleCount(Animation.INDEFINITE);
	
	parallelTransition = 
		new ParallelTransition( backgroundWrapper,
								cloudsWrapper );

	parallelTransition.setCycleCount(Animation.INDEFINITE);

	//
	// Sets the label of the Button based on the animation state
	//
	parallelTransition.statusProperty().addListener((obs, oldValue, newValue) -> {
		if( newValue == Animation.Status.RUNNING ) {
			btnControl.setText( "||" );
		} else {
			btnControl.setText( ">" );
		}
	});
}
 
開發者ID:bekwam,項目名稱:examples-javafx-repos1,代碼行數:55,代碼來源:ImprovedBackgroundController.java


注:本文中的javafx.animation.ParallelTransition.setCycleCount方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。