changeset 7909:3d617cc276d6

[SCENEBUILDER] Going on fixing DTL-6783: Rationalize job implementation between Hierarchy and Content Panels => Adapt Modify Object jobs (BatchModifyObject and BatchModifyFxId removed)
author slions
date Fri, 29 Aug 2014 10:12:42 +0200
parents 2def7cb07a48
children c314c8bcf9d7
files apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/BatchModifyFxIdJob.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/BatchModifyObjectJob.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/ModifyObjectJob.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeColumnGesture.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeGesture.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeRowGesture.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeTableColumnGesture.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeTreeTableColumnGesture.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/mode/EditModeController.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/treeview/HierarchyTreeCell.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/InspectorPanelController.java
diffstat 11 files changed, 102 insertions(+), 279 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/BatchModifyFxIdJob.java	Fri Aug 29 08:58:44 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * 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.job.v2.BackupSelectionJob;
-import com.oracle.javafx.scenebuilder.kit.editor.job.v2.CompositeJob;
-import com.oracle.javafx.scenebuilder.kit.editor.job.v2.UpdateSelectionJob;
-import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- *
- */
-public class BatchModifyFxIdJob extends CompositeJob {
-
-    private final FXOMObject fxomObject;
-    private final String newValue;
-
-    public BatchModifyFxIdJob(
-            FXOMObject fxomObject, 
-            String newValue,
-            EditorController editorController) {
-        super(editorController, true, false);
-
-        assert fxomObject != null;
-
-        this.fxomObject = fxomObject;
-        this.newValue = newValue;
-    }
-
-    /*
-     * CompositeJob
-     */
-    
-    @Override
-    protected List<Job> makeSubJobs() {
-        final List<Job> result = new ArrayList<>();
-        
-        final ModifyFxIdJob job = new ModifyFxIdJob(fxomObject, newValue, getEditorController());
-        if (job.isExecutable()) {
-            result.add(job);
-        }
-        
-        if (result.isEmpty() == false) {
-            result.add(0, new BackupSelectionJob(getEditorController()));
-            result.add(new UpdateSelectionJob(fxomObject, getEditorController()));
-        }
-        
-        return result;
-    }
-
-    @Override
-    protected String makeDescription() {
-        final String result;
-        final List<Job> subJobs = getSubJobs();
-        final int subJobCount = subJobs.size();
-        assert (subJobCount == 0) || (subJobCount == 3);
-
-        if (subJobCount == 0) {
-            result = "Unexecutable Set"; //NOI18N
-        } else {
-            result = subJobs.get(1).getDescription(); // BackupSelection + 1 ModifyFxId + UpdateSelection
-        }
-
-        return result;
-    }
-}
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/BatchModifyObjectJob.java	Fri Aug 29 08:58:44 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
- * 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.job.v2.BackupSelectionJob;
-import com.oracle.javafx.scenebuilder.kit.editor.job.v2.CompositeJob;
-import com.oracle.javafx.scenebuilder.kit.editor.job.v2.UpdateSelectionJob;
-import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
-import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- */
-public class BatchModifyObjectJob extends CompositeJob {
-
-    private final FXOMInstance fxomInstance;
-    private final Map<ValuePropertyMetadata, Object> valueMap;
-    private final String description;
-
-    public BatchModifyObjectJob(FXOMInstance fxomInstance,
-            String description,
-            Map<ValuePropertyMetadata, Object> valueMap,
-            EditorController editorController) {
-        super(editorController, true /* shouldRefreshSceneGraph */, false /* shouldUpdateSelection */);
-        
-        assert fxomInstance != null;
-        assert valueMap != null;
-        assert description != null;
-        
-        this.fxomInstance = fxomInstance;
-        this.valueMap = new HashMap<>(valueMap);
-        this.description = description;
-    }
-
-    public BatchModifyObjectJob(FXOMInstance fxomInstance,
-            ValuePropertyMetadata propertyMetadata,
-            Object newValue,
-            EditorController editorController) {
-        super(editorController, true /* shouldRefreshSceneGraph */, false /* shouldUpdateSelection */);
-        assert fxomInstance != null;
-        assert propertyMetadata != null;
-
-        this.fxomInstance = fxomInstance;
-        this.valueMap = new HashMap<>();
-        this.valueMap.put(propertyMetadata, newValue);
-        this.description = I18N.getString("label.action.edit.set.1",
-                propertyMetadata.getName().toString(),
-                fxomInstance.getSceneGraphObject().getClass().getSimpleName());
-    }
-
-    /*
-     * CompositeJob
-     */
-    
-    @Override
-    protected List<Job> makeSubJobs() {
-        final List<Job> result = new ArrayList<>();
-        
-        for (Map.Entry<ValuePropertyMetadata,Object> e : valueMap.entrySet()) {
-            final ModifyObjectJob j = new ModifyObjectJob(fxomInstance, 
-                    e.getKey(), e.getValue(), getEditorController());
-            if (j.isExecutable()) {
-                result.add(j);
-            }
-        }
-        
-        if (result.isEmpty() == false) {
-            result.add(0, new BackupSelectionJob(getEditorController()));
-            result.add(new UpdateSelectionJob(fxomInstance, getEditorController()));
-        }
-        
-        return result;
-    }
-
-    @Override
-    protected String makeDescription() {
-        return description;
-    }
-}
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/ModifyObjectJob.java	Fri Aug 29 08:58:44 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/ModifyObjectJob.java	Fri Aug 29 10:12:42 2014 +0200
@@ -46,21 +46,47 @@
     private final ValuePropertyMetadata propertyMetadata;
     private final Object newValue;
     private final Object oldValue;
