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.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.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.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
|
! Example design dialog
|
||||||
|
@ -46,17 +46,17 @@ public class RenameConfigDialog extends JDialog {
|
|||||||
RenameConfigDialog.this.setVisible(false);
|
RenameConfigDialog.this.setVisible(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(okButton, "growx");
|
panel.add(okButton);
|
||||||
|
|
||||||
JButton renameToDefaultButton = new SelectColorButton(trans.get("RenameConfigDialog.but.reset"));
|
JButton resetToDefaultButton = new SelectColorButton(trans.get("RenameConfigDialog.but.reset"));
|
||||||
renameToDefaultButton.addActionListener(new ActionListener() {
|
resetToDefaultButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
rocket.getFlightConfiguration(fcid).setName(null);
|
rocket.getFlightConfiguration(fcid).setName(null);
|
||||||
RenameConfigDialog.this.setVisible(false);
|
RenameConfigDialog.this.setVisible(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(renameToDefaultButton, "growx");
|
panel.add(resetToDefaultButton);
|
||||||
|
|
||||||
JButton cancel = new SelectColorButton(trans.get("button.cancel"));
|
JButton cancel = new SelectColorButton(trans.get("button.cancel"));
|
||||||
cancel.addActionListener(new ActionListener() {
|
cancel.addActionListener(new ActionListener() {
|
||||||
@ -65,11 +65,12 @@ public class RenameConfigDialog extends JDialog {
|
|||||||
RenameConfigDialog.this.setVisible(false);
|
RenameConfigDialog.this.setVisible(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(cancel, "growx, wrap para");
|
panel.add(cancel, "wrap para");
|
||||||
|
|
||||||
// {motors} & {manufacturers} info
|
// {motors} & {manufacturers} info
|
||||||
String text = "<html>" + CommonStrings.dagger + " " + trans.get("RenameConfigDialog.lbl.infoMotors")
|
String text = "<html>" + CommonStrings.dagger + " " + trans.get("RenameConfigDialog.lbl.infoMotors")
|
||||||
+ trans.get("RenameConfigDialog.lbl.infoManufacturers")
|
+ trans.get("RenameConfigDialog.lbl.infoManufacturers")
|
||||||
|
+ trans.get("RenameConfigDialog.lbl.infoCases")
|
||||||
+ trans.get("RenameConfigDialog.lbl.infoCombination");
|
+ trans.get("RenameConfigDialog.lbl.infoCombination");
|
||||||
StyledLabel info = new StyledLabel(text, -2);
|
StyledLabel info = new StyledLabel(text, -2);
|
||||||
info.setFontColor(GUIUtil.getUITheme().getDimTextColor());
|
info.setFontColor(GUIUtil.getUITheme().getDimTextColor());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user