private IDefaultTableModel model = null;\r
\r
private int selectedRow = -1;\r
+ \r
+ private IFrame parentFrame = null;\r
\r
/**\r
This method initializes jButtonAdd \r
\r
model.addColumn("Option String Value");\r
\r
- jTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r
+ jTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\r
jTable.getSelectionModel().addListSelectionListener(this);\r
jTable.getModel().addTableModelListener(this);\r
jTable.addMouseListener(this);\r
@param inBuildOptions The input BuildOptionsDocument.BuildOptions\r
\r
**/\r
- public ModuleBuildOptions(OpeningModuleType inOmt) {\r
+ public ModuleBuildOptions(OpeningModuleType inOmt, IFrame iFrame) {\r
super();\r
this.omt = inOmt;\r
this.msa = omt.getXmlMsa();\r
+ this.parentFrame = iFrame;\r
init(msa.getModuleBuildOptions());\r
this.setVisible(true);\r
}\r
}\r
\r
private void showEdit(int index) {\r
- BuildOptionsDlg dlg = new BuildOptionsDlg(vid.getBuildOptions(index), new IFrame(), omt.getId());\r
+ BuildOptionsDlg dlg = new BuildOptionsDlg(vid.getBuildOptions(index), this.parentFrame, omt.getId());\r
int result = dlg.showDialog();\r
if (result == DataType.RETURN_TYPE_OK) {\r
if (index == -1) {\r
if (jTable.isEditing()) {\r
jTable.getCellEditor().stopCellEditing();\r
}\r
- if (selectedRow > -1) {\r
- this.model.removeRow(selectedRow);\r
- this.vid.removeBuildOptions(selectedRow);\r
+\r
+ int selectedRows[] = this.jTable.getSelectedRows();\r
+ \r
+ if (selectedRows != null) {\r
+ for (int index = selectedRows.length - 1; index > -1; index--) {\r
+ this.model.removeRow(selectedRows[index]);\r
+ this.vid.removeBuildOptions(selectedRows[index]);\r
+ }\r
selectedRow = -1;\r
this.save();\r
}\r