本文整理了Java中javafx.scene.Parent.minWidth()
方法的一些代码示例,展示了Parent.minWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parent.minWidth()
方法的具体详情如下:
包路径:javafx.scene.Parent
类名称:Parent
方法名:minWidth
暂无
代码示例来源: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
scene.getStylesheets().add(this.getClass().getResource("ReportingDialog.css").toExternalForm());
stage.setMinWidth(scene.getRoot().minWidth(0) + 70);
stage.setMinHeight(scene.getRoot().minHeight(0) + 70);
内容来源于网络,如有侵权,请联系作者删除!