[#2069] Add motor type to motor details

This commit is contained in:
SiboVG 2023-02-25 01:02:03 +01:00
parent 2c22015ec7
commit 22fd01d7fc
2 changed files with 9 additions and 0 deletions

View File

@ -1384,6 +1384,7 @@ TCMotorSelPan.lbl.Maxthrust = Max. thrust:
TCMotorSelPan.lbl.Burntime = Burn time:
TCMotorSelPan.lbl.Launchmass = Launch mass:
TCMotorSelPan.lbl.Emptymass = Empty mass:
TCMotorSelPan.lbl.Motortype = Motor type:
TCMotorSelPan.lbl.Caseinfo = Case info:
TCMotorSelPan.lbl.Propinfo = Propellant:
TCMotorSelPan.lbl.CompatibleCases = Compatible Cases:

View File

@ -59,6 +59,7 @@ class MotorInformationPanel extends JPanel {
private final JLabel burnTimeLabel;
private final JLabel launchMassLabel;
private final JLabel emptyMassLabel;
private final JLabel motorTypeLabel;
private final JLabel caseInfoLabel;
private final JLabel propInfoLabel;
private final JLabel dataPointsLabel;
@ -117,6 +118,11 @@ class MotorInformationPanel extends JPanel {
emptyMassLabel = new JLabel();
this.add(emptyMassLabel, "wrap");
//// Motor type
this.add(new JLabel(trans.get("TCMotorSelPan.lbl.Motortype")));
motorTypeLabel = new JLabel();
this.add(motorTypeLabel, "wrap");
//// case info:
this.add(new JLabel(trans.get("TCMotorSelPan.lbl.Caseinfo")));
caseInfoLabel = new JLabel();
@ -239,6 +245,7 @@ class MotorInformationPanel extends JPanel {
burnTimeLabel.setText("");
launchMassLabel.setText("");
emptyMassLabel.setText("");
motorTypeLabel.setText("");
caseInfoLabel.setText("");
propInfoLabel.setText("");
compatibleCasesLabel.setText("");
@ -279,6 +286,7 @@ class MotorInformationPanel extends JPanel {
selectedMotor.getLaunchMass()));
emptyMassLabel.setText(UnitGroup.UNITS_MASS.getDefaultUnit().toStringUnit(
selectedMotor.getBurnoutMass()));
motorTypeLabel.setText(selectedMotor.getMotorType().getName());
caseInfoLabel.setText(selectedMotor.getCaseInfo());
propInfoLabel.setText(selectedMotor.getPropellantInfo());
compatibleCasesLabel.setText("<html>" + StringUtils.join(", ",selectedMotor.getCompatibleCases()) + "<html>");