本文整理匯總了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; }