Commits

Eugene Ryzhikov committed 8f2f188

Fix #18. Rename Dialogs.build to Dialogs.create

Comments (0)

Files changed (2)

samples/org/controlsfx/samples/HelloDialog.java

         final Button Hyperlink2 = new Button("Show");
         Hyperlink2.setOnAction(new EventHandler<ActionEvent>() {
             @Override public void handle(ActionEvent e) {
-                Dialogs.build()
+                Dialogs.create()
                    .owner(cbSetOwner.isSelected() ? stage : null)
                    .title("JavaFX")
                    .masthead(isMastheadVisible() ? "Wouldn't this be nice?" : null)
         final Button Hyperlink3 = new Button("Show");
         Hyperlink3.setOnAction(new EventHandler<ActionEvent>() {
             @Override public void handle(ActionEvent e) {
-                Action response =  Dialogs.build()
+                Action response =  Dialogs.create()
                     .owner(cbSetOwner.isSelected() ? stage : null)
                     .title("You do want dialogs right?")
                     .masthead(isMastheadVisible() ? "Just Checkin'" : null)
         final Button Hyperlink6a = new Button("Show");
         Hyperlink6a.setOnAction(new EventHandler<ActionEvent>() {
             @Override public void handle(ActionEvent e) {
-                Action response = Dialogs.build()
+                Action response = Dialogs.create()
                     .owner(cbSetOwner.isSelected() ? stage : null)
                    .title("I'm warning you!")
                    .masthead(isMastheadVisible() ? "I'm glad I didn't need to use this..." : null)
         final Button Hyperlink7a = new Button("Show");
         Hyperlink7a.setOnAction(new EventHandler<ActionEvent>() {
             @Override public void handle(ActionEvent e) {
-                Action response = Dialogs.build()
+                Action response = Dialogs.create()
                       .owner(cbSetOwner.isSelected() ? stage : null)
                       .title("It looks like you're making a bad decision")
                       .message("Exception Encountered")
         final Button Hyperlink5a = new Button("Show");
         Hyperlink5a.setOnAction(new EventHandler<ActionEvent>() {
             @Override public void handle(ActionEvent e) {
-                Action response = Dialogs.build()
+                Action response = Dialogs.create()
                     .owner(cbSetOwner.isSelected() ? stage : null)
                     .title("It looks like you're making a bad decision")
                     .message("Better change your mind - this is really your last chance!")
         Hyperlink5b.setOnAction(new EventHandler<ActionEvent>() {
             @Override public void handle(ActionEvent e) {
 
-                Action response = Dialogs.build()
+                Action response = Dialogs.create()
                         .owner(cbSetOwner.isSelected() ? stage : null)
                         .message("Better change your mind - this is really your last chance!")
                         .title("It looks like you're making a bad decision")
                 // if (isMastheadVisible())
                 // dlg.masthead("Please type in your name");
                 // String response = dlg.showInputDialog();
-                String response = Dialogs.build()
+                String response = Dialogs.create()
                     .owner(cbSetOwner.isSelected() ? stage : null)
                     .title("Name Check")
                     .masthead(isMastheadVisible() ? "Please type in your name" : null)
                 // if (isMastheadVisible())
                 // dlg.masthead("Name Guess");
                 // String response = dlg.showInputDialog();
-                String response = Dialogs.build()
+                String response = Dialogs.create()
                         .owner(cbSetOwner.isSelected() ? stage : null)
                         .title("Name Guess")
                         .masthead(isMastheadVisible() ? "Name Guess" : null)
                 // dlg.masthead("Name Guess");
                 // String response = dlg.showInputDialog();
 
-                String response = Dialogs.build()
+                String response = Dialogs.create()
                       .owner(cbSetOwner.isSelected() ? stage : null)
                       .title("Name Guess")
                       .masthead(isMastheadVisible() ? "Name Guess" : null)
                 // dlg.masthead("Name Guess");
                 // String response = dlg.showInputDialog();
 
-                String response = Dialogs.build()
+                String response = Dialogs.create()
                         .owner(cbSetOwner.isSelected() ? stage : null)
                         .title("Name Guess")
                         .masthead(isMastheadVisible() ? "Name Guess" : null)
         final Button Hyperlink12 = new Button("Show");
         Hyperlink12.setOnAction(new EventHandler<ActionEvent>() {
             @Override public void handle(ActionEvent e) {
-                int response = Dialogs.build().owner(stage)
+                int response = Dialogs.create().owner(stage)
                         .title("Manually connect to wireless network")
                         .masthead(isMastheadVisible() ? "Manually connect to wireless network": null)
                         .message("How do you want to add a network?")

src/org/controlsfx/dialogs/Dialogs.java

     }
 
     /**
-     * Builds the initial dialog
+     * Creates the initial dialog
      * @return dialog instance
      */
-    public static Dialogs build() {
+    public static Dialogs create() {
         return new Dialogs();
     }
 
-    private Dialogs() {
-        
-    }
+    private Dialogs() {}
     
     /**
      * Assigns the owner of the dialog. If an owner is specified, the dialog will