Closedown

This commit is contained in:
boccioli_m
2015-08-31 11:10:31 +02:00
parent a3d418af42
commit 63ef187970

View File

@@ -692,10 +692,13 @@ public class TestingList extends Panel {
if (this.jTable1.isEnabled()) {
if(evt.getButton() == java.awt.event.MouseEvent.BUTTON3){
//right mouse click
//select row with right-click only if previously only one or zero rows were selected
if(jTable1.getSelectedRowCount()<2){
Point cursor = evt.getPoint();
int rowAtPoint = jTable1.rowAtPoint(cursor);
jTable1.setRowSelectionInterval(rowAtPoint, rowAtPoint);
}
//enable action Show Test Details only if one row is selected
Point cursor = evt.getPoint();
int rowAtPoint = jTable1.rowAtPoint(cursor);
jTable1.setRowSelectionInterval(rowAtPoint, rowAtPoint);
this.jMenuItemShowDetails.setEnabled(jTable1.getSelectedRows().length == 1);
jPopupMenuTable.show(jTable1, evt.getX(), evt.getY());
}