当前位置: 首页>>代码示例>>Java>>正文


Java Stage.setMinHeight方法代码示例

本文整理汇总了Java中javafx.stage.Stage.setMinHeight方法的典型用法代码示例。如果您正苦于以下问题:Java Stage.setMinHeight方法的具体用法?Java Stage.setMinHeight怎么用?Java Stage.setMinHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.stage.Stage的用法示例。


在下文中一共展示了Stage.setMinHeight方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {

    this.primaryStage = primaryStage;
    Parent root = new AnchorPane();
    Scene scene = new Scene(root);
    primaryStage.setScene(scene);
    primaryStage.getIcons().add(new Image(SQUID_LOGO_SANS_TEXT_URL));
    primaryStage.setTitle("Squid 3.0 pre-release");

    // this produces non-null window after .show()
    primaryStageWindow = primaryStage.getScene().getWindow();

    primaryStage.setOnCloseRequest((WindowEvent e) -> {
        Platform.exit();
        System.exit(0);
    });

    // postpone loading to allow for stage creation and use in controller
    scene.setRoot(FXMLLoader.load(getClass().getResource("SquidUIController.fxml")));
    primaryStage.show();
    primaryStage.setMinHeight(scene.getHeight() + 15);
    primaryStage.setMinWidth(scene.getWidth());

    squidAboutWindow = new SquidAboutWindow(primaryStage);
}
 
开发者ID:CIRDLES,项目名称:Squid,代码行数:27,代码来源:SquidUI.java

示例2: start

import javafx.stage.Stage; //导入方法依赖的package包/类
public void start(Stage stg) throws IOException
{
    guiroot = loader.load();
    sc = new Scene(guiroot);
    
    contr = loader.getController();

    stg.setScene(sc);
    stg.sizeToScene();
    stg.setTitle("Plasmoxy::ThunderLord/VisionGama");
    stg.setMinHeight(stg.getHeight());
    stg.setMinWidth(stg.getWidth());
    stg.show();
    
    stg.setOnCloseRequest( event ->
    {
        System.out.println("CLOSING");
        contr.close();
    });
    
}
 
开发者ID:Plasmoxy,项目名称:AquamarineLake,代码行数:22,代码来源:App.java

示例3: start

import javafx.stage.Stage; //导入方法依赖的package包/类
public void start(Stage stg) throws IOException {
    guiroot = loader.load();
    sc = new Scene(guiroot);

    contr = loader.getController();

    stg.setScene(sc);
    stg.sizeToScene();
    stg.setTitle("Plasmoxy - SentientLight/TrackMate");
    stg.setMinHeight(stg.getHeight());
    stg.setMinWidth(stg.getWidth());
    stg.show();

    stg.setOnCloseRequest(event ->
    {
        System.out.println("CLOSING");
        contr.close();
    });

    contr.init();

}
 
开发者ID:Plasmoxy,项目名称:AquamarineLake,代码行数:23,代码来源:App.java

示例4: showInDialog

import javafx.stage.Stage; //导入方法依赖的package包/类
private void showInDialog(javafx.event.ActionEvent event) {
    Stage s = new Stage(StageStyle.DECORATED);
    s.setTitle(tp.getText());
    s.initModality(Modality.APPLICATION_MODAL);
    s.setMinHeight(640);
    s.setMinHeight(480);
    //s.setFullScreen(true);
    s.setMaximized(true);
    //TableView<HybridRow> newView = new TableView<>(tableView.getItems());
    BorderPane root = new BorderPane(content);
    tp.setContent(new Label("opened externally"));
    ButtonBar bb = new ButtonBar();
    root.setTop(bb);
    s.setScene(new Scene(root));
    Button yesButton = new Button("Close");
    ButtonBar.setButtonData(yesButton, ButtonBar.ButtonData.CANCEL_CLOSE);
    bb.getButtons().addAll(yesButton);
    yesButton.setOnAction(e -> s.hide());
    s.showAndWait();
    tp.setContent(content);
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:22,代码来源:TimingDiagramCollectionView.java

示例5: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/main.fxml"));
    Parent root = fxmlLoader.load();
    primaryStage.setTitle("ソースリスト作るよ");
    primaryStage.setScene(new Scene(root, 700, 500));
    primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/icons.png")));
    primaryStage.setMinHeight(500);
    primaryStage.setMinWidth(700);
    Controller controller = fxmlLoader.getController();
    controller.init(primaryStage);
    primaryStage.setMaxHeight(500);
    primaryStage.setMaxWidth(700);


    primaryStage.show();
}
 