-    
-    public ModifyObjectJob(FXOMInstance fxomInstance, ValuePropertyMetadata propertyMetadata, Object newValue, EditorController editorController) {
+    private final String description;
+
+    public ModifyObjectJob(
+            FXOMInstance fxomInstance, 
+            ValuePropertyMetadata propertyMetadata, 
+            Object newValue, 
+            EditorController editorController) {
         super(editorController);
-        
+
         assert fxomInstance != null;
         assert fxomInstance.getSceneGraphObject() != null;
         assert propertyMetadata != null;
-        
+
         this.fxomInstance = fxomInstance;
         this.propertyMetadata = propertyMetadata;
         this.newValue = newValue;
         this.oldValue = propertyMetadata.getValueObject(fxomInstance);
+        this.description = I18N.getString("label.action.edit.set.1",
+                propertyMetadata.getName().toString(),
+                fxomInstance.getSceneGraphObject().getClass().getSimpleName());
     }
-    
-    
+
+    public ModifyObjectJob(
+            FXOMInstance fxomInstance,
+            ValuePropertyMetadata propertyMetadata,
+            Object newValue,
+            EditorController editorController,
+            String description) {
+        super(editorController);
+
+        assert fxomInstance != null;
+        assert fxomInstance.getSceneGraphObject() != null;
+        assert propertyMetadata != null;
+
+        this.fxomInstance = fxomInstance;
+        this.propertyMetadata = propertyMetadata;
+        this.newValue = newValue;
+        this.oldValue = propertyMetadata.getValueObject(fxomInstance);
+        this.description = description;
+    }
+
     /*
      * Job
      */
@@ -91,10 +117,7 @@
 
     @Override
     public String getDescription() {
-        final String description = I18N.getString("label.action.edit.set.1",
-                propertyMetadata.getName().toString(),
-                fxomInstance.getSceneGraphObject().getClass().getSimpleName());
         return description;
     }
-    
+
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeColumnGesture.java	Fri Aug 29 08:58:44 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeColumnGesture.java	Fri Aug 29 10:12:42 2014 +0200
@@ -34,7 +34,7 @@
 
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
 import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
-import com.oracle.javafx.scenebuilder.kit.editor.job.BatchModifyObjectJob;
+import com.oracle.javafx.scenebuilder.kit.editor.job.ModifyObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.gridpane.GridPaneHandles;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.resizer.GridPaneColumnResizer;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
@@ -45,9 +45,7 @@
 import com.oracle.javafx.scenebuilder.kit.util.Deprecation;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import javafx.geometry.Point2D;
 import javafx.scene.input.KeyEvent;
 import javafx.scene.layout.ColumnConstraints;
@@ -144,16 +142,14 @@
         userDidCancel();
         
         // Step #3
-        final Map<ValuePropertyMetadata, Object> metaValueMap = new HashMap<>();
-        metaValueMap.put(columnConstraintsMeta, newConstraints);
-        
         final EditorController editorController 
                 = contentPanelController.getEditorController();
-        final BatchModifyObjectJob j = new BatchModifyObjectJob(
-                fxomInstance, 
-                I18N.getString("label.action.edit.resize.column"), 
-                metaValueMap, 
-                editorController);
+        final ModifyObjectJob j = new ModifyObjectJob(
+                fxomInstance,
+                columnConstraintsMeta,
+                newConstraints,
+                editorController,
+                I18N.getString("label.action.edit.resize.column"));
         editorController.getJobManager().push(j);
         
         gridPaneHandles.layoutDecoration();
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeGesture.java	Fri Aug 29 08:58:44 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeGesture.java	Fri Aug 29 10:12:42 2014 +0200
@@ -32,7 +32,7 @@
 package com.oracle.javafx.scenebuilder.kit.editor.panel.content.gesture.mouse;
 
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
-import com.oracle.javafx.scenebuilder.kit.editor.job.BatchModifyObjectJob;
+import com.oracle.javafx.scenebuilder.kit.editor.job.ModifyObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.ContentPanelController;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.HudWindowController;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.relocater.AbstractRelocater;
@@ -175,16 +175,19 @@
         if (changeMap.isEmpty() == false) {
             final EditorController editorController 
                     = contentPanelController.getEditorController();
-            final BatchModifyObjectJob j = new BatchModifyObjectJob(
-                    fxomInstance, 
-                    "Resize", 
-                    metaValueMap, 
-                    editorController);
-            if (j.isExecutable()) {
-                editorController.getJobManager().push(j);
+            for (Map.Entry<ValuePropertyMetadata, Object> e : metaValueMap.entrySet()) {
+                final ModifyObjectJob job = new ModifyObjectJob(
+                        fxomInstance,
+                        e.getKey(),
+                        e.getValue(),
+                        editorController,
+                        "Resize");
+                if (job.isExecutable()) {
+                    editorController.getJobManager().push(job);
+                }
             }
         }
-        
+
     }
 
     @Override
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeRowGesture.java	Fri Aug 29 08:58:44 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeRowGesture.java	Fri Aug 29 10:12:42 2014 +0200
@@ -34,7 +34,7 @@
 
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
 import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
-import com.oracle.javafx.scenebuilder.kit.editor.job.BatchModifyObjectJob;
+import com.oracle.javafx.scenebuilder.kit.editor.job.ModifyObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.gridpane.GridPaneHandles;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.resizer.GridPaneRowResizer;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
@@ -149,11 +149,12 @@
         
         final EditorController editorController 
                 = contentPanelController.getEditorController();
-        final BatchModifyObjectJob j = new BatchModifyObjectJob(
-                fxomInstance, 
-                I18N.getString("label.action.edit.resize.row"), 
-                metaValueMap, 
-                editorController);
+        final ModifyObjectJob j = new ModifyObjectJob(
+                fxomInstance,
+                rowConstraintsMeta,
+                newConstraints,
+                editorController,
+                I18N.getString("label.action.edit.resize.row"));
         editorController.getJobManager().push(j);
         
         gridPaneHandles.layoutDecoration();
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeTableColumnGesture.java	Fri Aug 29 08:58:44 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeTableColumnGesture.java	Fri Aug 29 10:12:42 2014 +0200
@@ -35,8 +35,8 @@
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
 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.BatchModifyObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
+import com.oracle.javafx.scenebuilder.kit.editor.job.ModifyObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.ContentPanelController;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.resizer.TableColumnResizer;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
@@ -44,7 +44,9 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.Metadata;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
 import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javafx.geometry.Point2D;
 import javafx.scene.control.TableColumn;
@@ -135,10 +137,10 @@
                 = new BatchJob(editorController, true,
                 I18N.getString("label.action.edit.resize.column"));
         if (changeMap.isEmpty() == false) {
-            batchJob.addSubJob(makeResizeJob(columnInstance, changeMap));
+            batchJob.addSubJobs(makeResizeJob(columnInstance, changeMap));
         }
         if (changeMapNext.isEmpty() == false) {
-            batchJob.addSubJob(makeResizeJob(columnInstance.getNextSlibing(), changeMapNext));
+            batchJob.addSubJobs(makeResizeJob(columnInstance.getNextSlibing(), changeMapNext));
         }
         if (batchJob.isExecutable()) {
             editorController.getJobManager().push(batchJob);
@@ -168,10 +170,12 @@
      * Private
      */
     
-    private Job makeResizeJob(FXOMObject columnObject, Map<PropertyName, Object> changeMap) {
+    private List<Job> makeResizeJob(FXOMObject columnObject, Map<PropertyName, Object> changeMap) {
         assert columnObject.getSceneGraphObject() instanceof TableColumn;
         assert columnObject instanceof FXOMInstance;
         
+        final List<Job> result = new ArrayList<>();
+
         final Metadata metadata = Metadata.getMetadata();
         final Map<ValuePropertyMetadata, Object> metaValueMap = new HashMap<>();
         for (Map.Entry<PropertyName,Object> e : changeMap.entrySet()) {
@@ -180,12 +184,14 @@
             metaValueMap.put(vpm, e.getValue());
         }
 
-        final BatchModifyObjectJob result = new BatchModifyObjectJob(
-                (FXOMInstance) columnObject, 
-                BatchModifyObjectJob.class.getSimpleName(), 
-                metaValueMap, 
-                contentPanelController.getEditorController());
-        
+        for (Map.Entry<ValuePropertyMetadata, Object> e : metaValueMap.entrySet()) {
+            final ModifyObjectJob job = new ModifyObjectJob(
+                    (FXOMInstance) columnObject,
+                    e.getKey(),
+                    e.getValue(),
+                    contentPanelController.getEditorController());
+            result.add(job);
+        }        
         return result;
     }
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeTreeTableColumnGesture.java	Fri Aug 29 08:58:44 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/gesture/mouse/ResizeTreeTableColumnGesture.java	Fri Aug 29 10:12:42 2014 +0200
@@ -35,8 +35,8 @@
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
 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.BatchModifyObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
+import com.oracle.javafx.scenebuilder.kit.editor.job.ModifyObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.ContentPanelController;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.resizer.TreeTableColumnResizer;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
@@ -44,7 +44,9 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.Metadata;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.ValuePropertyMetadata;
 import com.oracle.javafx.scenebuilder.kit.metadata.util.PropertyName;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import javafx.geometry.Point2D;
 import javafx.scene.control.TreeTableColumn;
@@ -135,10 +137,10 @@
                 = new BatchJob(editorController, true,
                 I18N.getString("label.action.edit.resize.column"));
         if (changeMap.isEmpty() == false) {
-            batchJob.addSubJob(makeResizeJob(columnInstance, changeMap));
+            batchJob.addSubJobs(makeResizeJob(columnInstance, changeMap));
         }
         if (changeMapNext.isEmpty() == false) {
-            batchJob.addSubJob(makeResizeJob(columnInstance.getNextSlibing(), changeMapNext));
+            batchJob.addSubJobs(makeResizeJob(columnInstance.getNextSlibing(), changeMapNext));
         }
         if (batchJob.isExecutable()) {
             editorController.getJobManager().push(batchJob);
@@ -168,10 +170,12 @@
      * Private
      */
     
-    private Job makeResizeJob(FXOMObject columnObject, Map<PropertyName, Object> changeMap) {
+    private List<Job> makeResizeJob(FXOMObject columnObject, Map<PropertyName, Object> changeMap) {
         assert columnObject.getSceneGraphObject() instanceof TreeTableColumn;
         assert columnObject instanceof FXOMInstance;
         
+        final List<Job> result = new ArrayList<>();
+        
         final Metadata metadata = Metadata.getMetadata();
         final Map<ValuePropertyMetadata, Object> metaValueMap = new HashMap<>();
         for (Map.Entry<PropertyName,Object> e : changeMap.entrySet()) {
@@ -180,12 +184,14 @@
             metaValueMap.put(vpm, e.getValue());
         }
 
-        final BatchModifyObjectJob result = new BatchModifyObjectJob(
-                (FXOMInstance) columnObject, 
-                BatchModifyObjectJob.class.getSimpleName(), 
-                metaValueMap, 
-                contentPanelController.getEditorController());
-        
+        for (Map.Entry<ValuePropertyMetadata, Object> e : metaValueMap.entrySet()) {
+            final ModifyObjectJob job = new ModifyObjectJob(
+                    (FXOMInstance) columnObject,
+                    e.getKey(),
+                    e.getValue(),
+                    contentPanelController.getEditorController());
+            result.add(job);
+        }        
         return result;
     }
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/mode/EditModeController.java	Fri Aug 29 08:58:44 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/mode/EditModeController.java	Fri Aug 29 10:12:42 2014 +0200
@@ -36,7 +36,7 @@
 import com.oracle.javafx.scenebuilder.kit.editor.drag.target.AbstractDropTarget;
 import com.oracle.javafx.scenebuilder.kit.editor.drag.target.GridPaneDropTarget;
 import com.oracle.javafx.scenebuilder.kit.editor.drag.target.RootDropTarget;
-import com.oracle.javafx.scenebuilder.kit.editor.job.BatchModifyObjectJob;
+import com.oracle.javafx.scenebuilder.kit.editor.job.ModifyObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.RelocateSelectionJob;
 import com.oracle.javafx.scenebuilder.kit.editor.messagelog.MessageLog;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.content.AbstractDecoration;
@@ -797,8 +797,8 @@
                 = Metadata.getMetadata().queryValueProperty(inlineEditedObject, propertyName);
         final EditorController editorController
                 = contentPanelController.getEditorController();
-        final BatchModifyObjectJob job
-                = new BatchModifyObjectJob(inlineEditedObject, vpm, newValue, editorController);
+        final ModifyObjectJob job
+                = new ModifyObjectJob(inlineEditedObject, vpm, newValue, editorController);
         
         if (job.isExecutable()) {
             editorController.getJobManager().push(job);
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/treeview/HierarchyTreeCell.java	Fri Aug 29 08:58:44 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/treeview/HierarchyTreeCell.java	Fri Aug 29 10:12:42 2014 +0200
@@ -40,8 +40,8 @@
 import com.oracle.javafx.scenebuilder.kit.editor.drag.target.RootDropTarget;
 import com.oracle.javafx.scenebuilder.kit.editor.i18n.I18N;
 import com.oracle.javafx.scenebuilder.kit.editor.images.ImageUtils;
-import com.oracle.javafx.scenebuilder.kit.editor.job.BatchModifyFxIdJob;
-import com.oracle.javafx.scenebuilder.kit.editor.job.BatchModifyObjectJob;
+import com.oracle.javafx.scenebuilder.kit.editor.job.ModifyFxIdJob;
+import com.oracle.javafx.scenebuilder.kit.editor.job.ModifyObjectJob;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.hierarchy.HierarchyDNDController;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.hierarchy.HierarchyItem;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.hierarchy.AbstractHierarchyPanelController;
@@ -644,8 +644,8 @@
                             assert propertyName != null;
                             final ValuePropertyMetadata vpm
                                     = Metadata.getMetadata().queryValueProperty(fxomInstance, propertyName);
-                            final BatchModifyObjectJob job1
-                                    = new BatchModifyObjectJob(fxomInstance, vpm, newValue, editorController);
+                            final ModifyObjectJob job1
+                                    = new ModifyObjectJob(fxomInstance, vpm, newValue, editorController);
                             if (job1.isExecutable()) {
                                 editorController.getJobManager().push(job1);
                             }
@@ -654,8 +654,8 @@
                     case FXID:
                         assert newValue != null;
                         final String fxId = newValue.isEmpty() ? null : newValue;
-                        final BatchModifyFxIdJob job2
-                                = new BatchModifyFxIdJob(fxomObject, fxId, editorController);
+                        final ModifyFxIdJob job2
+                                = new ModifyFxIdJob(fxomObject, fxId, editorController);
                         if (job2.isExecutable()) {
 
                             // If a controller class has been defined, 
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/InspectorPanelController.java	Fri Aug 29 08:58:44 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/InspectorPanelController.java	Fri Aug 29 10:12:42 2014 +0200
@@ -34,9 +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.i18n.I18N;
-import com.oracle.javafx.scenebuilder.kit.editor.job.BatchModifyFxIdJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.BatchModifySelectionJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
+import com.oracle.javafx.scenebuilder.kit.editor.job.ModifyFxIdJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.togglegroup.ModifySelectionToggleGroupJob;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.AnchorPaneConstraintsEditor;
 import com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.BooleanEditor;
@@ -1203,7 +1203,7 @@
     }
 
     private void setSelectedFXOMInstanceFxId(FXOMObject fxomObject, String fxId) {
-        final BatchModifyFxIdJob job = new BatchModifyFxIdJob(fxomObject, fxId, getEditorController());
+        final ModifyFxIdJob job = new ModifyFxIdJob(fxomObject, fxId, getEditorController());
         pushJob(job);
     }