Java Code Examples for javafx.stage.Stage#setIconified()
The following examples show how to use
javafx.stage.Stage#setIconified() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java From ApkToolPlus with Apache License 2.0 | 6 votes |
/** * 最小化 */ public void minimized() { Stage stage = (Stage) btnMinimized.getScene().getWindow(); if (stage.isMaximized()) { // 重置窗口大小 stage.setMaximized(false); stage.setWidth(Config.WINDOW_WIDTH); stage.setHeight(Config.WINDOW_HEIGHT); stage.centerOnScreen(); // 后台运行 Platform.runLater(() -> { stage.setIconified(true); }); } else { stage.setIconified(true); } }
Example 2
Source File: MultiplayerTray.java From mars-sim with GNU General Public License v3.0 | 6 votes |
private void createStage() { stage = new Stage(); // out stage will be translucent, so give it a transparent style. stage.initStyle(StageStyle.TRANSPARENT); //stage = multiplayerClient.getMainMenu().getStage(); // create the layout for the javafx stage. StackPane layout = new StackPane(createContent()); layout.setStyle("-fx-background-color: rgba(255, 255, 255, 0.5);"); layout.setPrefSize(300, 200); layout.setOnMouseClicked(event -> stage.hide()); Scene scene = new Scene(layout); // a scene with a transparent fill is necessary to implement the translucent app window. scene.setFill(Color.TRANSPARENT); stage.setScene(scene); stage.setIconified(true); }
Example 3
Source File: FX.java From FxDock with Apache License 2.0 | 5 votes |
/** deiconify and toFront() */ public static void toFront(Stage w) { if(w.isIconified()) { w.setIconified(false); } w.toFront(); }
Example 4
Source File: StageModeTest.java From pdfsam with GNU Affero General Public License v3.0 | 5 votes |
@Test public void valueForDefault() { Stage stage = new Stage(); Scene scene = new Scene(new HBox()); stage.setScene(scene); stage.setMaximized(false); stage.setIconified(false); assertEquals(StageMode.DEFAULT, StageMode.valueFor(stage)); }
Example 5
Source File: UndecoratorController.java From DevToolBox with GNU Lesser General Public License v2.1 | 4 votes |
private void _minimize() { Stage stage = undecorator.getStage(); stage.setIconified(true); }