List of usage examples for javafx.util Duration millis
double millis
To view the source code for javafx.util Duration millis.
Click Source Link
From source file:org.sleuthkit.autopsy.timeline.ui.detailview.EventNodeBase.java
void animateTo(double xLeft, double yTop) { if (timeline != null) { timeline.stop();//from w ww .j av a2 s. c o m Platform.runLater(this::requestChartLayout); } timeline = new Timeline(new KeyFrame(Duration.millis(100), new KeyValue(layoutXProperty(), xLeft), new KeyValue(layoutYProperty(), yTop))); timeline.setOnFinished(finished -> Platform.runLater(this::requestChartLayout)); timeline.play(); }
From source file:org.sociotech.unui.javafx.engine2d.AbstractWorld.java
private void initEventLoop() { final Duration fps = Duration.millis(1000 / (float) 60); final KeyFrame eventLoop = new KeyFrame(fps, new EventHandler<ActionEvent>() { public void handle(ActionEvent event) { // destroy entities on list getEntityManager().destroy(); updateEntities();//from www .j a va2 s . co m updateFps(); onPostUpdate(m_fps); } }); // Create Loop TimelineBuilder builder = TimelineBuilder.create(); builder.cycleCount(Animation.INDEFINITE); builder.keyFrames(eventLoop); m_eventLoop = builder.build(); }
From source file:uk.bl.dpt.qa.gui.DissimilarGUIThread.java
/** * Convenience method to run after a GUI update thread (i.e. fade progress indicator) */// w ww. jav a 2s. c o m private void internalAfterGUIThread() { internalDisableInterface(false); Platform.runLater(new Runnable() { //@Override public void run() { FadeTransition fade = new FadeTransition(Duration.millis(gFadeDelayMS), progressIndicator); fade.setFromValue(1); fade.setToValue(0); fade.play(); } }); }
From source file:view.EditorView.java
private void compassImageFadeOut() { FadeTransition ft = new FadeTransition(Duration.millis(250), compassImage); ft.setFromValue(compassImage.getOpacity()); ft.setToValue(0.2);/*from w w w . j a va2 s .com*/ ft.setAutoReverse(false); ft.play(); }
From source file:view.EditorView.java
private void compassImageFadeIn() { FadeTransition ft = new FadeTransition(Duration.millis(250), compassImage); ft.setFromValue(compassImage.getOpacity()); ft.setAutoReverse(false);/* www . ja v a 2s.c o m*/ ft.setToValue(0.5); ft.play(); }
From source file:Watcher.FXMLDocumentController.java
@FXML protected void addSite(ActionEvent event) { addSitePane.setVisible(true);/*from w w w. ja v a 2 s. c o m*/ RotateTransition rt = new RotateTransition(Duration.millis(200), addSitePane); rt.setFromAngle(180); rt.setToAngle(0); rt.setCycleCount(1); rt.setInterpolator(Interpolator.EASE_IN); fadeout(true); rt.play(); }
From source file:Watcher.FXMLDocumentController.java
@FXML protected void cancelSiteAdd(MouseEvent event) { RotateTransition rt = new RotateTransition(Duration.millis(200), addSitePane); rt.setFromAngle(0);/*from w w w. j ava 2 s .c om*/ rt.setToAngle(180); rt.setCycleCount(1); rt.setInterpolator(Interpolator.EASE_OUT); rt.setOnFinished(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent t) { addSitePane.setVisible(false); fadeout(false); } }); rt.play(); }
From source file:Watcher.FXMLDocumentController.java
private void fadeout(boolean inpB) { if (inpB) {/*from w ww . ja va 2 s . c o m*/ javafx.animation.FadeTransition ft = new FadeTransition(Duration.millis(200), fadeOutPane); ft.setCycleCount(1); ft.setFromValue(0); ft.setToValue(0.7); fadeOutPane.setVisible(true); ft.play(); } else { javafx.animation.FadeTransition ft = new FadeTransition(Duration.millis(200), fadeOutPane); ft.setCycleCount(1); ft.setFromValue(0.7); ft.setToValue(0); ft.play(); fadeOutPane.setVisible(false); } }