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


Java FadeTransition.setDuration方法代碼示例

本文整理匯總了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();
}
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:22,代碼來源:ControllerLayoutNome.java

示例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();
}
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:25,代碼來源:ControllerLayoutPrincipal.java

示例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();
}
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:19,代碼來源:ControllerLayoutCMPergunta.java

示例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();
}
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:23,代碼來源:ControllerLayoutInicial.java

示例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();
}
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:20,代碼來源:ControllerLayoutRanking.java

示例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();
  }
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:23,代碼來源:ControllerLayoutTelaRegras.java

示例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();
}
 
開發者ID:Naoghuman,項目名稱:SokubanFX,代碼行數:26,代碼來源:PreviewPresenter.java

示例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();
}
 
開發者ID:Naoghuman,項目名稱:SokubanFX,代碼行數:21,代碼來源:ApplicationPresenter.java

示例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);
    }
}
 
開發者ID:Simego,項目名稱:FXImgurUploader,代碼行數:26,代碼來源:RadialMenu.java

示例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();
}
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:12,代碼來源:ControllerLayoutNome.java

示例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();
}
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:13,代碼來源:ControllerLayoutPrincipal.java

示例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();
}
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:9,代碼來源:ControllerLayoutCMPergunta.java

示例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();
  }
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:9,代碼來源:ControllerLayoutTelaCreditos.java

示例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();
}
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:12,代碼來源:ControllerLayoutInicial.java

示例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();
  }
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:9,代碼來源:ControllerLayoutTelaVencedor.java


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