Update rename dialog to include cases info
This commit is contained in:
parent
e72870c306
commit
2c750498bb
@ -240,7 +240,8 @@ RenameConfigDialog.lbl.name = Name for flight configuration:
|
||||
RenameConfigDialog.but.reset = Reset to default
|
||||
RenameConfigDialog.lbl.infoMotors = The text '<b>{motors}</b>' will be replaced with the <b>motor designation(s).</b><br><pre>\te.g. '{motors} \u2192 'M1350-0'</pre>
|
||||
RenameConfigDialog.lbl.infoManufacturers = The text '<b>{manufacturers}</b>' will be replaced with the <b>motor manufacturer(s).</b><br><pre>\te.g. '{manufacturers}' \u2192 'AeroTech'</pre>
|
||||
RenameConfigDialog.lbl.infoCombination = A <b>combination</b> of the above can be used.<br><pre>\te.g. '{manufacturers motors}' \u2192 'AeroTech M1350-0'</pre>
|
||||
RenameConfigDialog.lbl.infoCases = The text '<b>{cases}</b>' will be replaced with the <b>motor case(s).</b><br><pre>\te.g. '{cases}' \u2192 'SU 18.0x70.0'</pre>
|
||||
RenameConfigDialog.lbl.infoCombination = A <b>combination</b> of the above can be used (you may choose the separator).<br><pre>\te.g. '{manufacturers motors}' \u2192 'AeroTech M1350-0'</pre>
|
||||
|
||||
|
||||
! Example design dialog
|
||||
|
@ -46,17 +46,17 @@ public class RenameConfigDialog extends JDialog {
|
||||
RenameConfigDialog.this.setVisible(false);
|
||||
}
|
||||
});
|
||||
panel.add(okButton, "growx");
|
||||
panel.add(okButton);
|
||||
|
||||
JButton renameToDefaultButton = new SelectColorButton(trans.get("RenameConfigDialog.but.reset"));
|
||||
renameToDefaultButton.addActionListener(new ActionListener() {
|
||||
JButton resetToDefaultButton = new SelectColorButton(trans.get("RenameConfigDialog.but.reset"));
|
||||
resetToDefaultButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
rocket.getFlightConfiguration(fcid).setName(null);
|
||||
RenameConfigDialog.this.setVisible(false);
|
||||
}
|
||||
});
|
||||
panel.add(renameToDefaultButton, "growx");
|
||||
panel.add(resetToDefaultButton);
|
||||
|
||||
JButton cancel = new SelectColorButton(trans.get("button.cancel"));
|
||||
cancel.addActionListener(new ActionListener() {
|
||||
@ -65,11 +65,12 @@ public class RenameConfigDialog extends JDialog {
|
||||
RenameConfigDialog.this.setVisible(false);
|
||||
}
|
||||
});
|
||||
panel.add(cancel, "growx, wrap para");
|
||||
panel.add(cancel, "wrap para");
|
||||
|
||||
// {motors} & {manufacturers} info
|
||||
String text = "<html>" + CommonStrings.dagger + " " + trans.get("RenameConfigDialog.lbl.infoMotors")
|
||||
+ trans.get("RenameConfigDialog.lbl.infoManufacturers")
|
||||
+ trans.get("RenameConfigDialog.lbl.infoCases")
|
||||
+ trans.get("RenameConfigDialog.lbl.infoCombination");
|
||||
StyledLabel info = new StyledLabel(text, -2);
|
||||
info.setFontColor(GUIUtil.getUITheme().getDimTextColor());
|
||||
|
Loading…
x
Reference in New Issue
Block a user