]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network.ui/src/org/simantics/district/network/ui/table/CustomPasteDataCommand.java
Add CSV table view for copy/pasting consumer information before creation
[simantics/district.git] / org.simantics.district.network.ui / src / org / simantics / district / network / ui / table / CustomPasteDataCommand.java
diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/table/CustomPasteDataCommand.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/table/CustomPasteDataCommand.java
new file mode 100644 (file)
index 0000000..2ddc0a4
--- /dev/null
@@ -0,0 +1,28 @@
+package org.simantics.district.network.ui.table;
+
+import org.eclipse.nebula.widgets.nattable.command.AbstractMultiColumnCommand;
+import org.eclipse.nebula.widgets.nattable.command.ILayerCommand;
+import org.eclipse.nebula.widgets.nattable.layer.ILayer;
+
+public class CustomPasteDataCommand extends AbstractMultiColumnCommand {
+
+    int pasteRow;
+    String[][] data;
+
+    protected CustomPasteDataCommand(ILayer layer, int[] columnPositions, int pasteRow, String[][] data) {
+        super(layer, columnPositions);
+        this.pasteRow = pasteRow;
+        this.data = data;
+    }
+
+    protected CustomPasteDataCommand(CustomPasteDataCommand pasteDataCommand) {
+        super(pasteDataCommand);
+        this.pasteRow = pasteDataCommand.pasteRow;
+        this.data = pasteDataCommand.data;
+    }
+    @Override
+    public ILayerCommand cloneCommand() {
+        return new CustomPasteDataCommand(this);
+    }
+    
+}