• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JFXDialogLayout类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.jfoenix.controls.JFXDialogLayout的典型用法代码示例。如果您正苦于以下问题:Java JFXDialogLayout类的具体用法?Java JFXDialogLayout怎么用?Java JFXDialogLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JFXDialogLayout类属于com.jfoenix.controls包,在下文中一共展示了JFXDialogLayout类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: showInfoDialog

import com.jfoenix.controls.JFXDialogLayout; //导入依赖的package包/类
public void showInfoDialog(){
    JFXDialogLayout content = new JFXDialogLayout();
    content.setHeading(new Text("Information"));
    content.setBody(new Text("We are going to open your default browser window to let \n" +
            "you choose the gmail account , allow the specified permissions\n" +
            "and then close the window."));
    JFXDialog dialog = new JFXDialog(myController, content, JFXDialog.DialogTransition.CENTER);
    JFXButton button = new JFXButton("Okay");
    button.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent event) {
            dialog.close();
            SplashWaitController.startBackgroundTasks();
            myController.setScreen(AmailMain.splashWaitId);

        }
    });
    content.setActions(button);
    dialog.show();
}
 
开发者ID:ashoknailwal,项目名称:desktop-gmail-client,代码行数:21,代码来源:SplashGuideController.java


示例2: show

import com.jfoenix.controls.JFXDialogLayout; //导入依赖的package包/类
public void show() {
	textArea = new JFXTextArea(bodyText);
	
	JFXDialogLayout content = new JFXDialogLayout();
	content.setHeading(new Text(headingText));
	content.setBody(textArea);
	content.setPrefSize(dialogWidth, dialogHeight);
	StackPane stackPane = new StackPane();
	stackPane.autosize();
	JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true);
	JFXButton button = new JFXButton("Okay");
	button.setOnAction(new EventHandler<ActionEvent>() {
		@Override
		public void handle(ActionEvent event) {
			dialog.close();
		}
	});
	button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
	button.setPrefHeight(32);
	button.setStyle(dialogBtnStyle);
	content.setActions(button);
	pane.getChildren().add(stackPane);
	AnchorPane.setTopAnchor(stackPane, (pane.getHeight() - content.getPrefHeight()) / 2);
	AnchorPane.setLeftAnchor(stackPane, (pane.getWidth() - content.getPrefWidth()) / 2);
	dialog.show();
}
 
开发者ID:Seil0,项目名称:cemu_UI,代码行数:27,代码来源:JFXTextAreaInfoDialog.java


示例3: show

import com.jfoenix.controls.JFXDialogLayout; //导入依赖的package包/类
public void show() {
	JFXDialogLayout content = new JFXDialogLayout();
	content.setHeading(new Text(headingText));
	content.setBody(new Text(bodyText));
	content.setPrefSize(dialogWidth, dialogHeight);
	StackPane stackPane = new StackPane();
	stackPane.autosize();
	JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true);
	JFXButton button = new JFXButton("Okay");
	button.setOnAction(new EventHandler<ActionEvent>() {
		@Override
		public void handle(ActionEvent event) {
			dialog.close();
		}
	});
	button.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
	button.setPrefHeight(32);
	button.setStyle(dialogBtnStyle);
	content.setActions(button);
	pane.getChildren().add(stackPane);
	AnchorPane.setTopAnchor(stackPane, (pane.getHeight() - content.getPrefHeight()) / 2);
	AnchorPane.setLeftAnchor(stackPane, (pane.getWidth() - content.getPrefWidth()) / 2);
	dialog.show();
}
 
开发者ID:Seil0,项目名称:cemu_UI,代码行数:25,代码来源:JFXInfoDialog.java


示例4: showDialog

import com.jfoenix.controls.JFXDialogLayout; //导入依赖的package包/类
public void showDialog() {
    JFXDialogLayout jfxDialogLayout = new JFXDialogLayout();
    jfxDialogLayout.setHeading(new Text(header));
    jfxDialogLayout.setBody(new Text(content));
    JFXDialog jfxDialog = new JFXDialog(stackPane, jfxDialogLayout, JFXDialog.DialogTransition.CENTER);
    JFXButton okay = new JFXButton(buttonLabel);
    okay.setPrefWidth(110);
    okay.setStyle("-fx-background-color: #F39C12; -fx-text-fill: white;");
    okay.setButtonType(JFXButton.ButtonType.RAISED);
    okay.setOnAction(event -> {
        jfxDialog.close();
        stackPane.setVisible(false);
    });
    stackPane.setOnMouseClicked(event -> stackPane.setVisible(false));
    jfxDialogLayout.setActions(okay);
    jfxDialog.show();
}
 
