本文整理汇总了Java中jfxtras.scene.control.window.Window类的典型用法代码示例。如果您正苦于以下问题:Java Window类的具体用法?Java Window怎么用?Java Window使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Window类属于jfxtras.scene.control.window包,在下文中一共展示了Window类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CustomCloseIcon
import jfxtras.scene.control.window.Window; //导入依赖的package包/类
public CustomCloseIcon(final Window w) {
getStyleClass().setAll("custom-close-icon");
BackgroundImage img = new BackgroundImage(
new Image(FileUtils.getResourceToExternalForm("/img/close.png"), 15, 15, false, true),
BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.CENTER,
BackgroundSize.DEFAULT);
setBackground(new Background(img));
setOnAction((e) -> w.close());
}
示例2: openAddDialog
import jfxtras.scene.control.window.Window; //导入依赖的package包/类
public void openAddDialog() {
UI ui = app.getAssetLoader().loadUI("dialog_add_entity.fxml", new DialogAddEntityController());
Window window = new InGameWindow("Add Entity", InGameWindow.WindowDecor.ALL);
window.setPrefSize(350, 300);
window.setContentPane(new Pane(ui.getRoot()));
app.getGameScene().addUINode(window);
}
示例3: openEditDialog
import jfxtras.scene.control.window.Window; //导入依赖的package包/类
public void openEditDialog() {
UI ui = app.getAssetLoader().loadUI("dialog_edit_entity.fxml", new DialogEditEntityController());
Window window = new InGameWindow("Edit Entity", InGameWindow.WindowDecor.ALL);
window.setPrefSize(380, 450);
window.setContentPane(new Pane(ui.getRoot()));
app.getGameScene().addUINode(window);
}
示例4: openColorAdjustDialog
import jfxtras.scene.control.window.Window; //导入依赖的package包/类
public void openColorAdjustDialog() {
if (uiColorAdjust == null) {
uiColorAdjust = app.getAssetLoader().loadUI("dialog_color_adjust.fxml", new ColorAdjustController());
}
Window window = new InGameWindow("Color Adjust", InGameWindow.WindowDecor.ALL);
window.setPrefSize(380, 450);
window.setContentPane(new Pane(uiColorAdjust.getRoot()));
app.getGameScene().addUINode(window);
}