diff options
author | hche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-24 08:20:08 +0000 |
---|---|---|
committer | hche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-24 08:20:08 +0000 |
commit | ff7bc6c4254598cc28e8ad1a9443377d3b6ef832 (patch) | |
tree | 106b4226cf05c3b785c66aa5ca381448664a1329 /Tools/Java | |
parent | 4cb9d58c9b132edd6e6a48598b856e3129b56931 (diff) | |
download | edk2-ff7bc6c4254598cc28e8ad1a9443377d3b6ef832.zip edk2-ff7bc6c4254598cc28e8ad1a9443377d3b6ef832.tar.gz edk2-ff7bc6c4254598cc28e8ad1a9443377d3b6ef832.tar.bz2 |
1. Finish Enhancement EDKT345: Support deleting multiple rows together when remove source files in MSA
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2294 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java')
16 files changed, 144 insertions, 64 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java index ce4fa37..aee620d 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBootModes.java @@ -189,7 +189,7 @@ public class ModuleBootModes extends IInternalFrame { model.addColumn("Name");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -359,9 +359,14 @@ public class ModuleBootModes extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeBootModes(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeBootModes(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBuildOptions.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBuildOptions.java index 178ae39..993d1b9 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBuildOptions.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleBuildOptions.java @@ -189,7 +189,7 @@ public class ModuleBuildOptions extends IInternalFrame { model.addColumn("Option String Value");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -364,9 +364,14 @@ public class ModuleBuildOptions extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeBuildOptions(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeBuildOptions(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java index 642e21d..b2217f1 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleDataHubs.java @@ -188,7 +188,7 @@ public class ModuleDataHubs extends IInternalFrame { model.addColumn("Data Hub C_Name");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -356,9 +356,14 @@ public class ModuleDataHubs extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeDataHubs(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeDataHubs(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java index dd6bbde..31977b5 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleEvents.java @@ -194,7 +194,7 @@ public class ModuleEvents extends IInternalFrame { model.addColumn("Type");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -385,9 +385,14 @@ public class ModuleEvents extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeEvents(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeEvents(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java index 8082632..b1917dd 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleExterns.java @@ -189,7 +189,7 @@ public class ModuleExterns extends IInternalFrame implements ItemListener { model.addColumn("Name");
model.addColumn("Value");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -452,9 +452,14 @@ public class ModuleExterns extends IInternalFrame implements ItemListener { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeExterns(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeExterns(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleGuids.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleGuids.java index 4fa02d1..5c9d329 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleGuids.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleGuids.java @@ -185,7 +185,7 @@ public class ModuleGuids extends IInternalFrame { model.addColumn("Guid C_Name");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -353,9 +353,14 @@ public class ModuleGuids extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeGuids(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeGuids(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java index 4761257..5914b6a 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHiiPackages.java @@ -185,7 +185,7 @@ public class ModuleHiiPackages extends IInternalFrame { model.addColumn("Hii Package C_Name");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -356,9 +356,14 @@ public class ModuleHiiPackages extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeHiiPackages(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeHiiPackages(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java index e8125b6..465ebee 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleHobs.java @@ -188,7 +188,7 @@ public class ModuleHobs extends IInternalFrame { model.addColumn("Type");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -359,9 +359,14 @@ public class ModuleHobs extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeHobs(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeHobs(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleLibraryClassDefinitions.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleLibraryClassDefinitions.java index ce5d86f..0968571 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleLibraryClassDefinitions.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleLibraryClassDefinitions.java @@ -183,7 +183,7 @@ public class ModuleLibraryClassDefinitions extends IInternalFrame { model.addColumn("Library Class Name");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -386,9 +386,14 @@ public class ModuleLibraryClassDefinitions extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vLibraryClass.removeLibraryClass(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vLibraryClass.removeLibraryClass(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePCDs.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePCDs.java index c6a5e8f..a504755 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePCDs.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePCDs.java @@ -190,7 +190,7 @@ public class ModulePCDs extends IInternalFrame { model.addColumn("Value");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -363,9 +363,14 @@ public class ModulePCDs extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removePcdCoded(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removePcdCoded(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java index 21e237e..3077f3d 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePackageDependencies.java @@ -191,7 +191,7 @@ public class ModulePackageDependencies extends IInternalFrame { model.addColumn("Package Name");
model.addColumn("Package Version");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -365,9 +365,14 @@ public class ModulePackageDependencies extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removePackageDependencies(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removePackageDependencies(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePpis.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePpis.java index 504f291..c7a3e42 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePpis.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModulePpis.java @@ -192,7 +192,7 @@ public class ModulePpis extends IInternalFrame { model.addColumn("Type");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -378,9 +378,14 @@ public class ModulePpis extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removePpis(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removePpis(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleProtocols.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleProtocols.java index 1d8c933..61c5dd8 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleProtocols.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleProtocols.java @@ -194,7 +194,7 @@ public class ModuleProtocols extends IInternalFrame { model.addColumn("Type");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -379,9 +379,14 @@ public class ModuleProtocols extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeProtocols(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeProtocols(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java index 770a0a0..0d31e10 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSourceFiles.java @@ -187,7 +187,7 @@ public class ModuleSourceFiles extends IInternalFrame { model.addColumn("Tool Code");
model.addColumn("Tool Chain Family");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -392,9 +392,14 @@ public class ModuleSourceFiles extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vSourceFiles.removeSourceFiles(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vSourceFiles.removeSourceFiles(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java index 29bed2b..8bcb18c 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleSystemTables.java @@ -187,7 +187,7 @@ public class ModuleSystemTables extends IInternalFrame { model.addColumn("Guid C_Name");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -356,9 +356,14 @@ public class ModuleSystemTables extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeSystemTables(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeSystemTables(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java index 7038ee9..29eb4ff 100644 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java +++ b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/ModuleVariables.java @@ -187,7 +187,7 @@ public class ModuleVariables extends IInternalFrame { model.addColumn("Guid C_Name");
model.addColumn("Usage");
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
jTable.getSelectionModel().addListSelectionListener(this);
jTable.getModel().addTableModelListener(this);
jTable.addMouseListener(this);
@@ -356,9 +356,14 @@ public class ModuleVariables extends IInternalFrame { if (jTable.isEditing()) {
jTable.getCellEditor().stopCellEditing();
}
- if (selectedRow > -1) {
- this.model.removeRow(selectedRow);
- this.vid.removeVariables(selectedRow);
+
+ int selectedRows[] = this.jTable.getSelectedRows();
+
+ if (selectedRows != null) {
+ for (int index = selectedRows.length - 1; index > -1; index--) {
+ this.model.removeRow(selectedRows[index]);
+ this.vid.removeVariables(selectedRows[index]);
+ }
selectedRow = -1;
this.save();
}
|