开发者ID:victorward,项目名称:recruitervision,代码行数:18,代码来源:MaterialDialog.java


示例5: showMaterialDialog

import com.jfoenix.controls.JFXDialogLayout; //导入依赖的package包/类
public static void showMaterialDialog(StackPane root, Node nodeToBeBlurred, List<JFXButton> controls, String header, String body) {
    BoxBlur blur = new BoxBlur(3, 3, 3);

    JFXDialogLayout dialogLayout = new JFXDialogLayout();
    JFXDialog dialog = new JFXDialog(root, dialogLayout, JFXDialog.DialogTransition.TOP);
    
    controls.forEach(controlButton->{
        controlButton.getStyleClass().add("dialog-button");
        controlButton.addEventHandler(MouseEvent.MOUSE_CLICKED, (MouseEvent mouseEvent) -> {
            dialog.close();
        });
    });

    dialogLayout.setHeading(new Label(header));
    dialogLayout.setBody(new Label(body));
    dialogLayout.setActions(controls);
    dialog.show();
    dialog.setOnDialogClosed((JFXDialogEvent event1) -> {
        nodeToBeBlurred.setEffect(null);
    });
    nodeToBeBlurred.setEffect(blur);
}
 
开发者ID:afsalashyana,项目名称:Library-Assistant,代码行数:23,代码来源:AlertMaker.java


示例6: show

import com.jfoenix.controls.JFXDialogLayout; //导入依赖的package包/类
public void show() {
	
	JFXDialogLayout content = new JFXDialogLayout();
   	content.setHeading(new Text(headingText));
   	content.setBody(new Text(bodyText));
   	StackPane stackPane = new StackPane();
   	stackPane.autosize();
   	JFXDialog dialog = new JFXDialog(stackPane, content, JFXDialog.DialogTransition.LEFT, true);
   	JFXButton okayBtn = new JFXButton(okayText);
   	okayBtn.addEventHandler(ActionEvent.ACTION, (e)-> {
   		dialog.close();
   	});
   	okayBtn.addEventHandler(ActionEvent.ACTION, okayAction);
   	okayBtn.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
   	okayBtn.setPrefHeight(32);
   	okayBtn.setStyle(dialogBtnStyle);
   	JFXButton cancelBtn = new JFXButton(cancelText);
   	cancelBtn.addEventHandler(ActionEvent.ACTION, (e)-> {
   		dialog.close();
   	});
   	cancelBtn.addEventHandler(ActionEvent.ACTION, cancelAction);
   	cancelBtn.setButtonType(com.jfoenix.controls.JFXButton.ButtonType.RAISED);
   	cancelBtn.setPrefHeight(32);
   	cancelBtn.setStyle(dialogBtnStyle);
   	content.setActions(cancelBtn, okayBtn);
   	content.setPrefSize(dialogWidth, dialogHeight);
   	pane.getChildren().add(stackPane);
   	AnchorPane.setTopAnchor(stackPane, (pane.getHeight()-content.getPrefHeight())/2);
   	AnchorPane.setLeftAnchor(stackPane, (pane.getWidth()-content.getPrefWidth())/2);
   	dialog.show();
}
 
开发者ID:Seil0,项目名称:cemu_UI,代码行数:32,代码来源:JFXOkayCancelDialog.java


示例7: showDialogWithDirectory

