本文整理匯總了Java中javafx.animation.FadeTransition.setDuration方法的典型用法代碼示例。如果您正苦於以下問題:Java FadeTransition.setDuration方法的具體用法?Java FadeTransition.setDuration怎麽用?Java FadeTransition.setDuration使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javafx.animation.FadeTransition
的用法示例。
在下文中一共展示了FadeTransition.setDuration方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: makeFadeOut
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
/**
* Método de efeito de transição de saída
*/
private void makeFadeOut(String path) {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(1);
fadeTransition.setToValue(0);
fadeTransition.setOnFinished(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
try {
loadScreenPlay(path);
} catch (IOException ex) {
Logger.getLogger(ControllerLayoutInicial.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
fadeTransition.play();
}
示例2: makeFadeOut
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
/**
* Método que inicia a view Inicial (MENU) e aplica estilos CSS nos botões
*/
@Autor("Divino Matheus")
private void makeFadeOut(String path) {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(1);
fadeTransition.setToValue(0);
fadeTransition.setOnFinished(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
try {
loadScreenPlay(path);
} catch (IOException ex) {
Logger.getLogger(ControllerLayoutInicial.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
fadeTransition.play();
}
示例3: makeFadeOut
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
private void makeFadeOut(String path) {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(1);
fadeTransition.setToValue(0);
fadeTransition.setOnFinished(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
try {
loadScreenPlay(path);
} catch (IOException ex) {
Logger.getLogger(ControllerLayoutInicial.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
fadeTransition.play();
}
示例4: makeFadeOut
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
/**
* Método para efeito de transição de saída
*/
private void makeFadeOut(String path) {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(1);
fadeTransition.setToValue(0);
fadeTransition.setOnFinished(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
try {
loadScreenPlay(path);
} catch (IOException ex) {
Logger.getLogger(ControllerLayoutInicial.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
fadeTransition.play();
}
示例5: makeFadeOut
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
private void makeFadeOut(String path) {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(1);
fadeTransition.setToValue(0);
fadeTransition.setOnFinished(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
try {
loadScreenPlay(path);
} catch (IOException ex) {
Logger.getLogger(ControllerLayoutInicial.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
fadeTransition.play();
}
示例6: makeFadeOut
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
/**
* Método para efeito de transição de saída
*/
private void makeFadeOut(String path) {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(1);
fadeTransition.setToValue(0);
fadeTransition.setOnFinished(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
try {
loadScreenPlay(path);
} catch (IOException ex) {
Logger.getLogger(ControllerLayoutInicial.class.getName()).log(Level.SEVERE, null, ex);
}
}
});
fadeTransition.play();
}
示例7: onActionNextRandomMap
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
private void onActionNextRandomMap() {
LoggerFacade.INSTANCE.debug(this.getClass(), "On action next random Map"); // NOI18N
final int randomMapIndex = MapFacade.INSTANCE.getRandomMapIndex();
final MapModel mm = MapFacade.INSTANCE.loadMap(randomMapIndex);
this.printMapToConsole(mm);
vbRandomMap.getChildren().clear();
vbRandomMap.setOpacity(0.0d);
vbRandomMap.getChildren().add(this.getLabel("Map: " + randomMapIndex)); // NOI18N
vbRandomMap.getChildren().add(this.getLabel("")); // NOI18N
final ObservableList<String> map = mm.getMapAsStrings();
map.stream().forEach(line -> {
vbRandomMap.getChildren().add(this.getLabel(line));
});
final FadeTransition ftShowNextRandomMap = new FadeTransition();
ftShowNextRandomMap.setDuration(Duration.millis(550.0d));
ftShowNextRandomMap.setFromValue(0.0d);
ftShowNextRandomMap.setToValue(1.0d);
ftShowNextRandomMap.setNode(vbRandomMap);
ftShowNextRandomMap.playFromStart();
}
示例8: showViewPreview
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
private void showViewPreview() {
LoggerFacade.INSTANCE.debug(this.getClass(), "Show view Preview"); // NOI18N
final PreviewView view = new PreviewView();
final PreviewPresenter presenter = view.getRealPresenter();
presenter.registerActions();
final Parent preview = view.getView();
preview.setOpacity(0.0d);
bpGameArea.setCenter(preview);
final FadeTransition ftHidePreviewView = new FadeTransition();
ftHidePreviewView.setDelay(Duration.millis(250.0d));
ftHidePreviewView.setDuration(Duration.millis(375.0d));
ftHidePreviewView.setFromValue(0.0d);
ftHidePreviewView.setToValue(1.0d);
ftHidePreviewView.setNode(preview);
ftHidePreviewView.playFromStart();
}
示例9: show
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
public void show() {
if (options.isButtonHideOnSelect() && mainMenuButton.getOpacity() > 0) {
return;
}
if (options.isButtonHideOnSelect() || mainMenuButton.getOpacity() == 0) {
mainMenuButton.setScaleX(1.0);
mainMenuButton.setScaleY(1.0);
cross.setRotate(0);
mainMenuButton.setRotate(0);
FadeTransition buttonFadeIn = new FadeTransition();
buttonFadeIn.setNode(mainMenuButton);
buttonFadeIn.setDuration(Duration.millis(200));
buttonFadeIn.setToValue(options.getButtonAlpha());
buttonFadeIn.play();
}
for (Parent node : items.keySet()) {
node.setScaleX(1.0);
node.setScaleY(1.0);
node.setTranslateX(0);
node.setTranslateY(0);
node.setRotate(0);
}
}
示例10: makeFadeInTransition
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
/**
* Método de efeito de transição de entrada
*/
private void makeFadeInTransition() {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(0);
fadeTransition.setToValue(1);
fadeTransition.play();
}
示例11: makeFadeInTransition
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
/**
* Método para aplicar efeito de transição
*/
@Autor("Divino Matheus")
private void makeFadeInTransition() {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(0);
fadeTransition.setToValue(1);
fadeTransition.play();
}
示例12: makeFadeInTransition
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
private void makeFadeInTransition() {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(0);
fadeTransition.setToValue(1);
fadeTransition.play();
}
示例13: makeFadeInTransition
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
private void makeFadeInTransition() {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(0);
fadeTransition.setToValue(1);
fadeTransition.play();
}
示例14: makeFadeInTransition
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
/**
* Método para efeito de transição de entrada
*/
private void makeFadeInTransition() {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(0);
fadeTransition.setToValue(1);
fadeTransition.play();
}
示例15: makeFadeInTransition
import javafx.animation.FadeTransition; //導入方法依賴的package包/類
private void makeFadeInTransition() {
FadeTransition fadeTransition = new FadeTransition();
fadeTransition.setDuration(Duration.millis(250));
fadeTransition.setNode(rootPane);
fadeTransition.setFromValue(0);
fadeTransition.setToValue(1);
fadeTransition.play();
}