本文整理匯總了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;
}
}
示例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;
}
}
示例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();
}
示例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( ">" );
}
});
}
示例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;
}
}
示例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;
}
}
示例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( ">" );
}
});
}