Clean up on aisle 5
This commit is contained in:
parent
f762dc11aa
commit
5d80a3a167
@ -464,11 +464,12 @@ public class SimulationPanel extends JPanel {
|
|||||||
simulationTable.addMouseListener(new MouseAdapter() {
|
simulationTable.addMouseListener(new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent e) {
|
public void mouseClicked(MouseEvent e) {
|
||||||
|
int selectedRow = simulationTable.getSelectedRow();
|
||||||
|
if (selectedRow < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {
|
if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {
|
||||||
int selectedRow = simulationTable.getSelectedRow();
|
|
||||||
if (selectedRow < 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int selected = simulationTable.convertRowIndexToModel(selectedRow);
|
int selected = simulationTable.convertRowIndexToModel(selectedRow);
|
||||||
|
|
||||||
int column = simulationTable.columnAtPoint(e.getPoint());
|
int column = simulationTable.columnAtPoint(e.getPoint());
|
||||||
@ -481,11 +482,7 @@ public class SimulationPanel extends JPanel {
|
|||||||
|
|
||||||
openDialog(document.getSimulations().get(selected));
|
openDialog(document.getSimulations().get(selected));
|
||||||
}
|
}
|
||||||
} else if (e.getButton() == MouseEvent.BUTTON3 && e.getClickCount() == 1){
|
} else if (e.getButton() == MouseEvent.BUTTON3 && e.getClickCount() == 1) {
|
||||||
int selectedRow = simulationTable.getSelectedRow();
|
|
||||||
if (selectedRow < 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
doPopup(e);
|
doPopup(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user