public void hidePopup() { myPopupStage.hide(); popupBinding.unsubscribe(); popupBinding = () -> {}; }
@Override public Parent loadAndShow(String name) { final Parent parent = (Parent) load(name); final Stage stage = requireNonNull(userInterfaceComponent.getStage()); final Scene scene = new Scene(parent); stage.hide(); BrandUtil.applyBrand(injector, stage, scene); stage.setScene(scene); WindowSettingUtil.applySaveOnCloseMethod(stage, name); if ("Scene".equals(name)) { WindowSettingUtil.applyStoredDisplaySettings(stage, name); } stage.show(); return parent; }
import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.TextField; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class EmbeddedSample extends Application { @Override public void start(Stage stage) { stage.setScene(new Scene(new StackPane(new TextField("xyzzy")), 200, 100)); stage.getScene().setOnMouseClicked(e -> stage.hide()); stage.show(); } public static void main(String[] args) { launch(args); } }
@Override public void handle(final ActionEvent arg0) { stage.hide(); } })
/** * {@inheritDoc} */ @Override public void run() { _stage.hide(); }
@FXML public void handleSysTryAction(ActionEvent event) { Stage stage = (Stage) button.getScene().getWindow(); createDummyStage(); stage.hide(); }
public void dispose() { this.popupWindow.hide(); } }
secondaryStage.hide();
Stage st = (Stage) loginbutton.getScene().getWindow(); st.hide(); try { showFxml(filex); } catch (Exception exp) { System.out.println("file loading problem "+exp); }
/** * Hides this {@code MOTDDialog} and marks its {@link MOTD} as read using * {@link MOTD#markAsRead()} */ private void hide() { try { motd.markAsRead(); stage.hide(); } catch (ClassNotFoundException | IOException e) { FOKLogger.log(MOTDDialog.class.getName(), Level.SEVERE, FOKLogger.DEFAULT_ERROR_TEXT, e); } }
// can use an Alert, Dialog, or PopupWindow as needed... Stage popup = new Stage(); // configure UI for popup etc... // hide popup after 3 seconds: PauseTransition delay = new PauseTransition(Duration.seconds(3)); delay.setOnFinished(e -> popup.hide()); popup.show(); delay.play();
final Stage stage = new Stage(); stage.setScene(new Scene(new Label("Hello"))); stage.show(); Timeline timeline = new Timeline(); timeline.getKeyFrames().add(new KeyFrame(Duration.seconds(10), new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { stage.hide(); } })); timeline.play();
public void run() { if (visible) { stage.show(); canvas.requestFocus(); } else { stage.hide(); } } });
public void setDockFeedbackInvisible() { if (dockFeedbackPopup.isShowing()) { dockFeedbackPopup.hide(); if (dockFadeTransition != null) { dockFadeTransition.stop(); } } }
Stage firstStage = ... ; Stage secondStage = new Stage(); // secondStage.initOwner(firstStage); firstStage.addEventHandler(WindowEvent.WINDOW_HIDDEN, evt -> secondStage.hide()); // ...
private void handleEvent(HideDialogEvent e) { final Stage stage = e.getStage(); makeCentralPaneLighter(); Platform.runLater(() -> stage.hide()); }
public void changeStage(Stage stage) throws IOException { GiantsAdminController controller = new GiantsAdminController("Hello World!"); FXMLLoader loader = new FXMLLoader(getClass().getResource("GiantsAdmin.fxml")); loader.setController(controller); stage.hide(); stage.setScene(new Scene((Pane) loader.load())); stage.show(); }
/** * Sends a tweet using the {@link NewTweetService}. */ private CompletionStage<Void> sendTweet() { Stream.of(tweetTextArea, sendButton, pickMediaButton).forEach(ctr -> ctr.setDisable(true)); return newTweetService.sendTweet(tweetTextArea.getText(), mediasToUpload) .thenAcceptAsync(status -> { LOG.info("Tweeted status : {} [{}]", status.getId(), status.getText()); this.embeddingStage.getValue().hide(); }, Platform::runLater); }
private void applicationReady() { FadeTransition ft = new FadeTransition(Duration.millis(500), preloaderStage.getScene().getRoot()); ft.setFromValue(1.0); ft.setToValue(0.0); ft.setOnFinished(e -> { preloaderStage.hide(); }); ft.play(); }