Remove FlightDataComboBox

This commit is contained in:
SiboVG 2024-08-13 22:20:09 +02:00
parent df71a555ce
commit 7a453829ac
2 changed files with 1 additions and 19 deletions

View File

@ -1,18 +0,0 @@
package info.openrocket.swing.gui.simulation;
import info.openrocket.swing.gui.widgets.GroupableAndSearchableComboBox;
import info.openrocket.core.l10n.Translator;
import info.openrocket.core.simulation.FlightDataType;
import info.openrocket.core.simulation.FlightDataTypeGroup;
import info.openrocket.core.startup.Application;
import javax.swing.JComboBox;
import java.util.List;
public class FlightDataComboBox extends JComboBox<FlightDataType> {
private static final Translator trans = Application.getTranslator();
public static GroupableAndSearchableComboBox<FlightDataTypeGroup, FlightDataType> createComboBox(List<FlightDataType> types) {
return new GroupableAndSearchableComboBox<>(types, trans.get("FlightDataComboBox.placeholder"));
}
}

View File

@ -173,7 +173,7 @@ public class SimulationPlotPanel extends JPanel {
//// X axis type:
this.add(new JLabel(trans.get("simplotpanel.lbl.Xaxistype")), "spanx, split");
domainTypeSelector = FlightDataComboBox.createComboBox(Arrays.asList(types));
domainTypeSelector = new GroupableAndSearchableComboBox<>(Arrays.asList(types), trans.get("FlightDataComboBox.placeholder"));
domainTypeSelector.setSelectedItem(configuration.getDomainAxisType());
domainTypeSelector.addItemListener(new ItemListener() {
@Override