当前位置: 首页>>代码示例>>Java>>正文


Java JFXDialog类代码示例

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


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

示例1: showInfoDialog

import com.jfoenix.controls.JFXDialog; //导入依赖的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.JFXDialog; //导入依赖的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.JFXDialog; //导入依赖的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.JFXDialog; //导入依赖的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: setDialouge

import com.jfoenix.controls.JFXDialog; //导入依赖的package包/类
public static void setDialouge(JFXButton applyButton , String heading , String text , Node ob) {
	
	JFXButton button = applyButton;
	
	content.setHeading(new Text(heading));
	content.setBody(new Text(text));
	
	JFXDialog dialoge = new JFXDialog(pane, content, JFXDialog.DialogTransition.CENTER);
	button.addEventHandler(MouseEvent.MOUSE_CLICKED, (e6) -> {
		dialoge.close();
	});
	
	content.setActions(ob, button);
	
	// To show overlay dialougge box
	dialoge.show();
}
 
开发者ID:badarshahzad,项目名称:Jfx-Browser,代码行数:18,代码来源:Main.java

示例6: showMaterialDialog

import com.jfoenix.controls.JFXDialog; //导入依赖的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

示例7: WizardDialog

import com.jfoenix.controls.JFXDialog; //导入依赖的package包/类
/**
 * Wizard dialog constructor
 *
 * @param root
 *            the root component from which the wizard will appear. Use a
 *            {@link StackPane}
 */
public WizardDialog(final String name, final StackPane root)
{
    this.stepper = new WizardStepper(this);
    this.steps = Lists.newArrayList();
    this.region = new BorderPane();
    this.dialog = new JFXDialog(root, this.region, DialogTransition.CENTER);
    this.title = name;
    this.initWizard();
}
 
开发者ID:Leviathan-Studio,项目名称:MineIDE,代码行数:17,代码来源:WizardDialog.java

示例8: show

import com.jfoenix.controls.JFXDialog; //导入依赖的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

示例9: showDialogWithDirectory

import com.jfoenix.controls.JFXDialog; //导入依赖的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

示例10: showDialog

import com.jfoenix.controls.JFXDialog; //导入依赖的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

示例11: importBackup

import com.jfoenix.controls.JFXDialog; //导入依赖的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

示例12: setInfo

import com.jfoenix.controls.JFXDialog; //导入依赖的package包/类
public void setInfo(String body, JFXDialog d){
    this.d = d;
    this.body = body;
    webEngine.loadContent(body);
}
 
开发者ID:ashoknailwal,项目名称:desktop-gmail-client,代码行数:6,代码来源:ZoomInMailView.java

示例13: dialogOnExit

import com.jfoenix.controls.JFXDialog; //导入依赖的package包/类
/**
 * Open the exit dialog box
 * @param pane
 */
public void dialogOnExit(StackPane pane) {
	isShowingDialog = true;
	Label l = mainScene.createBlendLabel(Msg.getString("MainScene.exit.header"));
	l.setPadding(new Insets(10, 10, 10, 10));
	l.setFont(Font.font(null, FontWeight.BOLD, 14));
	HBox hb = new HBox();
	JFXButton b1 = new JFXButton("Exit");
	b1.setStyle("-fx-background-color: white;");
	JFXButton b2 = new JFXButton("Back");
	b2.setStyle("-fx-background-color: white;");
	hb.getChildren().addAll(b1, b2);
	hb.setAlignment(Pos.CENTER);
	HBox.setMargin(b1, new Insets(3,3,3,3));
	HBox.setMargin(b2, new Insets(3,3,3,3));
	VBox vb = new VBox();
	vb.setAlignment(Pos.CENTER);
	vb.setPadding(new Insets(5, 5, 5, 5));
	vb.getChildren().addAll(l, hb);
	StackPane sp = new StackPane(vb);
	sp.setStyle("-fx-background-color:rgba(0,0,0,0.1);");
	StackPane.setMargin(vb, new Insets(10,10,10,10));
	JFXDialog dialog = new JFXDialog();
	dialog.setDialogContainer(pane);
	dialog.setContent(sp);
	dialog.show();

	b1.setOnAction(e -> {
		isExit = true;
		dialog.close();
		Platform.exit();
		System.exit(0);
	});
	
	b2.setOnAction(e -> {
		dialog.close();
		isShowingDialog = false;
		e.consume();
	});

}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:45,代码来源:ScenarioConfigEditorFX.java

示例14: getDialog

import com.jfoenix.controls.JFXDialog; //导入依赖的package包/类
public JFXDialog getDialog()
{
    return this.dialog;
}
 
开发者ID:Leviathan-Studio,项目名称:MineIDE,代码行数:5,代码来源:WizardDialog.java

示例15: createMessageDialog

import com.jfoenix.controls.JFXDialog; //导入依赖的package包/类
public void createMessageDialog(String info){
    JFXDialog f = new JFXDialog();
    f.show();
   

}
 
开发者ID:othreecodes,项目名称:quizmaster,代码行数:7,代码来源:layoutController.java


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