javafx.scene.Parent.minHeight()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中javafx.scene.Parent.minHeight()方法的一些代码示例,展示了Parent.minHeight()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parent.minHeight()方法的具体详情如下:
包路径:javafx.scene.Parent
类名称:Parent
方法名:minHeight

Parent.minHeight介绍

暂无

代码示例

代码示例来源:origin: com.github.vatbub/common.view.reporting

public static void show() {
  FOKLogger.info(ReportingDialog.class.getName(), "Showing the ReportingDialogUploadProgress...");
  stage = new Stage();
  Parent root;
  try {
    String details = "";
    root = FXMLLoader.load(ReportingDialogUploadProgress.class.getResource("ReportingDialogUploadProgress.fxml"));
    Scene scene = new Scene(root);
    scene.getStylesheets().add(ReportingDialogUploadProgress.class.getResource("ReportingDialog.css").toExternalForm());
    stage.setMinWidth(scene.getRoot().minWidth(0) + 70);
    stage.setMinHeight(scene.getRoot().minHeight(0) + 70);
    stage.setScene(scene);
    stage.show();
  } catch (IOException e2) {
    FOKLogger.log(ReportingDialog.class.getName(), Level.SEVERE, FOKLogger.DEFAULT_ERROR_TEXT, e2);
  }
}

代码示例来源:origin: com.github.vatbub/common.view.motd

private void show(String windowTitle) {
  stage = new Stage();
  Parent root;
  try {
    root = FXMLLoader.load(MOTDDialog.class.getResource("MOTDDialog.fxml"), bundle);
    scene = new Scene(root);
    stage.getIcons().add(new Image(new URL(motd.getImage().getUrl()).openStream()));
    // scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
    // Set the window title
    stage.setTitle(windowTitle);
    stage.setMinWidth(scene.getRoot().minWidth(0) + 70);
    stage.setMinHeight(scene.getRoot().minHeight(0) + 70);
    stage.setScene(scene);
    stage.show();
  } catch (IOException e) {
    FOKLogger.log(MOTDDialog.class.getName(), Level.SEVERE, FOKLogger.DEFAULT_ERROR_TEXT, e);
  }
}

代码示例来源:origin: com.github.vatbub/common.updater

private void show(UpdateInfo update) {
  stage = new Stage();
  Parent root;
  try {
    if (update != null) {
      if (update.fileSizeInMB != -1) {
        messageText = "Filesize: " + (Math.round(update.fileSizeInMB * 100)) / 100.0
            + " MB, Version to download: " + update.toVersion.toString();
      } else {
        // File sie unknown, see Javadoc of UpdateInfo
        messageText = "Filesize: unknown, Version to download: " + update.toVersion.toString();
      }
    }
    updateInfo = update;
    root = FXMLLoader.load(UpdateAvailableDialog.class.getResource("AlertDialog.fxml"), bundle);
    Scene scene = new Scene(root);
    // scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
    // Set the window title and put the app name in it
    stage.setTitle(bundle.getString("window.Title").replace("{appName}", Common.getInstance().getAppName()));
    stage.setMinWidth(scene.getRoot().minWidth(0) + 70);
    stage.setMinHeight(scene.getRoot().minHeight(0) + 70);
    stage.setScene(scene);
    stage.show();
  } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  }
}

代码示例来源:origin: com.github.vatbub/common.view.reporting

stage.setMinHeight(scene.getRoot().minHeight(0) + 70);

相关文章