Commits

shemnon committed 59c5934

gradelize rough cut

Comments (0)

Files changed (19)

 syntax: glob
-bin/*
+*.class
+*.jar
+*.iml
+.DS_Store
+build/*
+.idea/*
+.gradle/*

bugs/svg/error.svg

Removed
Old image
-<?xml version="1.0"?>
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="42" width="42" viewBox="0 0 42 42">
-<defs>
-<radialGradient id="c" gradientUnits="userSpaceOnUse" cy="33" cx="21" gradientTransform="matrix(1 0 0 .5 0 17)" r="17">
-<stop offset="0"/>
-<stop stop-opacity="0" offset="1"/>
-</radialGradient>
-<linearGradient id="b" y2="33.7" gradientUnits="userSpaceOnUse" x2="21.2" gradientTransform="matrix(1.41 0 0 1.47 13.2 -17.5)" y1="19" x1="1">
-<stop stop-color="#e67c7c" offset="0"/>
-<stop stop-color="#d72f2f" offset="1"/>
-</linearGradient>
-<linearGradient id="a" x1="8" gradientUnits="userSpaceOnUse" x2="36" gradientTransform="translate(2,-9.1e-4)" y1="18" y2="34.3">
-<stop stop-color="#D4D4D4" offset="0"/>
-<stop stop-color="#E2E2E2" offset=".398"/>
-<stop stop-color="#fff" offset="1"/>
-</linearGradient>
-</defs>
-<ellipse opacity=".620" rx="18" ry="9" cy="33" cx="21" fill="url(#c)"/>
-<g stroke-linejoin="round">
-<path stroke="#9f0000" stroke-width="6" d="m4 35h34l-17-32z"/>
-<path stroke="url(#b)" stroke-width="4" d="m4 35h34l-17-32z"/>
-<path stroke="#c00" stroke-width="2" d="m4 35h34l-17-32z" fill="#c00"/>
-<path stroke="url(#a)" d="m7 33.2h28l-14-26.4z" fill="url(#a)"/>
-</g>
-<path d="m19.8 25.5-0.5-10h3.5l-0.6 10z"/>
-<circle cy="28.7" cx="21" r="2"/>
-</svg>

samples/org/controlsfx/samples/HelloDialog.java

-package org.controlsfx.samples;
-
-import javafx.application.Application;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.collections.FXCollections;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
-import javafx.geometry.Insets;
-import javafx.scene.Node;
-import javafx.scene.Scene;
-import javafx.scene.control.Button;
-import javafx.scene.control.CheckBox;
-import javafx.scene.control.ChoiceBox;
-import javafx.scene.control.Label;
-import javafx.scene.layout.GridPane;
-import javafx.scene.layout.StackPane;
-import javafx.scene.paint.Color;
-import javafx.scene.text.Font;
-import javafx.stage.Stage;
-
-import org.controlsfx.dialogs.Action;
-import org.controlsfx.dialogs.Dialogs;
-import org.controlsfx.dialogs.Dialogs.CommandLink;
-
-public class HelloDialog extends Application {
-
-    private final CheckBox cbShowMasthead = new CheckBox("Show Masthead");
-    private final CheckBox cbSetOwner = new CheckBox("Set Owner");
-
-    @Override public void start(final Stage stage) {
-        // setUserAgentStylesheet(STYLESHEET_MODENA);
-
-        stage.setTitle("Dialog Sample");
-
-        // VBox vbox = new VBox(10);
-        // vbox.setAlignment(Pos.CENTER);
-
-        GridPane grid = new GridPane();
-        grid.setPadding(new Insets(10, 10, 10, 10));
-        grid.setHgap(10);
-        grid.setVgap(10);
-
-        StackPane root = new StackPane();
-        root.getChildren().add(grid);
-        Scene scene = new Scene(root, 800, 300);
-        scene.setFill(Color.WHITE);
-
-        int row = 0;
-
-        // *******************************************************************
-        // Information Dialog
-        // *******************************************************************
-
-        grid.add(createLabel("Operating system button placement: "), 0, 0);
-
-        final String WINDOWS_UNIX = "Windows / Unix";
-        final String MAC_OS = "Mac OS";
-        final ChoiceBox<String> operatingSystem = new ChoiceBox<>(FXCollections.observableArrayList(WINDOWS_UNIX, MAC_OS));
-        operatingSystem.getSelectionModel().select(WINDOWS_UNIX);
-        operatingSystem.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
-            @Override public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
-                String os = operatingSystem.getSelectionModel().getSelectedItem();
-                Dialogs.setMacOS(MAC_OS.equals(os));
-                Dialogs.setWindows(WINDOWS_UNIX.equals(os));
-            }
-        });
-        grid.add(operatingSystem, 1, row);
-
-        row++;
-        grid.add(createLabel("Common Dialog attributes: "), 0, 1);
-        grid.add(cbShowMasthead, 1, row);
-        grid.add(cbSetOwner, 2, row);
-
-        row++;
-
-        // *******************************************************************
-        // Information Dialog
-        // *******************************************************************
-
-        grid.add(createLabel("Information Dialog: "), 0, row);
-
-        final Button Hyperlink2 = new Button("Show");
-        Hyperlink2.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-                Dialogs.create()
-                   .owner(cbSetOwner.isSelected() ? stage : null)
-                   .title("JavaFX")
-                   .masthead(isMastheadVisible() ? "Wouldn't this be nice?" : null)
-                   .message("A collection of pre-built JavaFX dialogs?\nSeems like a great idea to me...")
-                   .showInformation();
-            }
-        });
-        grid.add(Hyperlink2, 1, row);
-
-        row++;
-
-        // *******************************************************************
-        // Confirmation Dialog
-        // *******************************************************************
-
-        grid.add(createLabel("Confirmation Dialog: "), 0, row);
-
-        final Button Hyperlink3 = new Button("Show");
-        Hyperlink3.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-                Action response =  Dialogs.create()
-                    .owner(cbSetOwner.isSelected() ? stage : null)
-                    .title("You do want dialogs right?")
-                    .masthead(isMastheadVisible() ? "Just Checkin'" : null)
-                    .message( "I was a bit worried that you might not want them, so I wanted to double check.")
-                    .showConfirm();
-
-                System.out.println("response: " + response);
-            }
-        });
-        grid.add(Hyperlink3, 1, row);
-
-        row++;
-
-        // *******************************************************************
-        // Warning Dialog
-        // *******************************************************************
-
-        grid.add(createLabel("Warning Dialog: "), 0, row);
-
-        final Button Hyperlink6a = new Button("Show");
-        Hyperlink6a.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-                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)
-                   .message("This is a warning")
-                   .showWarning();
-
-                System.out.println("response: " + response);
-            }
-        });
-        grid.add(Hyperlink6a, 1, row);
-
-        row++;
-
-        // *******************************************************************
-        // Error Dialog
-        // *******************************************************************
-
-        grid.add(createLabel("Error Dialog: "), 0, row);
-
-        final Button Hyperlink7a = new Button("Show");
-        Hyperlink7a.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-                Action response = Dialogs.create()
-                      .owner(cbSetOwner.isSelected() ? stage : null)
-                      .title("It looks like you're making a bad decision")
-                      .message("Exception Encountered")
-                      .masthead( isMastheadVisible() ? "Better change your mind - this is really your last chance!" : null)
-                      .showError();
-
-                System.out.println("response: " + response);
-            }
-        });
-        grid.add(Hyperlink7a, 1, row);
-
-        row++;
-
-        // *******************************************************************
-        // More Details Dialog
-        // *******************************************************************
-
-        grid.add(createLabel("'Exception' Dialog: "), 0, row);
-
-        final Button Hyperlink5a = new Button("Show");
-        Hyperlink5a.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-                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!")
-                    .masthead(isMastheadVisible() ? "Exception Encountered" : null)
-                    .showException(new RuntimeException("Pending Bad Decision Exception"));
-
-                System.out.println("response: " + response);
-            }
-        });
-        grid.add(Hyperlink5a, 1, row);
-
-        final Button Hyperlink5b = new Button("Open in new window");
-        Hyperlink5b.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-
-                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")
-                        .masthead(isMastheadVisible() ? "Exception Encountered" : null)
-                        .showExceptionInNewWindow(new RuntimeException("Pending Bad Decision Exception"));
-
-                System.out.println("response: " + response);
-            }
-        });
-        grid.add(Hyperlink5b, 2, row);
-
-        row++;
-
-        // *******************************************************************
-        // Input Dialog (with masthead)
-        // *******************************************************************
-
-        grid.add(createLabel("Input Dialog (with Masthead): "), 0, row);
-
-        final Button Hyperlink8 = new Button("TextField");
-        Hyperlink8.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-                // Dialog<String> dlg = Dialog.<String>
-                // build(stage).message("What is your name?").title("Name Check");
-                // if (isMastheadVisible())
-                // dlg.masthead("Please type in your name");
-                // String response = dlg.showInputDialog();
-                String response = Dialogs.create()
-                    .owner(cbSetOwner.isSelected() ? stage : null)
-                    .title("Name Check")
-                    .masthead(isMastheadVisible() ? "Please type in your name" : null)
-                    .message("What is your name?")
-                    .showTextInput();
-
-                System.out.println("response: " + response);
-            }
-        });
-        grid.add(Hyperlink8, 1, row);
-
-        final Button Hyperlink9 = new Button("Initial Value Set");
-        Hyperlink9.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-                // Dialog<String> dlg = Dialog.<String>
-                // build(stage).message("Pick a name?").title("Name Guess")
-                // .inputInitialValue("Jonathan");
-                // if (isMastheadVisible())
-                // dlg.masthead("Name Guess");
-                // String response = dlg.showInputDialog();
-                String response = Dialogs.create()
-                        .owner(cbSetOwner.isSelected() ? stage : null)
-                        .title("Name Guess")
-                        .masthead(isMastheadVisible() ? "Name Guess" : null)
-                        .message("Pick a name?")
-                        .showTextInput("Jonathan");
-                System.out.println("response: " + response);
-            }
-        });
-        grid.add(Hyperlink9, 2, row);
-
-        final Button Hyperlink10 = new Button("Set Choices (< 10)");
-        Hyperlink10.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-                // Dialog<String> dlg = Dialog.<String>
-                // build(stage).message("Pick a name?").title("Name Guess")
-                // .inputInitialValue("Jonathan").inputChoices("Matthew", "Jonathan", "Ian", "Sue",
-                // "Hannah");
-                // if (isMastheadVisible())
-                // dlg.masthead("Name Guess");
-                // String response = dlg.showInputDialog();
-
-                String response = Dialogs.create()
-                      .owner(cbSetOwner.isSelected() ? stage : null)
-                      .title("Name Guess")
-                      .masthead(isMastheadVisible() ? "Name Guess" : null)
-                      .message("Pick a name?")
-                      .showChoices("Matthew", "Jonathan", "Ian", "Sue", "Hannah");
-
-                System.out.println("response: " + response);
-            }
-        });
-        grid.add(Hyperlink10, 3, row);
-
-        final Button Hyperlink11 = new Button("Set Choices (>= 10)");
-        Hyperlink11.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-                // Dialog<String> dlg = Dialog
-                // .<String> build(stage)
-                // .message("Pick a name?")
-                // .title("Name Guess")
-                // .inputInitialValue("Jonathan")
-                // .inputChoices("Matthew", "Jonathan", "Ian", "Sue", "Hannah", "Julia", "Denise",
-                // "Stephan",
-                // "Sarah", "Ron", "Ingrid");
-                // if (isMastheadVisible())
-                // dlg.masthead("Name Guess");
-                // String response = dlg.showInputDialog();
-
-                String response = Dialogs.create()
-                        .owner(cbSetOwner.isSelected() ? stage : null)
-                        .title("Name Guess")
-                        .masthead(isMastheadVisible() ? "Name Guess" : null)
-                        .message("Pick a name?")
-                        .showChoices("Matthew", "Jonathan", "Ian", "Sue", "Hannah", "Julia", "Denise", "Stephan",
-                             "Sarah", "Ron", "Ingrid");
-
-                System.out.println("response: " + response);
-            }
-        });
-        grid.add(Hyperlink11, 4, row);
-
-        row++;
-        
-        grid.add(createLabel("Command Links: "), 0, row);
-        final Button Hyperlink12 = new Button("Show");
-        Hyperlink12.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent e) {
-                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?")
-                        .showCommandLinks( 1,
-                             new CommandLink("Add a network that is in the range of this computer", 
-                                             "This shows you a list of networks that are currently available and lets you connect to one."),
-                             new CommandLink("Manually create a network profile", 
-                                             "This creates a new network profile or locates an existing one and saves it on your computer"),
-                             new CommandLink("Create an ad hoc network", 
-                                     "This creates a temporary network for sharing files or and Internet connection")
-                                );
-
-                System.out.println("response: " + response);
-            }
-        });
-        grid.add(Hyperlink12, 1, row);
-
-        stage.setScene(scene);
-        stage.show();
-    }
-
-    /**
-     * @param args
-     *            the command line arguments
-     */
-    public static void main(String[] args) {
-        Application.launch(args);
-    }
-
-    private Node createLabel(String text) {
-        Label label = new Label(text);
-        label.setFont(Font.font("Amble, Arial", 13));
-        label.setTextFill(Color.BLUE);
-        return label;
-    }
-
-    private boolean isMastheadVisible() {
-        return cbShowMasthead.isSelected();
-    }
-}

src/impl/org/controlsfx/behavior/GridCellBehavior.java

-/**
- * Copyright (c) 2013, ControlsFX
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *     * Neither the name of ControlsFX, any associated website, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL CONTROLSFX BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package impl.org.controlsfx.behavior;
-
-import org.controlsfx.control.GridCell;
-
-import com.sun.javafx.scene.control.behavior.CellBehaviorBase;
-
-public class GridCellBehavior<T> extends CellBehaviorBase<GridCell<T>> {
-    public GridCellBehavior(GridCell<T> control) {
-        super(control);
-    }
-}

src/impl/org/controlsfx/dialogs/resources/oxygen/1366601620_9555.ico

Removed
Old image

src/impl/org/controlsfx/dialogs/resources/oxygen/1366601678_9552.ico

Removed
Old image

src/impl/org/controlsfx/dialogs/resources/oxygen/1366601680_9552.icns

Binary file removed.

src/impl/org/controlsfx/dialogs/resources/oxygen/32/dialog-information.png

Removed
Old image

src/impl/org/controlsfx/dialogs/resources/oxygen/64/1366601833_system-help.png

Removed
Old image

src/impl/org/controlsfx/dialogs/resources/oxygen/license.txt

-Attribution-NonCommercial-NoDerivs 2.5 Generic (CC BY-NC-ND 2.5)
-http://creativecommons.org/licenses/by-nc-nd/2.5/

src/main/java/impl/org/controlsfx/behavior/RatingBehavior.java

+/**
+ * Copyright (c) 2013, ControlsFX
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *     * Neither the name of ControlsFX, any associated website, nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CONTROLSFX BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package impl.org.controlsfx.behavior;
+
+import org.controlsfx.control.Rating;
+
+import com.sun.javafx.scene.control.behavior.BehaviorBase;
+
+public class RatingBehavior extends BehaviorBase<Rating> {
+
+    public RatingBehavior(Rating control) {
+        super(control);
+    }
+}

src/main/java/org/controlsfx/control/GridCell.java

+/**
+ * Copyright (c) 2013, ControlsFX
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *     * Neither the name of ControlsFX, any associated website, nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL CONTROLSFX BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.controlsfx.control;
+
+import impl.org.controlsfx.skin.GridCellSkin;
+import javafx.beans.InvalidationListener;
+import javafx.beans.Observable;
+import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.scene.control.IndexedCell;
+import javafx.scene.control.Skin;
+
+public class GridCell<T> extends IndexedCell<T> {
+    
+    /**************************************************************************
+     * 
+     * Constructors
+     * 
+     **************************************************************************/
+
+    /**
+     * 
+     */
+	public GridCell() {
+		getStyleClass().add("grid-cell");
+		
+//		itemProperty().addListener(new ChangeListener<T>() {
+//            @Override public void changed(ObservableValue<? extends T> arg0, T oldItem, T newItem) {
+//                updateItem(newItem, newItem == null);
+//            }
+//        });
+		
+		// TODO listen for index change and update index and item, rather than
+		// listen to just item update as above. This requires the GridCell to 
+		// know about its containing GridRow (and the GridRow to know its 
+		// containing GridView)
+		indexProperty().addListener(new InvalidationListener() {
+            @Override public void invalidated(Observable observable) {
+                final GridRow<T> gridRow = getGridRow();
+                if (gridRow == null) return;
+                
+                GridView<T> gridView = gridRow.getGridView();
+                T item = gridView.getItems().get(getIndex());
+                
+//                updateIndex(getIndex());
+                updateItem(item, item == null);
+            }
+        });
+	}
+	
+	@Override protected Skin<?> createDefaultSkin() {
+        return new GridCellSkin<T>(this);
+    }
+	
+	
+	
+	/**************************************************************************
+     * 
+     * Properties
+     * 
+     **************************************************************************/
+
+    /**
+     * 
+     */
+    private final SimpleObjectProperty<GridRow<T>> gridRow = new SimpleObjectProperty<>(this, "gridRow");
+
+    public final void setGridRow(GridRow<T> value) {
+        gridRow.set(value);
+    }
+    public GridRow<T> getGridRow() {
+        return gridRow.get();
+    }
+    public SimpleObjectProperty<GridRow<T>> gridRowProperty() {
+        return gridRow;
+    }
+	
+}

src/main/resources/impl/org/controlsfx/dialogs/resources/fewer-details.png

Added
New image

src/main/resources/impl/org/controlsfx/dialogs/resources/oxygen/32/system-help.png

Added
New image

src/main/resources/impl/org/controlsfx/dialogs/resources/oxygen/48/system-help.png

Added
New image

src/main/resources/impl/org/controlsfx/dialogs/resources/oxygen/dialog-resources.properties

+# DialogTemplate
+# security.alert.high.image = /impl/org/controlsfx/dialogs/resources/security_high.png
+# security.alert.low.image = /impl/org/controlsfx/dialogs/resources/security_low.png
+
+# MoreInfoDialog
+# warning16.image = /impl/org/controlsfx/dialogs/resources/warning16.png
+# warning48.image = /impl/org/controlsfx/dialogs/resources/warning48.png
+warning.image = /impl/org/controlsfx/dialogs/resources/oxygen/48/dialog-warning.png
+
+# info16.image = /impl/org/controlsfx/dialogs/resources/info16.png
+# info48.image = /impl/org/controlsfx/dialogs/resources/info48.png
+info.image = /impl/org/controlsfx/dialogs/resources/oxygen/48/dialog-information.png
+# info.image = /impl/org/controlsfx/dialogs/resources/emblem-important.png
+
+#error32.image = /impl/org/controlsfx/dialogs/resources/error32.png
+#error48.image = /impl/org/controlsfx/dialogs/resources/error48.png
+error.image = /impl/org/controlsfx/dialogs/resources/oxygen/48/dialog-error.png
+
+confirm.image = /impl/org/controlsfx/dialogs/resources/oxygen/48/system-help.png
+
+java48.image = /impl/org/controlsfx/dialogs/resources/java48.png
+
+command.link.icon=/impl/org/controlsfx/dialogs/resources/arrow-green-right.png
+
+common.ok.button = Ok
+common.cancel.button = Cancel
+common.yes.button = Yes
+common.no.button = No
+common.close.button = Close
+common.detail.button.more = Show Details
+common.detail.button.less = Hide Details
+
+exception.dialog.title = Exception Details
+exception.dialog.label = The exception stacktrace was:
+

