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


Java Stage.setIconified方法代碼示例

本文整理匯總了Java中javafx.stage.Stage.setIconified方法的典型用法代碼示例。如果您正苦於以下問題:Java Stage.setIconified方法的具體用法?Java Stage.setIconified怎麽用?Java Stage.setIconified使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.stage.Stage的用法示例。


在下文中一共展示了Stage.setIconified方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: minimize

import javafx.stage.Stage; //導入方法依賴的package包/類
/**
 * 
 * @param event 
 */
public void minimize(MouseEvent event) {
		Stage stage  = (Stage)this.ICON.getScene().getWindow();
	stage.setIconified(true);
}
 
開發者ID:ShekkarRaee,項目名稱:xpanderfx,代碼行數:9,代碼來源:MainFXMLDocumentController.java

示例2: minimize

import javafx.stage.Stage; //導入方法依賴的package包/類
@FXML
private void minimize(ActionEvent event) {
    Stage stage = (Stage) menuPane.getScene().getWindow();
    stage.setIconified(true);
}
 
開發者ID:de-sach,項目名稱:BatpackJava,代碼行數:6,代碼來源:batteryMonitorLayoutController.java

示例3: start

import javafx.stage.Stage; //導入方法依賴的package包/類
@Override
public void start(Stage primaryStage) throws InterruptedException {
    this.primaryStage = primaryStage;
    //Application starts
    //Load Configurations to memory
    TatConfigManager configManager = new TatConfigManager(config);
    try {
       configManager.loadConfigItem();
       DateUtil.importPublicHoliday();
    } catch (IOException ioe){
        ioe.printStackTrace();
    }catch (ClassNotFoundException ce){
        ce.printStackTrace();
    }
    //Setup Menu
    appMenu = new MenuCreator().createApplicationLevelMenu(this, primaryStage, fm, config);
    
    //Setup Toolbar
    appToolbar = new ToolBarCreator().createApplicationLevelToolBar(this, primaryStage, fm, config);
    
    //Setup application border pane
    applicationPane = new BorderPane();

    //Setup left panel SplitPane frame
    leftPanelSp = createLeftPanelSplitPane();
    leftPanelSp.setPrefWidth(330);
    leftUpperTabPane = new LeftUpperTabPane();
    leftBottomTabPane = new LeftBottomTabPane(this);
    leftPanelSp.getItems().addAll(leftUpperTabPane, leftBottomTabPane);
    
    /**
     * Initialize the chart tab pane for the drawing area.
     * This is the centralized area to display OHLC charts
     * If a new chart is opened, it will add a tab for this
     * OHLC that all the related indicator canvas will be
     * add into the same tab
     */
    chartTabPane = new ChartTabPane(this);
    
    applicationPane.setLeft(leftPanelSp);
    applicationPane.setCenter(chartTabPane);
    
    rightVBox = new VBox();
    rightVBox.setPrefWidth(40);
    Rectangle rect = new Rectangle();
    rect.setFill(Color.DARKCYAN);
    rect.widthProperty().bind(rightVBox.widthProperty());
    rect.heightProperty().bind(leftPanelSp.heightProperty());
    rightVBox.getChildren().addAll(rect);
    rightVBox.prefHeightProperty().bind(applicationPane.heightProperty());
    applicationPane.setRight(rightVBox);
    //Bottom Status Bars
    bottomStatusHBox = new HBox();
    Rectangle bottomRect = new Rectangle();
    bottomRect.setFill(Color.DARKCYAN);
    bottomRect.widthProperty().bind(applicationPane.widthProperty());
    bottomRect.setHeight(40);
    bottomStatusHBox.getChildren().add(bottomRect);
    applicationPane.setBottom(bottomStatusHBox);
    //Packup things
    VBox topBox = new VBox(appMenu, appToolbar);
    applicationPane.setTop(topBox); 
  
    Scene scene = new Scene(applicationPane, 880, 600);
    scene.getStylesheets().add("style/stylesheet.css");
    Image appIcon = new Image("icon/TAT_LOGO_BLUE.png");
    primaryStage.getIcons().add(appIcon);
    primaryStage.setIconified(true);
    primaryStage.setTitle("Technical Analysis Tool Version 1.0.0");
    primaryStage.setScene(scene);
    primaryStage.setMinWidth(400);
    primaryStage.setMinHeight(350);
    primaryStage.setMaximized(true);

    BindProperties();
    
    primaryStage.show();
    
    System.out.println("javafx.runtime.version: " + System.getProperty("javafx.runtime.version"));
}
 
開發者ID:ztan5,項目名稱:TechnicalAnalysisTool,代碼行數:81,代碼來源:TatMain.java


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