Change FrameworkModules selection to next module in platform after remove one module.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1700 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jlin16 2006-10-10 04:28:15 +00:00
parent 2193b507f0
commit bc9b370686
3 changed files with 9 additions and 3 deletions

View File

@ -358,6 +358,9 @@ public class FpdFileContents {
if (!cursor.isText()) {
break;
}
if (cursor.getObject() == null) {
break;
}
String s = cursor.getTextValue();
if (s.matches(regExpNewLineAndSpaces)) {
continue;

View File

@ -727,7 +727,7 @@ public class FpdFrameworkModules extends IInternalFrame {
if (selectedRow < 0) {
return;
}
int nextSelection = selectedRow;
TableSorter sorter = (TableSorter) jTableFpdModules.getModel();
selectedRow = sorter.getModelRowIndex(selectedRow);
@ -761,7 +761,7 @@ public class FpdFrameworkModules extends IInternalFrame {
ffc.removeModuleSA(selectedRow);
}
catch (Exception exp) {
JOptionPane.showMessageDialog(frame, exp.getCause() + exp.getMessage());
JOptionPane.showMessageDialog(frame, exp.getMessage());
return;
}
@ -780,6 +780,10 @@ public class FpdFrameworkModules extends IInternalFrame {
}
modelFpdModules.removeRow(selectedRow);
if (nextSelection >= jTableFpdModules.getRowCount()) {
nextSelection = jTableFpdModules.getRowCount() - 1;
}
jTableFpdModules.changeSelection(nextSelection, 0, false, false);
docConsole.setSaved(false);
}
});

View File

@ -4,7 +4,6 @@ import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.DefaultCellEditor;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;