本文整理汇总了Java中javafx.stage.StageStyle.DECORATED属性的典型用法代码示例。如果您正苦于以下问题:Java StageStyle.DECORATED属性的具体用法?Java StageStyle.DECORATED怎么用?Java StageStyle.DECORATED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javafx.stage.StageStyle
的用法示例。
在下文中一共展示了StageStyle.DECORATED属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadTopsoilWindow
public void loadTopsoilWindow(double x, double y) {
Pane topsoilPlotUI = topsoilPlot.initializePlotPane();
Scene topsoilPlotScene = new Scene(topsoilPlotUI, 600, 600);
topsoilPlotWindow = new Stage(StageStyle.DECORATED);
// center on Squid
topsoilPlotWindow.setX(x);
topsoilPlotWindow.setY(y);
topsoilPlotWindow.setResizable(true);
topsoilPlotWindow.setScene(topsoilPlotScene);
topsoilPlotWindow.setTitle("Topsoil Plot");
topsoilPlotWindow.requestFocus();
topsoilPlotWindow.initOwner(null);
topsoilPlotWindow.initModality(Modality.NONE);
topsoilPlotWindow.show();
}
示例2: print
public void print()
{
Printer printer = Printer.getDefaultPrinter();
Stage stage = new Stage(StageStyle.DECORATED);
PrinterJob job = PrinterJob.createPrinterJob(printer);
if (job != null) {
boolean showDialog = job.showPageSetupDialog(stage);
if (showDialog) {
myPrint.setScaleX(0.46);
myPrint.setScaleY(0.46);
myPrint.setTranslateX(-252);
myPrint.setTranslateY(-110);
boolean success = job.printPage(myPrint);
if (success) {
job.endJob();
}
myPrint.setTranslateX(0);
myPrint.setTranslateY(0);
myPrint.setScaleX(1.0);
myPrint.setScaleY(1.0);
}
}
}
示例3: showInDialog
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);
}
示例4: showInDialog
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);
}
示例5: start
@Override
public void start(final Stage primaryStage) throws Exception
{
MineIDE.primaryStage = new Stage(StageStyle.DECORATED);
MineIDE.primaryStage.getIcons().add(new Image(Constant.IMG_DIR + "icon.png"));
MineIDE.primaryStage.setTitle(Constant.APP_NAME);
// stage.setTitle(Gui.mineIdeInfo.getAppName() + " v" +
// Gui.mineIdeInfo.getAppVersion() + " " + "Forge "
// + Gui.mineIdeInfo.getForgeVersion());
final GuiMain main = GuiMain.getInstance();
main.init();
main.setOldPreferences();
// MineIDE.primaryStage.setMaximized(true);
main.show(MineIDE.primaryStage);
}
示例6: showOptionsMenu
@Override
public void showOptionsMenu()
{
List<Submittable> submittables = new ArrayList<>();
Map<OptionSection, Pane> optionsMenuModel = createOptionsMenuModel(submittables);
OptionsPane optionsPane = new OptionsPane(optionsMenuModel);
Scene popupScene = new Scene(optionsPane);
Stage popupWindow = new Stage(StageStyle.DECORATED);
popupWindow.setTitle("Settings");
popupWindow.initModality(Modality.WINDOW_MODAL);
popupWindow.initOwner(stage);
popupWindow.setScene(popupScene);
popupWindow.setMinWidth(stage.getScene().getWidth() / 2);
popupWindow.setMinHeight(stage.getScene().getHeight()
- (stage.getScene().getHeight() / 3));
popupScene.getStylesheets().addAll(stage.getScene().getStylesheets());
optionsPane.setOkAction(() -> {
if (optionsMenuOkSelected(submittables))
{
submittables.forEach(submittable -> submittable.submit());
popupWindow.close();
}
});
optionsPane.setCancelAction(() -> {
popupWindow.close();
});
popupWindow.setOnCloseRequest((windowEvent) -> {
popupWindow.close();
});
popupWindow.show();
}
示例7: showMainStage
private void showMainStage() {
mainStage = new Stage(StageStyle.DECORATED);
mainStage.setTitle("Chess Bot");
mainStage.setResizable(false);
mainStage.setAlwaysOnTop(true);
mainStage.setOnCloseRequest(event -> {
Platform.exit();
System.exit(0);
});
mainStage.getIcons().add(new Image(APPLICATION_ICON));
mainStage.setScene(new Scene(PageResources.getRoot(PagePath.PATH_SCREEN_APPLICATION), 208, 491));
mainStage.show();
}
示例8: loadWindow
void loadWindow(String loc,String title) throws IOException
{
Parent parent=FXMLLoader.load(getClass().getResource(loc));
Stage stage=new Stage(StageStyle.DECORATED);
stage.setTitle(title);
stage.setScene(new Scene(parent));
stage.show();
}
示例9: hakkimda
@FXML
private void hakkimda(ActionEvent event) throws IOException
{
Parent parent=FXMLLoader.load(getClass().getResource("/AnaPencere/Hakkimda.fxml"));
Stage stage=new Stage(StageStyle.DECORATED);
stage.setTitle("Hakk�nda");
stage.setScene(new Scene(parent));
stage.show();
}
示例10: loadMain
void loadMain() throws IOException
{
Parent parent=FXMLLoader.load(getClass().getResource("/AnaPencere/AnaPencere.fxml"));
Stage stage=new Stage(StageStyle.DECORATED);
stage.setTitle("Ana Men�");
stage.setScene(new Scene(parent));
stage.show();
}
示例11: start
@Override
public void start(Stage primaryStage) throws Exception {
URL resource = getClass().getClassLoader().getResource("layouts/home_page.fxml");
if (resource != null) {
FXMLLoader fxmlLoader = new FXMLLoader(resource);
fxmlLoader.setResources(ResourceBundle.getBundle("bundles.strings", Locale.getDefault()));
Parent root = fxmlLoader.load();
Stage stage = new Stage(StageStyle.DECORATED);
stage.setMinWidth(640);
stage.setMinHeight(400);
stage.setScene(new Scene(root, 640, 400));
stage.show();
}
}
示例12: ModalDialog
public ModalDialog(Modal controller, URL fxml, Window owner, ResourceBundle bundle) {
this(controller, fxml, owner, StageStyle.DECORATED, Modality.APPLICATION_MODAL, bundle);
}
示例13: getPreferredStageStyle
/**
* The preferred StageStyle for the scene. The preferred style is not guaranteed due to JavaFX toolkit
* implementation.
* @return the preferred StageStyle or StageStyle.DECORATED by default.
*/
default StageStyle getPreferredStageStyle() { return StageStyle.DECORATED; }