changeset 7929:4ecd15e8a082

[SCENEBUILDER] Going on fixing DTL-6783: Rationalize job implementation between Hierarchy and Content Panels => Adapt Insert and Move GridPane Row/Column jobs
author slions
date Mon, 01 Sep 2014 09:18:39 +0200
parents e6954f3f3be8
children 60e8da40fca3
files apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/InsertColumnJob.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/InsertRowJob.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/MoveColumnContentJob.java apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/MoveRowContentJob.java
diffstat 4 files changed, 22 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/InsertColumnJob.java	Sun Aug 31 14:36:26 2014 +0300
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/InsertColumnJob.java	Mon Sep 01 09:18:39 2014 +0200
@@ -33,8 +33,10 @@
 package com.oracle.javafx.scenebuilder.kit.editor.job.gridpane.v2;
 
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
+import com.oracle.javafx.scenebuilder.kit.editor.job.BatchSelectionJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
-import com.oracle.javafx.scenebuilder.kit.editor.job.v2.CompositeJob;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.AbstractSelectionGroup;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.GridSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.value.list.ColumnConstraintsListPropertyMetadata;
@@ -48,7 +50,7 @@
 /**
  *
  */
-public class InsertColumnJob extends CompositeJob {
+public class InsertColumnJob extends BatchSelectionJob {
 
     private static final ColumnConstraintsListPropertyMetadata columnContraintsMeta =
             new ColumnConstraintsListPropertyMetadata(
@@ -104,5 +106,9 @@
     protected String makeDescription() {
         return getClass().getSimpleName();
     }
-    
+
+    @Override
+    protected AbstractSelectionGroup getNewSelectionGroup() {
+        return new GridSelectionGroup(gridPaneObject, GridSelectionGroup.Type.COLUMN, columnIndex);
+    }
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/InsertRowJob.java	Sun Aug 31 14:36:26 2014 +0300
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/InsertRowJob.java	Mon Sep 01 09:18:39 2014 +0200
@@ -33,8 +33,10 @@
 package com.oracle.javafx.scenebuilder.kit.editor.job.gridpane.v2;
 
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
+import com.oracle.javafx.scenebuilder.kit.editor.job.BatchSelectionJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
-import com.oracle.javafx.scenebuilder.kit.editor.job.v2.CompositeJob;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.AbstractSelectionGroup;
+import com.oracle.javafx.scenebuilder.kit.editor.selection.GridSelectionGroup;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.value.list.RowConstraintsListPropertyMetadata;
@@ -48,7 +50,7 @@
 /**
  *
  */
-public class InsertRowJob extends CompositeJob {
+public class InsertRowJob extends BatchSelectionJob {
 
     private static final RowConstraintsListPropertyMetadata rowContraintsMeta =
             new RowConstraintsListPropertyMetadata(
@@ -104,5 +106,9 @@
     protected String makeDescription() {
         return getClass().getSimpleName();
     }
-    
+
+    @Override
+    protected AbstractSelectionGroup getNewSelectionGroup() {
+        return new GridSelectionGroup(gridPaneObject, GridSelectionGroup.Type.ROW, rowIndex);
+    }
 }
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/MoveColumnContentJob.java	Sun Aug 31 14:36:26 2014 +0300
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/MoveColumnContentJob.java	Mon Sep 01 09:18:39 2014 +0200
@@ -33,8 +33,8 @@
 package com.oracle.javafx.scenebuilder.kit.editor.job.gridpane.v2;
 
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
+import com.oracle.javafx.scenebuilder.kit.editor.job.BatchDocumentJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
-import com.oracle.javafx.scenebuilder.kit.editor.job.v2.CompositeJob;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.value.IntegerPropertyMetadata;
@@ -48,7 +48,7 @@
 /**
  *
  */
-public class MoveColumnContentJob extends CompositeJob {
+public class MoveColumnContentJob extends BatchDocumentJob {
     
     private final IntegerPropertyMetadata columnIndexMeta =
             new IntegerPropertyMetadata(
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/MoveRowContentJob.java	Sun Aug 31 14:36:26 2014 +0300
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/job/gridpane/v2/MoveRowContentJob.java	Mon Sep 01 09:18:39 2014 +0200
@@ -33,8 +33,8 @@
 package com.oracle.javafx.scenebuilder.kit.editor.job.gridpane.v2;
 
 import com.oracle.javafx.scenebuilder.kit.editor.EditorController;
+import com.oracle.javafx.scenebuilder.kit.editor.job.BatchDocumentJob;
 import com.oracle.javafx.scenebuilder.kit.editor.job.Job;
-import com.oracle.javafx.scenebuilder.kit.editor.job.v2.CompositeJob;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
 import com.oracle.javafx.scenebuilder.kit.metadata.property.value.IntegerPropertyMetadata;
@@ -48,7 +48,7 @@
 /**
  *
  */
-public class MoveRowContentJob extends CompositeJob {
+public class MoveRowContentJob extends BatchDocumentJob {
     
     private final IntegerPropertyMetadata rowIndexMeta =
             new IntegerPropertyMetadata(