import com.jfoenix.controls.JFXDialogLayout; //导入依赖的package包/类
public void showDialogWithDirectory() {
    JFXDialogLayout jfxDialogLayout = new JFXDialogLayout();
    jfxDialogLayout.setHeading(new Text("Candidates list created"));
    jfxDialogLayout.setBody(new Text("Candidates list created, now you can open file at this directory [" + directoryLocation + "]"));
    JFXDialog jfxDialog = new JFXDialog(stackPane, jfxDialogLayout, JFXDialog.DialogTransition.CENTER);
    JFXButton okay = new JFXButton("Thanks");
    JFXButton openDirectory = new JFXButton("Open directory");
    okay.setPrefWidth(110);
    okay.setStyle("-fx-background-color: #F39C12; -fx-text-fill: white;");
    okay.setButtonType(JFXButton.ButtonType.RAISED);
    okay.setOnAction(event -> {
        jfxDialog.close();
        stackPane.setVisible(false);
    });

    openDirectory.setPrefWidth(110);
    openDirectory.setStyle("-fx-background-color:  #00A65A; -fx-text-fill: white;");
    openDirectory.setButtonType(JFXButton.ButtonType.RAISED);
    openDirectory.setOnAction(event -> {
        try {
            Desktop.getDesktop().open(new File(directoryLocation));
        } catch (IOException e) {
            e.printStackTrace();
        }
        stackPane.setVisible(false);
    });

    stackPane.setOnMouseClicked(event -> stackPane.setVisible(false));
    HBox hBox = new HBox(5);
    hBox.getChildren().addAll(openDirectory, okay);
    jfxDialogLayout.setActions(hBox);
    jfxDialog.show();
}
 
开发者ID:victorward,项目名称:recruitervision,代码行数:34,代码来源:MaterialDialog.java


示例8: showDialog

import com.jfoenix.controls.JFXDialogLayout; //导入依赖的package包/类
@Override
public void showDialog(DialogType dialogType, String title, String message, List<Item> items) {
	JFXDialogLayout content = new JFXDialogLayout();
	content.setHeading(new Text(title));
	content.setBody(new Text(message));
	JFXDialog dialog = new JFXDialog(mainWindow, content, DialogTransition.CENTER, true);
	dialog.setLayoutX(mainWindow.getWidth()/2);
	dialog.setLayoutY(mainWindow.getHeight()/2);
	
	dialog.show(mainWindow);
}
 
开发者ID:ntenhoeve,项目名称:Introspect-Framework,代码行数:12,代码来源:RfxUserinterfaceController.java


示例9: importBackup

import com.jfoenix.controls.JFXDialogLayout; //导入依赖的package包/类
/**
 * Imports a database with a structure that is exactly like
 * that of the structure of a database used within this application
 * and replaces the currently used database with the imported database
 */
private void importBackup() {
    FileChooser fileChooser = new FileChooser();
    fileChooser.setTitle("Import Backup Copy");
    fileChooser.setInitialDirectory(
            new File(System.getProperty("user.home"))
    );
    FileChooser.ExtensionFilter databaseExtensionFilter =
            new FileChooser.ExtensionFilter(
                    "DB - Database (.db)", "*.db");
    fileChooser.getExtensionFilters().add(databaseExtensionFilter);
    fileChooser.setSelectedExtensionFilter(databaseExtensionFilter);
    File backupFile = fileChooser.showOpenDialog(currentStage);

    if (backupFile != null) {
        try {
            // Import the database copy
            File theDatabase = new File(DatabaseHelper.DATABASE_PATH_NAME);
            Files.copy(backupFile.toPath(), theDatabase.toPath(), StandardCopyOption.REPLACE_EXISTING);

            // Inform the parent TabPane controller that a new database was imported
            parentTabPaneController.newDatabaseWasImported();

            // Inform the user that the import was successful
            JFXDialogLayout dialogLayout = new JFXDialogLayout();
            Text headingText = new Text("Success");
            headingText.setFill(Paint.valueOf("#6c93e4"));
            dialogLayout.setHeading(headingText);
            Text body = new Text("The backup was successfully imported.");
            dialogLayout.setBody(body);

            JFXDialog dialog = new JFXDialog(tabRootPane, dialogLayout, JFXDialog.DialogTransition.CENTER);

            JFXButton okButton = new JFXButton("OKAY");
            okButton.setOnMouseClicked(deleteEvent -> {
                dialog.close();
            });
            okButton.setTextFill(Color.valueOf("#6c93e4"));
            okButton.getStyleClass().add("dialogButton");

            dialogLayout.setActions(okButton);

            dialog.show();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
 
开发者ID:kwilliams3,项目名称:Recordian,代码行数:53,代码来源:BackupTabController.java



注:本文中的com.jfoenix.controls.JFXDialogLayout类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HttpException类代码示例发布时间:2022-05-23
下一篇:
Java Duplicator类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap