changeset 8053:f4e58490d406

Automated merge with http://hg.openjdk.java.net/openjfx/8u/rt
author kcr
date Fri, 12 Sep 2014 17:15:09 -0700
parents b2acb41b44b1 06b496f5c779
children 957060db6fa5 458738de0bf8
files modules/fxpackager/src/main/native/launcher/linux/DeployPlatform.h modules/fxpackager/src/main/native/launcher/linux/launcher.c modules/fxpackager/src/main/native/launcher/linux/xmlparser.c modules/fxpackager/src/main/native/launcher/linux/xmlparser.h modules/fxpackager/src/main/native/launcher/win/IconSwap.cpp modules/fxpackager/src/main/native/launcher/win/WinLauncherSvc.cpp
diffstat 295 files changed, 21477 insertions(+), 6067 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Wed Sep 10 08:28:43 2014 -0700
+++ b/.hgignore	Fri Sep 12 17:15:09 2014 -0700
@@ -34,3 +34,7 @@
 *~
 modules/web/src/main/native/LayoutTests
 apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/about/about.properties
+.git
+.gitattributes
+.gitignore
+*.sdf
--- a/.idea/fxpackager.iml	Wed Sep 10 08:28:43 2014 -0700
+++ b/.idea/fxpackager.iml	Fri Sep 12 17:15:09 2014 -0700
@@ -10,7 +10,7 @@
       <excludeFolder url="file://$MODULE_DIR$/modules/fxpackager/build" />
     </content>
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="graphics" exported="" />
+    <orderEntry type="module" module-name="controls" exported="" />
     <orderEntry type="inheritedJdk" />
   </component>
 </module>
--- a/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/i18n/SceneBuilderApp.properties	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/i18n/SceneBuilderApp.properties	Fri Sep 12 17:15:09 2014 -0700
@@ -133,6 +133,8 @@
 menu.title.enable.guides = Enable Alig_nment Guides
 menu.title.show.sample.controller.skeleton = Show Sample Controller S_keleton
 menu.title.zoom = _Zoom
+menu.title.zoom.in = Zoom _In
+menu.title.zoom.out = Zoom _Out
 # Modify menu items
 menu.title.fit = Fi_t to Parent
 menu.title.use.computed.sizes = _Use Computed Sizes
--- a/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/menubar/MenuBar.fxml	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/menubar/MenuBar.fxml	Fri Sep 12 17:15:09 2014 -0700
@@ -193,6 +193,7 @@
               <items>
                 <MenuItem fx:id="wrapInAnchorPaneMenuItem" mnemonicParsing="false" text="AnchorPane" />
                 <MenuItem fx:id="wrapInBorderPaneMenuItem" mnemonicParsing="false" text="BorderPane" />
+                <MenuItem fx:id="wrapInDialogPaneMenuItem" mnemonicParsing="false" text="DialogPane" />
                 <MenuItem fx:id="wrapInFlowPaneMenuItem" mnemonicParsing="false" text="FlowPane" />
                 <MenuItem fx:id="wrapInGridPaneMenuItem" mnemonicParsing="false" text="GridPane" />
                 <MenuItem fx:id="wrapInGroupMenuItem" mnemonicParsing="false" text="Group" />
@@ -202,6 +203,7 @@
                 <MenuItem fx:id="wrapInSplitPaneMenuItem" mnemonicParsing="false" text="SplitPane" />
                 <MenuItem fx:id="wrapInStackPaneMenuItem" mnemonicParsing="false" text="StackPane" />
                 <MenuItem fx:id="wrapInTabPaneMenuItem" mnemonicParsing="false" text="TabPane" />
+                <MenuItem fx:id="wrapInTextFlowMenuItem" mnemonicParsing="false" text="TextFlow" />
                 <MenuItem fx:id="wrapInTilePaneMenuItem" mnemonicParsing="false" text="TilePane" />
                 <MenuItem fx:id="wrapInTitledPaneMenuItem" mnemonicParsing="false" text="TitledPane" />
                 <MenuItem fx:id="wrapInToolBarMenuItem" mnemonicParsing="false" text="ToolBar" />
--- a/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/menubar/MenuBarController.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/menubar/MenuBarController.java	Fri Sep 12 17:15:09 2014 -0700
@@ -278,6 +278,8 @@
     @FXML
     private MenuItem wrapInBorderPaneMenuItem;
     @FXML
+    private MenuItem wrapInDialogPaneMenuItem;
+    @FXML
     private MenuItem wrapInFlowPaneMenuItem;
     @FXML
     private MenuItem wrapInGridPaneMenuItem;
@@ -294,6 +296,8 @@
     @FXML
     private MenuItem wrapInTabPaneMenuItem;
     @FXML
+    private MenuItem wrapInTextFlowMenuItem;
+    @FXML
     private MenuItem wrapInTilePaneMenuItem;
     @FXML
     private MenuItem wrapInTitledPaneMenuItem;
@@ -523,6 +527,7 @@
         assert sendBackwardMenuItem != null;
         assert wrapInAnchorPaneMenuItem != null;
         assert wrapInBorderPaneMenuItem != null;
+        assert wrapInDialogPaneMenuItem != null;
         assert wrapInFlowPaneMenuItem != null;
         assert wrapInGridPaneMenuItem != null;
         assert wrapInHBoxMenuItem != null;
@@ -531,6 +536,7 @@
         assert wrapInSplitPaneMenuItem != null;
         assert wrapInStackPaneMenuItem != null;
         assert wrapInTabPaneMenuItem != null;
+        assert wrapInTextFlowMenuItem != null;
         assert wrapInTilePaneMenuItem != null;
         assert wrapInTitledPaneMenuItem != null;
         assert wrapInToolBarMenuItem != null;
@@ -910,6 +916,7 @@
                 new KeyCharacterCombination("[", modifier)); //NOI18N
         wrapInAnchorPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_ANCHOR_PANE));
         wrapInBorderPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_BORDER_PANE));
+        wrapInDialogPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_DIALOG_PANE));
         wrapInFlowPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_FLOW_PANE));
         wrapInGroupMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_GROUP));
         wrapInGridPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_GRID_PANE));
@@ -919,6 +926,7 @@
         wrapInSplitPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_SPLIT_PANE));
         wrapInStackPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_STACK_PANE));
         wrapInTabPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_TAB_PANE));
+        wrapInTextFlowMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_TEXT_FLOW));
         wrapInTilePaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_TILE_PANE));
         wrapInTitledPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_TITLED_PANE));
         wrapInToolBarMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_TOOL_BAR));
@@ -1104,9 +1112,25 @@
     /*
      * Private (zoom menu)
      */
+    
+    final static double[] scalingTable = {0.25, 0.50, 0.75, 1.00, 1.50, 2.0, 4.0};
+    
     private void updateZoomMenu() {
         final double[] scalingTable = {0.25, 0.50, 0.75, 1.00, 1.50, 2.0, 4.0};
 
+        final MenuItem zoomInMenuItem = new MenuItem(I18N.getString("menu.title.zoom.in"));
+        zoomInMenuItem.setUserData(new ZoomInActionController());
+        zoomInMenuItem.setAccelerator(new KeyCharacterCombination("+", modifier)); //NOI18N
+        zoomMenu.getItems().add(zoomInMenuItem);
+        
+        final MenuItem zoomOutMenuItem = new MenuItem(I18N.getString("menu.title.zoom.out"));
+        zoomOutMenuItem.setUserData(new ZoomOutActionController());
+        zoomOutMenuItem.setAccelerator(new KeyCharacterCombination("+",  //NOI18N
+                KeyCombination.SHIFT_DOWN, modifier));
+        zoomMenu.getItems().add(zoomOutMenuItem);
+        
+        zoomMenu.getItems().add(new SeparatorMenuItem());
+        
         for (int i = 0; i < scalingTable.length; i++) {
             final double scaling = scalingTable[i];
             final String title = String.format("%.0f%%", scaling * 100); //NOI18N
@@ -1116,6 +1140,20 @@
         }
     }
 
+    
+    private static int findZoomScaleIndex(double zoomScale) {
+        int result = -1;
+        
+        for (int i = 0; i < scalingTable.length; i++) {
+            if (MathUtils.equals(zoomScale, scalingTable[i])) {
+                result = i;
+                break;
+            }
+        }
+        
+        return result;
+    }
+    
     private void updateOpenRecentMenuItems() {
 
         final List<MenuItem> menuItems = new ArrayList<>();
@@ -1695,6 +1733,67 @@
 
     }
     
+    class ZoomInActionController extends MenuItemController {
+
+        @Override
+        public boolean canPerform() {
+            boolean result;
+            if (documentWindowController == null) {
+                result = false;
+            } else {
+                final ContentPanelController contentPanelController
+                        = documentWindowController.getContentPanelController();
+                final int currentScalingIndex
+                        = findZoomScaleIndex(contentPanelController.getScaling());
+                result = currentScalingIndex+1 < scalingTable.length;
+            }
+            return result;
+        }
+
+        @Override
+        public void perform() {
+            final ContentPanelController contentPanelController
+                    = documentWindowController.getContentPanelController();
+            final int currentScalingIndex
+                    = findZoomScaleIndex(contentPanelController.getScaling());
+            final double newScaling
+                    = scalingTable[currentScalingIndex+1];
+            contentPanelController.setScaling(newScaling);
+        }
+
+    }
+    
+
+    class ZoomOutActionController extends MenuItemController {
+
+        @Override
+        public boolean canPerform() {
+            boolean result;
+            if (documentWindowController == null) {
+                result = false;
+            } else {
+                final ContentPanelController contentPanelController
+                        = documentWindowController.getContentPanelController();
+                final int currentScalingIndex
+                        = findZoomScaleIndex(contentPanelController.getScaling());
+                result = 0 <= currentScalingIndex-1;
+            }
+            return result;
+        }
+
+        @Override
+        public void perform() {
+            final ContentPanelController contentPanelController
+                    = documentWindowController.getContentPanelController();
+            final int currentScalingIndex
+                    = findZoomScaleIndex(contentPanelController.getScaling());
+            final double newScaling
+                    = scalingTable[currentScalingIndex-1];
+            contentPanelController.setScaling(newScaling);
+        }
+
+    }
+    
     private void updatePreviewWindowSize(Size size) {
         if (documentWindowController != null
                 && documentWindowController.getPreviewWindowController() != null
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/EditorController.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/EditorController.java	Fri Sep 12 17:15:09 2014 -0700
@@ -34,7 +34,8 @@
 import com.oracle.javafx.scenebuilder.kit.editor.EditorPlatform.Theme;
 import com.oracle.javafx.scenebuilder.kit.editor.drag.DragController;
 import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
-import com.oracle.javafx.scenebuilder.kit.editor.job.BatchJob;
+import com.oracle.javafx.scenebuilder.kit.editor.job.AddContextMenuToSelectionJob;
+import com.oracle.javafx.scenebuilder.kit.editor.job.AddTooltipToSelectionJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.ModifySelectionJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.BringForwardJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.BringToFrontJob;
@@ -44,7 +45,6 @@
 import com.oracle.javafx.scenebuilder.kit.editor.job.FitToParentSelectionJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.ImportFileJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.IncludeFileJob;
-import com.oracle.javafx.scenebuilder.kit.editor.job.InsertAsAccessoryJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.InsertAsSubComponentJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
 import com.oracle.javafx.scenebuilder.kit.editor.job.PasteIntoJob;
@@ -61,7 +61,6 @@
 import com.oracle.javafx.scenebuilder.kit.editor.job.gridpane.MoveColumnJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.gridpane.MoveRowJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.gridpane.v2.SpanJob;
-import com.oracle.javafx.scenebuilder.kit.editor.job.atomic.UpdateSelectionJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.wrap.AbstractWrapInJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.wrap.UnwrapJob;
 import com.oracle.javafx.scenebuilder.kit.editor.messagelog.MessageLog;
@@ -183,6 +182,7 @@
         UNWRAP,
         WRAP_IN_ANCHOR_PANE,
         WRAP_IN_BORDER_PANE,
+        WRAP_IN_DIALOG_PANE,
         WRAP_IN_FLOW_PANE,
         WRAP_IN_GRID_PANE,
         WRAP_IN_GROUP,
@@ -192,6 +192,7 @@
         WRAP_IN_SPLIT_PANE,
         WRAP_IN_STACK_PANE,
         WRAP_IN_TAB_PANE,
+        WRAP_IN_TEXT_FLOW,
         WRAP_IN_TILE_PANE,
         WRAP_IN_TITLED_PANE,
         WRAP_IN_TOOL_BAR,
@@ -1062,6 +1063,10 @@
                 performWrap(javafx.scene.layout.BorderPane.class);
                 break;
             }
+            case WRAP_IN_DIALOG_PANE: {
+                performWrap(javafx.scene.control.DialogPane.class);
+                break;
+            }
             case WRAP_IN_FLOW_PANE: {
                 performWrap(javafx.scene.layout.FlowPane.class);
                 break;
@@ -1098,6 +1103,10 @@
                 performWrap(javafx.scene.control.TabPane.class);
                 break;
             }
+            case WRAP_IN_TEXT_FLOW: {
+                performWrap(javafx.scene.text.TextFlow.class);
+                break;
+            }
             case WRAP_IN_TILE_PANE: {
                 performWrap(javafx.scene.layout.TilePane.class);
                 break;
@@ -1292,6 +1301,10 @@
                 result = canPerformWrap(javafx.scene.layout.BorderPane.class);
                 break;
             }
+            case WRAP_IN_DIALOG_PANE: {
+                result = canPerformWrap(javafx.scene.control.DialogPane.class);
+                break;
+            }
             case WRAP_IN_FLOW_PANE: {
                 result = canPerformWrap(javafx.scene.layout.FlowPane.class);
                 break;
@@ -1328,6 +1341,10 @@
                 result = canPerformWrap(javafx.scene.control.TabPane.class);
                 break;
             }
+            case WRAP_IN_TEXT_FLOW: {
+                result = canPerformWrap(javafx.scene.text.TextFlow.class);
+                break;
+            }
             case WRAP_IN_TILE_PANE: {
                 result = canPerformWrap(javafx.scene.layout.TilePane.class);
                 break;
@@ -1565,18 +1582,10 @@
         newObject.moveToFxomDocument(getFxomDocument());
         final FXOMObject rootObject = getFxomDocument().getFxomRoot();
         if (rootObject == null) { // Empty document
-            job = new BatchJob(this, true,
-                    I18N.getString("drop.job.insert.library.item", libraryItem.getName()));
-            ((BatchJob) job).addSubJob(new SetDocumentRootJob(newObject, this));
-            // New root container may need a resize
-            final DesignHierarchyMask mask = new DesignHierarchyMask(newObject);
-            if (mask.needResizeWhenTopElement()) {
-                ((BatchJob) job).addSubJob(new UsePredefinedSizeJob(this,
-                        EditorController.Size.SIZE_DEFAULT, newObject));
-            }
-                        
-            // As for non root element the inserted object is selected.
-            ((BatchJob) job).addSubJob(new UpdateSelectionJob(newObject, this));
+            final String description
+                    = I18N.getString("drop.job.insert.library.item", libraryItem.getName());
+            job = new SetDocumentRootJob(newObject, true /* usePredefinedSize */, description, this);
+
         } else {
             if (selection.isEmpty() || selection.isSelected(rootObject)) {
                 // No selection or root is selected -> we insert below root
@@ -1619,7 +1628,7 @@
                 final FXOMObject rootObject = getFxomDocument().getFxomRoot();
                 if (rootObject == null) { // Empty document
                     final SetDocumentRootJob job = new SetDocumentRootJob(
-                            newItemRoot, this);
+                            newItemRoot, true /* usePredefinedSize */, "unused", this); //NOI18N
                     result = job.isExecutable();
                 } else {
                     if (selection.isEmpty() || selection.isSelected(rootObject)) {
@@ -1680,6 +1689,7 @@
             classesSupportingWrapping = new ArrayList<>();
             classesSupportingWrapping.add(javafx.scene.layout.AnchorPane.class);
             classesSupportingWrapping.add(javafx.scene.layout.BorderPane.class);
+            classesSupportingWrapping.add(javafx.scene.control.DialogPane.class);
             classesSupportingWrapping.add(javafx.scene.layout.FlowPane.class);
             classesSupportingWrapping.add(javafx.scene.layout.GridPane.class);
             classesSupportingWrapping.add(javafx.scene.Group.class);
@@ -1689,6 +1699,7 @@
             classesSupportingWrapping.add(javafx.scene.control.SplitPane.class);
             classesSupportingWrapping.add(javafx.scene.layout.StackPane.class);
             classesSupportingWrapping.add(javafx.scene.control.TabPane.class);
+            classesSupportingWrapping.add(javafx.scene.text.TextFlow.class);
             classesSupportingWrapping.add(javafx.scene.layout.TilePane.class);
             classesSupportingWrapping.add(javafx.scene.control.TitledPane.class);
             classesSupportingWrapping.add(javafx.scene.control.ToolBar.class);
@@ -2201,42 +2212,9 @@
      * selected objects.
      */
     public void performAddContextMenu() {
-        assert canPerformAddContextMenu(); // (1)
-
-        // Build the ContextMenu item from the library builtin items
-        final String contextMenuFxmlPath = "builtin/ContextMenu.fxml"; //NOI18N
-        final URL contextMenuFxmlURL 
-                = BuiltinLibrary.class.getResource(contextMenuFxmlPath);
-        assert contextMenuFxmlURL != null;
-        try {
-            final String contextMenuFxmlText
-                    = FXOMDocument.readContentFromURL(contextMenuFxmlURL);
-
-            final AbstractSelectionGroup asg = selection.getGroup();
-            assert asg instanceof ObjectSelectionGroup; // Because of (1)
-            final ObjectSelectionGroup osg = (ObjectSelectionGroup) asg;
-
-            final BatchJob job = new BatchJob(this, true,
-                    I18N.getString("label.action.edit.add.context.menu"));
-            for (FXOMObject fxomObject : osg.getItems()) {
-                final FXOMDocument contextMenuDocument = new FXOMDocument(
-                        contextMenuFxmlText,
-                        contextMenuFxmlURL, getLibrary().getClassLoader(), null);
-
-                assert contextMenuDocument != null;
-                final FXOMObject contextMenuObject = contextMenuDocument.getFxomRoot();
-                assert contextMenuObject != null;
-                contextMenuObject.moveToFxomDocument(getFxomDocument());
-                assert contextMenuDocument.getFxomRoot() == null;
-
-                final Job insertJob = new InsertAsAccessoryJob(
-                        contextMenuObject, fxomObject, Accessory.CONTEXT_MENU, this);
-                job.addSubJob(insertJob);
-            }
-            getJobManager().push(job);
-        } catch (IOException x) {
-            throw new IllegalStateException("Bug in " + getClass().getSimpleName(), x); //NOI18N
-        }
+        assert canPerformAddContextMenu();
+        final Job addContextMenuJob = new AddContextMenuToSelectionJob(this);
+        getJobManager().push(addContextMenuJob);
     }
     
     /**
@@ -2257,42 +2235,9 @@
      */
     public void performAddTooltip() {
         assert canPerformAddTooltip(); // (1)
-
-        // Build the Tooltip item from the library builtin items
-        final String tooltipFxmlPath = "builtin/Tooltip.fxml"; //NOI18N
-        final URL tooltipFxmlURL 
-                = BuiltinLibrary.class.getResource(tooltipFxmlPath);
-        assert tooltipFxmlURL != null;
-        try {
-            final String tooltipFxmlText
-                    = FXOMDocument.readContentFromURL(tooltipFxmlURL);
-
-            final AbstractSelectionGroup asg = selection.getGroup();
-            assert asg instanceof ObjectSelectionGroup; // Because of (1)
-            final ObjectSelectionGroup osg = (ObjectSelectionGroup) asg;
-
-            final BatchJob job = new BatchJob(this, true,
-                    I18N.getString("label.action.edit.add.tooltip"));
-            for (FXOMObject fxomObject : osg.getItems()) {
-                final FXOMDocument tooltipDocument = new FXOMDocument(
-                        tooltipFxmlText,
-                        tooltipFxmlURL, getLibrary().getClassLoader(), null);
-
-                assert tooltipDocument != null;
-                final FXOMObject tooltipObject = tooltipDocument.getFxomRoot();
-                assert tooltipObject != null;
-                tooltipObject.moveToFxomDocument(getFxomDocument());
-                assert tooltipDocument.getFxomRoot() == null;
-
-                final Job insertJob = new InsertAsAccessoryJob(
-                        tooltipObject, fxomObject, Accessory.TOOLTIP, this);
-                job.addSubJob(insertJob);
-            }
-            getJobManager().push(job);
-        } catch (IOException x) {
-            throw new IllegalStateException("Bug in " + getClass().getSimpleName(), x); //NOI18N
-        }
-    }
+        final Job addTooltipJob = new AddTooltipToSelectionJob(this);
+        getJobManager().push(addTooltipJob);
+   }
     
     /**
      * Returns the URL of the CSS style associated to EditorController class.
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/drag/target/RootDropTarget.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/drag/target/RootDropTarget.java	Fri Sep 12 17:15:09 2014 -0700
@@ -34,13 +34,9 @@
 
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
 import com.oracle.javafx.scenebuilder.kit.editor.drag.source.AbstractDragSource;
-import com.oracle.javafx.scenebuilder.kit.editor.drag.source.LibraryDragSource;
-import com.oracle.javafx.scenebuilder.kit.editor.job.BatchJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
 import com.oracle.javafx.scenebuilder.kit.editor.job.SetDocumentRootJob;
-import com.oracle.javafx.scenebuilder.kit.editor.job.UsePredefinedSizeJob;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
-import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
 
 /**
  *
@@ -68,30 +64,8 @@
         assert dragSource.getDraggedObjects().size() == 1;
         
         final FXOMObject newRoot = dragSource.getDraggedObjects().get(0);
-        
-        /*
-         * Containers coming from the library are automatically resized.
-         */
-        final UsePredefinedSizeJob resizeJob;
-        if (dragSource instanceof LibraryDragSource) {
-            final DesignHierarchyMask mask = new DesignHierarchyMask(newRoot);
-            if (mask.needResizeWhenTopElement()) {
-                resizeJob = new UsePredefinedSizeJob(editorController, 
-                        EditorController.Size.SIZE_DEFAULT, newRoot);
-            } else {
-                resizeJob = null;
-            }
-        } else {
-            resizeJob = null;
-        }
-        
-        final BatchJob result = new BatchJob(editorController, true, dragSource.makeDropJobDescription());
-        result.addSubJob(new SetDocumentRootJob(newRoot, editorController));
-        if ((resizeJob != null) && resizeJob.isExecutable()) {
-            result.addSubJob(resizeJob);
-        }
-        
-        return result ;
+        return new SetDocumentRootJob(newRoot, true /* usePredefinedSize */, 
+                dragSource.makeDropJobDescription(), editorController);
     }
     
     @Override
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/AddContextMenuToSelectionJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * 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 Oracle Corporation 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 THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS 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 com.oracle.javafx.scenebuilder.kit.editor.job;
+
+import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
+import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.AbstractSelectionGroup;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.ObjectSelectionGroup;
+import com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument;
+import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
+import com.oracle.javafx.scenebuilder.kit.library.BuiltinLibrary;
+import com.oracle.javafx.scenebuilder.kit.library.Library;
+import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ */
+public class AddContextMenuToSelectionJob extends BatchSelectionJob {
+    
+    private Map<FXOMObject, FXOMObject> contextMenuMap; // Initialized lazily
+
+    public AddContextMenuToSelectionJob(EditorController editorController) {
+        super(editorController);
+    }
+    
+    public Collection<FXOMObject> getContextMenus() {
+        constructContextMenuMap();
+        return contextMenuMap.values();
+    }
+
+    /*
+     * BatchSelectionJob
+     */
+
+    @Override
+    protected List<Job> makeSubJobs() {
+        
+        constructContextMenuMap();
+        
+        final List<Job> result = new LinkedList<>();
+        for (Map.Entry<FXOMObject, FXOMObject> e : contextMenuMap.entrySet()) {
+            final FXOMObject fxomObject = e.getKey();
+            final FXOMObject contextMenuObject = e.getValue();
+            final Job insertJob = new InsertAsAccessoryJob(
+                    contextMenuObject, fxomObject, 
+                    DesignHierarchyMask.Accessory.CONTEXT_MENU, 
+                    getEditorController());
+            result.add(insertJob);
+        }
+        
+        return result;
+    }
+
+    @Override
+    protected AbstractSelectionGroup getNewSelectionGroup() {
+        final Collection<FXOMObject> contextMenus = contextMenuMap.values();
+        assert contextMenus.isEmpty() == false;
+        final FXOMObject hitMenu = contextMenus.iterator().next();
+        
+        return new ObjectSelectionGroup(contextMenus, hitMenu, null);
+    }
+
+    /*
+     * CompositeJob
+     */
+    
+    @Override
+    protected String makeDescription() {
+        return I18N.getString("label.action.edit.add.context.menu");
+    }
+    
+    
+    /*
+     * Private
+     */
+    
+    private void constructContextMenuMap() {
+        if (contextMenuMap == null) {
+            contextMenuMap = new LinkedHashMap<>();
+            
+            // Build the ContextMenu item from the library builtin items
+            final String contextMenuFxmlPath = "builtin/ContextMenu.fxml"; //NOI18N
+            final URL contextMenuFxmlURL 
+                    = BuiltinLibrary.class.getResource(contextMenuFxmlPath);
+            assert contextMenuFxmlURL != null;
+
+            final AbstractSelectionGroup asg = getEditorController().getSelection().getGroup();
+            assert asg instanceof ObjectSelectionGroup; // Because of (1)
+            final ObjectSelectionGroup osg = (ObjectSelectionGroup) asg;
+
+            try {
+                final String contextMenuFxmlText
+                        = FXOMDocument.readContentFromURL(contextMenuFxmlURL);
+
+                final FXOMDocument fxomDocument = getEditorController().getFxomDocument();
+                final Library library = getEditorController().getLibrary();
+                for (FXOMObject fxomObject : osg.getItems()) {
+                    final FXOMDocument contextMenuDocument = new FXOMDocument(
+                            contextMenuFxmlText,
+                            contextMenuFxmlURL, library.getClassLoader(), null);
+
+                    assert contextMenuDocument != null;
+                    final FXOMObject contextMenuObject = contextMenuDocument.getFxomRoot();
+                    assert contextMenuObject != null;
+                    contextMenuObject.moveToFxomDocument(fxomDocument);
+                    assert contextMenuDocument.getFxomRoot() == null;
+
+                    contextMenuMap.put(fxomObject, contextMenuObject);
+                }
+            } catch(IOException x) {
+                throw new IllegalStateException("Bug in " + getClass().getSimpleName(), x); //NOI18N
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/AddTooltipToSelectionJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * 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 Oracle Corporation 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 THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS 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 com.oracle.javafx.scenebuilder.kit.editor.job;
+
+import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
+import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.AbstractSelectionGroup;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.ObjectSelectionGroup;
+import com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument;
+import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
+import com.oracle.javafx.scenebuilder.kit.library.BuiltinLibrary;
+import com.oracle.javafx.scenebuilder.kit.library.Library;
+import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ */
+public class AddTooltipToSelectionJob extends BatchSelectionJob {
+    
+    private Map<FXOMObject, FXOMObject> tooltipMap; // Initialized lazily
+
+    public AddTooltipToSelectionJob(EditorController editorController) {
+        super(editorController);
+    }
+    
+    public Collection<FXOMObject> getTooltips() {
+        constructTooltipMap();
+        return tooltipMap.values();
+    }
+
+    /*
+     * BatchSelectionJob
+     */
+
+    @Override
+    protected List<Job> makeSubJobs() {
+        
+        constructTooltipMap();
+        
+        final List<Job> result = new LinkedList<>();
+        for (Map.Entry<FXOMObject, FXOMObject> e : tooltipMap.entrySet()) {
+            final FXOMObject fxomObject = e.getKey();
+            final FXOMObject tooltipObject = e.getValue();
+            final Job insertJob = new InsertAsAccessoryJob(
+                    tooltipObject, fxomObject, 
+                    DesignHierarchyMask.Accessory.TOOLTIP, 
+                    getEditorController());
+            result.add(insertJob);
+        }
+        
+        return result;
+    }
+
+    @Override
+    protected AbstractSelectionGroup getNewSelectionGroup() {
+        final Collection<FXOMObject> contextMenus = tooltipMap.values();
+        assert contextMenus.isEmpty() == false;
+        final FXOMObject hitMenu = contextMenus.iterator().next();
+        
+        return new ObjectSelectionGroup(contextMenus, hitMenu, null);
+    }
+
+    /*
+     * CompositeJob
+     */
+    
+    @Override
+    protected String makeDescription() {
+        return I18N.getString("label.action.edit.add.tooltip");
+    }
+    
+    
+    /*
+     * Private
+     */
+    
+    private void constructTooltipMap() {
+        if (tooltipMap == null) {
+            tooltipMap = new LinkedHashMap<>();
+            
+            // Build the ContextMenu item from the library builtin items
+            final String tooltipFxmlPath = "builtin/Tooltip.fxml"; //NOI18N
+            final URL tooltipFxmlURL 
+                    = BuiltinLibrary.class.getResource(tooltipFxmlPath);
+            assert tooltipFxmlURL != null;
+
+            final AbstractSelectionGroup asg = getEditorController().getSelection().getGroup();
+            assert asg instanceof ObjectSelectionGroup; // Because of (1)
+            final ObjectSelectionGroup osg = (ObjectSelectionGroup) asg;
+
+            try {
+                final String contextMenuFxmlText
+                        = FXOMDocument.readContentFromURL(tooltipFxmlURL);
+
+                final FXOMDocument fxomDocument = getEditorController().getFxomDocument();
+                final Library library = getEditorController().getLibrary();
+                for (FXOMObject fxomObject : osg.getItems()) {
+                    final FXOMDocument contextMenuDocument = new FXOMDocument(
+                            contextMenuFxmlText,
+                            tooltipFxmlURL, library.getClassLoader(), null);
+
+                    assert contextMenuDocument != null;
+                    final FXOMObject contextMenuObject = contextMenuDocument.getFxomRoot();
+                    assert contextMenuObject != null;
+                    contextMenuObject.moveToFxomDocument(fxomDocument);
+                    assert contextMenuDocument.getFxomRoot() == null;
+
+                    tooltipMap.put(fxomObject, contextMenuObject);
+                }
+            } catch(IOException x) {
+                throw new IllegalStateException("Bug in " + getClass().getSimpleName(), x); //NOI18N
+            }
+        }
+    }
+}
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/BringForwardJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/BringForwardJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -33,54 +33,62 @@
 
 import com.oracle.javafx.scenebuilder.kit.editor.job.atomic.ReIndexObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
-import com.oracle.javafx.scenebuilder.kit.editor.selection.GridSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.ObjectSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.Selection;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 /**
  *
  */
-public class BringForwardJob extends BatchDocumentJob {
+public class BringForwardJob extends InlineDocumentJob {
 
     public BringForwardJob(EditorController editorController) {
         super(editorController);
     }
 
     @Override
-    protected List<Job> makeSubJobs() {
+    public boolean isExecutable() {
+        final Selection selection = getEditorController().getSelection();
+        if (selection.getGroup() instanceof ObjectSelectionGroup == false) {
+            return false;
+        }
+        final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
+        for (FXOMObject item : osg.getSortedItems()) {
+            final FXOMObject nextSlibing = item.getNextSlibing();
+            if (nextSlibing == null) {
+                return false;
+            }
+        }
+        return true;
+    }
 
+    @Override
+    protected List<Job> makeAndExecuteSubJobs() {
+
+        assert isExecutable(); // (1)
         final List<Job> result = new ArrayList<>();
 
-        final Set<FXOMObject> candidates = new HashSet<>();
         final Selection selection = getEditorController().getSelection();
-        if (selection.getGroup() instanceof ObjectSelectionGroup) {
-            final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
-            candidates.addAll(osg.getFlattenItems());
-        } else if (selection.getGroup() instanceof GridSelectionGroup) {
-            // GridPane rows / columns are selected : BringForwardJob is meaningless
-            // Just do nothing
-        } else {
-            assert selection.getGroup() == null :
-                    "Add implementation for " + selection.getGroup();
-        }
+        assert selection.getGroup() instanceof ObjectSelectionGroup; // Because of (1)
+        final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
+        final List<FXOMObject> candidates = osg.getSortedItems();
 
-        for (FXOMObject candidate : candidates) {
+        for (int i = candidates.size() - 1; i >= 0; i--) {
+            final FXOMObject candidate = candidates.get(i);
             final FXOMObject nextSlibing = candidate.getNextSlibing();
             if (nextSlibing != null) {
                 final FXOMObject beforeChild = nextSlibing.getNextSlibing();
                 final ReIndexObjectJob subJob = new ReIndexObjectJob(
                         candidate, beforeChild, getEditorController());
                 if (subJob.isExecutable()) {
+                    subJob.execute();
                     result.add(subJob);
                 }
             }
         }
-        
+
         return result;
     }
 
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/BringToFrontJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/BringToFrontJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -33,40 +33,47 @@
 
 import com.oracle.javafx.scenebuilder.kit.editor.job.atomic.ReIndexObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
-import com.oracle.javafx.scenebuilder.kit.editor.selection.GridSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.ObjectSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.Selection;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 /**
  *
  */
-public class BringToFrontJob extends BatchDocumentJob {
+public class BringToFrontJob extends InlineDocumentJob {
 
     public BringToFrontJob(EditorController editorController) {
         super(editorController);
     }
+
     @Override
-    protected List<Job> makeSubJobs() {
+    public boolean isExecutable() {
+        final Selection selection = getEditorController().getSelection();
+        if (selection.getGroup() instanceof ObjectSelectionGroup == false) {
+            return false;
+        }
+        final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
+        for (FXOMObject item : osg.getSortedItems()) {
+            final FXOMObject nextSlibing = item.getNextSlibing();
+            if (nextSlibing == null) {
+                return false;
+            }
+        }
+        return true;
+    }
 
+    @Override
+    protected List<Job> makeAndExecuteSubJobs() {
+
+        assert isExecutable(); // (1)
         final List<Job> result = new ArrayList<>();
 
-        final Set<FXOMObject> candidates = new HashSet<>();
         final Selection selection = getEditorController().getSelection();
-        if (selection.getGroup() instanceof ObjectSelectionGroup) {
-            final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
-            candidates.addAll(osg.getFlattenItems());
-        } else if (selection.getGroup() instanceof GridSelectionGroup) {
-            // GridPane rows / columns are selected : BringToFrontJob is meaningless
-            // Just do nothing
-        } else {
-            assert selection.getGroup() == null :
-                    "Add implementation for " + selection.getGroup();
-        }
+        assert selection.getGroup() instanceof ObjectSelectionGroup; // Because of (1)
+        final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
+        final List<FXOMObject> candidates = osg.getSortedItems();
 
         for (FXOMObject candidate : candidates) {
             final FXOMObject nextSlibing = candidate.getNextSlibing();
@@ -74,11 +81,12 @@
                 final ReIndexObjectJob subJob = new ReIndexObjectJob(
                         candidate, null, getEditorController());
                 if (subJob.isExecutable()) {
+                    subJob.execute();
                     result.add(subJob);
                 }
             }
         }
-        
+
         return result;
     }
 
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/CutSelectionJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/CutSelectionJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -40,7 +40,7 @@
 /**
  *
  */
-public class CutSelectionJob extends BatchSelectionJob {
+public class CutSelectionJob extends InlineSelectionJob {
 
     private DeleteSelectionJob deleteSelectionSubJob;
 
@@ -49,13 +49,18 @@
     }
 
     @Override
+    public boolean isExecutable() {
+        return getEditorController().canPerformControlAction(ControlAction.COPY);
+    }
+
+    @Override
     protected AbstractSelectionGroup getNewSelectionGroup() {
         // Selection emptied
         return null;
     }
 
     @Override
-    protected List<Job> makeSubJobs() {
+    protected List<Job> makeAndExecuteSubJobs() {
 
         final List<Job> result = new ArrayList<>();
         if (getEditorController().canPerformControlAction(ControlAction.COPY)) {
@@ -65,6 +70,7 @@
 
             deleteSelectionSubJob = new DeleteSelectionJob(getEditorController());
             if (deleteSelectionSubJob.isExecutable()) {
+                deleteSelectionSubJob.execute(); 
                 result.add(deleteSelectionSubJob);
             }
         }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/InlineDocumentJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/InlineDocumentJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -56,7 +56,7 @@
     }
 
     @Override
-    public final void execute() {
+    public void execute() {
         final FXOMDocument fxomDocument
                 = getEditorController().getFxomDocument();
         fxomDocument.beginUpdate();
@@ -65,7 +65,7 @@
     }
 
     @Override
-    public final void undo() {
+    public void undo() {
         final FXOMDocument fxomDocument
                 = getEditorController().getFxomDocument();
         fxomDocument.beginUpdate();
@@ -76,7 +76,7 @@
     }
 
     @Override
-    public final void redo() {
+    public void redo() {
         final FXOMDocument fxomDocument
                 = getEditorController().getFxomDocument();
         fxomDocument.beginUpdate();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/InlineSelectionJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * 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 Oracle Corporation 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 THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS 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 com.oracle.javafx.scenebuilder.kit.editor.job;
+
+import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.AbstractSelectionGroup;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.Selection;
+import java.util.List;
+
+/**
+ * This Job updates the FXOM document AND the selection at execution time.
+ *
+ * The sub jobs are created and executed just after.
+ */
+public abstract class InlineSelectionJob extends InlineDocumentJob {
+
+    private AbstractSelectionGroup oldSelectionGroup;
+    private AbstractSelectionGroup newSelectionGroup;
+
+    public InlineSelectionJob(EditorController editorController) {
+        super(editorController);
+    }
+
+    protected final AbstractSelectionGroup getOldSelectionGroup() {
+        return oldSelectionGroup;
+    }
+
+    protected abstract AbstractSelectionGroup getNewSelectionGroup();
+
+    @Override
+    public final void execute() {
+        final Selection selection = getEditorController().getSelection();
+        try {
+            selection.beginUpdate();
+            oldSelectionGroup = selection.getGroup() == null ? null
+                    : selection.getGroup().clone();
+            super.execute();
+            newSelectionGroup = getNewSelectionGroup();
+            selection.select(newSelectionGroup);
+            selection.endUpdate();
+
+        } catch (CloneNotSupportedException x) {
+            // Emergency code
+            throw new RuntimeException(x);
+        }
+    }
+
+    @Override
+    public final void undo() {
+        final Selection selection = getEditorController().getSelection();
+        selection.beginUpdate();
+        super.undo();
+        selection.select(oldSelectionGroup);
+        selection.endUpdate();
+    }
+
+    @Override
+    public final void redo() {
+        final Selection selection = getEditorController().getSelection();
+        selection.beginUpdate();
+        super.redo();
+        selection.select(newSelectionGroup);
+        selection.endUpdate();
+    }
+
+    @Override
+    protected abstract List<Job> makeAndExecuteSubJobs();
+}
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/SendBackwardJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/SendBackwardJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -33,41 +33,47 @@
 
 import com.oracle.javafx.scenebuilder.kit.editor.job.atomic.ReIndexObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
-import com.oracle.javafx.scenebuilder.kit.editor.selection.GridSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.ObjectSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.Selection;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 /**
  *
  */
-public class SendBackwardJob extends BatchDocumentJob {
+public class SendBackwardJob extends InlineDocumentJob {
 
     public SendBackwardJob(EditorController editorController) {
         super(editorController);
     }
 
     @Override
-    protected List<Job> makeSubJobs() {
+    public boolean isExecutable() {
+        final Selection selection = getEditorController().getSelection();
+        if (selection.getGroup() instanceof ObjectSelectionGroup == false) {
+            return false;
+        }
+        final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
+        for (FXOMObject item : osg.getSortedItems()) {
+            final FXOMObject previousSlibing = item.getPreviousSlibing();
+            if (previousSlibing == null) {
+                return false;
+            }
+        }
+        return true;
+    }
 
+    @Override
+    protected List<Job> makeAndExecuteSubJobs() {
+
+        assert isExecutable(); // (1)
         final List<Job> result = new ArrayList<>();
 
-        final Set<FXOMObject> candidates = new HashSet<>();
         final Selection selection = getEditorController().getSelection();
-        if (selection.getGroup() instanceof ObjectSelectionGroup) {
-            final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
-            candidates.addAll(osg.getFlattenItems());
-        } else if (selection.getGroup() instanceof GridSelectionGroup) {
-            // GridPane rows / columns are selected : SendBackwardJob is meaningless
-            // Just do nothing
-        } else {
-            assert selection.getGroup() == null :
-                    "Add implementation for " + selection.getGroup();
-        }
+        assert selection.getGroup() instanceof ObjectSelectionGroup; // Because of (1)
+        final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
+        final List<FXOMObject> candidates = osg.getSortedItems();
 
         for (FXOMObject candidate : candidates) {
             final FXOMObject previousSlibing = candidate.getPreviousSlibing();
@@ -75,11 +81,12 @@
                 final ReIndexObjectJob subJob = new ReIndexObjectJob(
                         candidate, previousSlibing, getEditorController());
                 if (subJob.isExecutable()) {
+                    subJob.execute();
                     result.add(subJob);
                 }
             }
         }
-        
+
         return result;
     }
 
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/SendToBackJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/SendToBackJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -33,44 +33,51 @@
 
 import com.oracle.javafx.scenebuilder.kit.editor.job.atomic.ReIndexObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
-import com.oracle.javafx.scenebuilder.kit.editor.selection.GridSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.ObjectSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.Selection;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMPropertyC;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 /**
  *
  */
-public class SendToBackJob extends BatchDocumentJob {
+public class SendToBackJob extends InlineDocumentJob {
 
     public SendToBackJob(EditorController editorController) {
         super(editorController);
     }
 
     @Override
-    protected List<Job> makeSubJobs() {
+    public boolean isExecutable() {
+        final Selection selection = getEditorController().getSelection();
+        if (selection.getGroup() instanceof ObjectSelectionGroup == false) {
+            return false;
+        }
+        final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
+        for (FXOMObject item : osg.getSortedItems()) {
+            final FXOMObject previousSlibing = item.getPreviousSlibing();
+            if (previousSlibing == null) {
+                return false;
+            }
+        }
+        return true;
+    }
 
+    @Override
+    protected List<Job> makeAndExecuteSubJobs() {
+
+        assert isExecutable(); // (1)
         final List<Job> result = new ArrayList<>();
 
-        final Set<FXOMObject> candidates = new HashSet<>();
         final Selection selection = getEditorController().getSelection();
-        if (selection.getGroup() instanceof ObjectSelectionGroup) {
-            final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
-            candidates.addAll(osg.getFlattenItems());
-        } else if (selection.getGroup() instanceof GridSelectionGroup) {
-            // GridPane rows / columns are selected : SendToBackJob is meaningless
-            // Just do nothing
-        } else {
-            assert selection.getGroup() == null :
-                    "Add implementation for " + selection.getGroup();
-        }
+        assert selection.getGroup() instanceof ObjectSelectionGroup; // Because of (1)
+        final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
+        final List<FXOMObject> candidates = osg.getSortedItems();
 
-        for (FXOMObject candidate : candidates) {
+        for (int i = candidates.size() - 1; i >= 0; i--) {
+            final FXOMObject candidate = candidates.get(i);
             final FXOMObject previousSlibing = candidate.getPreviousSlibing();
             if (previousSlibing != null) {
                 final FXOMPropertyC parentProperty = candidate.getParentProperty();
@@ -78,11 +85,12 @@
                 final ReIndexObjectJob subJob = new ReIndexObjectJob(
                         candidate, beforeChild, getEditorController());
                 if (subJob.isExecutable()) {
+                    subJob.execute();
                     result.add(subJob);
                 }
             }
         }
-        
+
         return result;
     }
 
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/SetDocumentRootJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/SetDocumentRootJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -36,6 +36,7 @@
 import com.oracle.javafx.scenebuilder.kit.editor.selection.AbstractSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.editor.selection.ObjectSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
+import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -45,14 +46,27 @@
 public class SetDocumentRootJob extends BatchSelectionJob {
 
     private final FXOMObject newRoot;
+    private final boolean usePredefinedSize;
+    private final String description;
 
-    public SetDocumentRootJob(FXOMObject newRoot, EditorController editorController) {
+    public SetDocumentRootJob(FXOMObject newRoot, 
+            boolean usePredefinedSize, 
+            String description,
+            EditorController editorController) {
         super(editorController);
 
         assert editorController.getFxomDocument() != null;
         assert (newRoot == null) || (newRoot.getFxomDocument() == editorController.getFxomDocument());
+        assert description != null;
 
         this.newRoot = newRoot;
+        this.usePredefinedSize = usePredefinedSize;
+        this.description = description;
+    }
+    
+    public SetDocumentRootJob(FXOMObject newRoot, EditorController editorController) {
+        this(newRoot, false /* usePredefinedSize */, 
+                SetDocumentRootJob.class.getSimpleName(), editorController);
     }
 
     public FXOMObject getNewRoot() {
@@ -69,15 +83,25 @@
             if (newRoot != null) {
                 result.add(new PrunePropertiesJob(newRoot, null, getEditorController()));
             }
+            
+            // Adds job that effectively modifes the root
             result.add(new SetFxomRootJob(newRoot, getEditorController()));
+            
+            // If need, we add a job for resizing the root object
+            if ((newRoot != null) && usePredefinedSize) {
+                final DesignHierarchyMask mask = new DesignHierarchyMask(newRoot);
+                if (mask.needResizeWhenTopElement()) {
+                    result.add(new UsePredefinedSizeJob(getEditorController(), 
+                            EditorController.Size.SIZE_DEFAULT, newRoot));
+                }
+            }
         }
         return result;
     }
 
     @Override
     protected String makeDescription() {
-        // Not expected to reach the user
-        return getClass().getSimpleName();
+        return description;
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/reference/UpdateReferencesJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/reference/UpdateReferencesJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -33,7 +33,6 @@
 package com.oracle.javafx.scenebuilder.kit.editor.job.reference;
 
 import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
-import com.oracle.javafx.scenebuilder.kit.editor.selection.Selection;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -72,9 +71,7 @@
     @Override
     public void execute() {
         final FXOMDocument fxomDocument = getEditorController().getFxomDocument();
-        final Selection selection = getEditorController().getSelection();
         
-        selection.beginUpdate();
         fxomDocument.beginUpdate();
         
         // First executes the subjob => references may become valid
@@ -86,37 +83,30 @@
         fixJobs.addAll(updater.getExecutedJobs());
         
         fxomDocument.endUpdate();
-        selection.endUpdate();
     }
 
     @Override
     public void undo() {
         final FXOMDocument fxomDocument = getEditorController().getFxomDocument();
-        final Selection selection = getEditorController().getSelection();
         
-        selection.beginUpdate();
         fxomDocument.beginUpdate();
         for (int i = fixJobs.size() - 1; i >= 0; i--) {
             fixJobs.get(i).undo();
         }
         subJob.undo();
         fxomDocument.endUpdate();
-        selection.endUpdate();
     }
 
     @Override
     public void redo() {
         final FXOMDocument fxomDocument = getEditorController().getFxomDocument();
-        final Selection selection = getEditorController().getSelection();
         
-        selection.beginUpdate();
         fxomDocument.beginUpdate();
         subJob.redo();
         for (Job fixJob : fixJobs) {
             fixJob.redo();
         }
         fxomDocument.endUpdate();
-        selection.endUpdate();
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/wrap/AbstractWrapInJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/wrap/AbstractWrapInJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -60,6 +60,7 @@
 import javafx.scene.Parent;
 import javafx.scene.chart.Axis;
 import javafx.scene.control.Accordion;
+import javafx.scene.control.DialogPane;
 import javafx.scene.control.TabPane;
 import javafx.scene.layout.BorderPane;
 
@@ -85,6 +86,8 @@
             job = new WrapInAnchorPaneJob(editorController);
         } else if (wrappingClass == javafx.scene.layout.BorderPane.class) {
             job = new WrapInBorderPaneJob(editorController);
+        } else if (wrappingClass == javafx.scene.control.DialogPane.class) {
+            job = new WrapInDialogPaneJob(editorController);
         } else if (wrappingClass == javafx.scene.layout.FlowPane.class) {
             job = new WrapInFlowPaneJob(editorController);
         } else if (wrappingClass == javafx.scene.layout.GridPane.class) {
@@ -103,6 +106,8 @@
             job = new WrapInStackPaneJob(editorController);
         } else if (wrappingClass == javafx.scene.control.TabPane.class) {
             job = new WrapInTabPaneJob(editorController);
+        } else if (wrappingClass == javafx.scene.text.TextFlow.class) {
+            job = new WrapInTextFlowJob(editorController);
         } else if (wrappingClass == javafx.scene.layout.TilePane.class) {
             job = new WrapInTilePaneJob(editorController);
         } else if (wrappingClass == javafx.scene.control.TitledPane.class) {
@@ -143,7 +148,8 @@
             return true;
         }
         final Object parentSceneGraphObject = parent.getSceneGraphObject();
-        if (parentSceneGraphObject instanceof BorderPane) {
+        if (parentSceneGraphObject instanceof BorderPane
+                || parentSceneGraphObject instanceof DialogPane) {
             return osg.getItems().size() == 1;
         }
         return !(parentSceneGraphObject instanceof Accordion) // accepts only TitledPanes
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/wrap/UnwrapJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/wrap/UnwrapJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -52,13 +52,11 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
 import java.util.ArrayList;
 import java.util.List;
-import javafx.geometry.Bounds;
 import javafx.geometry.Point2D;
 import javafx.scene.Node;
 import javafx.scene.control.DialogPane;
 import javafx.scene.control.TabPane;
 import javafx.scene.layout.BorderPane;
-import javafx.scene.text.TextFlow;
 
 /**
  * Main class used for the unwrap jobs.
@@ -90,23 +88,13 @@
             return false;
         }
         final FXOMInstance containerInstance = (FXOMInstance) container;
-        
+
         // Unresolved custom type
         if (container.getSceneGraphObject() == null) {
             return false;
         }
-        
-        // Cannot unwrap TabPane
-        if (TabPane.class.isAssignableFrom(containerInstance.getDeclaredClass())) {
-            return false;
-        }
-        // Cannot unwrap all Pane subclasses (ex : BorderPane, TextFlow and DialogPane)
-        if (BorderPane.class.isAssignableFrom(containerInstance.getDeclaredClass())
-                || TextFlow.class.isAssignableFrom(containerInstance.getDeclaredClass())
-                || DialogPane.class.isAssignableFrom(containerInstance.getDeclaredClass())) {
-            return false;
-        }
-        // Can unwrap classes supporting wrapping except TabPane + some Pane subclasses (see above)
+
+        // Can unwrap ALL classes supporting wrapping
         boolean isAssignableFrom = false;
         for (Class<?> clazz : EditorController.getClassesSupportingWrapping()) {
             isAssignableFrom |= clazz.isAssignableFrom(
@@ -117,15 +105,7 @@
         }
 
         // Retrieve the num of children of the container to unwrap
-        final DesignHierarchyMask containerMask
-                = new DesignHierarchyMask(container);
-        int childrenCount;
-        if (containerMask.isAcceptingSubComponent()) {
-            childrenCount = containerMask.getSubComponentCount();
-        } else {
-            assert containerMask.isAcceptingAccessory(Accessory.CONTENT); // Because of (1)
-            childrenCount = containerMask.getAccessoryProperty(Accessory.CONTENT) == null ? 0 : 1;
-        }
+        int childrenCount = getChildren(containerInstance).size();
         // If the container to unwrap has no childen, it cannot be unwrapped
         if (childrenCount == 0) {
             return false;
@@ -145,12 +125,13 @@
             } else {
                 assert parentContainerMask.isAcceptingAccessory(Accessory.CONTENT)
                         || parentContainerMask.isAcceptingAccessory(Accessory.GRAPHIC)
-                        || parentContainerMask.getFxomObject().getSceneGraphObject() instanceof BorderPane;
+                        || parentContainerMask.getFxomObject().getSceneGraphObject() instanceof BorderPane
+                        || parentContainerMask.getFxomObject().getSceneGraphObject() instanceof DialogPane;
                 return childrenCount == 1;
             }
         }
     }
-    
+
     @Override
     protected List<Job> makeSubJobs() {
         final List<Job> result = new ArrayList<>();
@@ -323,37 +304,61 @@
 
         assert oldContainer.getSceneGraphObject() instanceof Node;
         final Node oldContainerNode = (Node) oldContainer.getSceneGraphObject();
-        final Bounds oldContainerBounds = oldContainerNode.getLayoutBounds();
-        final Point2D point = oldContainerNode.localToParent(
-                oldContainerBounds.getMinX(), oldContainerBounds.getMinY());
-
+        
         for (FXOMObject child : children) {
             assert child.getSceneGraphObject() instanceof Node;
+            
             final Node childNode = (Node) child.getSceneGraphObject();
-            double layoutX = point.getX() + childNode.getLayoutX();
-            double layoutY = point.getY() + childNode.getLayoutY();
+            final double currentLayoutX = childNode.getLayoutX();
+            final double currentLayoutY = childNode.getLayoutY();
+            
+            final Point2D nextLayoutXY = oldContainerNode.localToParent(
+                    currentLayoutX, currentLayoutY);
+            
             final ModifyObjectJob modifyLayoutX = WrapJobUtils.modifyObjectJob(
-                    (FXOMInstance) child, "layoutX", layoutX, getEditorController());
+                    (FXOMInstance) child, "layoutX", nextLayoutXY.getX(), getEditorController());
             jobs.add(modifyLayoutX);
             final ModifyObjectJob modifyLayoutY = WrapJobUtils.modifyObjectJob(
-                    (FXOMInstance) child, "layoutY", layoutY, getEditorController());
+                    (FXOMInstance) child, "layoutY", nextLayoutXY.getY(), getEditorController());
             jobs.add(modifyLayoutY);
         }
         return jobs;
     }
 
-    private List<FXOMObject> getChildren(final FXOMObject container) {
+    private List<FXOMObject> getChildren(final FXOMInstance container) {
         final DesignHierarchyMask mask = new DesignHierarchyMask(container);
         final List<FXOMObject> result = new ArrayList<>();
         if (mask.isAcceptingSubComponent()) {
-            for (int i = 0, count = mask.getSubComponentCount(); i < count; i++) {
-                final FXOMObject child = mask.getSubComponentAtIndex(i);
-                result.add(child);
+            // TabPane => unwrap first Tab CONTENT
+            if (TabPane.class.isAssignableFrom(container.getDeclaredClass())) {
+                final List<FXOMObject> tabs = mask.getSubComponents();
+                if (tabs.size() >= 1) {
+                    final FXOMObject tab = tabs.get(0);
+                    final DesignHierarchyMask tabMask = new DesignHierarchyMask(tab);
+                    assert tabMask.isAcceptingAccessory(Accessory.CONTENT);
+                    if (tabMask.getAccessory(Accessory.CONTENT) != null) {
+                        result.add(tabMask.getAccessory(Accessory.CONTENT));
+                    }
+                }
+            } else {
+                result.addAll(mask.getSubComponents());
             }
         } else {
-            assert mask.isAcceptingAccessory(Accessory.CONTENT);
-            final FXOMObject child = mask.getAccessory(Accessory.CONTENT);
-            result.add(child);
+            // BorderPane => unwrap CENTER accessory
+            if (mask.isAcceptingAccessory(Accessory.CENTER)
+                    && mask.getAccessory(Accessory.CENTER) != null) {
+                result.add(mask.getAccessory(Accessory.CENTER));
+            } 
+            // DialogPane => unwrap DP_CONTENT accessory
+            else if (mask.isAcceptingAccessory(Accessory.DP_CONTENT)
+                    && mask.getAccessory(Accessory.DP_CONTENT) != null) {
+                result.add(mask.getAccessory(Accessory.DP_CONTENT));
+            }
+            // ScrollPane => unwrap CONTENT accessory
+            else if (mask.isAcceptingAccessory(Accessory.CONTENT)
+                    && mask.getAccessory(Accessory.CONTENT) != null) {
+                result.add(mask.getAccessory(Accessory.CONTENT));
+            }
         }
         return result;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/wrap/WrapInDialogPaneJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * 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 Oracle Corporation 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 THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS 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 com.oracle.javafx.scenebuilder.kit.editor.job.wrap;
+
+import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
+import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
+import com.oracle.javafx.scenebuilder.kit.editor.job.atomic.AddPropertyJob;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.ObjectSelectionGroup;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.Selection;
+import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
+import com.oracle.javafx.scenebuilder.kit.fxom.FXOMPropertyC;
+import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
+import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask.Accessory;
+import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
+import java.util.ArrayList;
+import java.util.List;
+import javafx.scene.control.DialogPane;
+
+/**
+ * Job used to wrap selection in a DialogPane. Will use the CONTENT property.
+ */
+public class WrapInDialogPaneJob extends AbstractWrapInJob {
+
+    public WrapInDialogPaneJob(EditorController editorController) {
+        super(editorController);
+        newContainerClass = DialogPane.class;
+    }
+
+    @Override
+    protected boolean canWrapIn() {
+        final boolean result;
+        if (super.canWrapIn()) { // (1)
+            // Can wrap in CONTENT property single selection only
+            final Selection selection = getEditorController().getSelection();
+            assert selection.getGroup() instanceof ObjectSelectionGroup; // Because of (1)
+            final ObjectSelectionGroup osg = (ObjectSelectionGroup) selection.getGroup();
+            result = osg.getItems().size() == 1;
+        } else {
+            result = false;
+        }
+        return result;
+    }
+    
+    @Override
+    protected List<Job> wrapChildrenJobs(final List<FXOMObject> children) {
+
+        final List<Job> jobs = new ArrayList<>();
+
+        final DesignHierarchyMask newContainerMask
+                = new DesignHierarchyMask(newContainer);
+        assert newContainerMask.isAcceptingAccessory(Accessory.DP_CONTENT);
+
+        // Retrieve the new container property name to be used
+        final PropertyName newContainerPropertyName
+                = new PropertyName("content"); //NOI18N
+        // Create the new container property
+        final FXOMPropertyC newContainerProperty = new FXOMPropertyC(
+                newContainer.getFxomDocument(), newContainerPropertyName);
+
+        assert children.size() == 1;
+        // Update children before adding them to the new container
+        jobs.addAll(modifyChildrenJobs(newContainer, children));
+
+        // Add the children to the new container
+        jobs.addAll(addChildrenJobs(newContainerProperty, children));
+
+        // Add the new container property to the new container instance
+        assert newContainerProperty.getParentInstance() == null;
+        final Job addPropertyJob = new AddPropertyJob(
+                newContainerProperty,
+                newContainer,
+                -1, getEditorController());
+        jobs.add(addPropertyJob);
+
+        return jobs;
+    }
+}
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/wrap/WrapInScrollPaneJob.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/wrap/WrapInScrollPaneJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -32,10 +32,6 @@
 package com.oracle.javafx.scenebuilder.kit.editor.job.wrap;
 
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
-import com.oracle.javafx.scenebuilder.kit.editor.job.JobUtils;
-import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
-import java.util.List;
-import javafx.geometry.Bounds;
 import javafx.scene.control.ScrollPane;
 
 /**
@@ -47,13 +43,4 @@
         super(editorController);
         newContainerClass = ScrollPane.class;
     }
-
-    @Override
-    protected void modifyNewContainer(final List<FXOMObject> children) {
-        super.modifyNewContainer(children);
-
-        final Bounds unionOfBounds = WrapJobUtils.getUnionOfBounds(children);
-        JobUtils.setPrefViewportHeight(newContainer, ScrollPane.class, unionOfBounds.getHeight());
-        JobUtils.setPrefViewportWidth(newContainer, ScrollPane.class, unionOfBounds.getWidth());
-    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/wrap/WrapInTextFlowJob.java	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * 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 Oracle Corporation 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 THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS 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 com.oracle.javafx.scenebuilder.kit.editor.job.wrap;
+
+import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
+import javafx.scene.text.TextFlow;
+
+/**
+ * Job used to wrap selection in a TextFlow.
+ */
+public class WrapInTextFlowJob extends AbstractWrapInSubComponentJob {
+
+    public WrapInTextFlowJob(EditorController editorController) {
+        super(editorController);
+        newContainerClass = TextFlow.class;
+    }
+}
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/wrap/WrapJobUtils.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/wrap/WrapJobUtils.java	Fri Sep 12 17:15:09 2014 -0700
@@ -44,6 +44,7 @@
 import javafx.geometry.BoundingBox;
 import javafx.geometry.Bounds;
 import javafx.scene.Node;
+import javafx.scene.control.DialogPane;
 import javafx.scene.layout.BorderPane;
 
 /**
@@ -95,6 +96,32 @@
                 assert false;
                 result = null;
             }
+        } else if (container.getSceneGraphObject() instanceof DialogPane) {
+            // wrap/unwrap the child of a DialodPane
+            assert mask.isAcceptingAccessory(Accessory.DP_CONTENT);
+            assert mask.isAcceptingAccessory(Accessory.DP_GRAPHIC);
+            assert mask.isAcceptingAccessory(Accessory.EXPANDABLE_CONTENT);
+            assert mask.isAcceptingAccessory(Accessory.HEADER);
+            assert children != null && children.size() == 1; // wrap job is executable
+            final FXOMObject child = children.iterator().next();
+
+            final FXOMObject content = mask.getAccessory(Accessory.DP_CONTENT);
+            final FXOMObject graphic = mask.getAccessory(Accessory.DP_GRAPHIC);
+            final FXOMObject expandableContent = mask.getAccessory(Accessory.EXPANDABLE_CONTENT);
+            final FXOMObject header = mask.getAccessory(Accessory.HEADER);
+            // Return same accessory as the child container one
+            if (child.equals(content)) {
+                result = mask.getPropertyNameForAccessory(Accessory.DP_CONTENT);
+            } else if (child.equals(graphic)) {
+                result = mask.getPropertyNameForAccessory(Accessory.DP_GRAPHIC);
+            } else if (child.equals(expandableContent)) {
+                result = mask.getPropertyNameForAccessory(Accessory.EXPANDABLE_CONTENT);
+            } else if (child.equals(header)) {
+                result = mask.getPropertyNameForAccessory(Accessory.HEADER);
+            } else {
+                assert false;
+                result = null;
+            }
         } else if (mask.isAcceptingSubComponent()) {
             result = mask.getSubComponentPropertyName();
         } else if (mask.isAcceptingAccessory(Accessory.CONTENT)) {
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/AbstractDecoration.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/AbstractDecoration.java	Fri Sep 12 17:15:09 2014 -0700
@@ -40,6 +40,7 @@
 import javafx.scene.Group;
 import javafx.scene.Node;
 import javafx.scene.Scene;
+import javafx.scene.SubScene;
 import javafx.scene.transform.NonInvertibleTransformException;
 import javafx.scene.transform.Transform;
 
@@ -78,10 +79,6 @@
         this.sceneGraphObject = sceneGraphClass.cast(fxomObject.getSceneGraphObject());
         
         this.rootNode.sceneProperty().addListener((ChangeListener<Scene>) (ov, v1, v2) -> rootNodeSceneDidChange());
-        
-        // This is workaround for DTL-6628 
-        rootNode.getStyleClass().add("theme-presets"); //NOI18N
-        rootNode.getStyleClass().add("SBKIT-content-panel"); //NOI18N
     }
 
     public ContentPanelController getContentPanelController() {
@@ -138,13 +135,15 @@
     
     public Transform getSceneGraphObjectToDecorationTransform() {
         final Node proxy = getSceneGraphObjectProxy();
-        final Transform t1 = proxy.getLocalToSceneTransform();
+        final SubScene contentSubScene = contentPanelController.getContentSubScene();
+        final Transform t0 = proxy.getLocalToSceneTransform();
+        final Transform t1 = contentSubScene.getLocalToSceneTransform();
         final Transform t2 = getRootNode().getLocalToSceneTransform();
         final Transform result;
         
         try {
             final Transform i2 = t2.createInverse();
-            result = i2.createConcatenation(t1);
+            result = i2.createConcatenation(t1).createConcatenation(t0);
         } catch(NonInvertibleTransformException x) {
             throw new RuntimeException(x);
         }
@@ -191,11 +190,17 @@
     protected void startListeningToLocalToSceneTransform(Node node) {
         assert node != null;
         node.localToSceneTransformProperty().addListener(localToSceneTransformListener);
+        node.sceneProperty().addListener(sceneListener);
+        final SubScene contentSubScene = contentPanelController.getContentSubScene();
+        contentSubScene.localToSceneTransformProperty().addListener(localToSceneTransformListener);
     }
     
     protected void stopListeningToLocalToSceneTransform(Node node) {
         assert node != null;
         node.localToSceneTransformProperty().removeListener(localToSceneTransformListener);
+        node.sceneProperty().removeListener(sceneListener);
+        final SubScene contentSubScene = contentPanelController.getContentSubScene();
+        contentSubScene.localToSceneTransformProperty().removeListener(localToSceneTransformListener);
     }
     
     /*
@@ -226,5 +231,8 @@
         = (ov, v1, v2) -> layoutDecoration();
     
     private final ChangeListener<Transform> localToSceneTransformListener
-        = (ov, v1, v2) -> layoutDecoration();
+        = (ov, v1, v2) -> layoutDecoration(); 
+    
+    private final ChangeListener<Scene> sceneListener
+        = (ov, v1, v2) -> layoutDecoration(); 
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/ContentPanel.fxml	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/ContentPanel.fxml	Fri Sep 12 17:15:09 2014 -0700
@@ -47,15 +47,19 @@
       <children>
         <Group id="Group">
           <children>
-            <Group fx:id="scalingGroup" layoutX="-30.0" layoutY="-50.0">
+            <Group fx:id="scalingGroup">
               <children>
                 <Rectangle fx:id="extensionRect" arcHeight="5.0" arcWidth="5.0" fill="#ffc0cb00" height="200.0" layoutX="0.0" layoutY="0.0" mouseTransparent="false" stroke="TRANSPARENT" strokeType="INSIDE" width="200.0" />
                 <Label fx:id="backgroundPane" alignment="CENTER" layoutX="0.0" layoutY="0.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="-1.0" prefWidth="-1.0" style="" styleClass="stage-prompt" text="Label" textAlignment="CENTER" textFill="#9f9f9f" wrapText="true" />
-                <Group fx:id="contentGroup" layoutX="0.0" layoutY="0.0">
-                  <children>
-                    <Ellipse fill="DODGERBLUE" layoutX="0.0" layoutY="0.0" radiusX="140.0" radiusY="100.0" stroke="BLACK" strokeType="INSIDE" />
-                  </children>
-                </Group>
+                <SubScene fx:id="contentSubScene">
+                    <root>
+                        <Group fx:id="contentGroup" layoutX="0.0" layoutY="0.0">
+                          <children>
+                            <Ellipse fill="DODGERBLUE" layoutX="0.0" layoutY="0.0" radiusX="140.0" radiusY="100.0" stroke="BLACK" strokeType="INSIDE" />
+                          </children>
+                        </Group>
+                    </root>
+                </SubScene>
               </children>
             </Group>
           </children>
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/ContentPanelController.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/ContentPanelController.java	Fri Sep 12 17:15:09 2014 -0700
@@ -122,7 +122,7 @@
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask;
-import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
+import javafx.scene.SubScene;
 
 /**
  * This class creates and controls the <b>Content Panel</b> of Scene Builder Kit.
@@ -136,6 +136,7 @@
     @FXML private Rectangle extensionRect;
     @FXML private Label backgroundPane;
     @FXML private Group scalingGroup;
+    @FXML private SubScene contentSubScene;
     @FXML private Group contentGroup;
     @FXML private Pane glassLayer;
     @FXML private Group outlineLayer;
@@ -365,16 +366,23 @@
                 final FXOMObject nodeFxomObject = mask.getClosestFxNode();
                 if (nodeFxomObject != null) {
                     final Node node = (Node) nodeFxomObject.getSceneGraphObject();
-                    union.add(node.localToScene(node.getLayoutBounds(), true /* rootScene */));
+                    assert node.getLayoutBounds() != null;
+                    final Bounds nodeBounds = node.localToScene(node.getLayoutBounds(), true /* rootScene */);
+                    assert nodeBounds != null;
+                    union.add(nodeBounds);
                 }
             }
         }
 
         if (union.getResult() != null) {
             final Node content = scrollPane.getContent();
-            final Bounds enclosing = content.sceneToLocal(union.getResult(), true /* rootScene */);
+            final Bounds sceneEnclosing = union.getResult();
+            assert sceneEnclosing.getMinZ() == 0.0; // Side effect of SubScene
+            assert sceneEnclosing.getMaxZ() == 0.0;
+            final Bounds localEnclosing = content.sceneToLocal(sceneEnclosing, true /* rootScene */);
+            assert localEnclosing != null;
             final ScrollPaneBooster spb = new ScrollPaneBooster(scrollPane);
-            spb.scrollTo(enclosing);
+            spb.scrollTo(localEnclosing);
         }
     }
 
@@ -613,6 +621,15 @@
 
     
     /**
+     * @treatAsPrivate Returns the sub scene holding the user scene graph.
+     * @return the sub scene holding the user scene graph.
+     */
+    public SubScene getContentSubScene() {
+        return contentSubScene;
+    }
+
+    
+    /**
      * Computes the transform that projects from local coordinates of a 
      * scene graph object to the rudder layer local coordinates.
      * @param sceneGraphObject a scene graph object
@@ -623,12 +640,13 @@
         assert sceneGraphObject.getScene() == rudderLayer.getScene();
         
         final Transform t1 = sceneGraphObject.getLocalToSceneTransform();
-        final Transform t2 = rudderLayer.getLocalToSceneTransform();
+        final Transform t2 = contentSubScene.getLocalToSceneTransform();
+        final Transform t3 = rudderLayer.getLocalToSceneTransform();
         final Transform result;
         
         try {
-            final Transform i2 = t2.createInverse();
-            result = i2.createConcatenation(t1);
+            final Transform i3 = t3.createInverse();
+            result = i3.createConcatenation(t2).createConcatenation(t1);
         } catch(NonInvertibleTransformException x) {
             throw new RuntimeException(x);
         }
@@ -803,10 +821,13 @@
         assert backgroundPane.getMinWidth() == Region.USE_PREF_SIZE;
         assert backgroundPane.getMinHeight() == Region.USE_PREF_SIZE;
         assert scalingGroup != null;
-        assert contentGroup != null;
+        assert contentSubScene != null;
+        assert contentSubScene.getLayoutX() == 0.0;
+        assert contentSubScene.getLayoutY() == 0.0;
+        assert contentSubScene.getParent() == scalingGroup;
+        assert contentGroup == contentSubScene.getRoot();
         assert contentGroup.getLayoutX() == 0.0;
         assert contentGroup.getLayoutY() == 0.0;
-        assert contentGroup.getParent() == scalingGroup;
         assert glassLayer != null;
         assert glassLayer.isMouseTransparent() == false;
         assert glassLayer.isFocusTraversable();
@@ -828,17 +849,14 @@
         handleLayer.setManaged(false);
         rudderLayer.setManaged(false);
         
-        // Replace plain group in "contentGroup" by a custom one
-        // which isolates the user scene graph from SB owned styling.
-        installStylingIsolationGroup();
-        
         // Remove fake content used to help design
         backgroundPane.setText(""); //NOI18N
         
         // Setup our workspace controller
         workspaceController.panelControllerDidLoadFxml(
                 scrollPane,
-                scalingGroup, 
+                scalingGroup,
+                contentSubScene,
                 contentGroup, 
                 backgroundPane, 
                 extensionRect);
@@ -1034,45 +1052,6 @@
         changeModeController(newModeController);
     }
     
-    private void installStylingIsolationGroup() {
-        assert contentGroup.getParent() == scalingGroup;
-        
-        /*
-         * To isolate user content styling from SB's own styling we 
-         * insert two custom groups between scalingGroup and contentGroup:
-         * 
-         * 1) original layout loaded from FXML:
-         * 
-         *      ...
-         *          scalingGroup
-         *              contentGroup
-         *                  ... (user content)
-         * 
-         * 2) layout with isolation groups:
-         * 
-         *      ... 
-         *          scalingGroup
-         *              isolationGroupA     # impl_getAllParentStylesheets() overriden
-         *                  isolationGroupB     # getStyleableParent() overriden 
-         *                      contentGroup
-         *                          ... (user content)
-         *
-         * isolationGroupA prevents styling from SB to apply to user content
-         * isolationGroupB enables user content to have its own theme (modena, caspian...)
-         */
-        
-        final Group isolationGroupA = Deprecation.makeStylingIsolationGroupA();
-        final Group isolationGroupB = Deprecation.makeStylingIsolationGroupB();
-
-        final int contentGroupIndex = scalingGroup.getChildren().indexOf(contentGroup);
-        assert contentGroupIndex != -1;
-        scalingGroup.getChildren().remove(contentGroup);
-        scalingGroup.getChildren().add(contentGroupIndex, isolationGroupA);
-        isolationGroupA.getChildren().add(isolationGroupB);
-        isolationGroupB.getChildren().add(contentGroup);
-    }
-    
-    
     /*
      * Private (outline layer)
      */
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/WorkspaceController.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/WorkspaceController.java	Fri Sep 12 17:15:09 2014 -0700
@@ -46,6 +46,7 @@
 import javafx.scene.Node;
 import javafx.scene.Parent;
 import javafx.scene.Scene;
+import javafx.scene.SubScene;
 import javafx.scene.control.Label;
 import javafx.scene.control.ScrollPane;
 import javafx.scene.layout.Region;
@@ -62,6 +63,7 @@
     
     private ScrollPane scrollPane;
     private Group scalingGroup;
+    private SubScene contentSubScene;
     private Group contentGroup;
     private Label backgroundPane;
     private Rectangle extensionRect;
@@ -72,16 +74,18 @@
     private FXOMDocument fxomDocument;
 
     public void panelControllerDidLoadFxml(ScrollPane scrollPane, 
-            Group scalingGroup, Group contentGroup, Label backgroundPane, 
+            Group scalingGroup, SubScene contentSubScene, Group contentGroup, Label backgroundPane, 
             Rectangle extensionRect) {
         assert scrollPane != null;
         assert backgroundPane != null;
         assert scalingGroup != null;
+        assert contentSubScene != null;
         assert contentGroup != null;
         assert extensionRect != null;
         
         this.scrollPane = scrollPane;
         this.scalingGroup = scalingGroup;
+        this.contentSubScene = contentSubScene;
         this.contentGroup = contentGroup;
         this.backgroundPane = backgroundPane;
         this.extensionRect = extensionRect;
@@ -146,14 +150,8 @@
     }
     
     public void setThemeStyleSheet(String themeStyleSheet) {
-        assert contentGroup.getParent() instanceof Group;
-        final Group isolationGroup = (Group) contentGroup.getParent();
-        assert isolationGroup.getStyleClass().contains("root");
-        
-        isolationGroup.getStylesheets().clear();
         assert themeStyleSheet != null;
-        isolationGroup.getStylesheets().add(themeStyleSheet);
-        isolationGroup.applyCss();
+        contentSubScene.setUserAgentStylesheet(themeStyleSheet);
     }
     
     public void setPreviewStyleSheets(List<String> previewStyleSheets) {
@@ -166,7 +164,7 @@
         if (scrollPane != null) {
             try {
                 if (applyCSS) {
-                    scrollPane.getContent().applyCss();
+                    contentSubScene.getRoot().applyCss();
                 }
                 scrollPane.layout();
                 layoutException = null;
@@ -387,6 +385,9 @@
         extensionRect.setY(extensionBounds.getMinY());
         extensionRect.setWidth(extensionBounds.getWidth());
         extensionRect.setHeight(extensionBounds.getHeight());
+        
+        contentSubScene.setWidth(contentGroup.getLayoutBounds().getWidth());
+        contentSubScene.setHeight(contentGroup.getLayoutBounds().getHeight());
     }
     
     private static Bounds computeUnclippedBounds(Node node) {
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssPanelController.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssPanelController.java	Fri Sep 12 17:15:09 2014 -0700
@@ -1882,7 +1882,7 @@
             } catch (MalformedURLException ex) {
                 System.out.println("Invalid URL: " + ex);
             }
-            origin = CssInternal.getOrigin(rule);
+            origin = rule.getOrigin();
         }
         return getSource(url, origin);
     }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/NodeCssState.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/NodeCssState.java	Fri Sep 12 17:15:09 2014 -0700
@@ -429,7 +429,7 @@
         @Override
         public int compare(MatchingRule t, MatchingRule t1) {
             int originComparaison = compareOrigin(
-                    CssInternal.getOrigin(t.getRule()), CssInternal.getOrigin(t1.rule));
+                    t.getRule().getOrigin(), t1.rule.getOrigin());
             int tnotApplied = countNotApplied(t.declarations);
             int t1notApplied = countNotApplied(t1.declarations);
             int notAppliedComparaisons = tnotApplied - t1notApplied;
@@ -597,7 +597,7 @@
             for (Map.Entry<MatchingRule, List<MatchingDeclaration>> entry : matchingRules.entrySet()) {
                 MatchingRule rule = entry.getKey();
                 // Filterout the Inline
-                if (CssInternal.getOrigin(rule.getRule()) != StyleOrigin.INLINE) {
+                if (rule.getRule().getOrigin() != StyleOrigin.INLINE) {
                     rule.addDeclarations(entry.getValue());
                     sortedMatchingRules.add(rule);
                 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/InspectorPanelController.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/InspectorPanelController.java	Fri Sep 12 17:15:09 2014 -0700
@@ -41,6 +41,7 @@
 import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.AnchorPaneConstraintsEditor;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.BooleanEditor;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.BoundedDoubleEditor;
+import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.ButtonTypeEditor;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.ColumnResizePolicyEditor;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.CursorEditor;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.DividerPositionsEditor;
@@ -256,6 +257,7 @@
     private final Stack<Editor> columnResizePolicyEditorPool = new Stack<>();
     private final Stack<Editor> rectangle2DPopupEditorPool = new Stack<>();
     private final Stack<Editor> toggleGroupEditorPool = new Stack<>();
+    private final Stack<Editor> buttonTypeEditorPool = new Stack<>();
     // ...
     //
     // Subsection title pool
@@ -350,6 +352,7 @@
         editorPools.put(ColumnResizePolicyEditor.class, columnResizePolicyEditorPool);
         editorPools.put(Rectangle2DPopupEditor.class, rectangle2DPopupEditorPool);
         editorPools.put(ToggleGroupEditor.class, toggleGroupEditorPool);
+        editorPools.put(ButtonTypeEditor.class, buttonTypeEditorPool);
 
         // ...
     }
@@ -1349,6 +1352,9 @@
                 case "stylesheets": //NOI18N
                     propertyEditor = makePropertyEditor(StylesheetEditor.class, propMeta);
                     break;
+                case "buttonTypes": //NOI18N
+                    propertyEditor = makePropertyEditor(ButtonTypeEditor.class, propMeta);
+                    break;
                 case "dividerPositions": //NOI18N
                     propertyEditor = makePropertyEditor(DividerPositionsEditor.class, propMeta);
                     break;
@@ -1890,6 +1896,12 @@
             } else {
                 propertyEditor = new ToggleGroupEditor(propMeta, selectedClasses, getSuggestedToggleGroups());
             }
+        } else if (editorClass == ButtonTypeEditor.class) {
+            if (propertyEditor != null) {
+                ((ButtonTypeEditor) propertyEditor).reset(propMeta, selectedClasses);
+            } else {
+                propertyEditor = new ButtonTypeEditor(propMeta, selectedClasses);
+            }
         } else {
             if (propertyEditor != null) {
                 ((GenericEditor) propertyEditor).reset(propMeta, selectedClasses);
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/BooleanEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/BooleanEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -32,7 +32,9 @@
 package com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors;
 
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
+
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.geometry.Pos;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/ButtonTypeEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,396 @@
+/*
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * 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 Oracle Corporation 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 THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS 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 com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import javafx.beans.value.ChangeListener;
+import javafx.collections.FXCollections;
+import javafx.event.ActionEvent;
+import javafx.fxml.FXML;
+import javafx.scene.Node;
+import javafx.scene.Parent;
+import javafx.scene.control.Button;
+import javafx.scene.control.ButtonType;
+import javafx.scene.control.ChoiceBox;
+import javafx.scene.control.MenuItem;
+import javafx.scene.input.KeyCode;
+import javafx.scene.input.KeyEvent;
+import javafx.util.StringConverter;
+
+import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
+import com.oracle.javafx.scenebuilder.kit.metadata.property.value.ButtonTypePropertyMetadata;
+
+/**
+ * Editor of the DialogPane.buttonTypes property. It may contain several
+ * ButtonType, that have their dedicated class (ButtonTypeItem).
+ *
+ *
+ */
+public class ButtonTypeEditor extends InlineListEditor {
+
+    private static Map<String, ButtonType> predefinedButtonsNames = new TreeMap<>();
+    private Collection<ButtonType> buttonList = new TreeSet<ButtonType>(getButtonTypeComparator());
+
+    public ButtonTypeEditor(ValuePropertyMetadata propMeta, Set<Class<?>> selectedClasses) {
+        super(propMeta, selectedClasses);
+        initialize();
+    }
+
+    private void initialize() {
+        setLayoutFormat(PropertyEditor.LayoutFormat.DOUBLE_LINE);
+        // Build a sorted map, with button names as keys
+        for (Entry<ButtonType, String> entry : ButtonTypePropertyMetadata.getButtonTypeMap().entrySet()) {
+            predefinedButtonsNames.put(entry.getValue(), entry.getKey());
+        }
+        updateButtonLists();
+        addItem(getNewButtonTypeItem());
+    }
+
+    private ButtonTypeItem getNewButtonTypeItem() {
+        return new ButtonTypeItem(this, buttonList);
+    }
+
+    private void updateButtonLists() {
+        // As we don't want several buttons with the same type,
+        // we need to prevent this by updating the buttons types list in each
+        // item.
+        buttonList.clear();
+        buttonList.addAll(predefinedButtonsNames.values());
+        for (EditorItem item : getEditorItems()) {
+            Object itemValueObj = item.getValue();
+            if (itemValueObj == null) {
+                continue;
+            }
+            assert itemValueObj instanceof ButtonType;
+            ButtonType itemValue = (ButtonType) itemValueObj;
+            buttonList.remove(itemValue);
+        }
+        for (EditorItem item : getEditorItems()) {
+            assert item instanceof ButtonTypeItem;
+            ((ButtonTypeItem) item).updateButtonList(buttonList);
+        }
+    }
+
+    private Comparator<ButtonType> getButtonTypeComparator() {
+        Comparator<ButtonType> comparator = (ButtonType bt1, ButtonType bt2) -> bt1.getText().compareTo(bt2.getText());
+        return comparator;
+    }
+
+    @Override
+    public Object getValue() {
+        List<ButtonType> value = FXCollections.observableArrayList();
+        // Group all the item values in a list
+        for (EditorItem buttonTypeItem : getEditorItems()) {
+            Object itemValueObj = buttonTypeItem.getValue();
+            if (itemValueObj == null) {
+                continue;
+            }
+            assert itemValueObj instanceof ButtonType;
+            ButtonType itemValue = (ButtonType) itemValueObj;
+            value.add(itemValue);
+        }
+        if (value.isEmpty()) {
+            // no button type
+            return super.getPropertyMeta().getDefaultValueObject();
+        } else {
+            return value;
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public void setValue(Object value) {
+        setValueGeneric(value);
+        if (value == null) {
+            reset();
+            return;
+        }
+        assert value instanceof List;
+        // Warning : value is the editing list.
+        // We do not want to set the valueProperty() to editing list
+        setValueGeneric(value);
+        if (isSetValueDone()) {
+            return;
+        }
+
+        Iterator<EditorItem> itemsIter = new ArrayList<>(getEditorItems()).iterator();
+        for (ButtonType item : (List<ButtonType>) value) {
+            EditorItem editorItem;
+            if (itemsIter.hasNext()) {
+                // re-use the current items first
+                editorItem = itemsIter.next();
+                assert editorItem instanceof ButtonTypeItem;
+                ((ButtonTypeItem)editorItem).reset(predefinedButtonsNames.values());
+            } else {
+                // additional items required
+                editorItem = addItem(getNewButtonTypeItem());
+            }
+            editorItem.setValue(item);
+        }
+        // Empty the remaining items, if needed
+        while (itemsIter.hasNext()) {
+            EditorItem editorItem = itemsIter.next();
+            removeItem(editorItem);
+        }
+
+        // Update the button list
+        updateButtonLists();
+    }
+
+    public void reset(ValuePropertyMetadata propMeta, Set<Class<?>> selectedClasses) {
+        super.reset(propMeta, selectedClasses);
+        buttonList.clear();
+        buttonList.addAll(predefinedButtonsNames.values());
+        // add an empty item
+        addItem(getNewButtonTypeItem());
+    }
+
+    @Override
+    public void requestFocus() {
+        EditorItem firstItem = getEditorItems().get(0);
+        assert firstItem instanceof ButtonTypeItem;
+        ((ButtonTypeItem) firstItem).requestFocus();
+    }
+
+    @Override
+    public void commit(EditorItem source) {
+        super.commit(source);
+        updateButtonLists();
+    }
+
+    @Override
+    public void remove(EditorItem source) {
+        super.remove(source);
+        updateButtonLists();
+    }
+
+    /**
+     ***************************************************************************
+     *
+     * ButtonType item : button types ChoiceBox, and +/- buttons.
+     *
+     ***************************************************************************
+     */
+    private class ButtonTypeItem implements EditorItem {
+
+        @FXML
+        private Button plusBt;
+        @FXML
+        private Button minusBt;
+        @FXML
+        private ChoiceBox<ButtonType> buttonTypeCb;
+
+        private Parent root;
+        private EditorItemDelegate editor;
+
+        public ButtonTypeItem(EditorItemDelegate editor, Collection<ButtonType> buttonList) {
+//            System.out.println("New ButtonTypeItem.");
+            // It is an AutoSuggestEditor without MenuButton
+            initialize(editor, buttonList);
+        }
+
+        // Method to please FindBugs
+        private void initialize(EditorItemDelegate editor, Collection<ButtonType> buttonList) {
+            this.editor = editor;
+            root = EditorUtils.loadFxml("ButtonTypeEditorItem.fxml", this);//NOI18N
+
+            buttonTypeCb.setConverter(getButtonTypeConverter());
+            buttonTypeCb.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<ButtonType>() {
+                public void changed(javafx.beans.value.ObservableValue<? extends ButtonType> value,
+                        ButtonType prevValue, ButtonType newValue) {
+                    editor.commit(ButtonTypeItem.this);
+                    updatePlusMinusButtons();
+                };
+            });
+
+            updateButtonList(buttonList);
+            updatePlusMinusButtons();
+        }
+
+        public void updateButtonList(Collection<ButtonType> buttonList) {
+            // Remove ChoiceBox items that are not in the new list (but keep the
+            // current value)
+            for (ButtonType buttonType : buttonList) {
+                if (!buttonTypeCb.getItems().contains(buttonType)) {
+                    buttonTypeCb.getItems().add(buttonType);
+                }
+            }
+            ArrayList<ButtonType> currentItems = new ArrayList<>(buttonTypeCb.getItems());
+            for (ButtonType buttonType : currentItems) {
+                if (!buttonList.contains(buttonType) && buttonType != getValue()) {
+                    buttonTypeCb.getItems().remove(buttonType);
+                }
+            }
+        }
+
+        @Override
+        public final Node getNode() {
+            return root;
+        }
+
+        @Override
+        public Object getValue() {
+            return buttonTypeCb.getSelectionModel().getSelectedItem();
+        }
+
+        @Override
+        public void setValue(Object buttonType) {
+            assert buttonType instanceof ButtonType;
+            buttonTypeCb.getSelectionModel().select((ButtonType) buttonType);
+            updatePlusMinusButtons();
+        }
+
+        @Override
+        public void reset() {
+            buttonTypeCb.getSelectionModel().clearSelection();
+        }
+        
+        public void reset(Collection<ButtonType> buttonList) {
+            buttonTypeCb.getItems().clear();
+            updateButtonList(buttonList);
+        }
+        
+
+        // Please findBugs
+        public void requestFocus() {
+            buttonTypeCb.requestFocus();
+        }
+
+        @Override
+        public void setValueAsIndeterminate() {
+            handleIndeterminate(buttonTypeCb);
+        }
+
+        @Override
+        public MenuItem getMoveUpMenuItem() {
+            // not used here
+            return null;
+        }
+
+        @Override
+        public MenuItem getMoveDownMenuItem() {
+            // not used here
+            return null;
+        }
+
+        @Override
+        public MenuItem getRemoveMenuItem() {
+            // not used here
+            return null;
+        }
+
+        @Override
+        public Button getPlusButton() {
+            return plusBt;
+        }
+
+        @Override
+        public Button getMinusButton() {
+            return minusBt;
+        }
+
+        @FXML
+        void add(ActionEvent event) {
+            ButtonTypeEditor.ButtonTypeItem buttonTypeItem = getNewButtonTypeItem();
+            editor.add(this, buttonTypeItem);
+            buttonTypeItem.requestFocus();
+        }
+
+        @FXML
+        void remove(ActionEvent event) {
+            editor.remove(this);
+        }
+
+        @FXML
+        void plusBtTyped(KeyEvent event) {
+            if (event.getCode() == KeyCode.ENTER) {
+                editor.add(this, getNewButtonTypeItem());
+            }
+        }
+
+        private void updatePlusMinusButtons() {
+            if (buttonTypeCb.getSelectionModel().isEmpty()) {
+                // if no selection, or no additional possible button,
+                // disable plus and minus buttons
+                plusBt.setDisable(true);
+                minusBt.setDisable(true);
+            } else {
+                // enable plus and minus
+                plusBt.setDisable(false);
+                minusBt.setDisable(false);
+            }
+        }
+
+        @SuppressWarnings("unused")
+        protected void disablePlusButton(boolean disable) {
+            plusBt.setDisable(disable);
+        }
+
+        @SuppressWarnings("unused")
+        protected void disableMinusButton(boolean disable) {
+            minusBt.setDisable(disable);
+        }
+
+        private StringConverter<ButtonType> getButtonTypeConverter() {
+            Map<ButtonType, String> predefinedButtons = ButtonTypePropertyMetadata.getButtonTypeMap();
+            return new StringConverter<ButtonType>() {
+
+                @Override
+                public String toString(ButtonType buttonType) {
+                    return predefinedButtons.get(buttonType);
+                }
+
+                @Override
+                public ButtonType fromString(String buttonName) {
+                    for (Entry<ButtonType, String> entry : predefinedButtons.entrySet()) {
+                        if (entry.getValue().equals(buttonName)) {
+                            return entry.getKey();
+                        }
+                    }
+                    assert false;
+                    return null;
+                }
+            };
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/ButtonTypeEditorItem.fxml	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Copyright (c) 2012, 2014, Oracle and/or its affiliates.
+  All rights reserved. Use is subject to license terms.
+
+  This file is available and licensed under the following license:
+
+  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 Oracle Corporation 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 THE COPYRIGHT
+  OWNER OR CONTRIBUTORS 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.
+-->
+
+<?import java.lang.*?>
+<?import javafx.geometry.*?>
+<?import javafx.scene.control.*?>
+<?import javafx.scene.layout.*?>
+
+<HBox spacing="1.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
+  <children>
+      <ChoiceBox fx:id="buttonTypeCb" maxWidth="1.7976931348623157E308" HBox.hgrow="ALWAYS" />
+        <Button fx:id="plusBt" mnemonicParsing="false" onAction="#add" onKeyReleased="#plusBtTyped" styleClass="multi-row-plus-button" text="+" />
+      <Button fx:id="minusBt" mnemonicParsing="false" onAction="#remove" onKeyReleased="#plusBtTyped" styleClass="multi-row-plus-button" text="-" />
+  </children>
+  <padding>
+    <Insets />
+  </padding>
+</HBox>
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/ColumnResizePolicyEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/ColumnResizePolicyEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -33,7 +33,9 @@
 
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.value.TableViewResizePolicyPropertyMetadata;
+
 import java.util.Set;
+
 import javafx.scene.control.TableView;
 import javafx.scene.control.TreeTableView;
 
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/DividerPositionsEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/DividerPositionsEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -32,10 +32,12 @@
 package com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors;
 
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.scene.Node;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/DoubleEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/DoubleEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -33,11 +33,13 @@
 
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata;
+
 import java.util.ArrayList;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/EditorItem.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/EditorItem.java	Fri Sep 12 17:15:09 2014 -0700
@@ -45,9 +45,9 @@
 
     public Node getNode();
 
-    public String getValue();
+    public Object getValue();
 
-    public void setValue(String value);
+    public void setValue(Object value);
 
     public void reset();
 
@@ -61,4 +61,6 @@
     
     public Button getPlusButton();
     
+    public Button getMinusButton();
+    
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/EditorUtils.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/EditorUtils.java	Fri Sep 12 17:15:09 2014 -0700
@@ -542,4 +542,9 @@
         File file = new File(url);
         return file.getName();
     }
+    
+    public static String toString(Object obj) {
+        assert obj instanceof String;
+        return (String) obj; 
+    }
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/EventHandlerEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/EventHandlerEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -34,9 +34,11 @@
 import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
 import com.oracle.javafx.scenebuilder.kit.util.JavaLanguage;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.geometry.Pos;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/GenericEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/GenericEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -32,7 +32,9 @@
 package com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors;
 
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
+
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.scene.Node;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/I18nStringEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/I18nStringEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -34,7 +34,9 @@
 import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
 import com.oracle.javafx.scenebuilder.kit.metadata.util.PrefixedValue;
+
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.geometry.Pos;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/InlineListEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/InlineListEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -157,7 +157,9 @@
         if (!removeAll && editorItems.size() == 1) {
             // Do not remove last item, but reset it
             editorItem.reset();
-            editorItem.getRemoveMenuItem().setDisable(true);
+            if (editorItem.getRemoveMenuItem() != null) {
+                editorItem.getRemoveMenuItem().setDisable(true);
+            }
             return;
         }
         editorItems.remove(editorItem);
@@ -202,6 +204,9 @@
     private void updateMenuItems() {
         for (int ii = 0; ii < editorItems.size(); ii++) {
             EditorItem item = editorItems.get(ii);
+            if (item.getMoveUpMenuItem() == null || item.getMoveDownMenuItem() == null) {
+                continue;
+            }
             if (ii == 0) {
                 // first item
                 item.getMoveUpMenuItem().setDisable(true);
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/InsetsEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/InsetsEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -32,7 +32,9 @@
 package com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors;
 
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
+
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.fxml.FXML;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/IntegerEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/IntegerEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -33,11 +33,13 @@
 
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.value.IntegerPropertyMetadata;
+
 import java.util.ArrayList;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/Point3DEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/Point3DEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -32,7 +32,9 @@
 package com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors;
 
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
+
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.fxml.FXML;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/RotateEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/RotateEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -33,7 +33,9 @@
 
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata;
+
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.fxml.FXML;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StringEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StringEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -32,7 +32,9 @@
 package com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors;
 
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
+
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.scene.Node;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StyleClassEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StyleClassEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -111,7 +111,7 @@
         List<String> value = FXCollections.observableArrayList();
         // Group all the item values in a list
         for (EditorItem styleItem : getEditorItems()) {
-            String itemValue = styleItem.getValue();
+            String itemValue = EditorUtils.toString(styleItem.getValue());
             if (itemValue.isEmpty()) {
                 continue;
             }
@@ -255,7 +255,7 @@
                     ((TextField) event.getSource()).selectAll();
                 }
                 updateButtons();
-                currentValue = getValue();
+                currentValue = EditorUtils.toString(getValue());
             };
 
             ChangeListener<String> textPropertyChange = (ov, prevText, newText) -> {
@@ -308,15 +308,15 @@
         }
 
         @Override
-        public String getValue() {
+        public Object getValue() {
             return EditorUtils.getPlainString(styleClassTf.getText()).trim();
         }
 
         @Override
-        public void setValue(String styleClass) {
-            styleClassTf.setText(styleClass.trim());
+        public void setValue(Object styleClass) {
+            styleClassTf.setText(EditorUtils.toString(styleClass).trim());
             updateButtons();
-            currentValue = getValue();
+            currentValue = EditorUtils.toString(getValue());
         }
 
         @Override
@@ -355,6 +355,12 @@
             return plusBt;
         }
 
+        @Override
+        public Button getMinusButton() {
+            // not used here
+            return null;
+        }
+
         @FXML
         void add(ActionEvent event) {
             StyleClassEditor.StyleClassItem styleClassItem = getNewStyleClassItem();
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StyleEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StyleEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -111,7 +111,7 @@
         // Concatenate all the item values
         String value = null;
         for (EditorItem styleItem : getEditorItems()) {
-            String itemValue = styleItem.getValue();
+            String itemValue = EditorUtils.toString(styleItem.getValue());
             if (itemValue.isEmpty()) {
                 continue;
             }
@@ -271,7 +271,7 @@
                 }
 
                 updateButtons();
-                currentValue = getValue();
+                currentValue = EditorUtils.toString(getValue());
             };
 
             ChangeListener<String> textPropertyChange = (ov, prevText, newText) -> {
@@ -327,7 +327,7 @@
         }
 
         @Override
-        public String getValue() {
+        public Object getValue() {
             String value;
             if (propertyTf.getText().isEmpty() && valueTf.getText().isEmpty()) {
                 return ""; //NOI18N
@@ -351,25 +351,26 @@
         }
 
         @Override
-        public void setValue(String style) {
+        public void setValue(Object style) {
+            String styleStr = EditorUtils.toString(style);
             // remove last ';' if any
-            if (style.endsWith(";")) { //NOI18N
-                style = style.substring(0, style.length() - 1);
+            if (styleStr.endsWith(";")) { //NOI18N
+                styleStr = styleStr.substring(0, styleStr.length() - 1);
             }
             // split in property and value
-            int dotIndex = style.indexOf(':');
+            int dotIndex = styleStr.indexOf(':');
             String propertyStr;
             String valueStr = ""; //NOI18N
             if (dotIndex != -1) {
-                propertyStr = style.substring(0, dotIndex);
-                valueStr = style.substring(dotIndex + 1);
+                propertyStr = styleStr.substring(0, dotIndex);
+                valueStr = styleStr.substring(dotIndex + 1);
             } else {
-                propertyStr = style;
+                propertyStr = styleStr;
             }
             propertyTf.setText(propertyStr);
             valueTf.setText(valueStr);
             updateButtons();
-            currentValue = getValue();
+            currentValue = EditorUtils.toString(getValue());
         }
 
         @Override
@@ -412,6 +413,12 @@
             return plusBt;
         }
 
+        @Override
+        public Button getMinusButton() {
+            // Not used here
+            return null;
+        }
+
         @FXML
         void add(ActionEvent event) {
             StyleItem styleItem = getNewStyleItem();
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StylesheetEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StylesheetEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -120,7 +120,7 @@
         List<String> value = FXCollections.observableArrayList();
         // Group all the item values in a list
         for (EditorItem stylesheetItem : getEditorItems()) {
-            String itemValue = stylesheetItem.getValue();
+            String itemValue = EditorUtils.toString(stylesheetItem.getValue());
             if (itemValue.isEmpty()) {
                 continue;
             }
@@ -238,7 +238,7 @@
     }
 
     private String getUrl(EditorItem source) {
-        URL url = EditorUtils.getUrl(source.getValue(), fxmlFileLocation);
+        URL url = EditorUtils.getUrl(EditorUtils.toString(source.getValue()), fxmlFileLocation);
         if (url == null) {
             return null;
         }
@@ -330,7 +330,7 @@
         for (EditorItem editorItem : getEditorItems()) {
             assert editorItem instanceof StylesheetItem;
             StylesheetItem stylesheetItem = (StylesheetItem) editorItem;
-            URL url = EditorUtils.getUrl(stylesheetItem.getValue(), fxmlFileLocation);
+            URL url = EditorUtils.getUrl(EditorUtils.toString(stylesheetItem.getValue()), fxmlFileLocation);
             String value = null;
             if ((url == null) || (type == Type.CLASSLOADER_RELATIVE_PATH)) {
                 // In this case we empty the text field (i.e. suffix) content
@@ -380,7 +380,7 @@
             absoluteMenuItem.setDisable(true);
         }
     }
-
+    
     /**
      ***************************************************************************
      *
@@ -441,7 +441,7 @@
                 }
                 updateButtons();
                 updateOpenRevealMenuItems();
-                currentValue = getValue();
+                currentValue = EditorUtils.toString(getValue());
             };
 
             ChangeListener<String> textPropertyChange = (ov, prevText, newText) -> {
@@ -468,7 +468,7 @@
         }
 
         @Override
-        public String getValue() {
+        public Object getValue() {
             String suffix;
             if (stylesheetTf.getText().isEmpty()) {
                 return ""; //NOI18N
@@ -479,8 +479,8 @@
         }
 
         @Override
-        public void setValue(String styleSheet) {
-            PrefixedValue prefixedValue = new PrefixedValue(styleSheet);
+        public void setValue(Object styleSheet) {
+            PrefixedValue prefixedValue = new PrefixedValue(EditorUtils.toString(styleSheet));
             itemType = prefixedValue.getType();
             handlePrefix(itemType);
             if (prefixedValue.getSuffix() != null) {
@@ -491,7 +491,7 @@
             }
             updateButtons();
             updateOpenRevealMenuItems();
-            currentValue = getValue();
+            currentValue = EditorUtils.toString(getValue());
         }
 
         @Override
@@ -529,6 +529,12 @@
             return plusBt;
         }
 
+        @Override
+        public Button getMinusButton() {
+            // not used here
+            return null;
+        }
+
         @FXML
         void chooseStylesheet(ActionEvent event) {
             ((StylesheetEditor) editor).chooseStylesheet(event);
@@ -568,7 +574,7 @@
 
         private void updateOpenRevealMenuItems() {
             // Get the file name part of the suffix
-            String suffix = new PrefixedValue(getValue()).getSuffix();
+            String suffix = new PrefixedValue(EditorUtils.toString(getValue())).getSuffix();
             String fileName = null;
             if (!suffix.isEmpty()) {
                 fileName = EditorUtils.getSimpleFileName(suffix);
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/popupeditors/FontPopupEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/popupeditors/FontPopupEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -89,7 +89,7 @@
     }
     
     private void setStyle() {
-        styleEditor.reset("", "", new ArrayList<>(getStyles(familyEditor.getValue(), false, editorController)));//NOI18N
+        styleEditor.reset("", "", new ArrayList<>(getStyles(EditorUtils.toString(familyEditor.getValue()), false, editorController)));//NOI18N
         styleEditor.setUpdateFromModel(true);
         styleEditor.setValue(font.getStyle());
         styleEditor.setUpdateFromModel(false);
@@ -109,7 +109,8 @@
         Font oldFont = font;
         Object sizeObj = sizeEditor.getValue();
         assert sizeObj instanceof Double;
-        Font newFont = getFont(familyEditor.getValue(), styleEditor.getValue(), (Double) sizeObj, editorController);
+        Font newFont = getFont(EditorUtils.toString(familyEditor.getValue()), EditorUtils.toString(styleEditor.getValue()),
+                (Double) sizeObj, editorController);
         if (newFont != null) {
             return newFont;
         } else {
@@ -236,7 +237,7 @@
         }
 
         @Override
-        public String getValue() {
+        public Object getValue() {
             return getTextField().getText();
         }
 
@@ -275,7 +276,7 @@
         }
 
         @Override
-        public String getValue() {
+        public Object getValue() {
             return getTextField().getText();
         }
     }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/popupeditors/KeyCombinationPopupEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/popupeditors/KeyCombinationPopupEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -49,6 +49,7 @@
 
 import javafx.beans.value.ChangeListener;
 import javafx.event.ActionEvent;
+import javafx.event.Event;
 import javafx.event.EventHandler;
 import javafx.fxml.FXML;
 import javafx.scene.Node;
@@ -336,15 +337,20 @@
             modifierChoiceBox.getSelectionModel().select(modifier);
         }
 
-        modifierChoiceBox.getSelectionModel().selectedItemProperty().addListener((ChangeListener<Modifier>) (observable, oldValue, newValue) -> {
-            if (!mainKey.isEmpty()) {
-        KeyCombination kc = createKeyCombination();
-        if (kc != null) {
-            commit(kc);
-        }
-            }
-            buildUI();
-         });
+        modifierChoiceBox.getSelectionModel().selectedItemProperty()
+                .addListener((ChangeListener<Modifier>) (observable, oldValue, newValue) -> {
+                    if (!mainKey.isEmpty()) {
+                        KeyCombination kc = createKeyCombination();
+                        if (kc != null) {
+                            commit(kc);
+                        }
+                    }
+                    buildUI();
+                });
+        // Workaround for RT-37679
+        modifierChoiceBox.addEventHandler(ActionEvent.ACTION, (Event event) -> {
+            event.consume();
+        });
         return modifierChoiceBox;
     }
 
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/popupeditors/Rectangle2DPopupEditor.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/popupeditors/Rectangle2DPopupEditor.java	Fri Sep 12 17:15:09 2014 -0700
@@ -35,7 +35,9 @@
 import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.DoubleField;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.EditorUtils;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
+
 import java.util.Set;
+
 import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.fxml.FXML;
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/util/ContextMenuController.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/util/ContextMenuController.java	Fri Sep 12 17:15:09 2014 -0700
@@ -80,6 +80,7 @@
     private Menu wrapInMenu;
     private MenuItem wrapInAnchorPaneMenuItem;
     private MenuItem wrapInBorderPaneMenuItem;
+    private MenuItem wrapInDialogPaneMenuItem;
     private MenuItem wrapInFlowPaneMenuItem;
     private MenuItem wrapInGridPaneMenuItem;
     private MenuItem wrapInGroupMenuItem;
@@ -89,6 +90,7 @@
     private MenuItem wrapInSplitPaneMenuItem;
     private MenuItem wrapInStackPaneMenuItem;
     private MenuItem wrapInTabPaneMenuItem;
+    private MenuItem wrapInTextFlowMenuItem;
     private MenuItem wrapInTilePaneMenuItem;
     private MenuItem wrapInTitledPaneMenuItem;
     private MenuItem wrapInToolBarMenuItem;
@@ -388,6 +390,9 @@
         wrapInBorderPaneMenuItem = new MenuItem("BorderPane");
         wrapInBorderPaneMenuItem.setOnAction(onActionEventHandler);
         wrapInBorderPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_BORDER_PANE));
+        wrapInDialogPaneMenuItem = new MenuItem("DialogPane");
+        wrapInDialogPaneMenuItem.setOnAction(onActionEventHandler);
+        wrapInDialogPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_DIALOG_PANE));
         wrapInFlowPaneMenuItem = new MenuItem("FlowPane");
         wrapInFlowPaneMenuItem.setOnAction(onActionEventHandler);
         wrapInFlowPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_FLOW_PANE));
@@ -415,6 +420,9 @@
         wrapInTilePaneMenuItem = new MenuItem("TilePane");
         wrapInTilePaneMenuItem.setOnAction(onActionEventHandler);
         wrapInTilePaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_TILE_PANE));
+        wrapInTextFlowMenuItem = new MenuItem("TextFlow");
+        wrapInTextFlowMenuItem.setOnAction(onActionEventHandler);
+        wrapInTextFlowMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_TEXT_FLOW));
         wrapInTitledPaneMenuItem = new MenuItem("TitledPane");
         wrapInTitledPaneMenuItem.setOnAction(onActionEventHandler);
         wrapInTitledPaneMenuItem.setUserData(new EditActionController(EditAction.WRAP_IN_TITLED_PANE));
@@ -430,6 +438,7 @@
         wrapInMenu.getItems().setAll(
                 wrapInAnchorPaneMenuItem,
                 wrapInBorderPaneMenuItem,
+                wrapInDialogPaneMenuItem,
                 wrapInFlowPaneMenuItem,
                 wrapInGridPaneMenuItem,
                 wrapInGroupMenuItem,
@@ -439,6 +448,7 @@
                 wrapInSplitPaneMenuItem,
                 wrapInStackPaneMenuItem,
                 wrapInTabPaneMenuItem,
+                wrapInTextFlowMenuItem,
                 wrapInTilePaneMenuItem,
                 wrapInTitledPaneMenuItem,
                 wrapInToolBarMenuItem,
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMRefresher.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMRefresher.java	Fri Sep 12 17:15:09 2014 -0700
@@ -41,6 +41,7 @@
 import java.io.PrintWriter;
 import java.util.List;
 import java.util.Set;
+import javafx.scene.Parent;
 import javafx.scene.control.SplitPane;
 
 /**
@@ -90,11 +91,18 @@
      */
     
     private void refreshDocument(FXOMDocument currentDocument, FXOMDocument newDocument) {
-//        if (currentDocument.getSceneGraphRoot() instanceof Parent) {
-//            reloadStylesheets((Parent)currentDocument.getRootObject());
-//        }
+        
+        // Transfers scene graph object from newDocument to currentDocument
         currentDocument.setSceneGraphRoot(newDocument.getSceneGraphRoot());
         
+        // Simulates Scene's behavior : automatically adds "root" styleclass if
+        // if the scene graph root is a Parent instance
+        if (currentDocument.getSceneGraphRoot() instanceof Parent) {
+            final Parent rootParent = (Parent) currentDocument.getSceneGraphRoot();
+            rootParent.getStyleClass().add(0, "root");
+        }
+        
+        // Recurses
         if (currentDocument.getFxomRoot() != null) {
             refreshFxomObject(currentDocument.getFxomRoot(), newDocument.getFxomRoot());
         }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/library/BuiltinLibrary.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/library/BuiltinLibrary.java	Fri Sep 12 17:15:09 2014 -0700
@@ -123,6 +123,7 @@
                 "AccordionEmpty", "Accordion", EMPTY_QUALIFIER); //NOI18N
         addRegionItem200x200(javafx.scene.layout.AnchorPane.class, TAG_CONTAINERS);
         addRegionItem200x200(javafx.scene.layout.BorderPane.class, TAG_CONTAINERS);
+        addCustomizedItem(javafx.scene.control.ButtonBar.class, TAG_CONTAINERS, FX8_QUALIFIER);
         addCustomizedItem(javafx.scene.control.DialogPane.class, TAG_CONTAINERS, FX8_QUALIFIER);
         addDefaultItem(javafx.scene.control.DialogPane.class, TAG_CONTAINERS, EMPTY_QUALIFIER, FX8_QUALIFIER);
         addRegionItem200x200(javafx.scene.layout.FlowPane.class, TAG_CONTAINERS);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/library/builtin/ButtonBar.fxml	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright (c) 2014, Oracle and/or its affiliates.
+  All rights reserved. Use is subject to license terms.
+
+  This file is available and licensed under the following license:
+
+  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 Oracle Corporation 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 THE COPYRIGHT
+  OWNER OR CONTRIBUTORS 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.
+-->
+<?import java.lang.*?>
+<?import java.util.*?>
+<?import javafx.scene.control.*?>
+<?import javafx.scene.layout.*?>
+
+<ButtonBar prefWidth="200.0" prefHeight="40.0" xmlns:fx="http://javafx.com/fxml">
+  <buttons>
+    <Button mnemonicParsing="false" text="Button" />
+  </buttons>
+</ButtonBar>
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/Metadata.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/Metadata.java	Fri Sep 12 17:15:09 2014 -0700
@@ -334,6 +334,8 @@
             new ComponentClassMetadata(javafx.scene.control.Accordion.class, ControlMetadata);
     private final ComponentClassMetadata ButtonMetadata = 
             new ComponentClassMetadata(javafx.scene.control.Button.class, ButtonBaseMetadata);
+    private final ComponentClassMetadata ButtonBarMetadata = 
+            new ComponentClassMetadata(javafx.scene.control.ButtonBar.class, ControlMetadata);
     private final ComponentClassMetadata CheckBoxMetadata = 
             new ComponentClassMetadata(javafx.scene.control.CheckBox.class, ButtonBaseMetadata);
     private final ComponentClassMetadata CheckMenuItemMetadata = 
@@ -550,6 +552,14 @@
             new PropertyName("boundsType");
     private final PropertyName buttonCellName = 
             new PropertyName("buttonCell");
+    private final PropertyName buttonMinWidthName = 
+            new PropertyName("buttonMinWidth");
+    private final PropertyName buttonOrderName = 
+            new PropertyName("buttonOrder");
+    private final PropertyName buttonsName = 
+            new PropertyName("buttons");
+    private final PropertyName buttonTypesName = 
+            new PropertyName("buttonTypes");
     private final PropertyName cacheName = 
             new PropertyName("cache");
     private final PropertyName cacheHintName = 
@@ -1332,13 +1342,13 @@
                 alternativeColumnFillVisibleName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 86));
+                new InspectorPath("Properties", "Specific", 88));
     private final ValuePropertyMetadata alternativeRowFillVisiblePropertyMetadata =
             new BooleanPropertyMetadata(
                 alternativeRowFillVisibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 92));
+                new InspectorPath("Properties", "Specific", 94));
     private final ValuePropertyMetadata anchorLocationPropertyMetadata =
             new EnumerationPropertyMetadata(
                 anchorLocationName,
@@ -1365,14 +1375,14 @@
                 animatedName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 41));
+                new InspectorPath("Properties", "Specific", 43));
     private final ValuePropertyMetadata arcHeightPropertyMetadata =
             new DoublePropertyMetadata(
                 arcHeightName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 42));
+                new InspectorPath("Properties", "Specific", 44));
     private final ValuePropertyMetadata arcWidthPropertyMetadata =
             new DoublePropertyMetadata(
                 arcWidthName,
@@ -1391,19 +1401,19 @@
                 autoHideName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 43));
+                new InspectorPath("Properties", "Specific", 45));
     private final ValuePropertyMetadata autoHide_false_PropertyMetadata =
             new BooleanPropertyMetadata(
                 autoHideName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 43));
+                new InspectorPath("Properties", "Specific", 45));
     private final ValuePropertyMetadata autoRangingPropertyMetadata =
             new BooleanPropertyMetadata(
                 autoRangingName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 70));
+                new InspectorPath("Properties", "Specific", 72));
     private final ValuePropertyMetadata autoSizeChildrenPropertyMetadata =
             new BooleanPropertyMetadata(
                 autoSizeChildrenName,
@@ -1416,7 +1426,7 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 4.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 75));
+                new InspectorPath("Properties", "Specific", 77));
     private final ValuePropertyMetadata baselineOffsetPropertyMetadata =
             new DoublePropertyMetadata(
                 baselineOffsetName,
@@ -1437,7 +1447,7 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 10.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 71));
+                new InspectorPath("Properties", "Specific", 73));
     private final ComponentPropertyMetadata bottomPropertyMetadata =
             new ComponentPropertyMetadata(
                 bottomName,
@@ -1467,7 +1477,31 @@
                 buttonCellName,
                 true, /* readWrite */
                 null, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 38));
+                new InspectorPath("Properties", "Specific", 40));
+    private final ValuePropertyMetadata buttonMinWidthPropertyMetadata =
+            new DoublePropertyMetadata(
+                buttonMinWidthName,
+                com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
+                true, /* readWrite */
+                70.0, /* defaultValue */
+                new InspectorPath("Layout", "Size", 0));
+    private final ValuePropertyMetadata buttonOrderPropertyMetadata =
+            new StringPropertyMetadata(
+                buttonOrderName,
+                true, /* readWrite */
+                "L_HE+U+FBIX_NCYOA_R", /* defaultValue */
+                new InspectorPath("Properties", "Specific", 5));
+    private final ComponentPropertyMetadata buttonsPropertyMetadata =
+            new ComponentPropertyMetadata(
+                buttonsName,
+                NodeMetadata,
+                true); /* collection */
+    private final ValuePropertyMetadata buttonTypesPropertyMetadata =
+            new ButtonTypeListPropertyMetadata(
+                buttonTypesName,
+                true, /* readWrite */
+                Collections.emptyList(), /* defaultValue */
+                new InspectorPath("Properties", "Specific", 18));
     private final ValuePropertyMetadata cachePropertyMetadata =
             new BooleanPropertyMetadata(
                 cacheName,
@@ -1492,27 +1526,27 @@
                 cancelButtonName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 44));
+                new InspectorPath("Properties", "Specific", 46));
     private final ValuePropertyMetadata categoriesPropertyMetadata =
             new StringListPropertyMetadata(
                 categoriesName,
                 true, /* readWrite */
                 Collections.emptyList(), /* defaultValue */
-                new InspectorPath("Properties", "Specific", 76));
+                new InspectorPath("Properties", "Specific", 78));
     private final ValuePropertyMetadata categoryGapPropertyMetadata =
             new DoublePropertyMetadata(
                 categoryGapName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 10.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 77));
+                new InspectorPath("Properties", "Specific", 79));
     private final ValuePropertyMetadata categorySpacingPropertyMetadata =
             new DoublePropertyMetadata(
                 categorySpacingName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 false, /* readWrite */
                 null, /* No defaultValue for R/O property */
-                new InspectorPath("Properties", "Specific", 78));
+                new InspectorPath("Properties", "Specific", 80));
     private final ComponentPropertyMetadata centerPropertyMetadata =
             new ComponentPropertyMetadata(
                 centerName,
@@ -1558,25 +1592,25 @@
                 clockwiseName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 87));
+                new InspectorPath("Properties", "Specific", 89));
     private final ValuePropertyMetadata closablePropertyMetadata =
             new BooleanPropertyMetadata(
                 closableName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 5));
+                new InspectorPath("Properties", "Specific", 6));
     private final ValuePropertyMetadata collapsiblePropertyMetadata =
             new BooleanPropertyMetadata(
                 collapsibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 60));
+                new InspectorPath("Properties", "Specific", 62));
     private final ValuePropertyMetadata colorPropertyMetadata =
             new ColorPropertyMetadata(
                 colorName,
                 true, /* readWrite */
                 javafx.scene.paint.Color.WHITE, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 6));
+                new InspectorPath("Properties", "Specific", 7));
     private final ComponentPropertyMetadata columnConstraintsPropertyMetadata =
             new ComponentPropertyMetadata(
                 columnConstraintsName,
@@ -1588,19 +1622,19 @@
                 javafx.geometry.HPos.class,
                 true, /* readWrite */
                 javafx.geometry.HPos.LEFT, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 61));
+                new InspectorPath("Properties", "Specific", 63));
     private final ValuePropertyMetadata columnResizePolicy_TABLEVIEW_UNCONSTRAINED_PropertyMetadata =
             new TableViewResizePolicyPropertyMetadata(
                 columnResizePolicyName,
                 true, /* readWrite */
                 javafx.scene.control.TableView.UNCONSTRAINED_RESIZE_POLICY, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 32));
+                new InspectorPath("Properties", "Specific", 34));
     private final ValuePropertyMetadata columnResizePolicy_TREETABLEVIEW_UNCONSTRAINED_PropertyMetadata =
             new TreeTableViewResizePolicyPropertyMetadata(
                 columnResizePolicyName,
                 true, /* readWrite */
                 javafx.scene.control.TreeTableView.UNCONSTRAINED_RESIZE_POLICY, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 32));
+                new InspectorPath("Properties", "Specific", 34));
     private final ComponentPropertyMetadata columns_TableColumn_PropertyMetadata =
             new ComponentPropertyMetadata(
                 columnsName,
@@ -1616,7 +1650,7 @@
                 consumeAutoHidingEventsName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 62));
+                new InspectorPath("Properties", "Specific", 64));
     private final ComponentPropertyMetadata content_Node_NULL_PropertyMetadata =
             new ComponentPropertyMetadata(
                 contentName,
@@ -1627,7 +1661,7 @@
                 contentName,
                 true, /* readWrite */
                 "", /* defaultValue */
-                new InspectorPath("Properties", "Specific", 9));
+                new InspectorPath("Properties", "Specific", 10));
     private final ComponentPropertyMetadata content_Node_SEPARATOR_PropertyMetadata =
             new ComponentPropertyMetadata(
                 contentName,
@@ -1663,7 +1697,7 @@
                 contextMenuEnabledName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 10));
+                new InspectorPath("Properties", "Specific", 11));
     private final ValuePropertyMetadata controlXPropertyMetadata =
             new DoublePropertyMetadata(
                 controlXName,
@@ -1711,7 +1745,7 @@
                 createSymbolsName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 79));
+                new InspectorPath("Properties", "Specific", 81));
     private final ValuePropertyMetadata cullFacePropertyMetadata =
             new EnumerationPropertyMetadata(
                 cullFaceName,
@@ -1742,14 +1776,14 @@
                 defaultButtonName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 12));
+                new InspectorPath("Properties", "Specific", 13));
     private final ValuePropertyMetadata depthPropertyMetadata =
             new DoublePropertyMetadata(
                 depthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 2.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 15));
+                new InspectorPath("Layout", "Size", 16));
     private final ValuePropertyMetadata depthTestPropertyMetadata =
             new EnumerationPropertyMetadata(
                 depthTestName,
@@ -1768,7 +1802,7 @@
                 dividerPositionsName,
                 true, /* readWrite */
                 Collections.emptyList(), /* defaultValue */
-                new InspectorPath("Properties", "Specific", 14));
+                new InspectorPath("Properties", "Specific", 15));
     private final ValuePropertyMetadata divisionsPropertyMetadata =
             new IntegerPropertyMetadata(
                 divisionsName,
@@ -1787,13 +1821,13 @@
                 editableName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 15));
+                new InspectorPath("Properties", "Specific", 16));
     private final ValuePropertyMetadata editable_true_PropertyMetadata =
             new BooleanPropertyMetadata(
                 editableName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 15));
+                new InspectorPath("Properties", "Specific", 16));
     private final ValuePropertyMetadata effectPropertyMetadata =
             new EffectPropertyMetadata(
                 effectName,
@@ -1824,7 +1858,7 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 5.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 93));
+                new InspectorPath("Properties", "Specific", 95));
     private final ValuePropertyMetadata endXPropertyMetadata =
             new DoublePropertyMetadata(
                 endXName,
@@ -1849,19 +1883,19 @@
                 expandedName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 16));
+                new InspectorPath("Properties", "Specific", 17));
     private final ValuePropertyMetadata expanded_true_PropertyMetadata =
             new BooleanPropertyMetadata(
                 expandedName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 16));
+                new InspectorPath("Properties", "Specific", 17));
     private final ValuePropertyMetadata expandedItemCountPropertyMetadata =
             new IntegerPropertyMetadata(
                 expandedItemCountName,
                 false, /* readWrite */
                 null, /* No defaultValue for R/O property */
-                new InspectorPath("Properties", "Specific", 17));
+                new InspectorPath("Properties", "Specific", 19));
     private final ValuePropertyMetadata farClipPropertyMetadata =
             new DoublePropertyMetadata(
                 farClipName,
@@ -1881,13 +1915,13 @@
                 fillName,
                 true, /* readWrite */
                 null, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 18));
+                new InspectorPath("Properties", "Specific", 20));
     private final ValuePropertyMetadata fill_BLACK_PropertyMetadata =
             new PaintPropertyMetadata(
                 fillName,
                 true, /* readWrite */
                 javafx.scene.paint.Color.BLACK, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 18));
+                new InspectorPath("Properties", "Specific", 20));
     private final ValuePropertyMetadata fillHeightPropertyMetadata =
             new BooleanPropertyMetadata(
                 fillHeightName,
@@ -1900,7 +1934,7 @@
                 javafx.scene.shape.FillRule.class,
                 true, /* readWrite */
                 javafx.scene.shape.FillRule.NON_ZERO, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 19));
+                new InspectorPath("Properties", "Specific", 21));
     private final ValuePropertyMetadata fillWidthPropertyMetadata =
             new BooleanPropertyMetadata(
                 fillWidthName,
@@ -1913,7 +1947,7 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 14));
+                new InspectorPath("Layout", "Size", 15));
     private final ValuePropertyMetadata fitToHeightPropertyMetadata =
             new BooleanPropertyMetadata(
                 fitToHeightName,
@@ -1932,14 +1966,14 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 13));
+                new InspectorPath("Layout", "Size", 14));
     private final ValuePropertyMetadata fixedCellSizePropertyMetadata =
             new DoublePropertyMetadata(
                 fixedCellSizeName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 -1.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 126));
+                new InspectorPath("Properties", "Specific", 128));
     private final ValuePropertyMetadata fixedEyeAtCameraZeroPropertyMetadata =
             new BooleanPropertyMetadata(
                 fixedEyeAtCameraZeroName,
@@ -1990,13 +2024,13 @@
                 forceZeroInRangeName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 120));
+                new InspectorPath("Properties", "Specific", 122));
     private final ValuePropertyMetadata gapStartAndEndPropertyMetadata =
             new BooleanPropertyMetadata(
                 gapStartAndEndName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 97));
+                new InspectorPath("Properties", "Specific", 99));
     private final ComponentPropertyMetadata graphicPropertyMetadata =
             new ComponentPropertyMetadata(
                 graphicName,
@@ -2014,7 +2048,7 @@
                 gridLinesVisibleName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 20));
+                new InspectorPath("Properties", "Specific", 22));
     private final ValuePropertyMetadata halignment_NULL_PropertyMetadata =
             new EnumerationPropertyMetadata(
                 halignmentName,
@@ -2035,7 +2069,7 @@
                 javafx.scene.control.ScrollPane.ScrollBarPolicy.class,
                 true, /* readWrite */
                 javafx.scene.control.ScrollPane.ScrollBarPolicy.AS_NEEDED, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 46));
+                new InspectorPath("Properties", "Specific", 48));
     private final ComponentPropertyMetadata headerPropertyMetadata =
             new ComponentPropertyMetadata(
                 headerName,
@@ -2053,21 +2087,21 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 2.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 7));
+                new InspectorPath("Layout", "Size", 8));
     private final ValuePropertyMetadata height_Double_0_PropertyMetadata =
             new DoublePropertyMetadata(
                 heightName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 7));
+                new InspectorPath("Layout", "Size", 8));
     private final ValuePropertyMetadata height_Double_ro_PropertyMetadata =
             new DoublePropertyMetadata(
                 heightName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 false, /* readWrite */
                 null, /* No defaultValue for R/O property */
-                new InspectorPath("Layout", "Size", 7));
+                new InspectorPath("Layout", "Size", 8));
     private final ValuePropertyMetadata hgapPropertyMetadata =
             new DoublePropertyMetadata(
                 hgapName,
@@ -2087,58 +2121,58 @@
                 hideOnClickName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 21));
+                new InspectorPath("Properties", "Specific", 23));
     private final ValuePropertyMetadata hideOnClick_false_PropertyMetadata =
             new BooleanPropertyMetadata(
                 hideOnClickName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 21));
+                new InspectorPath("Properties", "Specific", 23));
     private final ValuePropertyMetadata hideOnEscapePropertyMetadata =
             new BooleanPropertyMetadata(
                 hideOnEscapeName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 63));
+                new InspectorPath("Properties", "Specific", 65));
     private final ValuePropertyMetadata hmaxPropertyMetadata =
             new DoublePropertyMetadata(
                 hmaxName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 1.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 106));
+                new InspectorPath("Properties", "Specific", 108));
     private final ValuePropertyMetadata hminPropertyMetadata =
             new DoublePropertyMetadata(
                 hminName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 102));
+                new InspectorPath("Properties", "Specific", 104));
     private final ValuePropertyMetadata horizontalGridLinesVisiblePropertyMetadata =
             new BooleanPropertyMetadata(
                 horizontalGridLinesVisibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 98));
+                new InspectorPath("Properties", "Specific", 100));
     private final ValuePropertyMetadata horizontalZeroLineVisiblePropertyMetadata =
             new BooleanPropertyMetadata(
                 horizontalZeroLineVisibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 108));
+                new InspectorPath("Properties", "Specific", 110));
     private final ValuePropertyMetadata htmlTextPropertyMetadata =
             new StringPropertyMetadata(
                 htmlTextName,
                 true, /* readWrite */
                 "<html><head></head><body contenteditable=\"true\"></body></html>", /* defaultValue */
-                new InspectorPath("Properties", "Specific", 22));
+                new InspectorPath("Properties", "Specific", 24));
     private final ValuePropertyMetadata hvaluePropertyMetadata =
             new DoublePropertyMetadata(
                 hvalueName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 104));
+                new InspectorPath("Properties", "Specific", 106));
     private final ValuePropertyMetadata idPropertyMetadata =
             new StringPropertyMetadata(
                 idName,
@@ -2150,19 +2184,19 @@
                 imageName,
                 true, /* readWrite */
                 null, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 23));
+                new InspectorPath("Properties", "Specific", 25));
     private final ValuePropertyMetadata indeterminate_Boolean_PropertyMetadata =
             new BooleanPropertyMetadata(
                 indeterminateName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 47));
+                new InspectorPath("Properties", "Specific", 49));
     private final ValuePropertyMetadata indeterminate_Boolean_ro_PropertyMetadata =
             new BooleanPropertyMetadata(
                 indeterminateName,
                 false, /* readWrite */
                 null, /* No defaultValue for R/O property */
-                new InspectorPath("Properties", "Specific", 47));
+                new InspectorPath("Properties", "Specific", 49));
     private final ValuePropertyMetadata insetsPropertyMetadata =
             new InsetsPropertyMetadata(
                 insetsName,
@@ -2184,7 +2218,7 @@
                 labelName,
                 true, /* readWrite */
                 "", /* defaultValue */
-                new InspectorPath("Properties", "Specific", 24));
+                new InspectorPath("Properties", "Specific", 26));
     private final ComponentPropertyMetadata labelForPropertyMetadata =
             new ComponentPropertyMetadata(
                 labelForName,
@@ -2195,14 +2229,14 @@
                 labelFormatterName,
                 true, /* readWrite */
                 null, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 111));
+                new InspectorPath("Properties", "Specific", 113));
     private final ValuePropertyMetadata labelLineLengthPropertyMetadata =
             new DoublePropertyMetadata(
                 labelLineLengthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 20.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 109));
+                new InspectorPath("Properties", "Specific", 111));
     private final ValuePropertyMetadata labelPaddingPropertyMetadata =
             new InsetsPropertyMetadata(
                 labelPaddingName,
@@ -2214,13 +2248,13 @@
                 labelsVisibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 99));
+                new InspectorPath("Properties", "Specific", 101));
     private final ValuePropertyMetadata largeArcFlagPropertyMetadata =
             new BooleanPropertyMetadata(
                 largeArcFlagName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 124));
+                new InspectorPath("Properties", "Specific", 126));
     private final ValuePropertyMetadata layoutBoundsPropertyMetadata =
             new BoundsPropertyMetadata(
                 layoutBoundsName,
@@ -2252,26 +2286,26 @@
                 javafx.geometry.Side.class,
                 true, /* readWrite */
                 javafx.geometry.Side.BOTTOM, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 72));
+                new InspectorPath("Properties", "Specific", 74));
     private final ValuePropertyMetadata legendVisiblePropertyMetadata =
             new BooleanPropertyMetadata(
                 legendVisibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 64));
+                new InspectorPath("Properties", "Specific", 66));
     private final ValuePropertyMetadata length_Double_PropertyMetadata =
             new DoublePropertyMetadata(
                 lengthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 17));
+                new InspectorPath("Layout", "Size", 18));
     private final ValuePropertyMetadata length_Integer_ro_PropertyMetadata =
             new IntegerPropertyMetadata(
                 lengthName,
                 false, /* readWrite */
                 null, /* No defaultValue for R/O property */
-                new InspectorPath("Layout", "Size", 17));
+                new InspectorPath("Layout", "Size", 18));
     private final ValuePropertyMetadata lightOnPropertyMetadata =
             new BooleanPropertyMetadata(
                 lightOnName,
@@ -2291,14 +2325,14 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 88));
+                new InspectorPath("Properties", "Specific", 90));
     private final ValuePropertyMetadata majorTickUnitPropertyMetadata =
             new DoublePropertyMetadata(
                 majorTickUnitName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 25.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 89));
+                new InspectorPath("Properties", "Specific", 91));
     private final ValuePropertyMetadata materialPropertyMetadata =
             new MaterialPropertyMetadata(
                 materialName,
@@ -2311,21 +2345,21 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 100.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 48));
+                new InspectorPath("Properties", "Specific", 50));
     private final ValuePropertyMetadata maxHeight_COMPUTED_PropertyMetadata =
             new DoublePropertyMetadata(
                 maxHeightName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_PREF_SIZE,
                 true, /* readWrite */
                 -1.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 5));
+                new InspectorPath("Layout", "Size", 6));
     private final ValuePropertyMetadata maxHeight_MAX_PropertyMetadata =
             new DoublePropertyMetadata(
                 maxHeightName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_PREF_SIZE,
                 true, /* readWrite */
                 Double.MAX_VALUE, /* defaultValue */
-                new InspectorPath("Layout", "Size", 5));
+                new InspectorPath("Layout", "Size", 6));
     private final ValuePropertyMetadata maxPageIndicatorCountPropertyMetadata =
             new IntegerPropertyMetadata(
                 maxPageIndicatorCountName,
@@ -2338,21 +2372,21 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_PREF_SIZE,
                 true, /* readWrite */
                 -1.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 4));
+                new InspectorPath("Layout", "Size", 5));
     private final ValuePropertyMetadata maxWidth_500000_PropertyMetadata =
             new DoublePropertyMetadata(
                 maxWidthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_PREF_SIZE,
                 true, /* readWrite */
                 5000.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 4));
+                new InspectorPath("Layout", "Size", 5));
     private final ValuePropertyMetadata maxWidth_MAX_PropertyMetadata =
             new DoublePropertyMetadata(
                 maxWidthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_PREF_SIZE,
                 true, /* readWrite */
                 Double.MAX_VALUE, /* defaultValue */
-                new InspectorPath("Layout", "Size", 4));
+                new InspectorPath("Layout", "Size", 5));
     private final ComponentPropertyMetadata menusPropertyMetadata =
             new ComponentPropertyMetadata(
                 menusName,
@@ -2370,46 +2404,46 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 27));
+                new InspectorPath("Properties", "Specific", 29));
     private final ValuePropertyMetadata minHeight_COMPUTED_PropertyMetadata =
             new DoublePropertyMetadata(
                 minHeightName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_PREF_SIZE,
                 true, /* readWrite */
                 -1.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 1));
+                new InspectorPath("Layout", "Size", 2));
     private final ValuePropertyMetadata minHeight_0_PropertyMetadata =
             new DoublePropertyMetadata(
                 minHeightName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_PREF_SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 1));
+                new InspectorPath("Layout", "Size", 2));
     private final ValuePropertyMetadata minorTickCount_3_PropertyMetadata =
             new IntegerPropertyMetadata(
                 minorTickCountName,
                 true, /* readWrite */
                 3, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 94));
+                new InspectorPath("Properties", "Specific", 96));
     private final ValuePropertyMetadata minorTickCount_5_PropertyMetadata =
             new IntegerPropertyMetadata(
                 minorTickCountName,
                 true, /* readWrite */
                 5, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 94));
+                new InspectorPath("Properties", "Specific", 96));
     private final ValuePropertyMetadata minorTickLengthPropertyMetadata =
             new DoublePropertyMetadata(
                 minorTickLengthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 5.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 119));
+                new InspectorPath("Properties", "Specific", 121));
     private final ValuePropertyMetadata minorTickVisiblePropertyMetadata =
             new BooleanPropertyMetadata(
                 minorTickVisibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 117));
+                new InspectorPath("Properties", "Specific", 119));
     private final ValuePropertyMetadata minViewportHeightPropertyMetadata =
             new DoublePropertyMetadata(
                 minViewportHeightName,
@@ -2430,21 +2464,21 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_PREF_SIZE,
                 true, /* readWrite */
                 -1.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 0));
+                new InspectorPath("Layout", "Size", 1));
     private final ValuePropertyMetadata minWidth_1000_PropertyMetadata =
             new DoublePropertyMetadata(
                 minWidthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_PREF_SIZE,
                 true, /* readWrite */
                 10.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 0));
+                new InspectorPath("Layout", "Size", 1));
     private final ValuePropertyMetadata minWidth_0_PropertyMetadata =
             new DoublePropertyMetadata(
                 minWidthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_PREF_SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 0));
+                new InspectorPath("Layout", "Size", 1));
     private final ValuePropertyMetadata mnemonicParsing_false_PropertyMetadata =
             new BooleanPropertyMetadata(
                 mnemonicParsingName,
@@ -2869,21 +2903,21 @@
                 pannableName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 28));
+                new InspectorPath("Properties", "Specific", 30));
     private final ValuePropertyMetadata percentHeightPropertyMetadata =
             new DoublePropertyMetadata(
                 percentHeightName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.PERCENTAGE,
                 true, /* readWrite */
                 -1.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 19));
+                new InspectorPath("Layout", "Size", 20));
     private final ValuePropertyMetadata percentWidthPropertyMetadata =
             new DoublePropertyMetadata(
                 percentWidthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.PERCENTAGE,
                 true, /* readWrite */
                 -1.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 18));
+                new InspectorPath("Layout", "Size", 19));
     private final ValuePropertyMetadata pickOnBounds_false_PropertyMetadata =
             new BooleanPropertyMetadata(
                 pickOnBoundsName,
@@ -2913,19 +2947,19 @@
                 javafx.geometry.Side.class,
                 true, /* readWrite */
                 javafx.geometry.Side.BOTTOM, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 29));
+                new InspectorPath("Properties", "Specific", 31));
     private final ValuePropertyMetadata prefColumnCount_40_PropertyMetadata =
             new IntegerPropertyMetadata(
                 prefColumnCountName,
                 true, /* readWrite */
                 40, /* defaultValue */
-                new InspectorPath("Layout", "Size", 8));
+                new InspectorPath("Layout", "Size", 9));
     private final ValuePropertyMetadata prefColumnCount_12_PropertyMetadata =
             new IntegerPropertyMetadata(
                 prefColumnCountName,
                 true, /* readWrite */
                 12, /* defaultValue */
-                new InspectorPath("Layout", "Size", 8));
+                new InspectorPath("Layout", "Size", 9));
     private final ValuePropertyMetadata prefColumnsPropertyMetadata =
             new IntegerPropertyMetadata(
                 prefColumnsName,
@@ -2938,20 +2972,20 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_COMPUTED_SIZE,
                 true, /* readWrite */
                 -1.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 3));
+                new InspectorPath("Layout", "Size", 4));
     private final ValuePropertyMetadata prefHeight_60000_PropertyMetadata =
             new DoublePropertyMetadata(
                 prefHeightName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_COMPUTED_SIZE,
                 true, /* readWrite */
                 600.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 3));
+                new InspectorPath("Layout", "Size", 4));
     private final ValuePropertyMetadata prefRowCountPropertyMetadata =
             new IntegerPropertyMetadata(
                 prefRowCountName,
                 true, /* readWrite */
                 10, /* defaultValue */
-                new InspectorPath("Layout", "Size", 9));
+                new InspectorPath("Layout", "Size", 10));
     private final ValuePropertyMetadata prefRowsPropertyMetadata =
             new IntegerPropertyMetadata(
                 prefRowsName,
@@ -2992,47 +3026,47 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_COMPUTED_SIZE,
                 true, /* readWrite */
                 -1.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 2));
+                new InspectorPath("Layout", "Size", 3));
     private final ValuePropertyMetadata prefWidth_8000_PropertyMetadata =
             new DoublePropertyMetadata(
                 prefWidthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_COMPUTED_SIZE,
                 true, /* readWrite */
                 80.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 2));
+                new InspectorPath("Layout", "Size", 3));
     private final ValuePropertyMetadata prefWidth_80000_PropertyMetadata =
             new DoublePropertyMetadata(
                 prefWidthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.USE_COMPUTED_SIZE,
                 true, /* readWrite */
                 800.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 2));
+                new InspectorPath("Layout", "Size", 3));
     private final ValuePropertyMetadata prefWrapLengthPropertyMetadata =
             new DoublePropertyMetadata(
                 prefWrapLengthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 400.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 73));
+                new InspectorPath("Properties", "Specific", 75));
     private final ValuePropertyMetadata preserveRatio_false_PropertyMetadata =
             new BooleanPropertyMetadata(
                 preserveRatioName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 30));
+                new InspectorPath("Properties", "Specific", 32));
     private final ValuePropertyMetadata preserveRatio_true_PropertyMetadata =
             new BooleanPropertyMetadata(
                 preserveRatioName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 30));
+                new InspectorPath("Properties", "Specific", 32));
     private final ValuePropertyMetadata progressPropertyMetadata =
             new DoublePropertyMetadata(
                 progressName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.PROGRESS,
                 true, /* readWrite */
                 -1.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 31));
+                new InspectorPath("Properties", "Specific", 33));
     private final ValuePropertyMetadata promptTextPropertyMetadata =
             new StringPropertyMetadata(
                 promptTextName,
@@ -3045,28 +3079,28 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 10));
+                new InspectorPath("Layout", "Size", 11));
     private final ValuePropertyMetadata radius_100_PropertyMetadata =
             new DoublePropertyMetadata(
                 radiusName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 1.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 10));
+                new InspectorPath("Layout", "Size", 11));
     private final ValuePropertyMetadata radiusXPropertyMetadata =
             new DoublePropertyMetadata(
                 radiusXName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 11));
+                new InspectorPath("Layout", "Size", 12));
     private final ValuePropertyMetadata radiusYPropertyMetadata =
             new DoublePropertyMetadata(
                 radiusYName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 12));
+                new InspectorPath("Layout", "Size", 13));
     private final ValuePropertyMetadata resizable_Boolean_ro_PropertyMetadata =
             new BooleanPropertyMetadata(
                 resizableName,
@@ -3312,7 +3346,7 @@
                 rotateGraphicName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 65));
+                new InspectorPath("Properties", "Specific", 67));
     private final ValuePropertyMetadata rotationAxisPropertyMetadata =
             new Point3DPropertyMetadata(
                 rotationAxisName,
@@ -3330,14 +3364,14 @@
                 javafx.geometry.VPos.class,
                 true, /* readWrite */
                 javafx.geometry.VPos.CENTER, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 49));
+                new InspectorPath("Properties", "Specific", 51));
     private final ValuePropertyMetadata scalePropertyMetadata =
             new DoublePropertyMetadata(
                 scaleName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 false, /* readWrite */
                 null, /* No defaultValue for R/O property */
-                new InspectorPath("Properties", "Specific", 80));
+                new InspectorPath("Properties", "Specific", 82));
     private final ValuePropertyMetadata scaleShapePropertyMetadata =
             new BooleanPropertyMetadata(
                 scaleShapeName,
@@ -3389,13 +3423,13 @@
                 selectedName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 33));
+                new InspectorPath("Properties", "Specific", 35));
     private final ValuePropertyMetadata selected_Boolean_ro_PropertyMetadata =
             new BooleanPropertyMetadata(
                 selectedName,
                 false, /* readWrite */
                 null, /* No defaultValue for R/O property */
-                new InspectorPath("Properties", "Specific", 33));
+                new InspectorPath("Properties", "Specific", 35));
     private final ComponentPropertyMetadata shapePropertyMetadata =
             new ComponentPropertyMetadata(
                 shapeName,
@@ -3406,45 +3440,45 @@
                 showRootName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 50));
+                new InspectorPath("Properties", "Specific", 52));
     private final ValuePropertyMetadata showTickLabelsPropertyMetadata =
             new BooleanPropertyMetadata(
                 showTickLabelsName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 81));
+                new InspectorPath("Properties", "Specific", 83));
     private final ValuePropertyMetadata showTickMarksPropertyMetadata =
             new BooleanPropertyMetadata(
                 showTickMarksName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 74));
+                new InspectorPath("Properties", "Specific", 76));
     private final ValuePropertyMetadata showWeekNumbersPropertyMetadata =
             new BooleanPropertyMetadata(
                 showWeekNumbersName,
                 true, /* readWrite */
-                true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 125));
+                false, /* defaultValue */
+                new InspectorPath("Properties", "Specific", 127));
     private final ValuePropertyMetadata side_NULL_PropertyMetadata =
             new EnumerationPropertyMetadata(
                 sideName,
                 javafx.geometry.Side.class,
                 "BOTTOM", /* null equivalent */
                 true, /* readWrite */
-                new InspectorPath("Properties", "Specific", 34));
+                new InspectorPath("Properties", "Specific", 36));
     private final ValuePropertyMetadata side_TOP_PropertyMetadata =
             new EnumerationPropertyMetadata(
                 sideName,
                 javafx.geometry.Side.class,
                 true, /* readWrite */
                 javafx.geometry.Side.TOP, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 34));
+                new InspectorPath("Properties", "Specific", 36));
     private final ValuePropertyMetadata smoothPropertyMetadata =
             new BooleanPropertyMetadata(
                 smoothName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 51));
+                new InspectorPath("Properties", "Specific", 53));
     private final ValuePropertyMetadata snapToPixelPropertyMetadata =
             new BooleanPropertyMetadata(
                 snapToPixelName,
@@ -3456,20 +3490,20 @@
                 snapToTicksName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 100));
+                new InspectorPath("Properties", "Specific", 102));
     private final ValuePropertyMetadata sortablePropertyMetadata =
             new BooleanPropertyMetadata(
                 sortableName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 52));
+                new InspectorPath("Properties", "Specific", 54));
     private final ValuePropertyMetadata sortModePropertyMetadata =
             new EnumerationPropertyMetadata(
                 sortModeName,
                 javafx.scene.control.TreeSortMode.class,
                 true, /* readWrite */
                 javafx.scene.control.TreeSortMode.ALL_DESCENDANTS, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 54));
+                new InspectorPath("Properties", "Specific", 56));
     private final ComponentPropertyMetadata sortNodePropertyMetadata =
             new ComponentPropertyMetadata(
                 sortNodeName,
@@ -3486,7 +3520,7 @@
                 javafx.scene.control.TableColumn.SortType.class,
                 true, /* readWrite */
                 javafx.scene.control.TableColumn.SortType.ASCENDING, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 66));
+                new InspectorPath("Properties", "Specific", 68));
     private final ValuePropertyMetadata spacingPropertyMetadata =
             new DoublePropertyMetadata(
                 spacingName,
@@ -3500,14 +3534,14 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.ANGLE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 16));
+                new InspectorPath("Layout", "Size", 17));
     private final ValuePropertyMetadata startMarginPropertyMetadata =
             new DoublePropertyMetadata(
                 startMarginName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 5.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 90));
+                new InspectorPath("Properties", "Specific", 92));
     private final ValuePropertyMetadata startXPropertyMetadata =
             new DoublePropertyMetadata(
                 startXName,
@@ -3594,13 +3628,13 @@
                 true, /* readWrite */
                 Arrays.asList("accordion"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c36_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c37_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
                 Arrays.asList("chart"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c44_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c45_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3618,7 +3652,13 @@
                 true, /* readWrite */
                 Arrays.asList("button"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c40_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c35_PropertyMetadata =
+            new StringListPropertyMetadata(
+                styleClassName,
+                true, /* readWrite */
+                Arrays.asList("button-bar"), /* defaultValue */
+                new InspectorPath("Properties", "JavaFX CSS", 1));
+    private final ValuePropertyMetadata styleClass_c41_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3636,7 +3676,7 @@
                 true, /* readWrite */
                 Arrays.asList("menu-item","check-menu-item"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c42_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c43_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3708,7 +3748,7 @@
                 true, /* readWrite */
                 Arrays.asList("list-view"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c45_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c46_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3726,13 +3766,13 @@
                 true, /* readWrite */
                 Arrays.asList("menu-bar"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c51_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c52_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
                 Arrays.asList("menu-button"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c35_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c36_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3744,13 +3784,13 @@
                 true, /* readWrite */
                 Collections.emptyList(), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c38_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c39_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
                 Arrays.asList("pagination"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c52_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c53_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3762,7 +3802,7 @@
                 true, /* readWrite */
                 Arrays.asList("progress-bar"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c49_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c50_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3780,7 +3820,7 @@
                 true, /* readWrite */
                 Arrays.asList("scroll-bar"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c37_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c38_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3798,7 +3838,7 @@
                 true, /* readWrite */
                 Arrays.asList("menu-item","custom-menu-item","separator-menu-item"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c39_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c40_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3840,25 +3880,25 @@
                 true, /* readWrite */
                 Arrays.asList("tab-pane"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c41_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c42_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
                 Arrays.asList("table-column"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c48_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c49_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
                 Arrays.asList("table-view"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c50_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c51_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
                 Arrays.asList("text-input","text-area"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c46_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c47_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3870,7 +3910,7 @@
                 true, /* readWrite */
                 Arrays.asList("titled-pane"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c43_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c44_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3900,7 +3940,7 @@
                 true, /* readWrite */
                 Arrays.asList("tree-view"), /* defaultValue */
                 new InspectorPath("Properties", "JavaFX CSS", 1));
-    private final ValuePropertyMetadata styleClass_c47_PropertyMetadata =
+    private final ValuePropertyMetadata styleClass_c48_PropertyMetadata =
             new StringListPropertyMetadata(
                 styleClassName,
                 true, /* readWrite */
@@ -3917,20 +3957,20 @@
                 sweepFlagName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 122));
+                new InspectorPath("Properties", "Specific", 124));
     private final ValuePropertyMetadata tabClosingPolicyPropertyMetadata =
             new EnumerationPropertyMetadata(
                 tabClosingPolicyName,
                 javafx.scene.control.TabPane.TabClosingPolicy.class,
                 true, /* readWrite */
                 javafx.scene.control.TabPane.TabClosingPolicy.SELECTED_TAB, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 55));
+                new InspectorPath("Properties", "Specific", 57));
     private final ValuePropertyMetadata tableMenuButtonVisiblePropertyMetadata =
             new BooleanPropertyMetadata(
                 tableMenuButtonVisibleName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 56));
+                new InspectorPath("Properties", "Specific", 58));
     private final ValuePropertyMetadata tabMaxHeightPropertyMetadata =
             new DoublePropertyMetadata(
                 tabMaxHeightName,
@@ -4007,72 +4047,72 @@
                 tickLabelFillName,
                 true, /* readWrite */
                 javafx.scene.paint.Color.BLACK, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 95));
+                new InspectorPath("Properties", "Specific", 97));
     private final ValuePropertyMetadata tickLabelFontPropertyMetadata =
             new FontPropertyMetadata(
                 tickLabelFontName,
                 true, /* readWrite */
                 javafx.scene.text.Font.font("System",8.0), /* defaultValue */
-                new InspectorPath("Properties", "Specific", 91));
+                new InspectorPath("Properties", "Specific", 93));
     private final ValuePropertyMetadata tickLabelFormatterPropertyMetadata =
             new StringConverterPropertyMetadata(
                 tickLabelFormatterName,
                 true, /* readWrite */
                 null, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 84));
+                new InspectorPath("Properties", "Specific", 86));
     private final ValuePropertyMetadata tickLabelGapPropertyMetadata =
             new DoublePropertyMetadata(
                 tickLabelGapName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 3.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 101));
+                new InspectorPath("Properties", "Specific", 103));
     private final ValuePropertyMetadata tickLabelRotationPropertyMetadata =
             new DoublePropertyMetadata(
                 tickLabelRotationName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.ANGLE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 110));
+                new InspectorPath("Properties", "Specific", 112));
     private final ValuePropertyMetadata tickLabelsVisiblePropertyMetadata =
             new BooleanPropertyMetadata(
                 tickLabelsVisibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 83));
+                new InspectorPath("Properties", "Specific", 85));
     private final ValuePropertyMetadata tickLengthPropertyMetadata =
             new DoublePropertyMetadata(
                 tickLengthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 8.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 114));
+                new InspectorPath("Properties", "Specific", 116));
     private final ValuePropertyMetadata tickMarksPropertyMetadata =
             new TickMarkListPropertyMetadata(
                 tickMarksName,
                 true, /* readWrite */
                 Collections.emptyList(), /* defaultValue */
-                new InspectorPath("Properties", "Specific", 82));
+                new InspectorPath("Properties", "Specific", 84));
     private final ValuePropertyMetadata tickMarkVisiblePropertyMetadata =
             new BooleanPropertyMetadata(
                 tickMarkVisibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 112));
+                new InspectorPath("Properties", "Specific", 114));
     private final ValuePropertyMetadata tickUnitPropertyMetadata =
             new DoublePropertyMetadata(
                 tickUnitName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 5.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 118));
+                new InspectorPath("Properties", "Specific", 120));
     private final ValuePropertyMetadata tileAlignmentPropertyMetadata =
             new EnumerationPropertyMetadata(
                 tileAlignmentName,
                 javafx.geometry.Pos.class,
                 true, /* readWrite */
                 javafx.geometry.Pos.CENTER, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 57));
+                new InspectorPath("Properties", "Specific", 59));
     private final ValuePropertyMetadata tileHeightPropertyMetadata =
             new DoublePropertyMetadata(
                 tileHeightName,
@@ -4092,20 +4132,20 @@
                 titleName,
                 true, /* readWrite */
                 "", /* defaultValue */
-                new InspectorPath("Properties", "Specific", 35));
+                new InspectorPath("Properties", "Specific", 37));
     private final ValuePropertyMetadata titleSidePropertyMetadata =
             new EnumerationPropertyMetadata(
                 titleSideName,
                 javafx.geometry.Side.class,
                 true, /* readWrite */
                 javafx.geometry.Side.TOP, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 58));
+                new InspectorPath("Properties", "Specific", 60));
     private final ValuePropertyMetadata toggleGroupPropertyMetadata =
             new ToggleGroupPropertyMetadata(
                 toggleGroupName,
                 true, /* readWrite */
                 null, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 36));
+                new InspectorPath("Properties", "Specific", 38));
     private final ComponentPropertyMetadata tooltipPropertyMetadata =
             new ComponentPropertyMetadata(
                 tooltipName,
@@ -4148,7 +4188,7 @@
                 javafx.scene.shape.ArcType.class,
                 true, /* readWrite */
                 javafx.scene.shape.ArcType.OPEN, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 59));
+                new InspectorPath("Properties", "Specific", 61));
     private final ValuePropertyMetadata underlinePropertyMetadata =
             new BooleanPropertyMetadata(
                 underlineName,
@@ -4161,20 +4201,20 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 1.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 67));
+                new InspectorPath("Properties", "Specific", 69));
     private final ValuePropertyMetadata upperBoundPropertyMetadata =
             new DoublePropertyMetadata(
                 upperBoundName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 100.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 96));
+                new InspectorPath("Properties", "Specific", 98));
     private final ValuePropertyMetadata userAgentStylesheetPropertyMetadata =
             new StringPropertyMetadata(
                 userAgentStylesheetName,
                 true, /* readWrite */
                 "", /* defaultValue */
-                new InspectorPath("Properties", "Specific", 127));
+                new InspectorPath("Properties", "Specific", 129));
     private final ValuePropertyMetadata valignment_NULL_PropertyMetadata =
             new EnumerationPropertyMetadata(
                 valignmentName,
@@ -4194,33 +4234,33 @@
                 valueName,
                 true, /* readWrite */
                 null, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 68));
+                new InspectorPath("Properties", "Specific", 70));
     private final ValuePropertyMetadata value_Color_PropertyMetadata =
             new ColorPropertyMetadata(
                 valueName,
                 true, /* readWrite */
                 javafx.scene.paint.Color.WHITE, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 68));
+                new InspectorPath("Properties", "Specific", 70));
     private final ValuePropertyMetadata value_Double_PropertyMetadata =
             new DoublePropertyMetadata(
                 valueName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 68));
+                new InspectorPath("Properties", "Specific", 70));
     private final ValuePropertyMetadata value_Object_ro_PropertyMetadata =
             new ObjectPropertyMetadata(
                 valueName,
                 false, /* readWrite */
                 null, /* No defaultValue for R/O property */
-                new InspectorPath("Properties", "Specific", 68));
+                new InspectorPath("Properties", "Specific", 70));
     private final ValuePropertyMetadata vbarPolicyPropertyMetadata =
             new EnumerationPropertyMetadata(
                 vbarPolicyName,
                 javafx.scene.control.ScrollPane.ScrollBarPolicy.class,
                 true, /* readWrite */
                 javafx.scene.control.ScrollPane.ScrollBarPolicy.AS_NEEDED, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 69));
+                new InspectorPath("Properties", "Specific", 71));
     private final ValuePropertyMetadata verticalFieldOfViewPropertyMetadata =
             new BooleanPropertyMetadata(
                 verticalFieldOfViewName,
@@ -4232,13 +4272,13 @@
                 verticalGridLinesVisibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 113));
+                new InspectorPath("Properties", "Specific", 115));
     private final ValuePropertyMetadata verticalZeroLineVisiblePropertyMetadata =
             new BooleanPropertyMetadata(
                 verticalZeroLineVisibleName,
                 true, /* readWrite */
                 true, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 115));
+                new InspectorPath("Properties", "Specific", 117));
     private final ValuePropertyMetadata vgapPropertyMetadata =
             new DoublePropertyMetadata(
                 vgapName,
@@ -4277,61 +4317,61 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 15.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 85));
+                new InspectorPath("Properties", "Specific", 87));
     private final ValuePropertyMetadata visibleRowCountPropertyMetadata =
             new IntegerPropertyMetadata(
                 visibleRowCountName,
                 true, /* readWrite */
                 10, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 39));
+                new InspectorPath("Properties", "Specific", 41));
     private final ValuePropertyMetadata visitedPropertyMetadata =
             new BooleanPropertyMetadata(
                 visitedName,
                 true, /* readWrite */
                 false, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 40));
+                new InspectorPath("Properties", "Specific", 42));
     private final ValuePropertyMetadata vmaxPropertyMetadata =
             new DoublePropertyMetadata(
                 vmaxName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 1.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 107));
+                new InspectorPath("Properties", "Specific", 109));
     private final ValuePropertyMetadata vminPropertyMetadata =
             new DoublePropertyMetadata(
                 vminName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 103));
+                new InspectorPath("Properties", "Specific", 105));
     private final ValuePropertyMetadata vvaluePropertyMetadata =
             new DoublePropertyMetadata(
                 vvalueName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 105));
+                new InspectorPath("Properties", "Specific", 107));
     private final ValuePropertyMetadata width_Double_200_PropertyMetadata =
             new DoublePropertyMetadata(
                 widthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 2.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 6));
+                new InspectorPath("Layout", "Size", 7));
     private final ValuePropertyMetadata width_Double_0_PropertyMetadata =
             new DoublePropertyMetadata(
                 widthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Layout", "Size", 6));
+                new InspectorPath("Layout", "Size", 7));
     private final ValuePropertyMetadata width_Double_ro_PropertyMetadata =
             new DoublePropertyMetadata(
                 widthName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 false, /* readWrite */
                 null, /* No defaultValue for R/O property */
-                new InspectorPath("Layout", "Size", 6));
+                new InspectorPath("Layout", "Size", 7));
     private final ValuePropertyMetadata wrappingWidthPropertyMetadata =
             new DoublePropertyMetadata(
                 wrappingWidthName,
@@ -4370,7 +4410,7 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.ANGLE,
                 true, /* readWrite */
                 0.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 123));
+                new InspectorPath("Properties", "Specific", 125));
     private final ValuePropertyMetadata y_0_PropertyMetadata =
             new DoublePropertyMetadata(
                 yName,
@@ -4396,14 +4436,14 @@
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.COORDINATE,
                 false, /* readWrite */
                 null, /* No defaultValue for R/O property */
-                new InspectorPath("Properties", "Specific", 116));
+                new InspectorPath("Properties", "Specific", 118));
     private final ValuePropertyMetadata zoomPropertyMetadata =
             new DoublePropertyMetadata(
                 zoomName,
                 com.oracle.javafx.scenebuilder.kit.metadata.property.value.DoublePropertyMetadata.DoubleKind.SIZE,
                 true, /* readWrite */
                 1.0, /* defaultValue */
-                new InspectorPath("Properties", "Specific", 121));
+                new InspectorPath("Properties", "Specific", 123));
     private final ValuePropertyMetadata SplitPane_resizableWithParentPropertyMetadata =
             new BooleanPropertyMetadata(
                 SplitPane_resizableWithParentName,
@@ -4585,6 +4625,7 @@
         componentClassMap.put(BoxMetadata.getKlass(), BoxMetadata);
         componentClassMap.put(BubbleChartMetadata.getKlass(), BubbleChartMetadata);
         componentClassMap.put(ButtonMetadata.getKlass(), ButtonMetadata);
+        componentClassMap.put(ButtonBarMetadata.getKlass(), ButtonBarMetadata);
         componentClassMap.put(ButtonBaseMetadata.getKlass(), ButtonBaseMetadata);
         componentClassMap.put(CameraMetadata.getKlass(), CameraMetadata);
         componentClassMap.put(CanvasMetadata.getKlass(), CanvasMetadata);
@@ -4724,13 +4765,13 @@
         ArcToMetadata.getProperties().add(y_0_PropertyMetadata);
 
         AreaChartMetadata.getProperties().add(createSymbolsPropertyMetadata);
-        AreaChartMetadata.getProperties().add(styleClass_c36_PropertyMetadata);
+        AreaChartMetadata.getProperties().add(styleClass_c37_PropertyMetadata);
 
         AxisMetadata.getProperties().add(animatedPropertyMetadata);
         AxisMetadata.getProperties().add(autoRangingPropertyMetadata);
         AxisMetadata.getProperties().add(labelPropertyMetadata);
         AxisMetadata.getProperties().add(side_NULL_PropertyMetadata);
-        AxisMetadata.getProperties().add(styleClass_c44_PropertyMetadata);
+        AxisMetadata.getProperties().add(styleClass_c45_PropertyMetadata);
         AxisMetadata.getProperties().add(tickLabelFillPropertyMetadata);
         AxisMetadata.getProperties().add(tickLabelFontPropertyMetadata);
         AxisMetadata.getProperties().add(tickLabelGapPropertyMetadata);
@@ -4758,7 +4799,7 @@
         BoxMetadata.getProperties().add(role_NODE_PropertyMetadata);
         BoxMetadata.getProperties().add(width_Double_200_PropertyMetadata);
 
-        BubbleChartMetadata.getProperties().add(styleClass_c36_PropertyMetadata);
+        BubbleChartMetadata.getProperties().add(styleClass_c37_PropertyMetadata);
 
         ButtonMetadata.getProperties().add(cancelButtonPropertyMetadata);
         ButtonMetadata.getProperties().add(defaultButtonPropertyMetadata);
@@ -4766,10 +4807,16 @@
         ButtonMetadata.getProperties().add(role_BUTTON_PropertyMetadata);
         ButtonMetadata.getProperties().add(styleClass_c17_PropertyMetadata);
 
+        ButtonBarMetadata.getProperties().add(buttonMinWidthPropertyMetadata);
+        ButtonBarMetadata.getProperties().add(buttonOrderPropertyMetadata);
+        ButtonBarMetadata.getProperties().add(buttonsPropertyMetadata);
+        ButtonBarMetadata.getProperties().add(focusTraversable_true_PropertyMetadata);
+        ButtonBarMetadata.getProperties().add(styleClass_c35_PropertyMetadata);
+
         ButtonBaseMetadata.getProperties().add(focusTraversable_true_PropertyMetadata);
         ButtonBaseMetadata.getProperties().add(onActionPropertyMetadata);
-        ButtonBaseMetadata.getProperties().add(role_MENU_BUTTON_PropertyMetadata);
-        ButtonBaseMetadata.getProperties().add(styleClass_c40_PropertyMetadata);
+        ButtonBaseMetadata.getProperties().add(role_RADIO_BUTTON_PropertyMetadata);
+        ButtonBaseMetadata.getProperties().add(styleClass_c41_PropertyMetadata);
 
         CameraMetadata.getProperties().add(farClipPropertyMetadata);
         CameraMetadata.getProperties().add(nearClipPropertyMetadata);
@@ -4787,13 +4834,13 @@
         CategoryAxisMetadata.getProperties().add(endMarginPropertyMetadata);
         CategoryAxisMetadata.getProperties().add(gapStartAndEndPropertyMetadata);
         CategoryAxisMetadata.getProperties().add(startMarginPropertyMetadata);
-        CategoryAxisMetadata.getProperties().add(styleClass_c44_PropertyMetadata);
+        CategoryAxisMetadata.getProperties().add(styleClass_c45_PropertyMetadata);
         CategoryAxisMetadata.getProperties().add(zeroPositionPropertyMetadata);
 
         ChartMetadata.getProperties().add(animatedPropertyMetadata);
         ChartMetadata.getProperties().add(legendSidePropertyMetadata);
         ChartMetadata.getProperties().add(legendVisiblePropertyMetadata);
-        ChartMetadata.getProperties().add(styleClass_c36_PropertyMetadata);
+        ChartMetadata.getProperties().add(styleClass_c37_PropertyMetadata);
         ChartMetadata.getProperties().add(titlePropertyMetadata);
         ChartMetadata.getProperties().add(titleSidePropertyMetadata);
 
@@ -4809,7 +4856,7 @@
 
         ChoiceBoxMetadata.getProperties().add(focusTraversable_true_PropertyMetadata);
         ChoiceBoxMetadata.getProperties().add(role_COMBO_BOX_PropertyMetadata);
-        ChoiceBoxMetadata.getProperties().add(styleClass_c42_PropertyMetadata);
+        ChoiceBoxMetadata.getProperties().add(styleClass_c43_PropertyMetadata);
         ChoiceBoxMetadata.getProperties().add(value_Object_PropertyMetadata);
 
         CircleMetadata.getProperties().add(centerXPropertyMetadata);
@@ -4904,6 +4951,7 @@
         DatePickerMetadata.getProperties().add(showWeekNumbersPropertyMetadata);
         DatePickerMetadata.getProperties().add(styleClass_c9_PropertyMetadata);
 
+        DialogPaneMetadata.getProperties().add(buttonTypesPropertyMetadata);
         DialogPaneMetadata.getProperties().add(children_c1_PropertyMetadata);
         DialogPaneMetadata.getProperties().add(content_Node_NULL_PropertyMetadata);
         DialogPaneMetadata.getProperties().add(contentTextPropertyMetadata);
@@ -4990,8 +5038,8 @@
         LabeledMetadata.getProperties().add(labelPaddingPropertyMetadata);
         LabeledMetadata.getProperties().add(lineSpacingPropertyMetadata);
         LabeledMetadata.getProperties().add(mnemonicParsing_true_PropertyMetadata);
-        LabeledMetadata.getProperties().add(role_TEXT_PropertyMetadata);
-        LabeledMetadata.getProperties().add(styleClass_c40_PropertyMetadata);
+        LabeledMetadata.getProperties().add(role_TITLED_PANE_PropertyMetadata);
+        LabeledMetadata.getProperties().add(styleClass_c41_PropertyMetadata);
         LabeledMetadata.getProperties().add(textPropertyMetadata);
         LabeledMetadata.getProperties().add(textAlignmentPropertyMetadata);
         LabeledMetadata.getProperties().add(textFillPropertyMetadata);
@@ -5015,7 +5063,7 @@
         LineMetadata.getProperties().add(stroke_BLACK_PropertyMetadata);
 
         LineChartMetadata.getProperties().add(createSymbolsPropertyMetadata);
-        LineChartMetadata.getProperties().add(styleClass_c36_PropertyMetadata);
+        LineChartMetadata.getProperties().add(styleClass_c37_PropertyMetadata);
 
         LineToMetadata.getProperties().add(x_0_PropertyMetadata);
         LineToMetadata.getProperties().add(y_0_PropertyMetadata);
@@ -5040,7 +5088,7 @@
         MediaViewMetadata.getProperties().add(preserveRatio_true_PropertyMetadata);
         MediaViewMetadata.getProperties().add(role_NODE_PropertyMetadata);
         MediaViewMetadata.getProperties().add(smoothPropertyMetadata);
-        MediaViewMetadata.getProperties().add(styleClass_c45_PropertyMetadata);
+        MediaViewMetadata.getProperties().add(styleClass_c46_PropertyMetadata);
         MediaViewMetadata.getProperties().add(viewportPropertyMetadata);
         MediaViewMetadata.getProperties().add(x_0_PropertyMetadata);
         MediaViewMetadata.getProperties().add(y_0_PropertyMetadata);
@@ -5060,7 +5108,7 @@
         MenuButtonMetadata.getProperties().add(items_MenuItem_PropertyMetadata);
         MenuButtonMetadata.getProperties().add(popupSidePropertyMetadata);
         MenuButtonMetadata.getProperties().add(role_MENU_BUTTON_PropertyMetadata);
-        MenuButtonMetadata.getProperties().add(styleClass_c51_PropertyMetadata);
+        MenuButtonMetadata.getProperties().add(styleClass_c52_PropertyMetadata);
 
         MenuItemMetadata.getProperties().add(acceleratorPropertyMetadata);
         MenuItemMetadata.getProperties().add(disablePropertyMetadata);
@@ -5070,7 +5118,7 @@
         MenuItemMetadata.getProperties().add(onActionPropertyMetadata);
         MenuItemMetadata.getProperties().add(onMenuValidationPropertyMetadata);
         MenuItemMetadata.getProperties().add(stylePropertyMetadata);
-        MenuItemMetadata.getProperties().add(styleClass_c35_PropertyMetadata);
+        MenuItemMetadata.getProperties().add(styleClass_c36_PropertyMetadata);
         MenuItemMetadata.getProperties().add(textPropertyMetadata);
         MenuItemMetadata.getProperties().add(visiblePropertyMetadata);
 
@@ -5185,7 +5233,7 @@
         NodeMetadata.getProperties().add(VBox_vgrowPropertyMetadata);
 
         NumberAxisMetadata.getProperties().add(forceZeroInRangePropertyMetadata);
-        NumberAxisMetadata.getProperties().add(styleClass_c44_PropertyMetadata);
+        NumberAxisMetadata.getProperties().add(styleClass_c45_PropertyMetadata);
         NumberAxisMetadata.getProperties().add(tickUnitPropertyMetadata);
 
         PaginationMetadata.getProperties().add(currentPageIndexPropertyMetadata);
@@ -5193,7 +5241,7 @@
         PaginationMetadata.getProperties().add(maxPageIndicatorCountPropertyMetadata);
         PaginationMetadata.getProperties().add(pageCountPropertyMetadata);
         PaginationMetadata.getProperties().add(role_PAGINATION_PropertyMetadata);
-        PaginationMetadata.getProperties().add(styleClass_c38_PropertyMetadata);
+        PaginationMetadata.getProperties().add(styleClass_c39_PropertyMetadata);
 
         PaneMetadata.getProperties().add(children_empty_PropertyMetadata);
 
@@ -5205,7 +5253,7 @@
 
         PasswordFieldMetadata.getProperties().add(focusTraversable_true_PropertyMetadata);
         PasswordFieldMetadata.getProperties().add(role_PASSWORD_FIELD_PropertyMetadata);
-        PasswordFieldMetadata.getProperties().add(styleClass_c52_PropertyMetadata);
+        PasswordFieldMetadata.getProperties().add(styleClass_c53_PropertyMetadata);
 
         PathMetadata.getProperties().add(elementsPropertyMetadata);
         PathMetadata.getProperties().add(fill_NULL_PropertyMetadata);
@@ -5226,7 +5274,7 @@
         PieChartMetadata.getProperties().add(labelLineLengthPropertyMetadata);
         PieChartMetadata.getProperties().add(labelsVisiblePropertyMetadata);
         PieChartMetadata.getProperties().add(startAnglePropertyMetadata);
-        PieChartMetadata.getProperties().add(styleClass_c36_PropertyMetadata);
+        PieChartMetadata.getProperties().add(styleClass_c37_PropertyMetadata);
 
         PointLightMetadata.getProperties().add(pickOnBounds_false_PropertyMetadata);
         PointLightMetadata.getProperties().add(role_NODE_PropertyMetadata);
@@ -5286,7 +5334,7 @@
         ProgressIndicatorMetadata.getProperties().add(indeterminate_Boolean_ro_PropertyMetadata);
         ProgressIndicatorMetadata.getProperties().add(progressPropertyMetadata);
         ProgressIndicatorMetadata.getProperties().add(role_PROGRESS_INDICATOR_PropertyMetadata);
-        ProgressIndicatorMetadata.getProperties().add(styleClass_c49_PropertyMetadata);
+        ProgressIndicatorMetadata.getProperties().add(styleClass_c50_PropertyMetadata);
 
         QuadCurveMetadata.getProperties().add(controlXPropertyMetadata);
         QuadCurveMetadata.getProperties().add(controlYPropertyMetadata);
@@ -5304,7 +5352,7 @@
 
         RadioButtonMetadata.getProperties().add(focusTraversable_true_PropertyMetadata);
         RadioButtonMetadata.getProperties().add(role_RADIO_BUTTON_PropertyMetadata);
-        RadioButtonMetadata.getProperties().add(styleClass_c40_PropertyMetadata);
+        RadioButtonMetadata.getProperties().add(styleClass_c41_PropertyMetadata);
 
         RadioMenuItemMetadata.getProperties().add(selected_Boolean_PropertyMetadata);
         RadioMenuItemMetadata.getProperties().add(styleClass_c7_PropertyMetadata);
@@ -5350,7 +5398,7 @@
         SVGPathMetadata.getProperties().add(pickOnBounds_false_PropertyMetadata);
         SVGPathMetadata.getProperties().add(role_NODE_PropertyMetadata);
 
-        ScatterChartMetadata.getProperties().add(styleClass_c36_PropertyMetadata);
+        ScatterChartMetadata.getProperties().add(styleClass_c37_PropertyMetadata);
 
         ScrollBarMetadata.getProperties().add(blockIncrementPropertyMetadata);
         ScrollBarMetadata.getProperties().add(maxPropertyMetadata);
@@ -5375,7 +5423,7 @@
         ScrollPaneMetadata.getProperties().add(prefViewportHeightPropertyMetadata);
         ScrollPaneMetadata.getProperties().add(prefViewportWidthPropertyMetadata);
         ScrollPaneMetadata.getProperties().add(role_SCROLL_PANE_PropertyMetadata);
-        ScrollPaneMetadata.getProperties().add(styleClass_c37_PropertyMetadata);
+        ScrollPaneMetadata.getProperties().add(styleClass_c38_PropertyMetadata);
         ScrollPaneMetadata.getProperties().add(vbarPolicyPropertyMetadata);
         ScrollPaneMetadata.getProperties().add(viewportBoundsPropertyMetadata);
         ScrollPaneMetadata.getProperties().add(vmaxPropertyMetadata);
@@ -5421,7 +5469,7 @@
         SliderMetadata.getProperties().add(showTickLabelsPropertyMetadata);
         SliderMetadata.getProperties().add(showTickMarksPropertyMetadata);
         SliderMetadata.getProperties().add(snapToTicksPropertyMetadata);
-        SliderMetadata.getProperties().add(styleClass_c39_PropertyMetadata);
+        SliderMetadata.getProperties().add(styleClass_c40_PropertyMetadata);
         SliderMetadata.getProperties().add(value_Double_PropertyMetadata);
 
         SphereMetadata.getProperties().add(divisionsPropertyMetadata);
@@ -5448,7 +5496,7 @@
         StackPaneMetadata.getProperties().add(contentBiasPropertyMetadata);
 
         StackedAreaChartMetadata.getProperties().add(createSymbolsPropertyMetadata);
-        StackedAreaChartMetadata.getProperties().add(styleClass_c36_PropertyMetadata);
+        StackedAreaChartMetadata.getProperties().add(styleClass_c37_PropertyMetadata);
 
         StackedBarChartMetadata.getProperties().add(categoryGapPropertyMetadata);
         StackedBarChartMetadata.getProperties().add(styleClass_c12_PropertyMetadata);
@@ -5509,7 +5557,7 @@
         TableColumnBaseMetadata.getProperties().add(sortablePropertyMetadata);
         TableColumnBaseMetadata.getProperties().add(sortNodePropertyMetadata);
         TableColumnBaseMetadata.getProperties().add(stylePropertyMetadata);
-        TableColumnBaseMetadata.getProperties().add(styleClass_c41_PropertyMetadata);
+        TableColumnBaseMetadata.getProperties().add(styleClass_c42_PropertyMetadata);
         TableColumnBaseMetadata.getProperties().add(textPropertyMetadata);
         TableColumnBaseMetadata.getProperties().add(visiblePropertyMetadata);
         TableColumnBaseMetadata.getProperties().add(width_Double_ro_PropertyMetadata);
@@ -5525,7 +5573,7 @@
         TableViewMetadata.getProperties().add(placeholderPropertyMetadata);
         TableViewMetadata.getProperties().add(role_TABLE_VIEW_PropertyMetadata);
         TableViewMetadata.getProperties().add(sortOrderPropertyMetadata);
-        TableViewMetadata.getProperties().add(styleClass_c48_PropertyMetadata);
+        TableViewMetadata.getProperties().add(styleClass_c49_PropertyMetadata);
         TableViewMetadata.getProperties().add(tableMenuButtonVisiblePropertyMetadata);
 
         TextMetadata.getProperties().add(baselineOffsetPropertyMetadata);
@@ -5549,7 +5597,7 @@
         TextAreaMetadata.getProperties().add(role_TEXT_AREA_PropertyMetadata);
         TextAreaMetadata.getProperties().add(scrollLeftPropertyMetadata);
         TextAreaMetadata.getProperties().add(scrollTopPropertyMetadata);
-        TextAreaMetadata.getProperties().add(styleClass_c50_PropertyMetadata);
+        TextAreaMetadata.getProperties().add(styleClass_c51_PropertyMetadata);
         TextAreaMetadata.getProperties().add(wrapTextPropertyMetadata);
 
         TextFieldMetadata.getProperties().add(alignment_CENTER_LEFT_PropertyMetadata);
@@ -5557,7 +5605,7 @@
         TextFieldMetadata.getProperties().add(onActionPropertyMetadata);
         TextFieldMetadata.getProperties().add(prefColumnCount_12_PropertyMetadata);
         TextFieldMetadata.getProperties().add(role_TEXT_FIELD_PropertyMetadata);
-        TextFieldMetadata.getProperties().add(styleClass_c46_PropertyMetadata);
+        TextFieldMetadata.getProperties().add(styleClass_c47_PropertyMetadata);
 
         TextFlowMetadata.getProperties().add(baselineOffsetPropertyMetadata);
         TextFlowMetadata.getProperties().add(contentBiasPropertyMetadata);
@@ -5572,8 +5620,8 @@
         TextInputControlMetadata.getProperties().add(fontPropertyMetadata);
         TextInputControlMetadata.getProperties().add(length_Integer_ro_PropertyMetadata);
         TextInputControlMetadata.getProperties().add(promptTextPropertyMetadata);
-        TextInputControlMetadata.getProperties().add(role_PASSWORD_FIELD_PropertyMetadata);
-        TextInputControlMetadata.getProperties().add(styleClass_c50_PropertyMetadata);
+        TextInputControlMetadata.getProperties().add(role_TEXT_AREA_PropertyMetadata);
+        TextInputControlMetadata.getProperties().add(styleClass_c51_PropertyMetadata);
         TextInputControlMetadata.getProperties().add(textPropertyMetadata);
         TextInputControlMetadata.getProperties().add(textFormatterPropertyMetadata);
 
@@ -5604,7 +5652,7 @@
         ToggleButtonMetadata.getProperties().add(focusTraversable_true_PropertyMetadata);
         ToggleButtonMetadata.getProperties().add(role_TOGGLE_BUTTON_PropertyMetadata);
         ToggleButtonMetadata.getProperties().add(selected_Boolean_PropertyMetadata);
-        ToggleButtonMetadata.getProperties().add(styleClass_c43_PropertyMetadata);
+        ToggleButtonMetadata.getProperties().add(styleClass_c44_PropertyMetadata);
         ToggleButtonMetadata.getProperties().add(toggleGroupPropertyMetadata);
 
         ToolBarMetadata.getProperties().add(items_Node_PropertyMetadata);
@@ -5680,7 +5728,7 @@
         ValueAxisMetadata.getProperties().add(minorTickLengthPropertyMetadata);
         ValueAxisMetadata.getProperties().add(minorTickVisiblePropertyMetadata);
         ValueAxisMetadata.getProperties().add(scalePropertyMetadata);
-        ValueAxisMetadata.getProperties().add(styleClass_c44_PropertyMetadata);
+        ValueAxisMetadata.getProperties().add(styleClass_c45_PropertyMetadata);
         ValueAxisMetadata.getProperties().add(tickLabelFormatterPropertyMetadata);
         ValueAxisMetadata.getProperties().add(upperBoundPropertyMetadata);
         ValueAxisMetadata.getProperties().add(zeroPositionPropertyMetadata);
@@ -5699,7 +5747,7 @@
         WebViewMetadata.getProperties().add(prefHeight_60000_PropertyMetadata);
         WebViewMetadata.getProperties().add(prefWidth_80000_PropertyMetadata);
         WebViewMetadata.getProperties().add(resizable_Boolean_ro_PropertyMetadata);
-        WebViewMetadata.getProperties().add(styleClass_c47_PropertyMetadata);
+        WebViewMetadata.getProperties().add(styleClass_c48_PropertyMetadata);
         WebViewMetadata.getProperties().add(width_Double_ro_PropertyMetadata);
         WebViewMetadata.getProperties().add(zoomPropertyMetadata);
 
@@ -5707,7 +5755,7 @@
         XYChartMetadata.getProperties().add(alternativeRowFillVisiblePropertyMetadata);
         XYChartMetadata.getProperties().add(horizontalGridLinesVisiblePropertyMetadata);
         XYChartMetadata.getProperties().add(horizontalZeroLineVisiblePropertyMetadata);
-        XYChartMetadata.getProperties().add(styleClass_c36_PropertyMetadata);
+        XYChartMetadata.getProperties().add(styleClass_c37_PropertyMetadata);
         XYChartMetadata.getProperties().add(verticalGridLinesVisiblePropertyMetadata);
         XYChartMetadata.getProperties().add(verticalZeroLineVisiblePropertyMetadata);
         XYChartMetadata.getProperties().add(XAxisPropertyMetadata);
@@ -5887,7 +5935,6 @@
 
     // The following properties are uncertified:
     //     axisSortingPolicy
-    //     buttonTypes
     //     redoable
     //     undoable
 
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/klass/ComponentClassMetadata.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/klass/ComponentClassMetadata.java	Fri Sep 12 17:15:09 2014 -0700
@@ -133,6 +133,7 @@
          * =========================================
          * 
          * Accordion        panes
+         * ButtonBar        buttons
          * ContextMenu      items
          * Menu             items
          * MenuBar          menus
@@ -154,6 +155,8 @@
       
         if (componentClass == javafx.scene.control.Accordion.class) {
             result = panesName;
+        } else if (componentClass == javafx.scene.control.ButtonBar.class) {
+            result = buttonsName;
         } else if (componentClass == javafx.scene.control.ContextMenu.class) {
             result = itemsName;
         } else if (componentClass == javafx.scene.control.Menu.class) {
@@ -191,6 +194,7 @@
         return result;
     }
         
+    private static final PropertyName buttonsName = new PropertyName("buttons");
     private static final PropertyName columnsName = new PropertyName("columns");
     private static final PropertyName elementsName = new PropertyName("elements");
     private static final PropertyName itemsName = new PropertyName("items");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/property/value/ButtonTypePropertyMetadata.java	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * 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 Oracle Corporation 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 THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS 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 com.oracle.javafx.scenebuilder.kit.metadata.property.value;
+
+import com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument;
+import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
+import com.oracle.javafx.scenebuilder.kit.metadata.util.InspectorPath;
+import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import javafx.scene.control.ButtonType;
+
+/**
+ *
+ * 
+ */
+public class ButtonTypePropertyMetadata extends ComplexPropertyMetadata<ButtonType> {
+    
+    private static Map<ButtonType, String> buttonTypeMap;
+    
+    public ButtonTypePropertyMetadata(PropertyName name, boolean readWrite, 
+            ButtonType defaultValue, InspectorPath inspectorPath) {
+        super(name, ButtonType.class, readWrite, defaultValue, inspectorPath);
+    }
+
+    public static synchronized Map<ButtonType, String> getButtonTypeMap() {
+        if (buttonTypeMap == null) {
+            buttonTypeMap = new HashMap<>();
+            buttonTypeMap.put(ButtonType.APPLY,   "APPLY"    ); //NOI18N
+            buttonTypeMap.put(ButtonType.CANCEL,  "CANCEL"   ); //NOI18N
+            buttonTypeMap.put(ButtonType.CLOSE,   "CLOSE"    ); //NOI18N
+            buttonTypeMap.put(ButtonType.FINISH,  "FINISH"   ); //NOI18N
+            buttonTypeMap.put(ButtonType.NEXT,    "NEXT"     ); //NOI18N
+            buttonTypeMap.put(ButtonType.NO,      "NO"       ); //NOI18N
+            buttonTypeMap.put(ButtonType.PREVIOUS,"PREVIOUS" ); //NOI18N
+            buttonTypeMap.put(ButtonType.YES,     "YES"      ); //NOI18N
+            buttonTypeMap = Collections.unmodifiableMap(buttonTypeMap);
+        }
+        
+        return buttonTypeMap;
+    }
+    
+    
+    /*
+     * ComplexPropertyMetadata
+     */
+    @Override
+    public FXOMInstance makeFxomInstanceFromValue(ButtonType value, FXOMDocument fxomDocument) {
+        final FXOMInstance result;
+        
+        final String buttonName = getButtonTypeMap().get(value);
+        if (buttonName != null) {
+            // It's a standard button type
+            result = new FXOMInstance(fxomDocument, ButtonType.class);
+            result.setFxConstant(buttonName);
+        } else {
+            // Emergency code
+            assert false;
+            result = new FXOMInstance(fxomDocument, ButtonType.class);
+            result.setFxConstant(getButtonTypeMap().get(ButtonType.APPLY));
+        }
+        
+        return result;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/property/value/list/ButtonTypeListPropertyMetadata.java	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates.
+ * All rights reserved. Use is subject to license terms.
+ *
+ * This file is available and licensed under the following license:
+ *
+ * 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 Oracle Corporation 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 THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS 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 com.oracle.javafx.scenebuilder.kit.metadata.property.value.list;
+
+import com.oracle.javafx.scenebuilder.kit.metadata.property.value.ButtonTypePropertyMetadata;
+import com.oracle.javafx.scenebuilder.kit.metadata.util.InspectorPath;
+import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
+import java.util.List;
+import javafx.scene.control.ButtonType;
+
+/**
+ *
+ */
+public class ButtonTypeListPropertyMetadata extends ListValuePropertyMetadata<ButtonType> {
+
+    private final static ButtonTypePropertyMetadata itemMetadata
+            = new ButtonTypePropertyMetadata(new PropertyName("unused"), //NOI18N
+                    true, ButtonType.CLOSE, InspectorPath.UNUSED);
+
+    public ButtonTypeListPropertyMetadata(PropertyName name, boolean readWrite, 
+            List<ButtonType> defaultValue, InspectorPath inspectorPath) {
+        super(name, ButtonType.class, itemMetadata, readWrite, defaultValue, inspectorPath);
+    }
+
+}
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/CssInternal.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/CssInternal.java	Fri Sep 12 17:15:09 2014 -0700
@@ -131,15 +131,11 @@
     }
 
     public static boolean isThemeRule(Rule rule) {
-        // With SB 2, we apply explicitly theme css (Modena, Caspian, ...)
-        // So although their rules appear with an AUTHOR origin, we have to consider them as USER_AGENT.
-        if (rule.getOrigin() == StyleOrigin.AUTHOR) {
-            String stylePath = rule.getStylesheet().getUrl();
-            assert stylePath != null;
-            for (String themeUrl : themeUrls) {
-                if (stylePath.endsWith(themeUrl)) {
-                    return true;
-                }
+        String stylePath = rule.getStylesheet().getUrl();
+        assert stylePath != null;
+        for (String themeUrl : themeUrls) {
+            if (stylePath.endsWith(themeUrl)) {
+                return true;
             }
         }
         return false;
@@ -496,24 +492,9 @@
         if (style == null || style.getDeclaration() == null) {
             return null;
         }
-        return getOrigin(style.getDeclaration().getRule());
+        return style.getDeclaration().getRule().getOrigin();
     }
 
-    // Wrapper method that force the origin to be USER_AGENT if this is an Fx theme style.
-    public static StyleOrigin getOrigin(Rule rule) {
-        if (rule == null) {
-            return null;
-        }
-        if (isThemeRule(rule)) {
-            // Force the origin to be USER_AGENT if this is an Fx theme style.
-            return StyleOrigin.USER_AGENT;
-        } else {
-            // Are the 2 lines below equivalent ?
-            // styleOrigin = style.getDeclaration().getRule().getStylesheet().getOrigin();
-            return rule.getOrigin();
-        }
-    }
-    
     // From an css url, returns the theme display name
     public static String getThemeDisplayName(String url) {
         String themeName = ""; //NOI18N
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/util/Deprecation.java	Fri Sep 12 17:15:09 2014 -0700
@@ -219,28 +219,6 @@
         tableColumn.impl_setReorderable(reordable);
     }
 
-    // RT-21247 : Promote impl_getAllParentStylesheets to public API
-    public static Group makeStylingIsolationGroupA() {
-        final Group result = new Group() {
-            @Override
-            public List<String> impl_getAllParentStylesheets() { return null; }
-        };
-
-        return result;
-    }
-
-    public static Group makeStylingIsolationGroupB() {
-        final Group result = new Group() {
-            @Override
-            public Styleable getStyleableParent() { return null; }
-        };
-
-        result.getStyleClass().add("root"); //NOI18N
-        result.getStylesheets().add(MODENA_STYLESHEET);
-
-        return result;
-    }
-
     // Returns the corresponding text css (.css) from a binary css (.bss)
     public static URL getThemeTextStylesheet(String binaryCssUrlStr) {
         String textCssUrlStr = binaryCssUrlStr.replaceAll(".bss", ".css"); //NOI18N
--- a/apps/toys/Hello/src/main/java/hello/HelloProgressIndicator.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/apps/toys/Hello/src/main/java/hello/HelloProgressIndicator.java	Fri Sep 12 17:15:09 2014 -0700
@@ -29,8 +29,11 @@
 import javafx.animation.KeyValue;
 import javafx.animation.Timeline;
 import javafx.application.Application;
+import javafx.beans.binding.Bindings;
+import javafx.beans.property.BooleanProperty;
 import javafx.scene.Group;
 import javafx.scene.Scene;
+import javafx.scene.control.CheckBox;
 import javafx.scene.control.ProgressIndicator;
 import javafx.scene.paint.Color;
 import javafx.scene.shape.Circle;
@@ -112,17 +115,16 @@
         pInd6.setProgress(0.5);
         root.getChildren().add(pInd6);
 
+        // busy indicator - indeterminate and spin are enabled by default
+        // See https://wiki.openjdk.java.net/display/OpenJFX/ProgressIndicator+User+Experience+Documentation
         ProgressIndicator pInd7 = new ProgressIndicator();
         pInd7.setLayoutX(300);
         pInd7.setLayoutY(250);
-        pInd7.setProgress(-1);
-        pInd7.setStyle("-fx-spin-enabled:true;");
         root.getChildren().add(pInd7);
 
         ProgressIndicator pInd8 = new ProgressIndicator();
         pInd8.setLayoutX(360);
         pInd8.setLayoutY(250);
-        pInd8.setProgress(-1);
         pInd8.setStyle("-fx-spin-enabled:false;");
         root.getChildren().add(pInd8);
 
@@ -195,6 +197,16 @@
         }
         //System.out.println("<path d=\""+circles+"\" />");
 
+        CheckBox checkBox = new CheckBox("Use caspian theme");
+        checkBox.selectedProperty().addListener(observable -> {
+            if (((BooleanProperty)observable).get()) Application.setUserAgentStylesheet(STYLESHEET_CASPIAN);
+            else Application.setUserAgentStylesheet(STYLESHEET_MODENA);
+        });
+        checkBox.setLayoutX(5);
+        checkBox.setLayoutY(425);
+
+
+        root.getChildren().add(checkBox);
         stage.setScene(scene);
         stage.show();
     }
--- a/build.gradle	Wed Sep 10 08:28:43 2014 -0700
+++ b/build.gradle	Fri Sep 12 17:15:09 2014 -0700
@@ -103,7 +103,7 @@
  * cygwin is installed, as I hope one day to remove the requirement to build
  * with cygwin, but at present (due to GStreamer / Webkit) cygwin is needed
  * anyway.
- * 
+ *
  * @param path the path to convert
  * @return the path converted to windows style, if on windows, otherwise it
  *         is the supplied path.
@@ -149,7 +149,7 @@
 /**
  * Iterates over each of the compile targets, passing the given closure
  * a CompileTarget instance.
- * 
+ *
  * @param c The closure to call
  */
 void compileTargets(Closure c) {
@@ -170,11 +170,11 @@
  * content for a properties file built at build time and stored in the
  * root project's $buildDir, and then loading that properties file and
  * passing it to the processor closure.
- * 
+ *
  * This is used on windows to produce a properties file containing all the
  * windows visual studio paths and environment variables, and on Linux
  * for storing the results of pkg-config calls.
- * 
+ *
  * @param name the name of the file to produce
  * @param loader a closure which is invoked, given the properties file. This
  *        closure is invoked only if the properties file needs to be created
@@ -331,6 +331,11 @@
 defineProperty("RETAIN_PACKAGER_TESTS", "false")
 ext.IS_RETAIN_PACKAGER_TESTS = Boolean.parseBoolean(RETAIN_PACKAGER_TESTS)
 
+// TEST_PACKAGER_DMG whether tests that create DMG files via hdiutil
+// should be run.  On OSX 10.7 this tends to hang automated builds
+defineProperty("TEST_PACKAGER_DMG", "false")
+ext.IS_TEST_PACKAGER_DMG = Boolean.parseBoolean(TEST_PACKAGER_DMG)
+
 // Define the SWT.jar that we are going to have to download during the build process based
 // on what platform we are compiling from (not based on our target).
 ext.SWT_FILE_NAME = IS_MAC ? "org.eclipse.swt.cocoa.macosx.x86_64_3.7.2.v3740f" :
@@ -437,7 +442,7 @@
 ext.IS_IMPORT_CROSS_TOOLS = importCrossTools
 
 // Location of the cross compile tools
-def crossToolsDir = "../crosslibs" 
+def crossToolsDir = "../crosslibs"
 if (hasProperty("CROSS_TOOLS_DIR")) {
     crossToolsDir = CROSS_TOOLS_DIR
 }
@@ -665,7 +670,7 @@
     // This value is used to under ./build/${sdkDirName} to allow for
     // a common name for the hosted build (for use when building apps)
     // and a unique name for cross builds.
-    if (rootProject.defaultHostTarget.equals(t.name)) { 
+    if (rootProject.defaultHostTarget.equals(t.name)) {
         // use a simple common default for the "host" build
         targetProperties.sdkDirName="sdk"
     } else {
@@ -841,7 +846,7 @@
  * Convenience method for creating javah, cc, link, and "native" tasks in the given project. These
  * tasks are parameterized by name, so that we can produce, for example, javahGlass, ccGlass, etc
  * named tasks.
- * 
+ *
  * @param project The project to add tasks to
  * @param name The name of the project, such as "prism-common". This name is used
  *        in the name of the generated task, such as ccPrismCommon, and also
@@ -860,7 +865,7 @@
     if (project.hasProperty("nativeAllTask")) project.nativeAllTask.dependsOn nativeTask
     project.assemble.dependsOn(nativeTask)
     if (project.hasProperty("cleanNativeAllTask")) project.cleanNativeAllTask.dependsOn cleanTask
-    
+
     // Each of the different compile targets will be placed in a sub directory
     // of these root dirs, with the name of the dir being the name of the target
     def headerRootDir = project.file("$project.buildDir/generated-src/headers/$name")
@@ -887,7 +892,7 @@
             println("Native library ${name} disabled in ${t.name} project properties");
             return
         }
-        
+
         def javahTask = project.task("javah${t.capital}${capitalName}", type: JavaHeaderTask, dependsOn: project.classes, group: "Build") {
             description = "Generates JNI Headers for ${name} for ${t.name}"
             if (properties.javahSource == null) {
@@ -1804,10 +1809,9 @@
     }
     processResources.dependsOn man
 
-    // Compile the native launchers. These are included in ant-javafx.jar
-    // TODO should teach this to know 32 / 64 bit
+    // Compile the native launchers. These are included in ant-javafx.jar.
     if (IS_WINDOWS && COMPILE_FXPACKAGER) {
-        task compileWinLauncher(type: CCTask, group: "Build") {
+        task buildWinLauncher(type: CCTask, group: "Build") {
             description = "Compiles native sources for the application co-bundle launcher";
             matches = "WinLauncher\\.cpp";
             params.addAll(WIN.launcher.ccFlags);
@@ -1819,16 +1823,39 @@
             doLast {
                 copy {
                     from "$buildDir/native/WinLauncher/WinLauncher.exe"
+                    from "$MSVCR"
+                    from "$MSVCP"
                     into "$buildDir/classes/main/com/oracle/tools/packager/windows"
                 }
             }
         }
-        task compileWinLauncherSvc(type: CCTask, group: "Build") {
+        task compileWinLibrary(type: CCTask, group: "Build") {
+            description = "Compiles native sources for the application co-bundle launcher library";
+            matches = ".*\\.cpp"
+            source(file("src/main/native/library/common"));
+            params.addAll(WIN.launcherlibrary.ccFlags)
+            output(file("$buildDir/native/WinLauncher/obj"));
+            compiler = WIN.launcherlibrary.compiler
+        }
+        task linkWinLibrary(type: LinkTask, group: "Build", dependsOn: compileWinLibrary) {
+            description = "Links native sources for the application co-bundle launcher library";
+            objectDir = file("$buildDir/native/WinLauncher/obj")
+            linkParams.addAll(WIN.launcherlibrary.linkFlags);
+            lib = file("$buildDir/native/WinLauncher/packager.dll")
+            linker = WIN.launcherlibrary.linker
+            doLast {
+                copy {
+                    from "$buildDir/native/WinLauncher/packager.dll"
+                    into "$buildDir/classes/main/com/oracle/tools/packager/windows"
+                }
+            }
+        }
+        task buildWinLauncherSvc(type: CCTask, group: "Build") {
             description = "Compiles native sources for the application co-bundle launcher";
             matches = "WinLauncherSvc\\.cpp";
             params.addAll(WIN.launcher.ccFlags);
             output(file("$buildDir/native/WinLauncherSvc"));
-            source(file("src/main/native/launcher/win"));
+            source(file("src/main/native/service/win"));
             compiler = WIN.launcher.compiler
             exe = true;
             linkerOptions.addAll(WIN.launcher.linkFlags);
@@ -1839,12 +1866,12 @@
                 }
             }
         }
-        task compileIconSwap(type: CCTask, group: "Build") {
+        task buildIconSwap(type: CCTask, group: "Build") {
             description = "Compiles native sources for the application co-bundle launcher"
             matches = "IconSwap\\.cpp"
             params.addAll(WIN.iconLauncher.ccFlags)
             output(file("$buildDir/native/IconSwap"))
-            source file("src/main/native/launcher/win")
+            source file("src/main/native/tools/win")
             compiler = WIN.launcher.compiler
             exe = true
             linkerOptions.addAll(WIN.iconLauncher.linkFlags)
@@ -1855,40 +1882,70 @@
                 }
             }
         }
-        task compileLauncher(dependsOn: [compileWinLauncher, compileWinLauncherSvc, compileIconSwap])
+        task compileLauncher(dependsOn: [buildWinLauncher, linkWinLibrary, buildWinLauncherSvc, buildIconSwap])
         jar.dependsOn compileLauncher;
-    } else if (COMPILE_FXPACKAGER) {
-        if (IS_MAC) {
-            task compileLauncher(type: CCTask, group: "Build") {
-                description = "Compiles native sources for the application co-bundle launcher"
-                matches = ".*\\.m"
-                output(file("$buildDir/classes/main/com/oracle/tools/packager/mac"))
-                params.addAll(MAC.launcher.ccFlags)
-                source file("src/main/native/launcher/mac")
-                compiler = MAC.launcher.compiler
-                eachOutputFile = { f ->
-                    return new File(f.getParent(), "JavaAppLauncher")
-                }
+    } else if (IS_MAC && COMPILE_FXPACKAGER) {
+        task buildMacLauncher(type: CCTask, group: "Build") {
+            description = "Compiles native sources for the application co-bundle launcher"
+            matches = ".*\\.m"
+            source file("src/main/native/launcher/mac")
+            params.addAll(MAC.launcher.ccFlags)
+            compiler = MAC.launcher.compiler
+            output(file("$buildDir/classes/main/com/oracle/tools/packager/mac"))
+            eachOutputFile = { f ->
+                return new File(f.getParent(), "JavaAppLauncher")
             }
-            jar.dependsOn compileLauncher;
-        } else {
-            def ccTask = project.task("compileLauncher", type: CCTask, group: "Build") {
-                description = "Compiles native sources for the application co-bundle launcher"
-                matches = ".*\\.c"
-                output(file("$buildDir/native/launcher"))
-                params.addAll(LINUX.launcher.ccFlags)
-                compiler = LINUX.launcher.compiler
-                source file("src/main/native/launcher/linux")
-            }
-            def linkTask = project.task("linkLauncher", type: LinkTask, dependsOn: ccTask, group: "Build") {
-                description = "Creates native dynamic library for the application co-bundle launcher"
-                linker = LINUX.launcher.linker
-                linkParams.addAll(LINUX.launcher.linkFlags)
-                objectDir = file("$buildDir/native/launcher")
-                lib = file("$buildDir/classes/main/com/oracle/tools/packager/linux/JavaAppLauncher")
-            }
-            jar.dependsOn linkTask;
         }
+        task compileMacLibrary(type: CCTask, group: "Build") {
+            description = "Compiles native sources for the application co-bundle launcher library"
+            matches = ".*\\.cpp|.*\\.mm"
+            source file("src/main/native/library/common");
+            params.addAll(MAC.launcherlibrary.ccFlags)
+            compiler = MAC.launcherlibrary.compiler
+            output(file("$buildDir/native/maclauncher/obj"))
+        }
+        task linkMacLibrary(type: LinkTask, group: "Build", dependsOn: compileMacLibrary) {
+            description = "Links native sources for the application co-bundle launcher library"
+            objectDir = file("$buildDir/native/maclauncher/obj")
+            linkParams.addAll(MAC.launcherlibrary.linkFlags)
+            linker = MAC.launcherlibrary.linker
+            lib = file("$buildDir/classes/main/com/oracle/tools/packager/mac/libpackager.dylib")
+        }
+        task compileLauncher(dependsOn: [buildMacLauncher, linkMacLibrary])
+        jar.dependsOn compileLauncher;
+    } else if (IS_LINUX && COMPILE_FXPACKAGER) {
+        task compileLinuxLauncher(type: CCTask, group: "Build") {
+            description = "Compiles native sources for the application co-bundle launcher"
+            matches = ".*\\.cpp"
+            source file("src/main/native/launcher/linux")
+            params.addAll(LINUX.launcher.ccFlags)
+            compiler = LINUX.launcher.compiler
+            output(file("$buildDir/native/linuxlauncher/launcherobj"))
+        }
+        task linkLinuxLauncher(type: LinkTask, dependsOn: compileLinuxLauncher, group: "Build") {
+            description = "Links native dynamic library for the application co-bundle launcher"
+            objectDir = file("$buildDir/native/linuxlauncher/launcherobj")
+            linkParams.addAll(LINUX.launcher.linkFlags)
+            linker = LINUX.launcher.linker
+            lib = file("$buildDir/classes/main/com/oracle/tools/packager/linux/JavaAppLauncher")
+        }
+        task compileLinuxLibrary(type: CCTask, group: "Build") {
+            description = "Compiles native sources for the application co-bundle launcher library"
+            matches = ".*\\.cpp"
+            source file("src/main/native/library/common")
+            params.addAll(LINUX.launcherlibrary.ccFlags)
+            compiler = LINUX.launcherlibrary.compiler
+            output(file("$buildDir/native/linuxlauncher/obj"))
+        }
+        task linkLinuxLibrary(type: LinkTask, dependsOn: compileLinuxLibrary, group: "Build") {
+            description = "Links native dynamic library for the application co-bundle launcher library"
+            objectDir = file("$buildDir/native/linuxlauncher/obj")
+            linkParams.addAll(LINUX.launcherlibrary.linkFlags)
+            linker = LINUX.launcherlibrary.linker
+            lib = file("$buildDir/classes/main/com/oracle/tools/packager/linux/libpackager.so")
+        }
+        task compileLauncher(dependsOn: [linkLinuxLauncher, linkLinuxLibrary])
+        jar.dependsOn compileLauncher;
     }
 
     // Builds the javapackager executable. For everything other than windows,
@@ -1969,7 +2026,20 @@
         }
     }
 
+    task packagerJar(type: Jar) {
+        group = "Basic"
+        description = "Creates the packager.jar"
+        archiveName = "packager.jar";
+        includeEmptyDirs = false
+        from("$buildDir/classes/main");
+        from("$buildDir/resources/main");
+        include('jdk/packager/**')
+
+        dependsOn(buildJavaPackager);
+    }
+
     jar.dependsOn buildJavaPackager
+    jar.dependsOn packagerJar
 
     classes << {
         // Copy all of the download libraries to libs directory for the sake of the IDEs
@@ -1996,7 +2066,7 @@
 
         manifest {
             attributes(
-                    "Main-Class": "hello.TestPackager",
+                    "Main-Class": "hello.HelloRectangle",
                     "Custom-Attribute": " Is it stripped?"
             )
         }
@@ -2007,7 +2077,10 @@
                 from "$projectDir/src/main/resources/com/oracle/tools/packager/mac/GenericAppHiDPI.icns"
                 from "$projectDir/src/main/resources/com/oracle/tools/packager/windows/javalogo_white_48.ico"
                 from "$projectDir/src/test/resources/hello/java-logo2.gif"
+                from "$projectDir/src/test/resources/hello/small.ico"
+                from "$projectDir/src/test/resources/hello/test.icns"
                 from "$projectDir/../../LICENSE"
+                from "$projectDir/build/libs/packager.jar"
                 into project.file("$projectDir/build/tmp/tests/appResources")
             }
             copy {
@@ -2043,8 +2116,20 @@
     test {
         dependsOn packagerFXPackagedJar
         systemProperty "RETAIN_PACKAGER_TESTS", RETAIN_PACKAGER_TESTS
+        systemProperty "TEST_PACKAGER_DMG", TEST_PACKAGER_DMG
         systemProperty "FULL_TEST", FULL_TEST
     }
+
+    task packagerDev(dependsOn: [jar, packagerFakeJar], type:JavaExec) {
+        workingDir = project.file("build/tmp/tests/appResources/")
+        classpath = project.files("build/libs/ant-javafx.jar", "build/classes/test", "build/resources/test")
+        main = "hello.SimpleBundle"
+        args = [
+                "-o", "$projectDir/build/dev",
+                "-all",
+                "image"
+        ]
+    }
 }
 
 project(":media") {
--- a/buildSrc/linux.gradle	Wed Sep 10 08:28:43 2014 -0700
+++ b/buildSrc/linux.gradle	Fri Sep 12 17:15:09 2014 -0700
@@ -173,6 +173,12 @@
 LINUX.launcher.linker = linker
 LINUX.launcher.linkFlags = ["-ldl"]
 
+LINUX.launcherlibrary = [:]
+LINUX.launcherlibrary.compiler = compiler
+LINUX.launcherlibrary.ccFlags = ["-DJAVAARCH=\"$OS_ARCH\"", "-I$JDK_HOME/include", "-I$JDK_HOME/include/linux", "-c", "-fPIC"]
+LINUX.launcherlibrary.linker = linker
+LINUX.launcherlibrary.linkFlags = ["-ldl", "-lpthread", "-shared"]
+
 LINUX.iio = [:]
 LINUX.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
 LINUX.iio.nativeSource = [
--- a/buildSrc/mac.gradle	Wed Sep 10 08:28:43 2014 -0700
+++ b/buildSrc/mac.gradle	Fri Sep 12 17:15:09 2014 -0700
@@ -124,6 +124,18 @@
 MAC.launcher.linker = linker
 MAC.launcher.linkFlags = ["-ldl"]
 
+MAC.launcherlibrary = [:]
+MAC.launcherlibrary.compiler = compiler
+MAC.launcherlibrary.ccFlags = [
+//        "-std=c++0x",
+        "-c",
+        ccBaseFlags,
+        IS_DEBUG_NATIVE ? ["-DDEBUG", "-O0"] : ["-O3", "-DNDEBUG"]].flatten()
+MAC.launcherlibrary.linker = linker
+MAC.launcherlibrary.linkFlags = ["-ldl", "-dynamiclib",
+        "-framework", "Cocoa",
+        "-stdlib=libstdc++"]
+
 MAC.iio = [:]
 MAC.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
 MAC.iio.nativeSource = [
--- a/buildSrc/src/main/groovy/com/sun/javafx/gradle/CCTask.groovy	Wed Sep 10 08:28:43 2014 -0700
+++ b/buildSrc/src/main/groovy/com/sun/javafx/gradle/CCTask.groovy	Fri Sep 12 17:15:09 2014 -0700
@@ -55,7 +55,7 @@
             // Add in any additional compilation params
             if (params != null) {
                 // A little hack. Only use the -std=c99 flag if compiling .c or .m
-                if (sourceFile.name.endsWith(".cpp") || sourceFile.name.endsWith(".cc")) {
+                if (sourceFile.name.endsWith(".cpp") || sourceFile.name.endsWith(".cc") || sourceFile.name.endsWith(".mm")) {
                     def stripped = params;
                     stripped.remove("-std=c99");
                     args(stripped)
--- a/buildSrc/win.gradle	Wed Sep 10 08:28:43 2014 -0700
+++ b/buildSrc/win.gradle	Fri Sep 12 17:15:09 2014 -0700
@@ -117,8 +117,8 @@
 def rcCompiler = cygpath("$WINDOWS_SDK_DIR/Bin/RC.Exe")
 ext.FXC = cygpath("$WINDOWS_DXSDK_DIR/utilities/bin/x86/fxc.exe")
 ext.MC = cygpath("$WINDOWS_SDK_DIR/Bin/mt.exe")
-// This next line is based on a line in the ant build scripts, but doesn't seem to point to the right place
-//ext.MSVCR = cygpath("${WINDOWS_VS_MSVCDIR}/redist/${IS_64 ? 'x64' : 'x86'}/Microsoft.VC${WINDOWS_VS_VER}.CRT/msvcr${WINDOWS_VS_VER}.dll")
+ext.MSVCR = cygpath("${WINDOWS_VS_MSVCDIR}/redist/${IS_64 ? 'x64' : 'x86'}/Microsoft.VC${WINDOWS_VS_VER}.CRT/msvcr${WINDOWS_VS_VER}.dll")
+ext.MSVCP = cygpath("${WINDOWS_VS_MSVCDIR}/redist/${IS_64 ? 'x64' : 'x86'}/Microsoft.VC${WINDOWS_VS_VER}.CRT/msvcp${WINDOWS_VS_VER}.dll")
 
 def rcFlags = [
     "/d", "\"JFX_COMPANY=${COMPANY_NAME}\"",
@@ -210,7 +210,17 @@
         "/D_LITTLE_ENDIAN", "/DWIN32_LEAN_AND_MEAN", "/I$JDK_HOME/include", "/I$JDK_HOME/include/win32",
         "/arch:SSE", "/fp:fast", "/O2", "/MD"];
 WIN.launcher.linker = linker
-WIN.launcher.linkFlags = ["/link", "/nologo", "/SUBSYSTEM:WINDOWS", "user32.lib", "shell32.lib", "advapi32.lib"]
+WIN.launcher.linkFlags = ["/link", "/nologo", "/WX", "/SUBSYSTEM:WINDOWS", "user32.lib", "shell32.lib", "advapi32.lib"]
+
+WIN.launcherlibrary = [:]
+WIN.launcherlibrary.compiler = compiler
+WIN.launcherlibrary.ccFlags = ["/nologo", "/W3",
+        // "/WX",
+        "/EHsc", "/c", "/D_WINDOWS", "/DUNICODE", "/D_UNICODE", "/DWIN32",
+        "/D_LITTLE_ENDIAN", "/DWIN32_LEAN_AND_MEAN", "/I$JDK_HOME/include", "/I$JDK_HOME/include/win32",
+        "/arch:SSE", "/fp:fast", "/O2", "/MD"];
+WIN.launcherlibrary.linker = linker
+WIN.launcherlibrary.linkFlags = ["/nologo", "/WX", "/DLL", "/SUBSYSTEM:WINDOWS", "user32.lib", "shell32.lib", "advapi32.lib", "ole32.lib"]
 
 WIN.iconLauncher = [:]
 WIN.iconLauncher.compiler = compiler
--- a/gradle.properties.template	Wed Sep 10 08:28:43 2014 -0700
+++ b/gradle.properties.template	Fri Sep 12 17:15:09 2014 -0700
@@ -98,6 +98,12 @@
 
 #RETAIN_PACKAGER_TESTS = false
 
+# Specifies whether or not Packager DMG tests should be run.
+# Mac OSX 10.7 tends to hang on automated builds with hdiutil is run,
+# hence the default is false.
+
+#TEST_PACKAGER_DMG = false
+
 # Specify the COMPILE_TARGETS when performing cross compiles. A Cross-Compile is
 # when you build for a platform other than the one you are building on. For example,
 # to build for Apple iOS, you would specify ios as one of the COMPILE_TARGETS.
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPickerSkin.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPickerSkin.java	Fri Sep 12 17:15:09 2014 -0700
@@ -196,9 +196,6 @@
         colorRect.getStyleClass().add("picker-color-rect");
 
         updateColor();
-        colorPicker.addEventHandler(ActionEvent.ACTION, t -> {
-            updateColor();
-        });
 
         pickerColorBox.getChildren().add(colorRect);
         displayNode.setGraphic(pickerColorBox);
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ComboBoxListViewSkin.java	Fri Sep 12 17:15:09 2014 -0700
@@ -37,6 +37,7 @@
 import javafx.collections.ObservableList;
 import javafx.collections.WeakListChangeListener;
 import javafx.css.PseudoClass;
+import javafx.event.ActionEvent;
 import javafx.event.EventHandler;
 import javafx.event.EventTarget;
 import javafx.scene.AccessibleAttribute;
@@ -249,6 +250,7 @@
             updateButtonCell();
         } else if ("VALUE".equals(p)) {
             updateValue();
+            comboBox.fireEvent(new ActionEvent());
         } else if ("EDITABLE".equals(p)) {
             updateEditable();
         }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DatePickerSkin.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/DatePickerSkin.java	Fri Sep 12 17:15:09 2014 -0700
@@ -39,6 +39,7 @@
 import javafx.beans.InvalidationListener;
 import javafx.beans.Observable;
 import javafx.css.PseudoClass;
+import javafx.event.ActionEvent;
 import javafx.geometry.Insets;
 import javafx.scene.Node;
 import javafx.scene.control.DatePicker;
@@ -242,6 +243,7 @@
                 datePickerContent.displayedYearMonthProperty().set((date != null) ? YearMonth.from(date) : YearMonth.now());
                 datePickerContent.updateValues();
             }
+            datePicker.fireEvent(new ActionEvent());
         } else {
             super.handleControlPropertyChanged(p);
         }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressBarSkin.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ProgressBarSkin.java	Fri Sep 12 17:15:09 2014 -0700
@@ -282,11 +282,9 @@
         indeterminateTransition = new IndeterminateTransition(startX, endX, getIndeterminateBarFlip(), this);
         indeterminateTransition.setCycleCount(Timeline.INDEFINITE);
 
-        if (!clipRegion.translateXProperty().isBound()) {
-            clipRegion.translateXProperty().bind(new When(bar.scaleXProperty().isEqualTo(-1.0, 1e-100)).
-                    then(bar.translateXProperty().subtract(w).add(indeterminateBarLengthProperty())).
-                    otherwise(bar.translateXProperty().negate()));
-        }
+        clipRegion.translateXProperty().bind(new When(bar.scaleXProperty().isEqualTo(-1.0, 1e-100)).
+                then(bar.translateXProperty().subtract(w).add(indeterminateBarLengthProperty())).
+                otherwise(bar.translateXProperty().negate()));
     }
 
     boolean wasIndeterminate = false;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TabPaneSkin.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TabPaneSkin.java	Fri Sep 12 17:15:09 2014 -0700
@@ -242,13 +242,15 @@
     }
     private void removeTabs(List<? extends Tab> removedList) {
         for (final Tab tab : removedList) {
+            stopCurrentAnimation(tab);
             // Animate the tab removal
             final TabHeaderSkin tabRegion = tabHeaderArea.getTabHeaderSkin(tab);
             if (tabRegion != null) {
                 tabRegion.isClosing = true;
                 if (closeTabAnimation.get() == TabAnimation.GROW) {
                     tabRegion.animating = true;
-                    Timeline closedTabTimeline = createTimeline(tabRegion, Duration.millis(ANIMATION_SPEED), 0.0F, event -> {
+                    Timeline closedTabTimeline = tabRegion.currentAnimation =
+                            createTimeline(tabRegion, Duration.millis(ANIMATION_SPEED), 0.0F, event -> {
                         handleClosedTab(tab);
                     });
                     closedTabTimeline.play();    
@@ -258,7 +260,17 @@
             }
         }
     }
-    
+
+    private void stopCurrentAnimation(Tab tab) {
+        final TabHeaderSkin tabRegion = tabHeaderArea.getTabHeaderSkin(tab);
+        if (tabRegion != null && tabRegion.currentAnimation != null) {
+            // Execute the code immediately, don't wait for the animation to finish.
+            tabRegion.currentAnimation.getKeyFrames().get(0).getOnFinished().handle(null);
+            tabRegion.currentAnimation.stop();
+            tabRegion.currentAnimation = null;
+        }
+    }
+
     private void handleClosedTab(Tab tab) {
         removeTab(tab);
         if (getSkinnable().getTabs().isEmpty()) {
@@ -268,6 +280,7 @@
     private void addTabs(List<? extends Tab> addedList, int from) {
         int i = 0;
         for (final Tab tab : addedList) {
+            stopCurrentAnimation(tab); // Note that this must happen before addTab() call below
             // A new tab was added - animate it out
             if (!tabHeaderArea.isVisible()) {
                 tabHeaderArea.setVisible(true);
@@ -281,10 +294,12 @@
                     tabRegion.animating = true;
                     tabRegion.animationTransition.setValue(0.0);
                     tabRegion.setVisible(true);
-                    createTimeline(tabRegion, Duration.millis(ANIMATION_SPEED), 1.0, event -> {
+                    tabRegion.currentAnimation = createTimeline(tabRegion, Duration.millis(ANIMATION_SPEED), 1.0, event -> {
                         tabRegion.animating = false;
+                        tabRegion.setVisible(true);
                         tabRegion.inner.requestLayout();
-                    }).play();
+                    });
+                    tabRegion.currentAnimation.play();
                 } else {
                     tabRegion.setVisible(true);
                     tabRegion.inner.requestLayout();
@@ -1403,6 +1418,7 @@
         }
 
         private boolean animating = false;
+        private Timeline currentAnimation;
 
         @Override protected double computePrefWidth(double height) {
 //            if (animating) {
--- a/modules/controls/src/main/java/javafx/scene/chart/Axis.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/Axis.java	Fri Sep 12 17:15:09 2014 -0700
@@ -721,13 +721,18 @@
                         if (m.isTextVisible()) {
                             double tickHeight = measureTickMarkSize(m.getValue(), getRange()).getHeight();
                             lastStart = updateAndGetDisplayPosition(m) - tickHeight / 2;
+                            break;
+                        } else {
+                            labelsToSkip.set(stop);
                         }
-                        break;
                     }
 
                     for (int i = tickMarks.size() - 1; i > stop; i--) {
                         TickMark<T> m = tickMarks.get(i);
-                        if (!m.isTextVisible()) continue;
+                        if (!m.isTextVisible()) {
+                            labelsToSkip.set(i);
+                            continue;
+                        }
                         double tickHeight = measureTickMarkSize(m.getValue(), getRange()).getHeight();
                         double tickStart = updateAndGetDisplayPosition(m) - tickHeight / 2;
                         if (tickStart <= prevEnd || tickStart + tickHeight > lastStart) {
@@ -745,13 +750,18 @@
                         if (m.isTextVisible()) {
                             double tickWidth = measureTickMarkSize(m.getValue(), getRange()).getWidth();
                             lastStart = updateAndGetDisplayPosition(m) - tickWidth / 2;
+                            break;
+                        } else {
+                            labelsToSkip.set(stop);
                         }
-                        break;
                     }
 
                     for (int i = 0; i < stop; ++i) {
                         TickMark<T> m = tickMarks.get(i);
-                        if (!m.isTextVisible()) continue;
+                        if (!m.isTextVisible()) {
+                            labelsToSkip.set(i);
+                            continue;
+                        }
                         double tickWidth = measureTickMarkSize(m.getValue(), getRange()).getWidth();
                         double tickStart = updateAndGetDisplayPosition(m) - tickWidth / 2;
                         if (tickStart <= prevEnd || tickStart + tickWidth > lastStart) {
--- a/modules/controls/src/main/java/javafx/scene/chart/StackedAreaChart.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/StackedAreaChart.java	Fri Sep 12 17:15:09 2014 -0700
@@ -572,9 +572,7 @@
             for (DataPointInfo<X, Y> dataInfo : aggregateData) {
                 if (dataIndex == lastCurrentIndex) lastCurrent = true;
                 if (dataIndex == firstCurrentIndex) firstCurrent = true;
-                double x;
-                double y;
-                Data<X,Y> item = dataInfo.dataItem;
+                final Data<X,Y> item = dataInfo.dataItem;
                 if (dataInfo.partOf.equals(PartOf.CURRENT)) { // handle data from current series
                     int pIndex = findPreviousPrevious(aggregateData, dataIndex); 
                     int nIndex = findNextPrevious(aggregateData, dataIndex);
@@ -583,24 +581,20 @@
                     if (pIndex == -1 || (nIndex == -1 && !(aggregateData.get(pIndex).x.equals(dataInfo.x)))) {
                         if (firstCurrent) {
                             // Need to add the drop down point.
-                            item = new Data(dataInfo.x, 0);
-                            x = xAxis.getDisplayPosition(item.getCurrentX());
-                            y = basePosition;
-                            addDropDown(currentSeriesData, item, item.getXValue(), item.getYValue(), x, y);
-                        } 
-                        // And add current point.
-                        item = dataInfo.dataItem;
-                        x = xAxis.getDisplayPosition(item.getCurrentX());
-                        y = yAxis.getDisplayPosition(
+                            Data<X, Y> ddItem = new Data(dataInfo.x, 0);
+                            addDropDown(currentSeriesData, ddItem, ddItem.getXValue(), ddItem.getYValue(),
+                                    xAxis.getDisplayPosition(ddItem.getCurrentX()), basePosition);
+                        }
+                        double x = xAxis.getDisplayPosition(item.getCurrentX());
+                        double y = yAxis.getDisplayPosition(
                                 yAxis.toRealValue(yAxis.toNumericValue(item.getCurrentY()) * seriesYAnimMultiplier.getValue()));
                         addPoint(currentSeriesData, item, item.getXValue(), item.getYValue(), x, y,
                                 PartOf.CURRENT, false, (firstCurrent) ? false : true);
                         if (dataIndex == lastCurrentIndex) {
                             // need to add drop down point
-                            item = new Data(dataInfo.x, 0);
-                            x = xAxis.getDisplayPosition(item.getCurrentX());
-                            y = basePosition;
-                            addDropDown(currentSeriesData, item, item.getXValue(), item.getYValue(), x, y);
+                            Data<X, Y> ddItem = new Data(dataInfo.x, 0);
+                            addDropDown(currentSeriesData, ddItem, ddItem.getXValue(), ddItem.getYValue(),
+                                    xAxis.getDisplayPosition(ddItem.getCurrentX()), basePosition);
                         }
                     } else {
                         prevPoint = aggregateData.get(pIndex);
@@ -613,9 +607,9 @@
                                 // If lastCurrent - add this drop down
                             } 
                             if (prevPoint.x.equals(dataInfo.x)) { // simply add
-                                x = xAxis.getDisplayPosition(item.getCurrentX());
+                                double x = xAxis.getDisplayPosition(item.getCurrentX());
                                 final double yv = yAxis.toNumericValue(item.getCurrentY()) + yAxis.toNumericValue(prevPoint.y);
-                                y = yAxis.getDisplayPosition(
+                                double y = yAxis.getDisplayPosition(
                                         yAxis.toRealValue(yv * seriesYAnimMultiplier.getValue()));
                                 addPoint(currentSeriesData, item, dataInfo.x, yAxis.toRealValue(yv), x, y, PartOf.CURRENT, false,
                                         (firstCurrent) ? false : true);
@@ -627,9 +621,9 @@
                             // interpolate 
                             nextPoint = (nIndex == -1) ? null : aggregateData.get(nIndex);
                             prevPoint = (pIndex == -1) ? null : aggregateData.get(pIndex);
-                            x = xAxis.getDisplayPosition(item.getCurrentX());
                             final double yValue = yAxis.toNumericValue(item.getCurrentY());
                             if (prevPoint != null && nextPoint != null) {
+                                double x = xAxis.getDisplayPosition(item.getCurrentX());
                                 double displayY = interpolate(prevPoint.displayX,
                                         prevPoint.displayY, nextPoint.displayX, nextPoint.displayY, x);
                                 double dataY = interpolate(xAxis.toNumericValue(prevPoint.x),
@@ -639,17 +633,17 @@
                                         xAxis.toNumericValue(dataInfo.x));
                                 if (firstCurrent) {
                                     // now create the drop down point
-                                    item = new Data(dataInfo.x, dataY);
-                                    addDropDown(currentSeriesData, item, dataInfo.x, yAxis.toRealValue(dataY), x, displayY);
+                                    Data<X, Y> ddItem = new Data(dataInfo.x, dataY);
+                                    addDropDown(currentSeriesData, ddItem, dataInfo.x, yAxis.toRealValue(dataY), x, displayY);
                                 }
-                                y = yAxis.getDisplayPosition(yAxis.toRealValue((yValue + dataY) * seriesYAnimMultiplier.getValue()));
+                                double y = yAxis.getDisplayPosition(yAxis.toRealValue((yValue + dataY) * seriesYAnimMultiplier.getValue()));
                                 // Add the current point
                                 addPoint(currentSeriesData, item, dataInfo.x, yAxis.toRealValue(yValue + dataY), x, y, PartOf.CURRENT, false,
                                         (firstCurrent) ? false : true);
                                 if (dataIndex == lastCurrentIndex) {
                                     // add drop down point
-                                    item = new Data(dataInfo.x, dataY);
-                                    addDropDown(currentSeriesData, item, dataInfo.x, yAxis.toRealValue(dataY), x, displayY);
+                                    Data<X, Y> ddItem = new Data(dataInfo.x, dataY);
+                                    addDropDown(currentSeriesData, ddItem, dataInfo.x, yAxis.toRealValue(dataY), x, displayY);
                                 }
                                 // Note: add drop down if last current
                             }
@@ -682,14 +676,14 @@
                             } else {
                                 // interpolate on the current series.
                                 prevPoint = aggregateData.get(pIndex);
-                                x = xAxis.getDisplayPosition(item.getCurrentX());
+                                double x = xAxis.getDisplayPosition(item.getCurrentX());
                                   double dataY = interpolate(xAxis.toNumericValue(prevPoint.x),
                                           yAxis.toNumericValue(prevPoint.y),
                                           xAxis.toNumericValue(nextPoint.x),
                                           yAxis.toNumericValue(nextPoint.y),
                                           xAxis.toNumericValue(dataInfo.x));
                                 final double yv = yAxis.toNumericValue(dataInfo.y) + dataY;
-                                y = yAxis.getDisplayPosition(
+                                double y = yAxis.getDisplayPosition(
                                         yAxis.toRealValue(yv * seriesYAnimMultiplier.getValue()));
                                 addPoint(currentSeriesData, new Data(dataInfo.x, dataY), dataInfo.x, yAxis.toRealValue(yv), x, y, PartOf.CURRENT, true, true);
                             }
--- a/modules/controls/src/main/java/javafx/scene/control/ColorPicker.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/ColorPicker.java	Fri Sep 12 17:15:09 2014 -0700
@@ -116,11 +116,6 @@
         getStyleClass().add(DEFAULT_STYLE_CLASS);
     }
 
-    /** {@inheritDoc} */
-    @Override void valueInvalidated() {
-        // do nothing - we dont want to fire action event when value changes.
-    }
-
     /***************************************************************************
      *                                                                         *
      * Methods                                                                 *
--- a/modules/controls/src/main/java/javafx/scene/control/ComboBoxBase.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/ComboBoxBase.java	Fri Sep 12 17:15:09 2014 -0700
@@ -132,10 +132,6 @@
         // End of fix for RT-29885
     }
     
-    void valueInvalidated() {
-        fireEvent(new ActionEvent());
-    }
-    
     /***************************************************************************
      *                                                                         *
      * Properties                                                              *
@@ -149,21 +145,8 @@
      * either the value input by the user, or the last selected item.
      */
     public ObjectProperty<T> valueProperty() { return value; }
-    private ObjectProperty<T> value = new SimpleObjectProperty<T>(this, "value") {
-        T oldValue;
-        
-        @Override protected void invalidated() {
-            super.invalidated();
-            T newValue = get();
-            
-            if ((oldValue == null && newValue != null) ||
-                    oldValue != null && ! oldValue.equals(newValue)) {
-                valueInvalidated();
-            }
-            
-            oldValue = newValue;
-        }
-    };
+    private ObjectProperty<T> value = new SimpleObjectProperty<T>(this, "value");
+
     public final void setValue(T value) { valueProperty().set(value); }
     public final T getValue() { return valueProperty().get(); }
     
--- a/modules/controls/src/main/java/javafx/scene/control/TextFormatter.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TextFormatter.java	Fri Sep 12 17:15:09 2014 -0700
@@ -255,25 +255,25 @@
         int anchor;
         int caret;
 
-        Change(Control control, FormatterAccessor accessor,  int newAnchor, int newCaretPosition) {
-            this.control = control;
-            this.accessor = accessor;
-            anchor = newAnchor;
-            caret = newCaretPosition;
-            text = "";
-            start = end = newCaretPosition;
+        Change(Control control, FormatterAccessor accessor,  int anchor, int caret) {
+            this(control, accessor, caret, caret, "", anchor, caret);
+        }
+
+        Change(Control control, FormatterAccessor accessor, int start, int end, String text) {
+            this(control, accessor, start, end, text, start + text.length(), start + text.length());
         }
 
         // Restrict construction to TextInputControl only. Because we are the
         // only ones who can create this, we don't bother doing a check here
         // to make sure the arguments are within reason (they will be).
-        Change(Control control, FormatterAccessor accessor, int start, int end, String text) {
+        Change(Control control, FormatterAccessor accessor, int start, int end, String text, int anchor, int caret) {
             this.control = control;
             this.accessor = accessor;
             this.start = start;
             this.end = end;
             this.text = text;
-            this.anchor = this.caret = start + text.length();
+            this.anchor = anchor;
+            this.caret = caret;
         }
 
         /**
--- a/modules/controls/src/main/java/javafx/scene/control/TextInputControl.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TextInputControl.java	Fri Sep 12 17:15:09 2014 -0700
@@ -1152,19 +1152,20 @@
         redoable.set(undoChange.next != null);
     }
 
-    boolean filterAndSet(String value) {
+    private boolean filterAndSet(String value) {
         // Send the new value through the textFormatter, if one exists.
         TextFormatter<?> formatter = getTextFormatter();
         int length = content.length();
         if (formatter != null && formatter.getFilter() != null && !text.isBound()) {
-            TextFormatter.Change change = new TextFormatter.Change(TextInputControl.this, getFormatterAccessor(), 0, length, value);
+            TextFormatter.Change change = new TextFormatter.Change(
+                    TextInputControl.this, getFormatterAccessor(), 0, length, value, 0, 0);
             change = formatter.getFilter().apply(change);
             if (change == null) {
                 return false;
             }
             replaceText(change.start, change.end, change.text, change.getAnchor(), change.getCaretPosition());
         } else {
-            replaceText(0, length, value, value.length(), value.length());
+            replaceText(0, length, value, 0, 0);
         }
         return true;
     }
--- a/modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/caspian/caspian.css	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/caspian/caspian.css	Fri Sep 12 17:15:09 2014 -0700
@@ -1996,6 +1996,7 @@
 
 .progress-indicator {
     -fx-indeterminate-segment-count: 8;
+    -fx-spin-enabled: true;
 }
 
 .progress-indicator > .determinate-indicator > .indicator {
--- a/modules/controls/src/test/java/javafx/scene/control/ComboBoxTest.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/ComboBoxTest.java	Fri Sep 12 17:15:09 2014 -0700
@@ -98,6 +98,7 @@
     
     @Before public void setup() {
         comboBox = new ComboBox<String>();
+        comboBox.setSkin(new ComboBoxListViewSkin<>(comboBox));
         sm = comboBox.getSelectionModel();
     }
     
--- a/modules/controls/src/test/java/javafx/scene/control/TextInputControlTest.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TextInputControlTest.java	Fri Sep 12 17:15:09 2014 -0700
@@ -350,8 +350,8 @@
     @Test
     public void caretAndAnchorPositionAfterSettingText() {
         textInput.setText("The quick brown fox");
-        assertEquals(19, textInput.getCaretPosition());
-        assertEquals(19, textInput.getAnchor());
+        assertEquals(0, textInput.getCaretPosition());
+        assertEquals(0, textInput.getAnchor());
     }
 
     /******************************************************
--- a/modules/fxpackager/.classpath	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/.classpath	Fri Sep 12 17:15:09 2014 -0700
@@ -18,5 +18,5 @@
       <attribute name="optional" value="true"/>
     </attributes>
   </classpathentry>
-  <classpathentry kind="src" exported="true" path="/graphics"/>
+  <classpathentry kind="src" exported="true" path="/controls"/>
 </classpath>
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/StandardBundlerParam.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/StandardBundlerParam.java	Fri Sep 12 17:15:09 2014 -0700
@@ -219,6 +219,17 @@
             );
 
     @SuppressWarnings("unchecked")
+    public static final StandardBundlerParam<List<String>> ARGUMENTS =
+            new StandardBundlerParam<>(
+                    I18N.getString("param.arguments.name"),
+                    I18N.getString("param.arguments.description"),
+                    "arguments",
+                    (Class<List<String>>) (Object) List.class,
+                    params -> Collections.emptyList(),
+                    (s, p) -> Arrays.asList(s.split("\\s+"))
+            );
+
+    @SuppressWarnings("unchecked")
     public static final StandardBundlerParam<List<String>> JVM_OPTIONS =
             new StandardBundlerParam<>(
                     I18N.getString("param.jvm-options.name"),
@@ -451,6 +462,72 @@
                     (s, p) -> (s == null || "null".equalsIgnoreCase(s))? true : Boolean.valueOf(s)
             );
 
+    @SuppressWarnings("unchecked")
+    public static final StandardBundlerParam<List<Map<String, ? super Object>>> SECONDARY_LAUNCHERS =
+            new StandardBundlerParam<>(
+                    I18N.getString("param.secondary-launchers.name"),
+                    I18N.getString("param.secondary-launchers.description"),
+                    "secondaryLaunchers",
+                    (Class<List<Map<String, ? super Object>>>) (Object) List.class,
+                    params -> new ArrayList<>(1),
+                    // valueOf(null) is false, and we actually do want null in some cases
+                    (s, p) -> null
+            );
+
+    @SuppressWarnings("unchecked")
+    public static final StandardBundlerParam<List<Map<String, ? super Object>>> FILE_ASSOCIATIONS =
+            new StandardBundlerParam<>(
+                    I18N.getString("param.file-associations.name"),
+                    I18N.getString("param.file-associations.description"),
+                    "fileAssociations",
+                    (Class<List<Map<String, ? super Object>>>) (Object) List.class,
+                    params -> new ArrayList<>(1),
+                    // valueOf(null) is false, and we actually do want null in some cases
+                    (s, p) -> null
+            );
+
+    @SuppressWarnings("unchecked")
+    public static final StandardBundlerParam<List<String>> FA_EXTENSIONS =
+            new StandardBundlerParam<>(
+                    I18N.getString("param.fa-extension.name"),
+                    I18N.getString("param.fa-extension.description"),
+                    "fileAssociation.extension",
+                    (Class<List<String>>) (Object) List.class,
+                    params -> null, // null means not matched to an extension
+                    (s, p) -> Arrays.asList(s.split("(,\\s)+"))
+            );
+
+    @SuppressWarnings("unchecked")
+    public static final StandardBundlerParam<List<String>> FA_CONTENT_TYPE =
+            new StandardBundlerParam<>(
+                    I18N.getString("param.fa-content-type.name"),
+                    I18N.getString("param.fa-content-type.description"),
+                    "fileAssociation.contentType",
+                    (Class<List<String>>) (Object) List.class,
+                    params -> null, // null means not matched to a content/mime type
+                    (s, p) -> Arrays.asList(s.split("(,\\s)+"))
+            );
+
+    public static final StandardBundlerParam<String> FA_DESCRIPTION =
+            new StandardBundlerParam<>(
+                    I18N.getString("param.fa-description.name"),
+                    I18N.getString("param.fa-description.description"),
+                    "fileAssociation.description",
+                    String.class,
+                    params -> APP_NAME.fetchFrom(params) + " File",
+                    null
+            );
+
+    public static final StandardBundlerParam<File> FA_ICON =
+            new StandardBundlerParam<>(
+                    I18N.getString("param.fa-icon.name"),
+                    I18N.getString("param.fa-icon.description"),
+                    "fileAssociation.icon",
+                    File.class,
+                    ICON::fetchFrom,
+                    (s, p) -> new File(s)
+            );
+
     public static void extractMainClassInfoFromAppResources(Map<String, ? super Object> params) {
         boolean hasMainClass = params.containsKey(MAIN_CLASS.getID());
         boolean hasMainJar = params.containsKey(MAIN_JAR.getID());
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxAppBundler.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxAppBundler.java	Fri Sep 12 17:15:09 2014 -0700
@@ -56,6 +56,7 @@
     protected static final String LINUX_BUNDLER_PREFIX =
             BUNDLER_PREFIX + "linux" + File.separator;
     private static final String EXECUTABLE_NAME = "JavaAppLauncher";
+    private static final String LIBRARY_NAME    = "libpackager.so";
 
     public static final BundlerParamInfo<File> ICON_PNG = new StandardBundlerParam<>(
             I18N.getString("param.icon-png.name"),
@@ -173,7 +174,16 @@
         return new File(outDir, APP_FS_NAME.fetchFrom(p));
     }
 
+    public static String getLauncherName(Map<String, ? super Object> p) {
+        return APP_FS_NAME.fetchFrom(p);
+    }
+
+    public static String getLauncherCfgName(Map<String, ? super Object> p) {
+        return "app/" + APP_FS_NAME.fetchFrom(p) +".cfg";
+    }
+
     File doBundle(Map<String, ? super Object> p, File outputDirectory, boolean dependentTask) {
+        Map<String, ? super Object> originalParams = new HashMap<>(p);
         try {
             if (!outputDirectory.isDirectory() && !outputDirectory.mkdirs()) {
                 throw new RuntimeException(MessageFormat.format(I18N.getString("error.cannot-create-output-dir"), outputDirectory.getAbsolutePath()));
@@ -183,7 +193,7 @@
             }
 
             // Create directory structure
-            File rootDirectory = new File(outputDirectory, APP_FS_NAME.fetchFrom(p));
+            File rootDirectory = getRootDir(outputDirectory, p);
             IOUtils.deleteRecursive(rootDirectory);
             rootDirectory.mkdirs();
 
@@ -196,19 +206,21 @@
             File appDirectory = new File(rootDirectory, "app");
             appDirectory.mkdirs();
 
-            // Copy executable to Linux folder
-            File executableFile = new File(getRootDir(outputDirectory, p), APP_FS_NAME.fetchFrom(p));
+            // create the primary launcher
+            createLauncherForEntryPoint(p, rootDirectory);
+
+            // Copy library to the launcher folder
             IOUtils.copyFromURL(
-                    RAW_EXECUTABLE_URL.fetchFrom(p),
-                    executableFile);
+                    LinuxResources.class.getResource(LIBRARY_NAME),
+                    new File(rootDirectory, LIBRARY_NAME));
 
-            executableFile.setExecutable(true, false);
-            executableFile.setWritable(true, true); //for str
-
-            // Generate PkgInfo
-            File pkgInfoFile = new File(appDirectory, "package.cfg");
-            pkgInfoFile.createNewFile();
-            writePkgInfo(p, pkgInfoFile);
+            // create the secondary launchers, if any
+            List<Map<String, ? super Object>> entryPoints = StandardBundlerParam.SECONDARY_LAUNCHERS.fetchFrom(p);
+            for (Map<String, ? super Object> entryPoint : entryPoints) {
+                Map<String, ? super Object> tmp = new HashMap<>(originalParams);
+                tmp.putAll(entryPoint);
+                createLauncherForEntryPoint(tmp, rootDirectory);
+            }
 
             // Copy runtime to PlugIns folder
             copyRuntime(p, runtimeDirectory);
@@ -227,6 +239,20 @@
         }
     }
 
+    private void createLauncherForEntryPoint(Map<String, ? super Object> p, File rootDir) throws IOException {
+        // Copy executable to Linux folder
+        File executableFile = new File(rootDir, getLauncherName(p));
+        IOUtils.copyFromURL(
+                RAW_EXECUTABLE_URL.fetchFrom(p),
+                executableFile);
+
+        executableFile.setExecutable(true, false);
+        executableFile.setWritable(true, true); //for str
+
+        // Generate PkgInfo
+        writePkgInfo(p, rootDir);
+    }
+
     private void copyApplication(Map<String, ? super Object> params, File appDirectory) throws IOException {
         RelativeFileSet appResources = APP_RESOURCES.fetchFrom(params);
         if (appResources == null) {
@@ -239,7 +265,9 @@
         }
     }
 
-    private void writePkgInfo(Map<String, ? super Object> params, File pkgInfoFile) throws FileNotFoundException {
+    private void writePkgInfo(Map<String, ? super Object> params, File rootDir) throws FileNotFoundException {
+        File pkgInfoFile = new File(rootDir, getLauncherCfgName(params));
+
         pkgInfoFile.delete();
         PrintStream out = new PrintStream(pkgInfoFile);
         out.println("app.mainjar=" + MAIN_JAR.fetchFrom(params).getIncludedFiles().iterator().next());
@@ -253,7 +281,15 @@
             out.println("app.mainclass=" +
                     MAIN_CLASS.fetchFrom(params).replaceAll("\\.", "/"));
         }
-        out.println("app.classpath=" + CLASSPATH.fetchFrom(params));
+
+        StringBuilder macroedPath = new StringBuilder();
+        for (String s : CLASSPATH.fetchFrom(params).split("[ ;:]+")) {
+            macroedPath.append("$PACKAGEDIR/");
+            macroedPath.append(s);
+            macroedPath.append(":");
+        }
+        macroedPath.deleteCharAt(macroedPath.length() - 1);
+        out.println("app.classpath=" + macroedPath.toString());
 
         List<String> jvmargs = JVM_OPTIONS.fetchFrom(params);
         int idx = 1;
@@ -282,6 +318,15 @@
             }
             idx++;
         }
+
+        // add command line args
+        List<String> args = ARGUMENTS.fetchFrom(params);
+        idx = 1;
+        for (String a : args) {
+            out.println("arg."+idx+"="+a);
+            idx++;
+        }
+
         out.close();
     }
 
@@ -331,6 +376,7 @@
         return Arrays.asList(
                 APP_NAME,
                 APP_RESOURCES,
+                ARGUMENTS,
                 JVM_OPTIONS,
                 JVM_PROPERTIES,
                 LINUX_RUNTIME,
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxDebBundler.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxDebBundler.java	Fri Sep 12 17:15:09 2014 -0700
@@ -29,6 +29,8 @@
 import com.oracle.tools.packager.IOUtils;
 import com.sun.javafx.tools.packager.bundlers.BundleParams;
 
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
 import java.io.*;
 import java.nio.file.Files;
 import java.nio.file.attribute.PosixFilePermission;
@@ -159,6 +161,31 @@
             },
             (s, p) -> s);
 
+    public static final BundlerParamInfo<String> XDG_FILE_PREFIX = new StandardBundlerParam<> (
+            I18N.getString("param.xdg-prefix.name"),
+            I18N.getString("param.xdg-prefix.description"),
+            "linux.xdg-prefix",
+            String.class,
+            params -> {
+                try {
+                    String vendor;
+                    if (params.containsKey(VENDOR.getID())) {
+                        vendor = VENDOR.fetchFrom(params);
+                    } else {
+                        vendor = "javapackager";
+                    }
+                    String appName = APP_FS_NAME.fetchFrom(params);
+
+                    return (vendor + "-" + appName).replaceAll("\\s", "");
+                } catch (Exception e) {
+                    if (Log.isDebug()) {
+                        e.printStackTrace();
+                    }
+                }
+                return "unknown-MimeInfo.xml";
+            },
+            (s, p) -> s);
+
     private final static String DEFAULT_ICON = "javalogo_white_32.png";
     private final static String DEFAULT_CONTROL_TEMPLATE = "template.control";
     private final static String DEFAULT_PRERM_TEMPLATE = "template.prerm";
@@ -229,6 +256,24 @@
                         MessageFormat.format(I18N.getString("error.launcher-name-too-long.advice"), BUNDLE_NAME.getID()));
             }
 
+            // only one mime type per association, at least one file extention
+            List<Map<String, ? super Object>> associations = FILE_ASSOCIATIONS.fetchFrom(p);
+            if (associations != null) {
+                for (int i = 0; i < associations.size(); i++) {
+                    Map<String, ? super Object> assoc = associations.get(i);
+                    List<String> mimes = FA_CONTENT_TYPE.fetchFrom(assoc);
+                    if (mimes == null || mimes.isEmpty()) {
+                        throw new ConfigException(
+                                MessageFormat.format(I18N.getString("error.no-content-types-for-file-association"), i),
+                                I18N.getString("error.no-content-types-for-file-association.advice"));
+                    } else if (mimes.size() > 1) {
+                        throw new ConfigException(
+                                MessageFormat.format(I18N.getString("error.too-many-content-types-for-file-association"), i),
+                                I18N.getString("error.too-many-content-types-for-file-association.advice"));
+                    }
+                }
+            }
+
             return true;
         } catch (RuntimeException re) {
             if (re.getCause() instanceof ConfigException) {
@@ -318,6 +363,7 @@
     protected void saveConfigFiles(Map<String, ? super Object> params) {
         try {
             File configRoot = CONFIG_ROOT.fetchFrom(params);
+            File rootDir = LinuxAppBundler.getRootDir(APP_IMAGE_ROOT.fetchFrom(params), params);
 
             if (getConfig_ControlFile(params).exists()) {
                 IOUtils.copyFile(getConfig_ControlFile(params),
@@ -343,13 +389,19 @@
                 IOUtils.copyFile(getConfig_PostrmFile(params),
                         new File(configRoot, getConfig_PostrmFile(params).getName()));
             }
-            if (getConfig_DesktopShortcutFile(params).exists()) {
-                IOUtils.copyFile(getConfig_DesktopShortcutFile(params),
-                        new File(configRoot, getConfig_DesktopShortcutFile(params).getName()));
+            if (getConfig_DesktopShortcutFile(rootDir, params).exists()) {
+                IOUtils.copyFile(getConfig_DesktopShortcutFile(rootDir, params),
+                        new File(configRoot, getConfig_DesktopShortcutFile(rootDir, params).getName()));
             }
-            if (getConfig_IconFile(params).exists()) {
-                IOUtils.copyFile(getConfig_IconFile(params),
-                        new File(configRoot, getConfig_IconFile(params).getName()));
+            for (Map<String, ? super Object> secondaryLauncher : SECONDARY_LAUNCHERS.fetchFrom(params)) {
+                if (getConfig_DesktopShortcutFile(rootDir, secondaryLauncher).exists()) {
+                    IOUtils.copyFile(getConfig_DesktopShortcutFile(rootDir, secondaryLauncher),
+                            new File(configRoot, getConfig_DesktopShortcutFile(rootDir, secondaryLauncher).getName()));
+                }
+            }
+            if (getConfig_IconFile(rootDir, params).exists()) {
+                IOUtils.copyFile(getConfig_IconFile(rootDir, params),
+                        new File(configRoot, getConfig_IconFile(rootDir, params).getName()));
             }
             if (SERVICE_HINT.fetchFrom(params)) {
                 if (getConfig_InitScriptFile(params).exists()) {
@@ -392,31 +444,209 @@
     }
 
     private boolean prepareProjectConfig(Map<String, ? super Object> params) throws IOException {
-        Map<String, String> data = new HashMap<>();
+        Map<String, String> data = createReplacementData(params);
+        File rootDir = LinuxAppBundler.getRootDir(APP_IMAGE_ROOT.fetchFrom(params), params);
 
-        data.put("APPLICATION_NAME", APP_NAME.fetchFrom(params));
-        data.put("APPLICATION_FS_NAME", APP_FS_NAME.fetchFrom(params));
-        data.put("APPLICATION_PACKAGE", BUNDLE_NAME.fetchFrom(params));
-        data.put("APPLICATION_VENDOR", VENDOR.fetchFrom(params));
-        data.put("APPLICATION_MAINTAINER", MAINTAINER.fetchFrom(params));
-        data.put("APPLICATION_VERSION", VERSION.fetchFrom(params));
-        data.put("APPLICATION_LAUNCHER_FILENAME", APP_FS_NAME.fetchFrom(params));
-        data.put("DEPLOY_BUNDLE_CATEGORY", CATEGORY.fetchFrom(params));
-        data.put("APPLICATION_DESCRIPTION", DESCRIPTION.fetchFrom(params));
-        data.put("APPLICATION_SUMMARY", TITLE.fetchFrom(params));
-        data.put("APPLICATION_COPYRIGHT", COPYRIGHT.fetchFrom(params));
-        data.put("APPLICATION_LICENSE_TYPE", LICENSE_TYPE.fetchFrom(params));
-        data.put("APPLICATION_LICENSE_TEXT", LICENSE_TEXT.fetchFrom(params));
-        data.put("APPLICATION_ARCH", getArch());
-        data.put("APPLICATION_INSTALLED_SIZE", Long.toString(getInstalledSizeKB(params)));
-        data.put("SERVICE_HINT", String.valueOf(SERVICE_HINT.fetchFrom(params)));
-        data.put("START_ON_INSTALL", String.valueOf(START_ON_INSTALL.fetchFrom(params)));
-        data.put("STOP_ON_UNINSTALL", String.valueOf(STOP_ON_UNINSTALL.fetchFrom(params)));
-        data.put("RUN_AT_STARTUP", String.valueOf(RUN_AT_STARTUP.fetchFrom(params)));
+        //prepare installer icon
+        File iconTarget = getConfig_IconFile(rootDir, params);
+        File icon = ICON_PNG.fetchFrom(params);
+        if (icon == null || !icon.exists()) {
+            fetchResource(LinuxAppBundler.LINUX_BUNDLER_PREFIX + iconTarget.getName(),
+                    I18N.getString("resource.menu-icon"),
+                    DEFAULT_ICON,
+                    iconTarget,
+                    VERBOSE.fetchFrom(params));
+        } else {
+            fetchResource(LinuxAppBundler.LINUX_BUNDLER_PREFIX + iconTarget.getName(),
+                    I18N.getString("resource.menu-icon"),
+                    icon,
+                    iconTarget,
+                    VERBOSE.fetchFrom(params));
+        }
+
+        StringBuilder installScripts = new StringBuilder();
+        StringBuilder removeScripts = new StringBuilder();
+        for (Map<String, ? super Object> secondaryLauncher : SECONDARY_LAUNCHERS.fetchFrom(params)) {
+            Map<String, String> secondaryLauncherData = createReplacementData(secondaryLauncher);
+            secondaryLauncherData.put("APPLICATION_FS_NAME", data.get("APPLICATION_FS_NAME"));
+            secondaryLauncherData.put("DESKTOP_MIMES", "");
+
+            //prepare desktop shortcut
+            Writer w = new BufferedWriter(new FileWriter(getConfig_DesktopShortcutFile(rootDir, secondaryLauncher)));
+            String content = preprocessTextResource(
+                    LinuxAppBundler.LINUX_BUNDLER_PREFIX + getConfig_DesktopShortcutFile(rootDir, secondaryLauncher).getName(),
+                    I18N.getString("resource.menu-shortcut-descriptor"),
+                    DEFAULT_DESKTOP_FILE_TEMPLATE,
+                    secondaryLauncherData,
+                    VERBOSE.fetchFrom(params));
+            w.write(content);
+            w.close();
+
+            //prepare installer icon
+            iconTarget = getConfig_IconFile(rootDir, secondaryLauncher);
+            icon = ICON_PNG.fetchFrom(secondaryLauncher);
+            if (icon == null || !icon.exists()) {
+                fetchResource(LinuxAppBundler.LINUX_BUNDLER_PREFIX + iconTarget.getName(),
+                        I18N.getString("resource.menu-icon"),
+                        DEFAULT_ICON,
+                        iconTarget,
+                        VERBOSE.fetchFrom(params));
+            } else {
+                fetchResource(LinuxAppBundler.LINUX_BUNDLER_PREFIX + iconTarget.getName(),
+                        I18N.getString("resource.menu-icon"),
+                        icon,
+                        iconTarget,
+                        VERBOSE.fetchFrom(params));
+            }
+
+            //postinst copying of desktop icon
+            installScripts.append("        xdg-desktop-menu install --novendor /opt/");
+            installScripts.append(data.get("APPLICATION_FS_NAME"));
+            installScripts.append("/");
+            installScripts.append(secondaryLauncherData.get("APPLICATION_LAUNCHER_FILENAME"));
+            installScripts.append(".desktop\n");
+
+            //postrm cleanup of desktop icon
+            removeScripts.append("        xdg-desktop-menu uninstall --novendor /opt/");
+            removeScripts.append(data.get("APPLICATION_FS_NAME"));
+            removeScripts.append("/");
+            removeScripts.append(secondaryLauncherData.get("APPLICATION_LAUNCHER_FILENAME"));
+            removeScripts.append(".desktop\n");
+        }
+        data.put("SECONDARY_LAUNCHERS_INSTALL", installScripts.toString());
+        data.put("SECONDARY_LAUNCHERS_REMOVE", removeScripts.toString());
+
+        List<Map<String, ? super Object>> associations = FILE_ASSOCIATIONS.fetchFrom(params);
+        data.put("FILE_ASSOCIATION_INSTALL", "");
+        data.put("FILE_ASSOCIATION_REMOVE", "");
+        data.put("DESKTOP_MIMES", "");
+        if (associations != null) {
+            String mimeInfoFile = XDG_FILE_PREFIX.fetchFrom(params) + "-MimeInfo.xml";
+            StringBuilder mimeInfo = new StringBuilder("<?xml version=\"1.0\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n");
+            StringBuilder registrations = new StringBuilder();
+            StringBuilder deregistrations = new StringBuilder();
+            StringBuilder desktopMimes = new StringBuilder("MimeType=");
+            boolean addedEntry = false;
+
+            for (Map<String, ? super Object> assoc : associations) {
+                //  <mime-type type="application/x-vnd.awesome">
+                //    <comment>Awesome document</comment>
+                //    <glob pattern="*.awesome"/>
+                //    <glob pattern="*.awe"/>
+                //  </mime-type>
+
+                if (assoc == null) {
+                    continue;
+                }
+
+                String description = FA_DESCRIPTION.fetchFrom(assoc);
+                File faIcon = FA_ICON.fetchFrom(assoc); //TODO FA_ICON_PNG
+                List<String> extensions = FA_EXTENSIONS.fetchFrom(assoc);
+                List<String> mimes = FA_CONTENT_TYPE.fetchFrom(assoc);
+                if (mimes == null || mimes.isEmpty()) {
+                    continue;
+                }
+                String thisMime = mimes.get(0);
+                String dashMime = thisMime.replace('/', '-');
+
+                mimeInfo.append("  <mime-type type='")
+                        .append(thisMime)
+                        .append("'>\n");
+                if (description != null && !description.isEmpty()) {
+                    mimeInfo.append("    <comment>")
+                            .append(description)
+                            .append("</comment>\n");
+                }
+
+                if (extensions != null) {
+                    for (String ext : extensions) {
+                        mimeInfo.append("    <glob pattern='*.")
+                                .append(ext)
+                                .append("'/>");
+                    }
+                }
+
+                mimeInfo.append("  </mime-type>\n");
+                if (!addedEntry) {
+                    registrations.append("        xdg-mime install /opt/")
+                            .append(data.get("APPLICATION_FS_NAME"))
+                            .append("/")
+                            .append(mimeInfoFile)
+                            .append("\n");
+                    registrations.append("        xdg-mime install /opt/")
+                            .append(data.get("APPLICATION_FS_NAME"))
+                            .append("/")
+                            .append(mimeInfoFile)
+                            .append("\n");
+
+                    deregistrations.append("        xdg-mime uninstall /opt/")
+                            .append(data.get("APPLICATION_FS_NAME"))
+                            .append("/")
+                            .append(mimeInfoFile)
+                            .append("\n");
+                    addedEntry = true;
+                } else {
+                    desktopMimes.append(";");
+                }
+                desktopMimes.append(thisMime);
+
+                if (faIcon != null && faIcon.exists()) {
+                    int size = getSquareSizeOfImage(faIcon);
+
+                    if (size > 0) {
+                        File target = new File(rootDir, APP_FS_NAME.fetchFrom(params) + "_fa_" + faIcon.getName());
+                        IOUtils.copyFile(faIcon, target);
+
+                        //xdg-icon-resource install --context mimetypes --size 64 awesomeapp_fa_1.png application-x.vnd-awesome
+                        registrations.append("        xdg-icon-resource install --context mimetypes --size ")
+                                .append(size)
+                                .append(" /opt/")
+                                .append(data.get("APPLICATION_FS_NAME"))
+                                .append("/")
+                                .append(target.getName())
+                                .append(" ")
+                                .append(dashMime)
+                                .append("\n");
+
+                        //xdg-icon-resource uninstall --context mimetypes --size 64 awesomeapp_fa_1.png application-x.vnd-awesome
+                        deregistrations.append("        xdg-icon-resource uninstall --context mimetypes --size ")
+                                .append(size)
+                                .append(" /opt/")
+                                .append(data.get("APPLICATION_FS_NAME"))
+                                .append("/")
+                                .append(target.getName())
+                                .append(" ")
+                                .append(dashMime)
+                                .append("\n");
+                    }
+                }
+            }
+            mimeInfo.append("</mime-info>");
+
+            if (addedEntry) {
+                Writer w = new BufferedWriter(new FileWriter(new File(rootDir, mimeInfoFile)));
+                w.write(mimeInfo.toString());
+                w.close();
+                data.put("FILE_ASSOCIATION_INSTALL", registrations.toString());
+                data.put("FILE_ASSOCIATION_REMOVE", deregistrations.toString());
+                data.put("DESKTOP_MIMES", desktopMimes.toString());
+            }
+        }
+
+        //prepare desktop shortcut
+        Writer w = new BufferedWriter(new FileWriter(getConfig_DesktopShortcutFile(rootDir, params)));
+        String content = preprocessTextResource(
+                LinuxAppBundler.LINUX_BUNDLER_PREFIX + getConfig_DesktopShortcutFile(rootDir, params).getName(),
+                I18N.getString("resource.menu-shortcut-descriptor"),
+                DEFAULT_DESKTOP_FILE_TEMPLATE,
+                data,
+                VERBOSE.fetchFrom(params));
+        w.write(content);
+        w.close();
 
         //prepare control file
-        Writer w = new BufferedWriter(new FileWriter(getConfig_ControlFile(params)));
-        String content = preprocessTextResource(
+        w = new BufferedWriter(new FileWriter(getConfig_ControlFile(params)));
+        content = preprocessTextResource(
                 LinuxAppBundler.LINUX_BUNDLER_PREFIX + getConfig_ControlFile(params).getName(),
                 I18N.getString("resource.deb-control-file"),
                 DEFAULT_CONTROL_TEMPLATE,
@@ -479,34 +709,6 @@
         w.write(content);
         w.close();
 
-        //prepare desktop shortcut
-        w = new BufferedWriter(new FileWriter(getConfig_DesktopShortcutFile(params)));
-        content = preprocessTextResource(
-                LinuxAppBundler.LINUX_BUNDLER_PREFIX + getConfig_DesktopShortcutFile(params).getName(),
-                I18N.getString("resource.menu-shortcut-descriptor"),
-                DEFAULT_DESKTOP_FILE_TEMPLATE,
-                data,
-                VERBOSE.fetchFrom(params));
-        w.write(content);
-        w.close();
-
-        //prepare installer icon
-        File iconTarget = getConfig_IconFile(params);
-        File icon = ICON_PNG.fetchFrom(params);
-        if (icon == null || !icon.exists()) {
-            fetchResource(LinuxAppBundler.LINUX_BUNDLER_PREFIX + iconTarget.getName(),
-                    I18N.getString("resource.menu-icon"),
-                    DEFAULT_ICON,
-                    iconTarget,
-                    VERBOSE.fetchFrom(params));
-        } else {
-            fetchResource(LinuxAppBundler.LINUX_BUNDLER_PREFIX + iconTarget.getName(),
-                    I18N.getString("resource.menu-icon"),
-                    icon,
-                    iconTarget,
-                    VERBOSE.fetchFrom(params));
-        }
-
         if (SERVICE_HINT.fetchFrom(params)) {
             //prepare init script
             w = new BufferedWriter(new FileWriter(getConfig_InitScriptFile(params)));
@@ -524,13 +726,39 @@
         return true;
     }
 
-    private File getConfig_DesktopShortcutFile(Map<String, ? super Object> params) {
-        return new File(LinuxAppBundler.getRootDir(APP_IMAGE_ROOT.fetchFrom(params), params),
+    private Map<String, String> createReplacementData(Map<String, ? super Object> params) {
+        Map<String, String> data = new HashMap<>();
+
+        data.put("APPLICATION_NAME", APP_NAME.fetchFrom(params));
+        data.put("APPLICATION_FS_NAME", APP_FS_NAME.fetchFrom(params));
+        data.put("APPLICATION_PACKAGE", BUNDLE_NAME.fetchFrom(params));
+        data.put("APPLICATION_VENDOR", VENDOR.fetchFrom(params));
+        data.put("APPLICATION_MAINTAINER", MAINTAINER.fetchFrom(params));
+        data.put("APPLICATION_VERSION", VERSION.fetchFrom(params));
+        data.put("APPLICATION_LAUNCHER_FILENAME", APP_FS_NAME.fetchFrom(params));
+        data.put("XDG_PREFIX", XDG_FILE_PREFIX.fetchFrom(params));
+        data.put("DEPLOY_BUNDLE_CATEGORY", CATEGORY.fetchFrom(params));
+        data.put("APPLICATION_DESCRIPTION", DESCRIPTION.fetchFrom(params));
+        data.put("APPLICATION_SUMMARY", TITLE.fetchFrom(params));
+        data.put("APPLICATION_COPYRIGHT", COPYRIGHT.fetchFrom(params));
+        data.put("APPLICATION_LICENSE_TYPE", LICENSE_TYPE.fetchFrom(params));
+        data.put("APPLICATION_LICENSE_TEXT", LICENSE_TEXT.fetchFrom(params));
+        data.put("APPLICATION_ARCH", getArch());
+        data.put("APPLICATION_INSTALLED_SIZE", Long.toString(getInstalledSizeKB(params)));
+        data.put("SERVICE_HINT", String.valueOf(SERVICE_HINT.fetchFrom(params)));
+        data.put("START_ON_INSTALL", String.valueOf(START_ON_INSTALL.fetchFrom(params)));
+        data.put("STOP_ON_UNINSTALL", String.valueOf(STOP_ON_UNINSTALL.fetchFrom(params)));
+        data.put("RUN_AT_STARTUP", String.valueOf(RUN_AT_STARTUP.fetchFrom(params)));
+        return data;
+    }
+
+    private File getConfig_DesktopShortcutFile(File rootDir, Map<String, ? super Object> params) {
+        return new File(rootDir,
                 APP_FS_NAME.fetchFrom(params) + ".desktop");
     }
 
-    private File getConfig_IconFile(Map<String, ? super Object> params) {
-        return new File(LinuxAppBundler.getRootDir(APP_IMAGE_ROOT.fetchFrom(params), params),
+    private File getConfig_IconFile(File rootDir, Map<String, ? super Object> params) {
+        return new File(rootDir,
                 APP_FS_NAME.fetchFrom(params) + ".png");
     }
 
@@ -629,4 +857,17 @@
         return bundle(params, outputParentDir);
     }
 
+    public int getSquareSizeOfImage(File f) {
+        try {
+            BufferedImage bi = ImageIO.read(f);
+            if (bi.getWidth() == bi.getHeight()) {
+                return bi.getWidth();
+            } else {
+                return 0;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return 0;
+        }
+    }
 }
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxRpmBundler.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxRpmBundler.java	Fri Sep 12 17:15:09 2014 -0700
@@ -28,6 +28,8 @@
 import com.oracle.tools.packager.*;
 import com.oracle.tools.packager.IOUtils;
 
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
 import java.io.*;
 import java.nio.file.Files;
 import java.nio.file.attribute.PosixFilePermission;
@@ -95,6 +97,31 @@
             },
             (s, p) -> s);
 
+    public static final BundlerParamInfo<String> XDG_FILE_PREFIX = new StandardBundlerParam<> (
+            I18N.getString("param.xdg-prefix.name"),
+            I18N.getString("param.xdg-prefix.description"),
+            "linux.xdg-prefix",
+            String.class,
+            params -> {
+                try {
+                    String vendor;
+                    if (params.containsKey(VENDOR.getID())) {
+                        vendor = VENDOR.fetchFrom(params);
+                    } else {
+                        vendor = "javapackager";
+                    }
+                    String appName = APP_FS_NAME.fetchFrom(params);
+
+                    return (vendor + "-" + appName).replaceAll("\\s", "");
+                } catch (Exception e) {
+                    if (Log.isDebug()) {
+                        e.printStackTrace();
+                    }
+                }
+                return "unknown-MimeInfo.xml";
+            },
+            (s, p) -> s);
+
     private final static String DEFAULT_ICON = "javalogo_white_32.png";
     private final static String DEFAULT_SPEC_TEMPLATE = "template.spec";
     private final static String DEFAULT_DESKTOP_FILE_TEMPLATE = "template.desktop";
@@ -118,7 +145,7 @@
 
             //TODO: Version is ignored; need to extract version string and compare!
             String content = new String(baos.toByteArray());
-            Pattern pattern = Pattern.compile("RPM version (\\d+\\.\\d+)");
+            Pattern pattern = Pattern.compile(" (\\d+\\.\\d+)");
             Matcher matcher = pattern.matcher(content);
             if (matcher.find()) {
                 String v = matcher.group(1);
@@ -164,6 +191,24 @@
                         I18N.getString(MessageFormat.format("error.cannot-find-rpmbuild.advice", TOOL_RPMBUILD_MIN_VERSION)));
             }
 
+            // only one mime type per association, at least one file extension
+            List<Map<String, ? super Object>> associations = FILE_ASSOCIATIONS.fetchFrom(p);
+            if (associations != null) {
+                for (int i = 0; i < associations.size(); i++) {
+                    Map<String, ? super Object> assoc = associations.get(i);
+                    List<String> mimes = FA_CONTENT_TYPE.fetchFrom(assoc);
+                    if (mimes == null || mimes.isEmpty()) {
+                        throw new ConfigException(
+                                MessageFormat.format(I18N.getString("error.no-content-types-for-file-association"), i),
+                                I18N.getString("error.no-content-types-for-file-association.advice"));
+                    } else if (mimes.size() > 1) {
+                        throw new ConfigException(
+                                MessageFormat.format(I18N.getString("error.too-many-content-types-for-file-association"), i),
+                                I18N.getString("error.too-many-content-types-for-file-association.advice"));
+                    }
+                }
+            }
+
             return true;
         } catch (RuntimeException re) {
             if (re.getCause() instanceof ConfigException) {
@@ -244,17 +289,19 @@
     protected void saveConfigFiles(Map<String, ? super Object> params) {
         try {
             File configRoot = CONFIG_ROOT.fetchFrom(params);
+            File rootDir = LinuxAppBundler.getRootDir(RPM_IMAGE_DIR.fetchFrom(params), params);
+
             if (getConfig_SpecFile(params).exists()) {
                 IOUtils.copyFile(getConfig_SpecFile(params),
                         new File(configRoot, getConfig_SpecFile(params).getName()));
             }
-            if (getConfig_DesktopShortcutFile(params).exists()) {
-                IOUtils.copyFile(getConfig_DesktopShortcutFile(params),
-                        new File(configRoot, getConfig_DesktopShortcutFile(params).getName()));
+            if (getConfig_DesktopShortcutFile(rootDir, params).exists()) {
+                IOUtils.copyFile(getConfig_DesktopShortcutFile(rootDir, params),
+                        new File(configRoot, getConfig_DesktopShortcutFile(rootDir, params).getName()));
             }
-            if (getConfig_IconFile(params).exists()) {
-                IOUtils.copyFile(getConfig_IconFile(params),
-                        new File(configRoot, getConfig_IconFile(params).getName()));
+            if (getConfig_IconFile(rootDir, params).exists()) {
+                IOUtils.copyFile(getConfig_IconFile(rootDir, params),
+                        new File(configRoot, getConfig_IconFile(rootDir, params).getName()));
             }
             if (SERVICE_HINT.fetchFrom(params)) {
                 if (getConfig_InitScriptFile(params).exists()) {
@@ -283,44 +330,11 @@
     }
 
     private boolean prepareProjectConfig(Map<String, ? super Object> params) throws IOException {
-        Map<String, String> data = new HashMap<>();
-
-        data.put("APPLICATION_NAME", APP_NAME.fetchFrom(params));
-        data.put("APPLICATION_FS_NAME", APP_FS_NAME.fetchFrom(params));
-        data.put("APPLICATION_PACKAGE", BUNDLE_NAME.fetchFrom(params));
-        data.put("APPLICATION_VENDOR", VENDOR.fetchFrom(params));
-        data.put("APPLICATION_VERSION", VERSION.fetchFrom(params));
-        data.put("APPLICATION_LAUNCHER_FILENAME", APP_FS_NAME.fetchFrom(params));
-        data.put("DEPLOY_BUNDLE_CATEGORY", CATEGORY.fetchFrom(params)); //TODO rpm categories
-        data.put("APPLICATION_DESCRIPTION", DESCRIPTION.fetchFrom(params));
-        data.put("APPLICATION_SUMMARY", TITLE.fetchFrom(params));
-        data.put("APPLICATION_LICENSE_TYPE", LICENSE_TYPE.fetchFrom(params));
-        data.put("APPLICATION_LICENSE_FILE", getLicenseFileString(params));
-        data.put("SERVICE_HINT", String.valueOf(SERVICE_HINT.fetchFrom(params)));
-        data.put("START_ON_INSTALL", String.valueOf(START_ON_INSTALL.fetchFrom(params)));
-        data.put("STOP_ON_UNINSTALL", String.valueOf(STOP_ON_UNINSTALL.fetchFrom(params)));
-        data.put("RUN_AT_STARTUP", String.valueOf(RUN_AT_STARTUP.fetchFrom(params)));
-
-        //prepare spec file
-        Writer w = new BufferedWriter(new FileWriter(getConfig_SpecFile(params)));
-        String content = preprocessTextResource(
-                LinuxAppBundler.LINUX_BUNDLER_PREFIX + getConfig_SpecFile(params).getName(),
-                I18N.getString("resource.rpm-spec-file"), DEFAULT_SPEC_TEMPLATE, data,
-                VERBOSE.fetchFrom(params));
-        w.write(content);
-        w.close();
-
-        //prepare desktop shortcut
-        w = new BufferedWriter(new FileWriter(getConfig_DesktopShortcutFile(params)));
-        content = preprocessTextResource(
-                LinuxAppBundler.LINUX_BUNDLER_PREFIX + getConfig_DesktopShortcutFile(params).getName(),
-                I18N.getString("resource.menu-shortcut-descriptor"), DEFAULT_DESKTOP_FILE_TEMPLATE, data,
-                VERBOSE.fetchFrom(params));
-        w.write(content);
-        w.close();
+        Map<String, String> data = createReplacementData(params);
+        File rootDir = LinuxAppBundler.getRootDir(RPM_IMAGE_DIR.fetchFrom(params), params);
 
         //prepare installer icon
-        File iconTarget = getConfig_IconFile(params);
+        File iconTarget = getConfig_IconFile(rootDir, params);
         File icon = LinuxAppBundler.ICON_PNG.fetchFrom(params);
         if (icon == null || !icon.exists()) {
             fetchResource(LinuxAppBundler.LINUX_BUNDLER_PREFIX + iconTarget.getName(),
@@ -336,6 +350,191 @@
                     VERBOSE.fetchFrom(params));
         }
 
+        StringBuilder installScripts = new StringBuilder();
+        StringBuilder removeScripts = new StringBuilder();
+        for (Map<String, ? super Object> secondaryLauncher : SECONDARY_LAUNCHERS.fetchFrom(params)) {
+            Map<String, String> secondaryLauncherData = createReplacementData(secondaryLauncher);
+            secondaryLauncherData.put("APPLICATION_FS_NAME", data.get("APPLICATION_FS_NAME"));
+            secondaryLauncherData.put("DESKTOP_MIMES", "");
+
+            //prepare desktop shortcut
+            Writer w = new BufferedWriter(new FileWriter(getConfig_DesktopShortcutFile(rootDir, secondaryLauncher)));
+            String content = preprocessTextResource(
+                    LinuxAppBundler.LINUX_BUNDLER_PREFIX + getConfig_DesktopShortcutFile(rootDir, secondaryLauncher).getName(),
+                    I18N.getString("resource.menu-shortcut-descriptor"), DEFAULT_DESKTOP_FILE_TEMPLATE, secondaryLauncherData,
+                    VERBOSE.fetchFrom(params));
+            w.write(content);
+            w.close();
+
+            //prepare installer icon
+            iconTarget = getConfig_IconFile(rootDir, secondaryLauncher);
+            icon = LinuxAppBundler.ICON_PNG.fetchFrom(secondaryLauncher);
+            if (icon == null || !icon.exists()) {
+                fetchResource(LinuxAppBundler.LINUX_BUNDLER_PREFIX + iconTarget.getName(),
+                        I18N.getString("resource.menu-icon"),
+                        DEFAULT_ICON,
+                        iconTarget,
+                        VERBOSE.fetchFrom(params));
+            } else {
+                fetchResource(LinuxAppBundler.LINUX_BUNDLER_PREFIX + iconTarget.getName(),
+                        I18N.getString("resource.menu-icon"),
+                        icon,
+                        iconTarget,
+                        VERBOSE.fetchFrom(params));
+            }
+
+            //post copying of desktop icon
+            installScripts.append("xdg-desktop-menu install --novendor /opt/");
+            installScripts.append(data.get("APPLICATION_FS_NAME"));
+            installScripts.append("/");
+            installScripts.append(secondaryLauncherData.get("APPLICATION_LAUNCHER_FILENAME"));
+            installScripts.append(".desktop\n");
+
+            //preun cleanup of desktop icon
+            removeScripts.append("xdg-desktop-menu uninstall --novendor /opt/");
+            removeScripts.append(data.get("APPLICATION_FS_NAME"));
+            removeScripts.append("/");
+            removeScripts.append(secondaryLauncherData.get("APPLICATION_LAUNCHER_FILENAME"));
+            removeScripts.append(".desktop\n");
+
+        }
+        data.put("SECONDARY_LAUNCHERS_INSTALL", installScripts.toString());
+        data.put("SECONDARY_LAUNCHERS_REMOVE", removeScripts.toString());
+
+        List<Map<String, ? super Object>> associations = FILE_ASSOCIATIONS.fetchFrom(params);
+        data.put("FILE_ASSOCIATION_INSTALL", "");
+        data.put("FILE_ASSOCIATION_REMOVE", "");
+        data.put("DESKTOP_MIMES", "");
+        if (associations != null) {
+            String mimeInfoFile = XDG_FILE_PREFIX.fetchFrom(params) + "-MimeInfo.xml";
+            StringBuilder mimeInfo = new StringBuilder("<?xml version=\"1.0\"?>\n<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>\n");
+            StringBuilder registrations = new StringBuilder();
+            StringBuilder deregistrations = new StringBuilder();
+            StringBuilder desktopMimes = new StringBuilder("MimeType=");
+            boolean addedEntry = false;
+
+            for (Map<String, ? super Object> assoc : associations) {
+                //  <mime-type type="application/x-vnd.awesome">
+                //    <comment>Awesome document</comment>
+                //    <glob pattern="*.awesome"/>
+                //    <glob pattern="*.awe"/>
+                //  </mime-type>
+
+                if (assoc == null) {
+                    continue;
+                }
+
+                String description = FA_DESCRIPTION.fetchFrom(assoc);
+                File faIcon = FA_ICON.fetchFrom(assoc); //TODO FA_ICON_PNG
+                List<String> extensions = FA_EXTENSIONS.fetchFrom(assoc);
+                List<String> mimes = FA_CONTENT_TYPE.fetchFrom(assoc);
+                if (mimes == null || mimes.isEmpty()) {
+                    continue;
+                }
+                String thisMime = mimes.get(0);
+                String dashMime = thisMime.replace('/', '-');
+
+                mimeInfo.append("  <mime-type type='")
+                        .append(thisMime)
+                        .append("'>\n");
+                if (description != null && !description.isEmpty()) {
+                    mimeInfo.append("    <comment>")
+                            .append(description)
+                            .append("</comment>\n");
+                }
+
+                if (extensions != null) {
+                    for (String ext : extensions) {
+                        mimeInfo.append("    <glob pattern='*.")
+                                .append(ext)
+                                .append("'/>");
+                    }
+                }
+
+                mimeInfo.append("  </mime-type>\n");
+                if (!addedEntry) {
+                    registrations.append("xdg-mime install /opt/")
+                            .append(data.get("APPLICATION_FS_NAME"))
+                            .append("/")
+                            .append(mimeInfoFile)
+                            .append("\n");
+                    registrations.append("xdg-mime install /opt/")
+                            .append(data.get("APPLICATION_FS_NAME"))
+                            .append("/")
+                            .append(mimeInfoFile)
+                            .append("\n");
+
+                    deregistrations.append("xdg-mime uninstall /opt/")
+                            .append(data.get("APPLICATION_FS_NAME"))
+                            .append("/")
+                            .append(mimeInfoFile)
+                            .append("\n");
+                    addedEntry = true;
+                } else {
+                    desktopMimes.append(";");
+                }
+                desktopMimes.append(thisMime);
+
+                if (faIcon != null && faIcon.exists()) {
+                    int size = getSquareSizeOfImage(faIcon);
+
+                    if (size > 0) {
+                        File target = new File(rootDir, APP_FS_NAME.fetchFrom(params) + "_fa_" + faIcon.getName());
+                        IOUtils.copyFile(faIcon, target);
+
+                        //xdg-icon-resource install --context mimetypes --size 64 awesomeapp_fa_1.png application-x.vnd-awesome
+                        registrations.append("        xdg-icon-resource install --context mimetypes --size ")
+                                .append(size)
+                                .append(" /opt/")
+                                .append(data.get("APPLICATION_FS_NAME"))
+                                .append("/")
+                                .append(target.getName())
+                                .append(" ")
+                                .append(dashMime)
+                                .append("\n");
+
+                        //xdg-icon-resource uninstall --context mimetypes --size 64 awesomeapp_fa_1.png application-x.vnd-awesome
+                        deregistrations.append("        xdg-icon-resource uninstall --context mimetypes --size ")
+                                .append(size)
+                                .append(" /opt/")
+                                .append(data.get("APPLICATION_FS_NAME"))
+                                .append("/")
+                                .append(target.getName())
+                                .append(" ")
+                                .append(dashMime)
+                                .append("\n");
+                    }
+                }
+            }
+            mimeInfo.append("</mime-info>");
+
+            if (addedEntry) {
+                Writer w = new BufferedWriter(new FileWriter(new File(rootDir, mimeInfoFile)));
+                w.write(mimeInfo.toString());
+                w.close();
+                data.put("FILE_ASSOCIATION_INSTALL", registrations.toString());
+                data.put("FILE_ASSOCIATION_REMOVE", deregistrations.toString());
+                data.put("DESKTOP_MIMES", desktopMimes.toString());
+            }
+        }
+        //prepare desktop shortcut
+        Writer w = new BufferedWriter(new FileWriter(getConfig_DesktopShortcutFile(rootDir, params)));
+        String content = preprocessTextResource(
+                LinuxAppBundler.LINUX_BUNDLER_PREFIX + getConfig_DesktopShortcutFile(rootDir, params).getName(),
+                I18N.getString("resource.menu-shortcut-descriptor"), DEFAULT_DESKTOP_FILE_TEMPLATE, data,
+                VERBOSE.fetchFrom(params));
+        w.write(content);
+        w.close();
+
+        //prepare spec file
+        w = new BufferedWriter(new FileWriter(getConfig_SpecFile(params)));
+        content = preprocessTextResource(
+                LinuxAppBundler.LINUX_BUNDLER_PREFIX + getConfig_SpecFile(params).getName(),
+                I18N.getString("resource.rpm-spec-file"), DEFAULT_SPEC_TEMPLATE, data,
+                VERBOSE.fetchFrom(params));
+        w.write(content);
+        w.close();
+
         if (SERVICE_HINT.fetchFrom(params)) {
             //prepare init script
             w = new BufferedWriter(new FileWriter(getConfig_InitScriptFile(params)));
@@ -353,13 +552,35 @@
         return true;
     }
 
-    private File getConfig_DesktopShortcutFile(Map<String, ? super Object> params) {
-        return new File(LinuxAppBundler.getRootDir(RPM_IMAGE_DIR.fetchFrom(params), params),
+    private Map<String, String> createReplacementData(Map<String, ? super Object> params) {
+        Map<String, String> data = new HashMap<>();
+
+        data.put("APPLICATION_NAME", APP_NAME.fetchFrom(params));
+        data.put("APPLICATION_FS_NAME", APP_FS_NAME.fetchFrom(params));
+        data.put("APPLICATION_PACKAGE", BUNDLE_NAME.fetchFrom(params));
+        data.put("APPLICATION_VENDOR", VENDOR.fetchFrom(params));
+        data.put("APPLICATION_VERSION", VERSION.fetchFrom(params));
+        data.put("APPLICATION_LAUNCHER_FILENAME", APP_FS_NAME.fetchFrom(params));
+        data.put("XDG_PREFIX", XDG_FILE_PREFIX.fetchFrom(params));
+        data.put("DEPLOY_BUNDLE_CATEGORY", CATEGORY.fetchFrom(params)); //TODO rpm categories
+        data.put("APPLICATION_DESCRIPTION", DESCRIPTION.fetchFrom(params));
+        data.put("APPLICATION_SUMMARY", TITLE.fetchFrom(params));
+        data.put("APPLICATION_LICENSE_TYPE", LICENSE_TYPE.fetchFrom(params));
+        data.put("APPLICATION_LICENSE_FILE", getLicenseFileString(params));
+        data.put("SERVICE_HINT", String.valueOf(SERVICE_HINT.fetchFrom(params)));
+        data.put("START_ON_INSTALL", String.valueOf(START_ON_INSTALL.fetchFrom(params)));
+        data.put("STOP_ON_UNINSTALL", String.valueOf(STOP_ON_UNINSTALL.fetchFrom(params)));
+        data.put("RUN_AT_STARTUP", String.valueOf(RUN_AT_STARTUP.fetchFrom(params)));
+        return data;
+    }
+
+    private File getConfig_DesktopShortcutFile(File rootDir, Map<String, ? super Object> params) {
+        return new File(rootDir,
                 APP_FS_NAME.fetchFrom(params) + ".desktop");
     }
 
-    private File getConfig_IconFile(Map<String, ? super Object> params) {
-        return new File(LinuxAppBundler.getRootDir(RPM_IMAGE_DIR.fetchFrom(params), params),
+    private File getConfig_IconFile(File rootDir, Map<String, ? super Object> params) {
+        return new File(rootDir,
                 APP_FS_NAME.fetchFrom(params) + ".png");
     }
 
@@ -460,4 +681,19 @@
     public File execute(Map<String, ? super Object> params, File outputParentDir) {
         return bundle(params, outputParentDir);
     }
+
+
+    public int getSquareSizeOfImage(File f) {
+        try {
+            BufferedImage bi = ImageIO.read(f);
+            if (bi.getWidth() == bi.getHeight()) {
+                return bi.getWidth();
+            } else {
+                return 0;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return 0;
+        }
+    }
 }
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/mac/MacAppBundler.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/mac/MacAppBundler.java	Fri Sep 12 17:15:09 2014 -0700
@@ -57,6 +57,7 @@
             BUNDLER_PREFIX + "macosx" + File.separator;
 
     private static final String EXECUTABLE_NAME      = "JavaAppLauncher";
+    private final static String LIBRARY_NAME         = "libpackager.dylib";
     private static final String TEMPLATE_BUNDLE_ICON = "GenericApp.icns";
     private static final String OS_TYPE_CODE         = "APPL";
     private static final String TEMPLATE_INFO_PLIST  = "Info.plist.template";
@@ -366,7 +367,6 @@
 
         }
 
-
         return true;
     }
 
@@ -443,6 +443,11 @@
                     RAW_EXECUTABLE_URL.fetchFrom(p),
                     executableFile);
 
+            // Copy library to the MacOS folder
+            IOUtils.copyFromURL(
+                    MacResources.class.getResource(LIBRARY_NAME),
+                    new File(macOSDirectory, LIBRARY_NAME));
+
             executableFile.setExecutable(true, false);
 
             // Copy runtime to PlugIns folder
@@ -459,6 +464,17 @@
             // Copy icon to Resources folder
             IOUtils.copyFile(getConfig_Icon(p),
                     new File(resourcesDirectory, getConfig_Icon(p).getName()));
+
+            // copy file association icons
+            for (Map<String, ? super Object> fa : FILE_ASSOCIATIONS.fetchFrom(p)) {
+                File f = FA_ICON.fetchFrom(fa);
+                if (f != null && f.exists()) {
+                    IOUtils.copyFile(f,
+                            new File(resourcesDirectory, f.getName()));
+                }
+            }
+
+
             // Generate Info.plist
             IOUtils.copyFile(getConfig_InfoPlist(p),
                     new File(contentsDirectory, "Info.plist"));
@@ -623,13 +639,22 @@
 
         data.put("DEPLOY_JVM_OPTIONS", sb.toString());
 
+        sb = new StringBuilder();
+        List<String> args = ARGUMENTS.fetchFrom(params);
+        newline = ""; //So we don't add unneccessary extra line after last append
+        for (String o : args) {
+            sb.append(newline).append("    <string>").append(o).append("</string>");
+            newline = "\n";
+        }
+        data.put("DEPLOY_ARGUMENTS", sb.toString());
+
         newline = "";
         sb = new StringBuilder();
         Map<String, String> overridableJVMOptions = USER_JVM_OPTIONS.fetchFrom(params);
         for (Map.Entry<String, String> arg: overridableJVMOptions.entrySet()) {
-            sb.append(newline);
-            sb.append("      <key>").append(arg.getKey()).append("</key>\n");
-            sb.append("      <string>").append(arg.getValue()).append("</string>");
+            sb.append(newline)
+                .append("      <key>").append(arg.getKey()).append("</key>\n")
+                .append("      <string>").append(arg.getValue()).append("</string>");
             newline = "\n";
         }
         data.put("DEPLOY_JVM_USER_OPTIONS", sb.toString());
@@ -641,10 +666,132 @@
 //        } else {
         data.put("DEPLOY_LAUNCHER_CLASS", MAIN_CLASS.fetchFrom(params));
 //        }
-        data.put("DEPLOY_APP_CLASSPATH", CLASSPATH.fetchFrom(params));
+
+        StringBuilder macroedPath = new StringBuilder();
+        for (String s : CLASSPATH.fetchFrom(params).split("[ ;:]+")) {
+            macroedPath.append("$PACKAGEDIR/");
+            macroedPath.append(s);
+            macroedPath.append(":");
+        }
+        macroedPath.deleteCharAt(macroedPath.length() - 1);
+
+        data.put("DEPLOY_APP_CLASSPATH", macroedPath.toString());
 
         //TODO: Add remainder of the classpath
 
+        StringBuilder bundleDocumentTypes = new StringBuilder();
+        StringBuilder exportedTypes = new StringBuilder();
+        for (Map<String, ? super Object> fileAssociation : FILE_ASSOCIATIONS.fetchFrom(params)) {
+
+            List<String> extensions = FA_EXTENSIONS.fetchFrom(fileAssociation);
+            List<String> mimeTypes = FA_CONTENT_TYPE.fetchFrom(fileAssociation);
+            String itemContentType = MAC_CF_BUNDLE_IDENTIFIER.fetchFrom(params) + "." + ((extensions == null || extensions.isEmpty())
+                    ? "mime"
+                    : extensions.get(0));
+            String description = FA_DESCRIPTION.fetchFrom(fileAssociation);
+            File icon = FA_ICON.fetchFrom(fileAssociation); //TODO FA_ICON_ICNS
+
+            bundleDocumentTypes.append("    <dict>\n")
+                .append("      <key>LSItemContentTypes</key>\n")
+                .append("      <array>\n")
+                .append("        <string>")
+                .append(itemContentType)
+                .append("</string>\n")
+                .append("      </array>\n")
+                .append("\n")
+                .append("      <key>CFBundleTypeName</key>\n")
+                .append("      <string>")
+                .append(description)
+                .append("</string>\n")
+                .append("\n")
+                .append("      <key>LSHandlerRank</key>\n")
+                .append("      <string>Owner</string>\n") //TODO make a bundler arg
+                .append("\n")
+                .append("      <key>CFBundleTypeRole</key>\n")
+                .append("      <string>Editor</string>\n") // TODO make a bundler arg
+                .append("\n")
+                .append("      <key>LSIsAppleDefaultForType</key>\n")
+                .append("      <true/>\n") // TODO make a bundler arg
+                .append("\n");
+
+            if (icon != null && icon.exists()) {
+                //?
+                bundleDocumentTypes.append("      <key>CFBundleTypeIconFile</key>\n")
+                        .append("      <string>")
+                        .append(icon.getName())
+                        .append("</string>\n");
+            }
+            bundleDocumentTypes.append("    </dict>\n");
+
+            exportedTypes.append("    <dict>\n")
+                .append("      <key>UTTypeIdentifier</key>\n")
+                .append("      <string>")
+                .append(itemContentType)
+                .append("</string>\n")
+                .append("\n")
+                .append("      <key>UTTypeDescription</key>\n")
+                .append("      <string>")
+                .append(description)
+                .append("</string>\n")
+                .append("      <key>UTTypeConformsTo</key>\n")
+                .append("      <array>\n")
+                .append("          <string>public.data</string>\n") //TODO expose this?
+                .append("      </array>\n")
+                .append("\n");
+            
+            if (icon != null && icon.exists()) {
+                exportedTypes.append("      <key>UTTypeIconFile</key>\n")
+                    .append("      <string>")
+                    .append(icon.getName())
+                    .append("</string>\n")
+                    .append("\n");
+            }
+
+            exportedTypes.append("\n")
+                .append("      <key>UTTypeTagSpecification</key>\n")
+                .append("      <dict>\n")
+            //TODO expose via param? .append("        <key>com.apple.ostype</key>\n");
+            //TODO expose via param? .append("        <string>ABCD</string>\n")
+                .append("\n");
+
+            if (extensions != null && !extensions.isEmpty()) {
+                exportedTypes.append("        <key>public.filename-extension</key>\n")
+                    .append("        <array>\n");
+
+                for (String ext : extensions) {
+                    exportedTypes.append("          <string>")
+                        .append(ext)
+                        .append("</string>\n");
+                }
+                exportedTypes.append("        </array>\n");
+            }
+            if (mimeTypes != null && !mimeTypes.isEmpty()) {
+                exportedTypes.append("        <key>public.mime-type</key>\n")
+                    .append("        <array>\n");
+
+                for (String mime : mimeTypes) {
+                    exportedTypes.append("          <string>")
+                        .append(mime)
+                        .append("</string>\n");
+                }
+                exportedTypes.append("        </array>\n");
+            }
+            exportedTypes.append("      </dict>\n")
+                    .append("    </dict>\n");
+        }
+        String associationData;
+        if (bundleDocumentTypes.length() > 0) {
+            associationData = "\n  <key>CFBundleDocumentTypes</key>\n  <array>\n"
+                    + bundleDocumentTypes.toString()
+                    + "  </array>\n\n  <key>UTExportedTypeDeclarations</key>\n  <array>\n"
+                    + exportedTypes.toString()
+                    + "  </array>\n";
+        } else {
+            associationData = "";
+        }
+        data.put("DEPLOY_FILE_ASSOCIATIONS", associationData);
+
+
         Writer w = new BufferedWriter(new FileWriter(file));
         w.write(preprocessTextResource(
                 MAC_BUNDLER_PREFIX + getConfig_InfoPlist(params).getName(),
@@ -836,6 +983,7 @@
         return Arrays.asList(
                 APP_NAME,
                 APP_RESOURCES,
+                ARGUMENTS,
                 BUNDLE_ID_SIGNING_PREFIX,
                 DEVELOPER_ID_APP_SIGNING_KEY,
                 ICON_ICNS,
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java	Fri Sep 12 17:15:09 2014 -0700
@@ -66,6 +66,9 @@
             (s, p) -> null);
 
     private final static String EXECUTABLE_NAME = "WinLauncher.exe";
+    private final static String LIBRARY_NAME = "packager.dll";
+    private final static String REDIST_MSVCR = "msvcr100.dll";
+    private final static String REDIST_MSVCP = "msvcp100.dll";
 
     private static final String TOOL_ICON_SWAP="IconSwap.exe";
 
@@ -191,8 +194,12 @@
         return new File(outDir, APP_NAME.fetchFrom(p));
     }
 
-    public static File getLauncher(File outDir, Map<String, ? super Object> p) {
-        return new File(getRootDir(outDir, p), APP_NAME.fetchFrom(p) +".exe");
+    public static String getLauncherName(Map<String, ? super Object> p) {
+        return APP_NAME.fetchFrom(p) +".exe";
+    }
+
+    public static String getLauncherCfgName(Map<String, ? super Object> p) {
+        return "app\\" + APP_NAME.fetchFrom(p) +".cfg";
     }
 
     private File getConfig_AppIcon(Map<String, ? super Object> params) {
@@ -232,6 +239,7 @@
     }
 
     File doBundle(Map<String, ? super Object> p, File outputDirectory, boolean dependentTask) {
+        Map<String, ? super Object> originalParams = new HashMap<>(p);
         if (!outputDirectory.isDirectory() && !outputDirectory.mkdirs()) {
             throw new RuntimeException(MessageFormat.format(I18N.getString("error.cannot-create-output-dir"), outputDirectory.getAbsolutePath()));
         }
@@ -243,8 +251,6 @@
                 Log.info(MessageFormat.format(I18N.getString("message.creating-app-bundle"), APP_NAME.fetchFrom(p), outputDirectory.getAbsolutePath()));
             }
 
-            prepareConfigFiles(p);
-
             // Create directory structure
             File rootDirectory = getRootDir(outputDirectory, p);
             IOUtils.deleteRecursive(rootDirectory);
@@ -254,47 +260,32 @@
             appDirectory.mkdirs();
             copyApplication(p, appDirectory);
 
-            // Generate PkgInfo
-            File pkgInfoFile = new File(appDirectory, "package.cfg");
-            pkgInfoFile.createNewFile();
-            writePkgInfo(p, pkgInfoFile);
+            // create the .exe launchers
+            createLauncherForEntryPoint(p, rootDirectory);
 
-            // Copy executable root folder
-            File executableFile = getLauncher(outputDirectory, p);
+            // copy in the needed libraries
             IOUtils.copyFromURL(
-                    RAW_EXECUTABLE_URL.fetchFrom(p),
-                    executableFile);
-            executableFile.setExecutable(true, false);
+                    WinResources.class.getResource(LIBRARY_NAME),
+                    new File(rootDirectory, LIBRARY_NAME));
+            IOUtils.copyFromURL(
+                    WinResources.class.getResource(REDIST_MSVCR),
+                    new File(rootDirectory, REDIST_MSVCR));
+            IOUtils.copyFromURL(
+                    WinResources.class.getResource(REDIST_MSVCP),
+                    new File(rootDirectory, REDIST_MSVCP));
 
-            //Update branding of exe file
-            if (REBRAND_EXECUTABLE.fetchFrom(p) && getConfig_AppIcon(p).exists()) {
-                //extract helper tool
-                File iconSwapTool = File.createTempFile("iconswap", ".exe");
-                iconSwapTool.delete();
-                IOUtils.copyFromURL(
-                        WinResources.class.getResource(TOOL_ICON_SWAP),
-                        iconSwapTool);
-                iconSwapTool.setExecutable(true, false);
-                iconSwapTool.deleteOnExit();
-
-                //run it on launcher file
-                executableFile.setWritable(true);
-                ProcessBuilder pb = new ProcessBuilder(
-                        iconSwapTool.getAbsolutePath(),
-                        getConfig_AppIcon(p).getAbsolutePath(),
-                        executableFile.getAbsolutePath());
-                IOUtils.exec(pb, VERBOSE.fetchFrom(p));
-                executableFile.setReadOnly();
-                iconSwapTool.delete();
+            // create the secondary launchers, if any
+            List<Map<String, ? super Object>> entryPoints = StandardBundlerParam.SECONDARY_LAUNCHERS.fetchFrom(p);
+            for (Map<String, ? super Object> entryPoint : entryPoints) {
+                Map<String, ? super Object> tmp = new HashMap<>(originalParams);
+                tmp.putAll(entryPoint);
+                createLauncherForEntryPoint(tmp, rootDirectory);
             }
 
             // Copy runtime to PlugIns folder
             File runtimeDirectory = new File(rootDirectory, "runtime");
             copyRuntime(p, runtimeDirectory);
 
-            IOUtils.copyFile(getConfig_AppIcon(p),
-                    new File(getRootDir(outputDirectory, p), APP_NAME.fetchFrom(p) + ".ico"));
-
             if (!dependentTask) {
                 Log.info(MessageFormat.format(I18N.getString("message.result-dir"), outputDirectory.getAbsolutePath()));
             }
@@ -314,6 +305,44 @@
 
     }
 
+    private void createLauncherForEntryPoint(Map<String, ? super Object> p, File rootDirectory) throws IOException {
+        prepareConfigFiles(p);
+
+        writePkgInfo(p, rootDirectory);
+
+        // Copy executable root folder
+        File executableFile = new File(rootDirectory, getLauncherName(p));
+        IOUtils.copyFromURL(
+                RAW_EXECUTABLE_URL.fetchFrom(p),
+                executableFile);
+        executableFile.setExecutable(true, false);
+
+        //Update branding of exe file
+        if (REBRAND_EXECUTABLE.fetchFrom(p) && getConfig_AppIcon(p).exists()) {
+            //extract helper tool
+            File iconSwapTool = File.createTempFile("iconswap", ".exe");
+            iconSwapTool.delete();
+            IOUtils.copyFromURL(
+                    WinResources.class.getResource(TOOL_ICON_SWAP),
+                    iconSwapTool);
+            iconSwapTool.setExecutable(true, false);
+            iconSwapTool.deleteOnExit();
+
+            //run it on launcher file
+            executableFile.setWritable(true);
+            ProcessBuilder pb = new ProcessBuilder(
+                    iconSwapTool.getAbsolutePath(),
+                    getConfig_AppIcon(p).getAbsolutePath(),
+                    executableFile.getAbsolutePath());
+            IOUtils.exec(pb, VERBOSE.fetchFrom(p));
+            executableFile.setReadOnly();
+            iconSwapTool.delete();
+        }
+
+        IOUtils.copyFile(getConfig_AppIcon(p),
+                new File(rootDirectory, APP_NAME.fetchFrom(p) + ".ico"));
+    }
+
     private void copyApplication(Map<String, ? super Object> params, File appDirectory) throws IOException {
         RelativeFileSet appResource = APP_RESOURCES.fetchFrom(params);
         if (appResource == null) {
@@ -326,7 +355,9 @@
         }
     }
 
-    private void writePkgInfo(Map<String, ? super Object> params, File pkgInfoFile) throws FileNotFoundException {
+    private void writePkgInfo(Map<String, ? super Object> params, File rootDir) throws FileNotFoundException {
+        File pkgInfoFile = new File(rootDir, getLauncherCfgName(params));
+
         pkgInfoFile.delete();
 
         PrintStream out = new PrintStream(pkgInfoFile);
@@ -357,7 +388,6 @@
             idx++;
         }
 
-
         Map<String, String> overridableJVMOptions = USER_JVM_OPTIONS.fetchFrom(params);
         idx = 1;
         for (Map.Entry<String, String> arg: overridableJVMOptions.entrySet()) {
@@ -370,6 +400,15 @@
             }
             idx++;
         }
+
+        // add command line args
+        List<String> args = ARGUMENTS.fetchFrom(params);
+        idx = 1;
+        for (String a : args) {
+            out.println("arg."+idx+"="+a);
+            idx++;
+        }
+
         out.close();
     }
 
@@ -419,6 +458,7 @@
         return Arrays.asList(
                 APP_NAME,
                 APP_RESOURCES,
+                ARGUMENTS,
                 ICON_ICO,
                 JVM_OPTIONS,
                 JVM_PROPERTIES,
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinExeBundler.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinExeBundler.java	Fri Sep 12 17:15:09 2014 -0700
@@ -35,6 +35,7 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import static com.oracle.tools.packager.StandardBundlerParam.SECONDARY_LAUNCHERS;
 import static com.oracle.tools.packager.StandardBundlerParam.SERVICE_HINT;
 import static com.oracle.tools.packager.StandardBundlerParam.VERBOSE;
 import static com.oracle.tools.packager.windows.WindowsBundlerParam.*;
@@ -301,6 +302,13 @@
                 IOUtils.copyFile(lfile, new File(imageDir, lfile.getName()));
             }
         }
+
+        for (Map<String, ? super Object> fileAssociation : FILE_ASSOCIATIONS.fetchFrom(params)) {
+            File icon = FA_ICON.fetchFrom(fileAssociation); //TODO FA_ICON_ICO
+            if (icon != null && icon.exists()) {
+                IOUtils.copyFile(icon, new File(appOutputDir, icon.getName()));
+            }
+        }
         
         if (SERVICE_HINT.fetchFrom(params)) {
             // copies the service launcher to the app root folder
@@ -440,8 +448,7 @@
         validateValueAndPut(data, "APPLICATION_VERSION", VERSION, params); // TODO make our own version paraminfo?
         validateValueAndPut(data, "INSTALLER_FILE_NAME", INSTALLER_FILE_NAME, params);
 
-        data.put("APPLICATION_LAUNCHER_FILENAME",
-                innosetupEscape(WinAppBundler.getLauncher(EXE_IMAGE_DIR.fetchFrom(params), params).getName()));
+        data.put("APPLICATION_LAUNCHER_FILENAME", innosetupEscape(WinAppBundler.getLauncherName(params)));
 
         data.put("APPLICATION_DESKTOP_SHORTCUT", SHORTCUT_HINT.fetchFrom(params) ? "returnTrue" : "returnFalse");
         data.put("APPLICATION_MENU_SHORTCUT", MENU_HINT.fetchFrom(params) ? "returnTrue" : "returnFalse");
@@ -475,7 +482,97 @@
         data.put("APPLICATION_NOT_SERVICE", SERVICE_HINT.fetchFrom(params) ? "returnFalse" : "returnTrue");
         data.put("START_ON_INSTALL", START_ON_INSTALL.fetchFrom(params) ? "-startOnInstall" : "");
         data.put("STOP_ON_UNINSTALL", STOP_ON_UNINSTALL.fetchFrom(params) ? "-stopOnUninstall" : "");
-        data.put("RUN_AT_STARTUP", RUN_AT_STARTUP.fetchFrom(params) ? "-runAtStartup" : "");        
+        data.put("RUN_AT_STARTUP", RUN_AT_STARTUP.fetchFrom(params) ? "-runAtStartup" : "");
+
+        StringBuilder secondaryLaunchersCfg = new StringBuilder();
+        for (Map<String, ? super Object> launcher : SECONDARY_LAUNCHERS.fetchFrom(params)) {
+            String application_name = APP_NAME.fetchFrom(launcher);
+            if (MENU_HINT.fetchFrom(launcher)) {
+                //Name: "{group}\APPLICATION_NAME"; Filename: "{app}\APPLICATION_NAME.exe"; IconFilename: "{app}\APPLICATION_NAME.ico"
+                secondaryLaunchersCfg.append("Name: \"{group}\\");
+                secondaryLaunchersCfg.append(application_name);
+                secondaryLaunchersCfg.append("\"; Filename: \"{app}\\");
+                secondaryLaunchersCfg.append(application_name);
+                secondaryLaunchersCfg.append(".exe\"; IconFilename: \"{app}\\");
+                secondaryLaunchersCfg.append(application_name);
+                secondaryLaunchersCfg.append(".ico\"\r\n");
+            }
+            if (SHORTCUT_HINT.fetchFrom(launcher)) {
+                //Name: "{commondesktop}\APPLICATION_NAME"; Filename: "{app}\APPLICATION_NAME.exe";  IconFilename: "{app}\APPLICATION_NAME.ico"
+                secondaryLaunchersCfg.append("Name: \"{commondesktop}\\");
+                secondaryLaunchersCfg.append(application_name);
+                secondaryLaunchersCfg.append("\"; Filename: \"{app}\\");
+                secondaryLaunchersCfg.append(application_name);
+                secondaryLaunchersCfg.append(".exe\";  IconFilename: \"{app}\\");
+                secondaryLaunchersCfg.append(application_name);
+                secondaryLaunchersCfg.append(".ico\"\r\n");
+            }
+        }
+        data.put("SECONDARY_LAUNCHERS", secondaryLaunchersCfg.toString());
+
+        StringBuilder registryEntries = new StringBuilder();
+        String regName = APP_REGISTRY_NAME.fetchFrom(params);
+        List<Map<String, ? super Object>> fetchFrom = FILE_ASSOCIATIONS.fetchFrom(params);
+        for (int i = 0; i < fetchFrom.size(); i++) {
+            Map<String, ? super Object> fileAssociation = fetchFrom.get(i);
+            String description = FA_DESCRIPTION.fetchFrom(fileAssociation);
+            File icon = FA_ICON.fetchFrom(fileAssociation); //TODO FA_ICON_ICO
+
+            List<String> extensions = FA_EXTENSIONS.fetchFrom(fileAssociation);
+            String entryName = regName + "File";
+            if (i > 0) {
+                entryName += "." + i;
+            }
+            for (String ext : extensions) {
+                // "Root: HKCR; Subkey: \".myp\"; ValueType: string; ValueName: \"\"; ValueData: \"MyProgramFile\"; Flags: uninsdeletevalue"
+                registryEntries.append("Root: HKCR; Subkey: \".")
+                    .append(ext)
+                    .append("\"; ValueType: string; ValueName: \"\"; ValueData: \"")
+                    .append(entryName)
+                    .append("\"; Flags: uninsdeletevalue\r\n");
+            }
+
+            if (!extensions.isEmpty()) {
+                String ext = extensions.get(0);
+                List<String> mimeTypes = FA_CONTENT_TYPE.fetchFrom(fileAssociation);
+                for (String mime : mimeTypes) {
+                    // "Root: HKCR; Subkey: HKCR\\Mime\\Database\\Content Type\\application/chaos; ValueType: string; ValueName: Extension; ValueData: .chaos; Flags: uninsdeletevalue"
+                    registryEntries.append("Root: HKCR; Subkey: \"Mime\\Database\\Content Type\\")
+                        .append(mime)
+                        .append("\"; ValueType: string; ValueName: \"Extension\"; ValueData: \".")
+                        .append(ext)
+                        .append("\"; Flags: uninsdeletevalue\r\n");
+                }
+            }
+
+            //"Root: HKCR; Subkey: \"MyProgramFile\"; ValueType: string; ValueName: \"\"; ValueData: \"My Program File\"; Flags: uninsdeletekey"
+            registryEntries.append("Root: HKCR; Subkey: \"")
+                .append(entryName)
+                .append("\"; ValueType: string; ValueName: \"\"; ValueData: \"")
+                .append(description)
+                .append("\"; Flags: uninsdeletekey\r\n");
+
+            if (icon != null && icon.exists()) {
+                // "Root: HKCR; Subkey: \"MyProgramFile\\DefaultIcon\"; ValueType: string; ValueName: \"\"; ValueData: \"{app}\\MYPROG.EXE,0\"\n" +
+                registryEntries.append("Root: HKCR; Subkey: \"")
+                        .append(entryName)
+                        .append("\\DefaultIcon\"; ValueType: string; ValueName: \"\"; ValueData: \"{app}\\")
+                        .append(icon.getName())
+                        .append("\"\r\n");
+            }
+
+            //"Root: HKCR; Subkey: \"MyProgramFile\\shell\\open\\command\"; ValueType: string; ValueName: \"\"; ValueData: \"\"\"{app}\\MYPROG.EXE\"\" \"\"%1\"\"\"\n"
+            registryEntries.append("Root: HKCR; Subkey: \"")
+                    .append(entryName)
+                    .append("\\shell\\open\\command\"; ValueType: string; ValueName: \"\"; ValueData: \"\"\"{app}\\")
+                    .append(APP_NAME.fetchFrom(params))
+                    .append("\"\" \"\"%1\"\"\"\r\n");
+        }
+        if (registryEntries.length() > 0) {
+            data.put("FILE_ASSOCIATIONS", "ChangesAssociations=yes\r\n\r\n[Registry]\r\n" + registryEntries.toString());
+        } else {
+            data.put("FILE_ASSOCIATIONS", "");
+        }
 
         Writer w = new BufferedWriter(new FileWriter(getConfig_ExeProjectFile(params)));
         String content = preprocessTextResource(
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinMsiBundler.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinMsiBundler.java	Fri Sep 12 17:15:09 2014 -0700
@@ -386,7 +386,20 @@
             // just copies the service launcher to the app root folder
             appDir = SERVICE_BUNDLER.fetchFrom(p).doBundle(p, appDir, true);
         }
-        
+
+        // copy file associaiton icons
+        List<Map<String, ? super Object>> fileAssociations = FILE_ASSOCIATIONS.fetchFrom(p);
+        for (Map<String, ? super Object> fileAssociation : fileAssociations) {
+            File icon = FA_ICON.fetchFrom(fileAssociation); //TODO FA_ICON_ICO
+            File faIconFile = new File(appDir, icon.getName());
+
+            try {
+                IOUtils.copyFile(icon, faIconFile);
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+
         return appDir != null;
     }
 
@@ -511,8 +524,7 @@
 
         //WinAppBundler will add application folder again => step out
         File imageRootDir = WIN_APP_IMAGE.fetchFrom(params);
-        File launcher = WinAppBundler.getLauncher(
-                imageRootDir.getParentFile(), params);
+        File launcher = new File(imageRootDir, WinAppBundler.getLauncherName(params));
 
         String launcherPath = relativePath(imageRootDir, launcher);
         data.put("APPLICATION_LAUNCHER", launcherPath);
@@ -543,6 +555,26 @@
             data.put("WIN64", "no");
         }
 
+        List<Map<String, ? super Object>> secondaryLaunchers = SECONDARY_LAUNCHERS.fetchFrom(params);
+
+        StringBuilder secondaryLauncherIcons = new StringBuilder();
+        for (int i = 0; i < secondaryLaunchers.size(); i++) {
+            Map<String, ? super Object> sl = secondaryLaunchers.get(i);
+            //        <Icon Id="DesktopIcon.exe" SourceFile="APPLICATION_ICON" />
+            if (SHORTCUT_HINT.fetchFrom(sl) || MENU_HINT.fetchFrom(sl)) {
+                File secondaryLauncher = new File(imageRootDir, WinAppBundler.getLauncherName(sl));
+                String secondaryLauncherPath = relativePath(imageRootDir, secondaryLauncher);
+                String secondaryLauncherIconPath = secondaryLauncherPath.replace(".exe", ".ico");
+
+                secondaryLauncherIcons.append("        <Icon Id=\"Launcher");
+                secondaryLauncherIcons.append(i);
+                secondaryLauncherIcons.append(".exe\" SourceFile=\"");
+                secondaryLauncherIcons.append(secondaryLauncherIconPath);
+                secondaryLauncherIcons.append("\" />\r\n");
+            }
+        }
+        data.put("SECONDARY_LAUNCHER_ICONS", secondaryLauncherIcons.toString());
+
         Writer w = new BufferedWriter(new FileWriter(getConfig_ProjectFile(params)));
         w.write(preprocessTextResource(
                 WinAppBundler.WIN_BUNDLER_PREFIX + getConfig_ProjectFile(params).getName(),
@@ -581,14 +613,12 @@
         out.println(prefix + " <Component Id=\"comp" + (compId++) + "\" DiskId=\"1\""
                 + " Guid=\"" + UUID.randomUUID().toString() + "\""
                 + (BIT_ARCH_64.fetchFrom(params) ? " Win64=\"yes\"" : "") + ">");
-        out.println("  <CreateFolder/>");
-        out.println("  <RemoveFolder Id=\"RemoveDir" + (id++) + "\" On=\"uninstall\" />");
+        out.println(prefix + "  <CreateFolder/>");
+        out.println(prefix + "  <RemoveFolder Id=\"RemoveDir" + (id++) + "\" On=\"uninstall\" />");
 
         boolean needRegistryKey = !MSI_SYSTEM_WIDE.fetchFrom(params);
         File imageRootDir = WIN_APP_IMAGE.fetchFrom(params);
-        File launcherFile = WinAppBundler.getLauncher(
-                /* Step up as WinAppBundler will add app folder */
-                imageRootDir.getParentFile(), params);
+        File launcherFile = new File(imageRootDir, WinAppBundler.getLauncherName(params));
         File launcherSvcFile = WinServiceBundler.getLauncherSvc(
                                 imageRootDir, params);
 
@@ -617,6 +647,10 @@
 
         boolean menuShortcut = MENU_HINT.fetchFrom(params);
         boolean desktopShortcut = SHORTCUT_HINT.fetchFrom(params);
+
+        Map<String, String> idToFileMap = new TreeMap<>();
+        boolean launcherSet = false;
+
         for (File f : files) {
             boolean isLauncher = f.equals(launcherFile);
             boolean isLauncherSvc = f.equals(launcherSvcFile);
@@ -625,11 +659,15 @@
             if (isLauncherSvc) {
                 continue;
             }
+            launcherSet = launcherSet || isLauncher;
 
             boolean doShortcuts = isLauncher && (menuShortcut || desktopShortcut);
 
+            String thisFileId = isLauncher ? LAUNCHER_ID : ("FileId" + (id++));
+            idToFileMap.put(f.getName(), thisFileId);
+
             out.println(prefix + "   <File Id=\"" +
-                    (isLauncher ? LAUNCHER_ID : ("FileId" + (id++))) + "\""
+                    thisFileId + "\""
                     + " Name=\"" + f.getName() + "\" "
                     + " Source=\"" + relativePath(imageRootDir, f) + "\""
                     + (BIT_ARCH_64.fetchFrom(params) ? " ProcessorArchitecture=\"x64\"" : "") + ">");
@@ -643,8 +681,61 @@
                         + " Name=\"" + APP_NAME.fetchFrom(params)
                         + "\" Advertise=\"no\" Icon=\"StartMenuIcon.exe\" IconIndex=\"0\" />");
             }
+
+            List<Map<String, ? super Object>> secondaryLaunchers = SECONDARY_LAUNCHERS.fetchFrom(params);
+            for (int i = 0; i < secondaryLaunchers.size(); i++) {
+                Map<String, ? super Object> sl = secondaryLaunchers.get(i);
+                File secondaryLauncherFile = new File(imageRootDir, WinAppBundler.getLauncherName(sl));
+                if (f.equals(secondaryLauncherFile)) {
+                    if (SHORTCUT_HINT.fetchFrom(sl)) {
+                        out.println(prefix + "  <Shortcut Id=\"desktopShortcut" + i + "\" Directory=\"DesktopFolder\""
+                                + " Name=\"" + APP_NAME.fetchFrom(sl) + "\" WorkingDirectory=\"INSTALLDIR\""
+                                + " Advertise=\"no\" Icon=\"Launcher" + i + ".exe\" IconIndex=\"0\" />");
+                    }
+                    if (MENU_HINT.fetchFrom(sl)) {
+                        out.println(prefix + "     <Shortcut Id=\"ExeShortcut" + i + "\" Directory=\"ProgramMenuDir\""
+                                + " Name=\"" + APP_NAME.fetchFrom(sl)
+                                + "\" Advertise=\"no\" Icon=\"Launcher" + i + ".exe\" IconIndex=\"0\" />");
+                        //Should we allow different menu groups?  Not for now.
+                    }
+                }
+            }
             out.println(prefix + "   </File>");
         }
+
+        if (launcherSet) {
+            List<Map<String, ? super Object>> fileAssociations = FILE_ASSOCIATIONS.fetchFrom(params);
+            String regName = APP_REGISTRY_NAME.fetchFrom(params);
+            for (int i = 0; i < fileAssociations.size(); i++) {
+                Map<String, ? super Object> fileAssociation = fileAssociations.get(i);
+                String description = FA_DESCRIPTION.fetchFrom(fileAssociation);
+                File icon = FA_ICON.fetchFrom(fileAssociation); //TODO FA_ICON_ICO
+                String entryName = regName + "File";
+                if (i > 0) {
+                    entryName += "." + i;
+                }
+
+                out.println(prefix + "   <ProgId Id='" + entryName + "' Description='" + description + "' Icon='" + idToFileMap.get(icon.getName()) + "' IconIndex='0'>");
+
+                List<String> extensions = FA_EXTENSIONS.fetchFrom(fileAssociation);
+                List<String> mimeTypes = FA_CONTENT_TYPE.fetchFrom(fileAssociation);
+
+                for (String ext : extensions) {
+                    out.println(prefix + "    <Extension Id='" + ext + "' Advertise='no'>");
+                    out.println(prefix + "      <Verb Id='open' Command='Open' TargetFile='" + LAUNCHER_ID + "' Argument='\"%1\"'/>");
+                    boolean defaultSet = false;
+                    for (String mime : mimeTypes) {
+                        out.println(prefix + "      <MIME ContentType='" + mime + "'" + (defaultSet
+                                ? ">"
+                                : " Default='yes'/>"));
+                        defaultSet = true;
+                    }
+                    out.println(prefix + "    </Extension>");
+                }
+                out.println(prefix + "   </ProgId>");
+            }
+        }
+
         out.println(prefix + " </Component>");
 
         // Two components cannot share the same key path value.
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WindowsBundlerParam.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WindowsBundlerParam.java	Fri Sep 12 17:15:09 2014 -0700
@@ -73,6 +73,19 @@
             },
             (s, p) -> s);
 
+    public static final BundlerParamInfo<String> APP_REGISTRY_NAME = new StandardBundlerParam<> (
+            I18N.getString("param.registry-name.name"),
+            I18N.getString("param.registry-name.description"),
+            "win.registryName",
+            String.class,
+            params -> {
+                String nm = APP_NAME.fetchFrom(params);
+                if (nm == null) return null;
+
+                return nm.replaceAll("[^-a-zA-Z\\.0-9]", "");
+            },
+            (s, p) -> s);
+
     public static final StandardBundlerParam<String> MENU_GROUP =
             new StandardBundlerParam<>(
                     I18N.getString("param.menu-group.name"),
--- a/modules/fxpackager/src/main/java/com/sun/javafx/tools/ant/DeployFXTask.java	Wed Sep 10 08:28:43 2014 -0700
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/ant/DeployFXTask.java	Fri Sep 12 17:15:09 2014 -0700
@@ -26,8 +26,13 @@
 package com.sun.javafx.tools.ant;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import com.oracle.tools.packager.StandardBundlerParam;
 import com.sun.javafx.tools.ant.Platform.Jvmarg;
 import com.sun.javafx.tools.ant.Platform.Property;
 import com.sun.javafx.tools.packager.DeployParams;
@@ -194,6 +199,11 @@
                         DeployParams.RunMode.WEBSTART);
                 }
             }
+
+            deployParams.addBundleArgument(StandardBundlerParam.FILE_ASSOCIATIONS.getID(),
+                    appInfo.fileAssociations.stream()
+                        .map(FileAssociation::createLauncherMap)
+                        .collect(Collectors.toList()));
         }
 
         deployParams.setUpdateMode(updateMode);
@@ -256,6 +266,15 @@
             }
         }
 
+        List<Map<String, ? super Object>> launchersAsMap = new ArrayList<>();
+        for (SecondaryLauncher sl : secondaryLaunchers) {
+            launchersAsMap.add(sl.createLauncherMap());
+        }
+
+        deployParams.addBundleArgument(
+                StandardBundlerParam.SECONDARY_LAUNCHERS.getID(),
+                launchersAsMap);
+
         deployParams.setBundleType(nativeBundles);
         deployParams.setTargetFormat(bundleFormat);
 
@@ -500,6 +519,15 @@
         return ba;
     }
 
+    private List<SecondaryLauncher> secondaryLaunchers = new ArrayList<>();
+
+    public SecondaryLauncher createSecondaryLauncher() {
+        SecondaryLauncher sl = new SecondaryLauncher();
+        secondaryLaunchers.add(sl);
+        return sl;
+    }
+
+
     @Override
     public void setDynamicAttribute(String name, String value) throws BuildException {
         //Use qName and value - can't really validate anything until we know which bundlers we have, so this has
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/fxpackager/src/main/java/com/sun/javafx/tools/ant/FileAssociation.java	Fri Sep 12 17:15:09 2014 -0700
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.javafx.tools.ant;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DynamicAttribute;
+import org.apache.tools.ant.types.DataType;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static com.oracle.tools.packager.StandardBundlerParam.*;
+
+/**
+ *
+ * Created by dferrin on 7/31/14.
+ */
+public class FileAssociation extends DataType implements DynamicAttribute {
+
+    String extension;
+    String mimeType;
+    String description;
+    File icon;
+
+    List<DeployFXTask.BundleArgument> bundleArgumentList = new ArrayList<>();
+
+    public DeployFXTask.BundleArgument createBundleArgument() {
+        DeployFXTask.BundleArgument ba = new DeployFXTask.BundleArgument();
+        bundleArgumentList.add(ba);
+        return ba;
+    }
+
+    @Override
+    public void setDynamicAttribute(String name, String value) throws BuildException {
+        //Use qName and value - can't really validate anything until we know which bundlers we have, so this has
+        //to done (way) downstream
+        bundleArgumentList.add(new DeployFXTask.BundleArgument(name, value));
+    }
+
+    public Map<String, ? super Object> createLauncherMap() {
+        Map<String, ? super Object> fileAssociations = new HashMap<>();
+
+        putUnlessNull(fileAssociations, FA_EXTENSIONS.getID(), extension);
+        putUnlessNull(fileAssociations, FA_CONTENT_TYPE.getID(), mimeType);
+        putUnlessNull(fileAssociations, FA_DESCRIPTION.getID(), description);
+        putUnlessNull(fileAssociations, FA_ICON.getID(), icon);
+
+        for (DeployFXTask.BundleArgument ba : bundleArgumentList) {
+            // TODO check and complain about collisions
+            putUnlessNull(fileAssociations, ba.arg, ba.value);
+        }
+
+        return fileAssociations;
+    }
+
+    public void putUnlessNull(Map<String, ? super Object> params, String param, Object value) {
+        if (value != null) {
+            params.put(param, value);
+        }
+    }
+
+    public void putUnlessNullOrEmpty(Map<String, ? super Object> params, String param, Collection value) {
+        if (value != null && !value.isEmpty()) {
+            params.put(param, value);
+        }
+    }
+
+    public void putUnlessNullOrEmpty(Map<String, ? super Object> params, String param, Map value) {
+        if (value != null && !value.isEmpty()) {
+            params.put(param, value);
+        }
+    }
+
+    /**
+     * The file extension or extensions (separated by spaces) that the application requests it be registered to handle
+     *
+     * @ant.not-required
+     */
+    public void setExtension(String extension) {
+        this.extension = extension;
+    }
+
+    /**
+     * The mime-type that the application requests it be registered to handle.
+     *
+     * @ant.not-required
+     */
+    public void setMimeType(String mimeType) {
+        this.mimeType = mimeType;
+    }
+
+    /**
+     * The description the Operation System may show for files of the associated extension and mime-type.
+     *
+     * @ant.optional
+     */
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    /**
+     * The icon the Operation System may show for files of the associated extension and mime-type.
+     *
+     * @ant.optional
+     */
+    public void setIcon(File icon) {