src/org/controlsfx/control/cell/MediaImageCell.java

-/**
- * Copyright (c) 2013, ControlsFX
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *     * Neither the name of ControlsFX, any associated website, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL CONTROLSFX BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.controlsfx.control.cell;
-
-import org.controlsfx.control.GridCell;
-
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.scene.media.Media;
-import javafx.scene.media.MediaPlayer;
-import javafx.scene.media.MediaPlayerBuilder;
-import javafx.scene.media.MediaView;
-import javafx.scene.media.MediaViewBuilder;
-
-public class MediaImageCell extends GridCell<Media> {
-	
-	private MediaPlayer mediaPlayer;
-	private final MediaView mediaView;
-	
-	public MediaImageCell() {
-		getStyleClass().add("media-grid-cell");
-		
-        mediaView = MediaViewBuilder.create().mediaPlayer(mediaPlayer).build();
-        mediaView.fitHeightProperty().bind(heightProperty());
-        mediaView.fitWidthProperty().bind(widthProperty());
-        mediaView.setMediaPlayer(mediaPlayer);
-	}
-	
-	public void pause() {
-		if(mediaPlayer != null) {
-			mediaPlayer.pause();
-		}
-	}
-	
-	public void play() {
-		if(mediaPlayer != null) {
-			mediaPlayer.play();
-		}
-	}
-	
-	public void stop() {
-		if(mediaPlayer != null) {
-			mediaPlayer.stop();
-		}
-	}
-	
-	@Override protected void updateItem(Media item, boolean empty) {
-	    super.updateItem(item, empty);
-	    
-	    getChildren().clear();
-        if (mediaPlayer != null) {
-            mediaPlayer.stop();
-        }
-	    
-	    if (empty) {
-	        setGraphic(null);
-	    } else {
-	        mediaPlayer = MediaPlayerBuilder.create().media(item).build();
-	        mediaView.setMediaPlayer(mediaPlayer);
-	        setGraphic(mediaView);
-	    }
-	}
-}

src/org/controlsfx/control/gridview.css

-.grid-view {
-	-fx-vertical-cell-spacing: 12;
-	-fx-horizontal-cell-spacing: 12;
-	-fx-cell-height: 64;
-	-fx-cell-width: 64;
-	-fx-horizontal-alignment: CENTER;
-}

src/org/controlsfx/dialogs/Dialog.java

-/**
- * Copyright (c) 2013, ControlsFX
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *     * Neither the name of ControlsFX, any associated website, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL CONTROLSFX BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.controlsfx.dialogs;
-
-import static org.controlsfx.dialogs.Dialog.DialogAction.CANCEL;
-import static org.controlsfx.dialogs.DialogResources.getString;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import javafx.beans.property.BooleanProperty;
-import javafx.beans.property.ObjectProperty;
-import javafx.beans.property.Property;
-import javafx.beans.property.SimpleBooleanProperty;
-import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.property.SimpleStringProperty;
-import javafx.beans.property.StringProperty;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.event.EventHandler;
-import javafx.geometry.Insets;
-import javafx.geometry.Pos;
-import javafx.scene.Node;
-import javafx.scene.control.Button;
-import javafx.scene.control.ButtonBase;
-import javafx.scene.control.Hyperlink;
-import javafx.scene.control.Label;
-import javafx.scene.control.Tooltip;
-import javafx.scene.image.Image;
-import javafx.scene.image.ImageView;
-import javafx.scene.layout.BorderPane;
-import javafx.scene.layout.HBox;
-import javafx.scene.layout.Pane;
-import javafx.scene.layout.Priority;
-import javafx.scene.layout.Region;
-import javafx.scene.layout.VBox;
-import javafx.scene.text.TextAlignment;
-import javafx.stage.Window;
-
-import com.sun.javafx.Utils;
-
-
-/**
- * API for creating standardized dialogs which include: 
- * masthead, content, expandable content and button bar
- */
-@SuppressWarnings("restriction")
-public class Dialog {
-
-    // According to the UI spec, the width of the main message text in the upper
-    // panel should be 426 pixels.
-    private static int MAIN_TEXT_WIDTH = 400;
-
-    // Specifies the minimum allowable width for all buttons in the dialog
-    private static int MINIMUM_BUTTON_WIDTH = 75;
-
-    private final FXDialog dialog;
-
-    // Dialog result.
-    private Action result = DialogAction.CANCEL;
-
-    private final BorderPane contentPane;
-    
-    // list containing user input buttons at bottom of dialog
-    private List<ButtonBase> buttons = new ArrayList<ButtonBase>();
-
-    /**
-     * Creates a dialog using specified owner and title
-     * @param owner dialog window  owner
-     * @param title dialog title
-     */
-    public Dialog(Window owner, String title) {
-        this.dialog = new FXDialog(title, owner, true);
-        this.contentPane = new BorderPane();
-        contentPane.setPrefWidth(MAIN_TEXT_WIDTH);
-        this.dialog.setContentPane(contentPane);
-    }
-
-    /**
-     * Shows dialog and wait for user response.
-     * @return action used to close the dialog
-     */
-    public Action show() {
-        try {
-            buildDialogContent();
-            dialog.centerOnScreen();
-            dialog.showAndWait();
-            return result;
-        } catch (Throwable e) {
-            e.printStackTrace();
-            return CANCEL;
-        }
-    }
-
-    /**
-     * Hides the dialog
-     */
-    public void hide() {
-        dialog.hide();
-    }
-
-
-    /////// Resizable property
-
-    /**
-     * Determines of dialog is resizable
-     * @return true if dialog is resizable
-     */
-    public final boolean isResizable() {
-        return dialog.isResizable();
-    }
-
-    /**
-     * Changes the dialog's resizable attribute
-     * @param resizable true if dialog should be resizable
-     */
-    public final void setResizable(boolean resizable) {
-        dialog.setResizable(resizable);
-    }
-
-    public BooleanProperty resizableProperty() {
-        return dialog.resizableProperty();
-    }
-
-    // Resizable property
-
-    private final ObjectProperty<Image> graphicProperty = new SimpleObjectProperty<Image>();
-
-    /**
-     * Dialog's graphic.
-     * Presented either in the masthead, if one is available or in the content 
-     * @return dialog's graphic
-     */
-    public final Image getGraphic() {
-        return graphicProperty.get();
-    }
-
-    /**
-     * Sets dialog's graphic
-     * @param graphic dialog's graphic. Used if not null.
-     */
-    public final void setGraphic(Image graphic) {
-        this.graphicProperty.set(graphic);
-    }
-
-    public ObjectProperty<Image> graphicProperty() {
-        return graphicProperty;
-    }
-
-    // Masthead property
-
-    private final ObjectProperty<Node> masthead = new SimpleObjectProperty<Node>();
-
-    /**
-     * Node which acts as dialog's masthead
-     * @return dialog's masthead
-     */
-    public final Node getMasthead() {
-        return masthead.get();
-    }
-
-    /**
-     * Assigns dialog's masthead. Any Node can be used 
-     * @param masthead future masthead
-     */
-    public final void setMasthead(Node masthead) {
-        this.masthead.setValue(masthead);
-    }
-
-    /**
-     * Asssign string as dialog's masthead
-     * @param mastheadText masthead text. Used if not null.
-     */
-    public final void setMasthead(String mastheadText) {
-
-        if (mastheadText == null)
-            return;
-
-        BorderPane mastheadPanel = new BorderPane();
-        mastheadPanel.getStyleClass().add("top-panel");
-
-        // Create panel with text area and graphic or just a background image:
-        // Create topPanel's components. UITextArea determines
-        // the size of the dialog by defining the number of columns
-        // based on font size.
-        Label mastheadTextArea = new Label();
-        mastheadTextArea.setPrefWidth(MAIN_TEXT_WIDTH);
-        mastheadTextArea.setMinSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
-        mastheadTextArea.setWrapText(true);
-        mastheadTextArea.getStyleClass().add("masthead-label-1");
-
-        VBox mastheadVBox = new VBox();
-        mastheadVBox.setAlignment(Pos.CENTER_LEFT);
-        mastheadTextArea.setText(mastheadText);
-        mastheadTextArea.setAlignment(Pos.CENTER_LEFT);
-        mastheadVBox.getChildren().add(mastheadTextArea);
-
-        mastheadPanel.setLeft(mastheadVBox);
-        BorderPane.setAlignment(mastheadVBox, Pos.CENTER_LEFT);
-
-        if (graphicProperty.get() != null) {
-            mastheadPanel.setRight(new ImageView(graphicProperty.get()));
-        }
-
-        setMasthead(mastheadPanel);
-    }
-
-    public ObjectProperty<Node> mastheadProperty() {
-        return masthead;
-    }
-
-    // Content property
-
-    private final ObjectProperty<Node> content = new SimpleObjectProperty<Node>();
-
-    /**
-     * Current dialog's content as Node
-     * @return dialog's content
-     */
-    public final Node getContent() {
-        return content.get();
-    }
-
-    /**
-     * Assign dialog content. Any Node can be used
-     * @param content dialog's content
-     */
-    public final void setContent(Node content) {
-        this.content.setValue(content);
-    }
-
-    /**
-     * Assign text as dialog's content
-     * @param contentText content text. Used if not null.
-     */
-    public final void setContent(String contentText) {
-        if (contentText == null) return;
-
-        Label label = new Label(contentText);
-        label.getStyleClass().addAll("center-content-area", "main-message");
-        label.setAlignment(Pos.TOP_LEFT);
-        label.setTextAlignment(TextAlignment.LEFT);
-
-        // FIXME we don't want to restrict the width, but for now this works ok
-        label.setPrefWidth(MAIN_TEXT_WIDTH);
-        label.setMaxWidth(360);
-        label.setWrapText(true);
-
-        setContent(label);
-    }
-
-    public ObjectProperty<Node> contentProperty() {
-        return content;
-    }
-
-    // ExpandableContent property
-
-    private final ObjectProperty<Node> expandableContentProperty = new SimpleObjectProperty<Node>();
-
-    /**
-     * Dialog's expandable content
-     * @return expandable content as Node
-     */
-    public final Node getExpandableContent() {
-        return expandableContentProperty.get();
-    }
-
-    /**
-     * Assigns dialog's expandable content. Any Node can be used.
-     * By default expandable conntent is hidden and can be made visible by clicking "Mode Details" hyperlink,
-     * which appears automatically of non-null expandable content exists 
-     * @param content expandable content.
-     */
-    public final void setExpandableContent(Node content) {
-        this.expandableContentProperty.set(content);
-    }
-
-    public ObjectProperty<Node> expandableContentProperty() {
-        return expandableContentProperty;
-    }
-
-    // Actions
-
-    private final ObservableList<Action> actions = FXCollections.<Action> observableArrayList();
-
-    /**
-     * Observable list of actions used for dialog's buttons bar.
-     * Can be used for manipulating actions before presenting the dialog
-     * @return actions list
-     */
-    public final ObservableList<Action> getActions() {
-        return actions;
-    }
-
-    /**
-     * Common dialog actions
-     */
-    public enum DialogAction implements Action {
-
-        CANCEL( getString("common.cancel.button"), true, true),
-        CLOSE ( getString("common.close.button"),  true, true),
-        NO    ( getString("common.no.button"),     true, true),
-        OK    ( getString("common.ok.button"),     true, false),
-        YES   ( getString("common.yes.button"),    true, false);
-
-        private final StringProperty title = new SimpleStringProperty();
-        private final BooleanProperty disabled = new SimpleBooleanProperty(false);
-        private final Property<Tooltip> tooltip = new SimpleObjectProperty<Tooltip>();
-        private final Property<Node> graphic = new SimpleObjectProperty<Node>();
-        
-        private boolean isClosing;
-        private boolean isDefault;
-        private boolean isCancel;
-
-        /**
-         * Creates common dialog action
-         * @param title action title
-         * @param isDefault true if it should be default action on the dialog. Only one can be, so the first us used.
-         * @param isCancel true if action produces the dialog cancellation. 
-         * @param isClosing true if action is closing the dialog
-         */
-        private DialogAction(String title, boolean isDefault, boolean isCancel, boolean isClosing) {
-            this.title.set(title);
-            this.isClosing = isClosing;
-            this.isDefault = isDefault;
-            this.isCancel = isCancel;
-        }
-
-        private DialogAction(String title, boolean isDefault, boolean isCancel) {
-            this(title, isDefault, isCancel, true);
-        }
-
-        @Override public StringProperty textProperty() {
-            return title;
-        }
-
-        @Override public BooleanProperty disabledProperty() {
-            return disabled;
-        }
-        
-        @Override public Property<Tooltip> tooltipProperty() {
-            return tooltip;
-        }
-        
-        @Override public Property<Node> graphicProperty() {
-            return graphic;
-        }
-        
-        public boolean isClosing() {
-            return isClosing;
-        }
-
-        public boolean isDefault() {
-            return isDefault;
-        }
-
-        public boolean isCancel() {
-            return isCancel;
-        }
-
-        public void execute(ActionEvent ae) {
-            if ( !disabled.get() ) {
-                if (ae.getSource() instanceof Dialog && (isCancel() || isClosing()) ) {
-                    Dialog dlg = ((Dialog) ae.getSource());
-                    dlg.result = DialogAction.this;        
-                    dlg.hide();
-                }
-            }
-        }
-
-    }
-
-    // ///// PRIVATE API ///////////////////////////////////////////////////////////////////
-
-    /**
-     * TODO delete me - this is just for testing!!
-     */
-    private static boolean isMac = false;
-    private static boolean isWindows = false;
-
-    static void setMacOS(boolean b) {
-        isMac = b;
-        isWindows = !b;
-    }
-
-    static void setWindows(boolean b) {
-        isMac = !b;
-        isWindows = b;
-    }
-
-    private boolean isMac() {
-        return isMac || (!isWindows && Utils.isMac());
-    }
-
-    private boolean hasMasthead() {
-        return getMasthead() != null;
-    }
-
-    private boolean hasExpandableContent() {
-        return getExpandableContent() != null;
-    }
-
-    protected void buildDialogContent() {
-
-        contentPane.getChildren().clear();
-        contentPane.getStyleClass().add("center-content-panel");
-
-        if (hasMasthead()) {
-            contentPane.setTop(getMasthead());
-        }
-        contentPane.setCenter(createCenterPanel());
-
-    }
-
-    private Pane createCenterPanel() {
-        VBox centerPanel = new VBox();
-        centerPanel.getStyleClass().add("center-panel");
-
-        BorderPane contentPanel = new BorderPane();
-        contentPanel.getStyleClass().add("center-content-panel");
-        VBox.setVgrow(contentPanel, Priority.ALWAYS);
-
-        Node content = getContent();
-        content = content == null ? new Pane() : content;
-        contentPanel.setCenter(content);
-        
-        // dialog image can go to the left if there is no masthead
-        if (!hasMasthead() && graphicProperty != null) {
-            ImageView dialogGraphic = new ImageView(graphicProperty.get());
-            Pane pane = new Pane(dialogGraphic);
-            pane.setPadding(new Insets(0, 0, 0, 12));
-            contentPanel.setLeft(pane);
-        }
-
-        if (contentPanel.getChildren().size() > 0) {
-            centerPanel.getChildren().add(contentPanel);
-            VBox.setVgrow(contentPanel, Priority.ALWAYS);
-        }
-
-        if (hasExpandableContent()) {
-
-            Node ec = getExpandableContent();
-
-            centerPanel.getChildren().add(ec);
-            VBox.setVgrow(contentPanel, Priority.NEVER);
-            VBox.setVgrow(ec, Priority.ALWAYS);
-            VBox.setMargin(ec, new Insets(12, 0, 12, 0));
-
-            ec.setVisible(false);
-            ec.managedProperty().bind(ec.visibleProperty());
-        }
-
-        if ( !getActions().isEmpty() || hasExpandableContent()) {
-           centerPanel.getChildren().add(createButtonPanel());
-        }
-
-        return centerPanel;
-    }
-
-    private Node createButtonPanel() {
-        buttons.clear();
-        
-        final HBox buttonsPanel = new HBox(6) {
-            @Override protected void layoutChildren() {
-                resizeButtons();
-                super.layoutChildren();
-            }
-        };
-        buttonsPanel.getStyleClass().add("button-bar");
-
-        // show details button if expandable content is present
-        if (hasExpandableContent()) {
-            buttonsPanel.getChildren().add(createDetailsButton());
-        }
-
-        // push buttons to the right
-        buttonsPanel.getChildren().add(createButtonSpacer());
-
-        boolean hasDefault = false;
-        for (Action cmd : getActions()) {
-            ButtonBase b = createButton(cmd, !hasDefault);
-            // keep only first default button
-            if (b instanceof Button) {
-                hasDefault |= ((Button) b).isDefaultButton();
-            }
-            buttons.add(b);
-        }
-
-        // OS based order of buttons
-        if (isMac())
-            Collections.reverse(buttons);
-
-        for (ButtonBase button : buttons) {
-            buttonsPanel.getChildren().add(button);
-        }
-
-        return buttonsPanel;
-    }
-    
-    /*
-     * According to UI guidelines, all buttons should have the same length. This
-     * function is to define the longest button in the array of buttons and set
-     * all buttons in array to be the length of the longest button.
-     */
-    private void resizeButtons() {
-        // Find out the longest button...
-        double widest = MINIMUM_BUTTON_WIDTH;
-        for (ButtonBase btn : buttons) {
-            if (btn == null)
-                continue;
-            widest = Math.max(widest, btn.prefWidth(-1));
-        }
-
-        // ...and set all buttons to be this width
-        for (ButtonBase btn : buttons) {
-            if (btn == null)
-                continue;
-            btn.setPrefWidth(btn.isVisible() ? widest : 0);
-        }
-    }
-
-    private Node createButtonSpacer() {
-        Region spacer = new Region();
-        HBox.setHgrow(spacer, Priority.ALWAYS);
-        return spacer;
-    }
-
-    private Hyperlink createDetailsButton() {
-        final Hyperlink detailsButton = new Hyperlink();
-        detailsButton.getStyleClass().setAll("details-button", "more");
-        final String moreText = getString("common.detail.button.more");
-        final String lessText = getString("common.detail.button.less");
-        detailsButton.setText(moreText);
-        detailsButton.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent ae) {
-                final Node content = getExpandableContent();
-                setResizable(!content.isVisible());
-                content.setVisible(!content.isVisible());
-                detailsButton.setText(content.isVisible() ? lessText : moreText);
-                dialog.sizeToScene();
-                detailsButton.getStyleClass().setAll("details-button", (content.isVisible() ? "less" : "more"));
-            }
-        });
-        return detailsButton;
-    }
-
-    private Button createButton(final Action action, boolean keepDefault) {
-        Button button = new Button();
-        
-        button.textProperty().bindBidirectional(action.textProperty());
-        button.disableProperty().bindBidirectional(action.disabledProperty());
-        button.tooltipProperty().bindBidirectional(action.tooltipProperty());
-        button.graphicProperty().bindBidirectional(action.graphicProperty());
-        
-        if (action instanceof DialogAction) {
-            DialogAction stdAction = (DialogAction) action;
-            button.setDefaultButton(stdAction.isDefault() && keepDefault);
-            button.setCancelButton(stdAction.isCancel());
-        }
-        button.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent ae) {
-                action.execute(new ActionEvent(Dialog.this, ae.getTarget()));
-                result = action;
-            }
-        });
-        return button;
-    }
-
-}