Code cleanup
This commit is contained in:
parent
509ef101b8
commit
84e7c951e6
@ -911,7 +911,7 @@ public class RocketActions {
|
||||
}
|
||||
ComponentConfigDialog.showDialog(parentFrame, document, components.get(0), listeners);
|
||||
} else if (sims != null && sims.length > 0 && (simulationPanel != null)) {
|
||||
simulationPanel.editSimulationAction();
|
||||
simulationPanel.editSimulation();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ public class SimulationPanel extends JPanel {
|
||||
editButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
editSimulationAction();
|
||||
editSimulation();
|
||||
}
|
||||
});
|
||||
this.add(editButton, "gapright para");
|
||||
@ -149,7 +149,7 @@ public class SimulationPanel extends JPanel {
|
||||
runButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
runSimulationAction();
|
||||
runSimulation();
|
||||
}
|
||||
});
|
||||
this.add(runButton, "gapright para");
|
||||
@ -161,7 +161,7 @@ public class SimulationPanel extends JPanel {
|
||||
deleteButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
deleteSimulationAction();
|
||||
deleteSimulation();
|
||||
}
|
||||
});
|
||||
this.add(deleteButton, "gapright para");
|
||||
@ -172,7 +172,7 @@ public class SimulationPanel extends JPanel {
|
||||
plotButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
plotSimulationAction();
|
||||
plotSimulation();
|
||||
}
|
||||
});
|
||||
this.add(plotButton, "wrap para");
|
||||
@ -524,7 +524,7 @@ public class SimulationPanel extends JPanel {
|
||||
updateButtonStates();
|
||||
}
|
||||
|
||||
private void plotSimulationAction() {
|
||||
private void plotSimulation() {
|
||||
int selected = simulationTable.getSelectedRow();
|
||||
if (selected < 0) {
|
||||
return;
|
||||
@ -546,7 +546,7 @@ public class SimulationPanel extends JPanel {
|
||||
openDialog(true, sim);
|
||||
}
|
||||
|
||||
private void deleteSimulationAction() {
|
||||
private void deleteSimulation() {
|
||||
int[] selection = simulationTable.getSelectedRows();
|
||||
if (selection.length == 0) {
|
||||
return;
|
||||
@ -593,7 +593,7 @@ public class SimulationPanel extends JPanel {
|
||||
simulationTableModel.fireTableDataChanged();
|
||||
}
|
||||
|
||||
private void runSimulationAction() {
|
||||
private void runSimulation() {
|
||||
Simulation[] sims = getSelectedSimulations();
|
||||
if (sims == null) return;
|
||||
|
||||
@ -604,7 +604,7 @@ public class SimulationPanel extends JPanel {
|
||||
fireMaintainSelection();
|
||||
}
|
||||
|
||||
public void editSimulationAction() {
|
||||
public void editSimulation() {
|
||||
Simulation[] sims = getSelectedSimulations();
|
||||
if (sims == null) return;
|
||||
|
||||
@ -661,7 +661,7 @@ public class SimulationPanel extends JPanel {
|
||||
cb.setContents(sel, sel);
|
||||
}
|
||||
|
||||
private void duplicateSimulationAction() {
|
||||
private void duplicateSimulation() {
|
||||
Simulation[] sims = getSelectedSimulations();
|
||||
if (sims == null) return;
|
||||
|
||||
@ -780,7 +780,7 @@ public class SimulationPanel extends JPanel {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
editSimulationAction();
|
||||
editSimulation();
|
||||
}
|
||||
}
|
||||
|
||||
@ -792,7 +792,7 @@ public class SimulationPanel extends JPanel {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
runSimulationAction();
|
||||
runSimulation();
|
||||
}
|
||||
}
|
||||
|
||||
@ -806,7 +806,7 @@ public class SimulationPanel extends JPanel {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
deleteSimulationAction();
|
||||
deleteSimulation();
|
||||
}
|
||||
}
|
||||
|
||||
@ -818,7 +818,7 @@ public class SimulationPanel extends JPanel {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
plotSimulationAction();
|
||||
plotSimulation();
|
||||
}
|
||||
}
|
||||
|
||||
@ -832,7 +832,7 @@ public class SimulationPanel extends JPanel {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
duplicateSimulationAction();
|
||||
duplicateSimulation();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.sf.openrocket.gui.main.flightconfigpanel;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.EventObject;
|
||||
import java.util.LinkedHashMap;
|
||||
@ -144,7 +143,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
|
||||
stateChanged(null);
|
||||
switch (tabs.getSelectedIndex()) {
|
||||
case MOTOR_TAB_INDEX:
|
||||
motorConfigurationPanel.selectMotorAction();
|
||||
motorConfigurationPanel.selectMotor();
|
||||
break;
|
||||
case RECOVERY_TAB_INDEX:
|
||||
recoveryConfigurationPanel.selectDeployment();
|
||||
|
@ -148,7 +148,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
||||
table.getActionMap().put("Enter", new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent ae) {
|
||||
selectMotorAction();
|
||||
selectMotor();
|
||||
}
|
||||
});
|
||||
|
||||
@ -208,7 +208,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
||||
|
||||
if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {
|
||||
if (selectedColumn > 0) {
|
||||
selectMotorAction();
|
||||
selectMotor();
|
||||
}
|
||||
} else if (e.getButton() == MouseEvent.BUTTON3 && e.getClickCount() == 1) {
|
||||
if (selectedColumn > 0) {
|
||||
@ -285,7 +285,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
||||
}
|
||||
}
|
||||
|
||||
public void selectMotorAction() {
|
||||
public void selectMotor() {
|
||||
List<MotorMount> mounts = getSelectedComponents();
|
||||
List<FlightConfigurationId> fcIds = getSelectedConfigurationIds();
|
||||
if ((mounts == null) || (fcIds == null) || mounts.size() == 0 || fcIds.size() == 0) {
|
||||
@ -332,7 +332,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
||||
}
|
||||
}
|
||||
|
||||
private void removeMotorAction() {
|
||||
private void removeMotor() {
|
||||
List<MotorMount> mounts = getSelectedComponents();
|
||||
List<FlightConfigurationId> fcIds = getSelectedConfigurationIds();
|
||||
if ((mounts == null) || (fcIds == null) || mounts.size() == 0 || fcIds.size() == 0) {
|
||||
@ -348,7 +348,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
||||
fireTableDataChanged(ComponentChangeEvent.MOTOR_CHANGE);
|
||||
}
|
||||
|
||||
private void selectIgnitionAction() {
|
||||
private void selectIgnition() {
|
||||
List<MotorMount> mounts = getSelectedComponents();
|
||||
List<FlightConfigurationId> fcIds = getSelectedConfigurationIds();
|
||||
if ((mounts == null) || (fcIds == null) || mounts.size() == 0 || fcIds.size() == 0) {
|
||||
@ -397,7 +397,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
||||
}
|
||||
|
||||
|
||||
private void resetIgnitionAction() {
|
||||
private void resetIgnition() {
|
||||
List<MotorMount> mounts = getSelectedComponents();
|
||||
List<FlightConfigurationId> fcIds = getSelectedConfigurationIds();
|
||||
if ((mounts == null) || (fcIds == null) || mounts.size() == 0 || fcIds.size() == 0) {
|
||||
@ -432,7 +432,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
selectMotorAction();
|
||||
selectMotor();
|
||||
}
|
||||
}
|
||||
|
||||
@ -443,7 +443,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
removeMotorAction();
|
||||
removeMotor();
|
||||
}
|
||||
}
|
||||
|
||||
@ -454,7 +454,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
selectIgnitionAction();
|
||||
selectIgnition();
|
||||
}
|
||||
}
|
||||
|
||||
@ -465,7 +465,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
resetIgnitionAction();
|
||||
resetIgnition();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user