开发者ID:Khromium,项目名称:MakeSourceList4j,代码行数:18,代码来源:Main.java

示例6: start

import javafx.stage.Stage; //导入方法依赖的package包/类
public void start(Stage stg) throws IOException
{
    guiroot = loader.load();
    sc = new Scene(guiroot);
    
    contr = loader.getController();

    stg.setScene(sc);
    stg.sizeToScene();
    stg.setTitle("");
    stg.setMinHeight(stg.getHeight());
    stg.setMinWidth(stg.getWidth());
    stg.show();
    
    stg.setOnCloseRequest( event ->
    {
        System.out.println("CLOSING");
        contr.close();
    });
    
}
 
开发者ID:Plasmoxy,项目名称:AquamarineLake,代码行数:22,代码来源:App.java

示例7: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(final Stage stage) throws Exception {
    GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
    int width = gd.getDisplayMode().getWidth();
    int height = gd.getDisplayMode().getHeight();

    Scene scene = new Scene(FXMLLoader.load(UDEDesktop.class.getResource("resources/UDEDesktopWindow.fxml")), width, height);
    scene.setFill(null);
    scene.getStylesheets().add("resources/stylesheet.css");
    stage.setScene(scene);
    // stage.initStyle(StageStyle.UNDECORATED);
    stage.initStyle(StageStyle.TRANSPARENT);
    stage.setTitle("UDEDesktop");
    stage.setMinWidth(300);
    stage.setMinHeight(300);
    stage.show();
    stage.toBack();
}
 
开发者ID:maximstewart,项目名称:UDE,代码行数:19,代码来源:UDEDesktop.java

示例8: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage stage) throws Exception {
	FXMLLoader loader = new FXMLLoader(getClass().getResource("/ph/kana/memory/ui/fxml/main-form.fxml"));
	Scene scene = new Scene(loader.load());

	setUserAgentStylesheet(STYLESHEET_MODENA);

	stage.setWidth(APP_WIDTH);
	stage.setMinWidth(APP_WIDTH);

	stage.setHeight(APP_HEIGHT);
	stage.setMinHeight(APP_HEIGHT);

	stage.setTitle("kana0011/password-locker");
	stage.setScene(scene);

	MainFormController controller = loader.<MainFormController>getController();
	controller.setHostServices(getHostServices());

	stage.show();
}
 
开发者ID:kana0011,项目名称:symmetrical-memory,代码行数:22,代码来源:MainForm.java

示例9: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start( final Stage primaryStage ) throws Exception {
    _primaryStage = primaryStage;

    primaryStage.setTitle( "Wall-T - Teamcity Radiator" );
    primaryStage.getIcons( ).addAll( UIUtils.createImage( "icons/icon.png" ) );

    primaryStage.setMinWidth( MIN_WIDTH );
    primaryStage.setMinHeight( MIN_HEIGHT );
    primaryStage.setWidth( MIN_WIDTH );
    primaryStage.setHeight( MIN_HEIGHT );

    _apiMonitoringService.start( );

    primaryStage.show( );

    _eventBus.post( new SceneEvent( ConfigurationScene.class ) );
}
 
开发者ID:u2032,项目名称:wall-t,代码行数:19,代码来源:WallApplication.java

示例10: setupStage

