[#1558] Restore table focus

This commit is contained in:
SiboVG 2022-07-28 00:48:50 +02:00
parent b7589a03e7
commit 96f3e671b0
5 changed files with 16 additions and 0 deletions

View File

@ -776,6 +776,7 @@ public class SimulationPanel extends JPanel {
break;
simulationTable.addRowSelectionInterval(row, row);
}
simulationTable.requestFocusInWindow();
}
class EditSimulationAction extends AbstractAction {

View File

@ -134,6 +134,7 @@ public abstract class FlightConfigurablePanel<T extends FlightConfigurableCompon
return;
}
table.changeSelection(row, col, true, false);
table.requestFocusInWindow();
}
protected void installTableListener() {

View File

@ -356,6 +356,8 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
if (update) {
fireTableDataChanged(ComponentChangeEvent.MOTOR_CHANGE);
} else {
table.requestFocusInWindow();
}
}
@ -420,6 +422,8 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
if (update) {
fireTableDataChanged(ComponentChangeEvent.MOTOR_CHANGE);
} else {
table.requestFocusInWindow();
}
}
@ -448,6 +452,8 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
if (update) {
fireTableDataChanged(ComponentChangeEvent.MOTOR_CHANGE);
} else {
table.requestFocusInWindow();
}
}

View File

@ -235,6 +235,8 @@ public class RecoveryConfigurationPanel extends FlightConfigurablePanel<Recovery
if (update) {
fireTableDataChanged(ComponentChangeEvent.AERODYNAMIC_CHANGE);
} else {
table.requestFocusInWindow();
}
}
@ -259,6 +261,8 @@ public class RecoveryConfigurationPanel extends FlightConfigurablePanel<Recovery
}
if (update) {
fireTableDataChanged(ComponentChangeEvent.AERODYNAMIC_CHANGE);
} else {
table.requestFocusInWindow();
}
}

View File

@ -245,6 +245,8 @@ public class SeparationConfigurationPanel extends FlightConfigurablePanel<AxialS
if (update) {
fireTableDataChanged(ComponentChangeEvent.AEROMASS_CHANGE);
} else {
table.requestFocusInWindow();
}
}
@ -269,6 +271,8 @@ public class SeparationConfigurationPanel extends FlightConfigurablePanel<AxialS
if (update) {
fireTableDataChanged(ComponentChangeEvent.AEROMASS_CHANGE);
} else {
table.requestFocusInWindow();
}
}