import javafx.stage.Stage; //导入方法依赖的package包/类
private void setupStage(Stage s)
{
	stage = s;
	s.setTitle("Pinggers Git/SVN Client");
	s.setHeight(480);
	s.setWidth(800);
	s.setMinHeight(480);
	s.setMinWidth(480);
	s.centerOnScreen();
	// Prevent Closing of the Main Window when it is disabled
	s.addEventFilter(WindowEvent.WINDOW_CLOSE_REQUEST, event -> {
		if(root.isDisable())
		{
			event.consume();
		}
	});
	// Use own Exit handling (double check for isDisable ...)
	s.setOnCloseRequest(event -> {
		requestExit();
		event.consume();
	});
}
 
开发者ID:Pingger,项目名称:Pinggers-GIT-SVN-Client,代码行数:23,代码来源:Overview.java

示例11: showInDialog

import javafx.stage.Stage; //导入方法依赖的package包/类
private void showInDialog(javafx.event.ActionEvent event) {
    //("SpecificationTableView.SpecificationTableView");
    Stage s = new Stage(StageStyle.DECORATED);
    s.setTitle(getText());
    s.initModality(Modality.APPLICATION_MODAL);
    s.setMinHeight(640);
    s.setMinHeight(480);
    s.setFullScreen(true);
    //s.setMaximized(true);
    //TableView<HybridRow> newView = new TableView<>(tableView.getItems());
    setContent(new Label("opened externally"));
    BorderPane root = new BorderPane(tableView);
    ButtonBar bb = new ButtonBar();
    root.setTop(bb);
    s.setScene(new Scene(root));
    Button yesButton = new Button("Close");
    ButtonBar.setButtonData(yesButton, ButtonBar.ButtonData.CANCEL_CLOSE);
    bb.getButtons().addAll(yesButton);
    yesButton.setOnAction(e -> s.hide());
    s.showAndWait();
    setContent(tableView);
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:23,代码来源:SpecificationTableView.java

示例12: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage stage) throws Exception {
    Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));
    XMLManager xml = new XMLManager();
    xml.setEnvConfiguration();
    stage.setMinWidth(600);
    stage.setMinHeight(650);
    Scene scene = new Scene(root);
    
    //Alert a = new Alert(AlertType.ERROR);
   
    scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
    
    stage.getIcons().add(new Image(new URL(getClass().getResource("/gallery/images/iv.png").toExternalForm()).toString(),16,16,true,true));
    stage.setOnCloseRequest(event ->{
        System.exit(0);
    });
    stage.setScene(scene);
    stage.setTitle("Joanne");
    stage.show();

    this.stage = stage;
    if(new File(new EnvVars().getEnvironmentVariable(Environment.USER_HOME)+File.separator+"joanne"+File.separator+"google_drive").exists()){        
        System.out.println(Files.createDirectories(Paths.get(new EnvVars().getEnvironmentVariable(Environment.USER_HOME)+File.separator+"joanne"+File.separator+"google_drive")));
    }
    new File("/tmp/joanne").mkdir();
}
 
开发者ID:Obsidiam,项目名称:joanne,代码行数:28,代码来源:Gallery.java

示例13: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage stage) throws Exception {
	Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));

	Scene scene = new Scene(root);
	

	stage.setScene(scene);
	stage.getIcons().add(new Image("/icon.png"));
	stage.show();
	stage.setMinWidth(stage.getWidth());
	stage.setMinHeight(stage.getHeight());

	scene.setOnKeyPressed(e -> {
	    if (e.getCode() == KeyCode.NUMPAD1 || e.getCode() == KeyCode.DIGIT1) {
	        controller.keyPressed('1');
	    }else if (e.getCode() == KeyCode.NUMPAD2 || e.getCode() == KeyCode.DIGIT2) {
	        controller.keyPressed('2');
	    }else if (e.getCode() == KeyCode.NUMPAD3 || e.getCode() == KeyCode.DIGIT3) {
	        controller.keyPressed('3');
	    }else if (e.getCode() == KeyCode.NUMPAD4 || e.getCode() == KeyCode.DIGIT4) {
	        controller.keyPressed('4');
	    }else if (e.getCode() == KeyCode.NUMPAD5 || e.getCode() == KeyCode.DIGIT5) {
	        controller.keyPressed('5');
	    }else if (e.getCode() == KeyCode.NUMPAD6 || e.getCode() == KeyCode.DIGIT6) {
	        controller.keyPressed('6');
	    }else if (e.getCode() == KeyCode.NUMPAD7 || e.getCode() == KeyCode.DIGIT7) {
	        controller.keyPressed('7');
	    }else if (e.getCode() == KeyCode.NUMPAD8 || e.getCode() == KeyCode.DIGIT8) {
	        controller.keyPressed('8');
	    }else if (e.getCode() == KeyCode.NUMPAD9 || e.getCode() == KeyCode.DIGIT9) {
	        controller.keyPressed('9');
	    }else if (e.getCode() == KeyCode.NUMPAD0 || e.getCode() == KeyCode.DIGIT0) {
	        controller.keyPressed('0');
	    }else if (e.getCode() == KeyCode.ADD || e.getCode() == KeyCode.PLUS) {
	        controller.keyPressed('+');
	    }else if (e.getCode() == KeyCode.SUBTRACT || e.getCode() == KeyCode.MINUS) {
	        controller.keyPressed('-');
	    }else if (e.getCode() == KeyCode.MULTIPLY) {
	        controller.keyPressed('*');
	    }else if (e.getCode() == KeyCode.DIVIDE || e.getCode() == KeyCode.SLASH) {
	        controller.keyPressed('/');
	    }else if (e.getCode() == KeyCode.ENTER || e.getCode() == KeyCode.EQUALS) {
	        controller.keyPressed('=');
	    }else if (e.getCode() == KeyCode.PERIOD || e.getCode() == KeyCode.COMMA || e.getCode() == KeyCode.DECIMAL) {
	        controller.keyPressed('.');
	    }else if (e.getCode() == KeyCode.BACK_SPACE) {
	        controller.keyPressed('b');
	    }else if (e.getCode() == KeyCode.ESCAPE || e.getCode() == KeyCode.DELETE) {
	        controller.keyPressed('c');
	    }
	});
}
 
开发者ID:kudlav,项目名称:Sifon-Industries,代码行数:54,代码来源:Calc.java

示例14: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) {

    WeekView root1 = new WeekView(LocalDate.now(), new Calendar());
    Stage stage = new Stage();
    stage.setScene(new Scene(root1));
    stage.setTitle("Fastis");
    stage.setMinWidth(100);
    stage.setMinHeight(100);
    stage.show();

    testLayout(root1);
    testCalendar(root1);
}
 
开发者ID:Jibbow,项目名称:FastisFX,代码行数:15,代码来源:Main.java

示例15: start

import javafx.stage.Stage; //导入方法依赖的package包/类
public void start(Stage stg) throws IOException
{
    guiroot = loader.load();
    sc = new Scene(guiroot);
    
    contr = loader.getController();

    stg.setScene(sc);
    stg.sizeToScene();
    stg.setTitle("Plasmoxy - CVFXBase");

    stg.setOnCloseRequest( event ->
    {
        System.out.println("[App] Received close signal, calling close on controller");
        contr.close();
    });

    contr.init(); // tell the controller to initialize itself now
    stg.show(); // render the stage

    // after rendering, fix the min size of it
    stg.setMinHeight(stg.getHeight());
    stg.setMinWidth(stg.getWidth());

    System.out.println("[App] App launched");
    
}
 
开发者ID:Plasmoxy,项目名称:AquamarineLake,代码行数:28,代码来源:App.java


注:本文中的javafx.stage.Stage.setMinHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。