Merge pull request #1098 from SiboVG/issue-motors-layout

Clean up motor configuration layout
This commit is contained in:
Joe Pfeiffer 2022-01-31 18:05:17 -07:00 committed by GitHub
commit d277dbb4ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 47 additions and 39 deletions

View File

@ -2086,8 +2086,8 @@ EditDecalHelper.launchSystemEditorException = Cannot launch system graphics edit
EditDecalHelper.launchCustomEditorException = Cannot launch graphics editor with command ''{0}''
EditDecalHelper.editPreferencesHelp = The editor used can be modified in the Preferences dialog.
MotorConfigurationPanel.lbl.motorMounts = Motor mounts:
MotorConfigurationPanel.lbl.motorConfiguration = Motor configurations:
MotorConfigurationPanel.lbl.motorMounts = Motor mounts
MotorConfigurationPanel.lbl.motorConfiguration = Motor configurations
MotorConfigurationPanel.btn.removeMotor = Remove motor
MotorConfigurationPanel.btn.selectMotor = Select motor
MotorConfigurationPanel.btn.selectIgnition = Select ignition

View File

@ -175,10 +175,10 @@ MotorConfigurationPanel.btn.removeMotor = Odeber motor
MotorConfigurationPanel.btn.selectMotor = Vyber motor
edtmotorconfdlg.but.Removeconfiguration = Odeber nastavení
edtmotorconfdlg.but.Newconfiguration = Nové nastavení
MotorConfigurationPanel.lbl.motorMounts = <html><b>Pripojení motoru:</b>
MotorConfigurationPanel.lbl.motorMounts = Pripojení motoru
edtmotorconfdlg.title.Editmotorconf = Úprava nastavení motoru
edtmotorconfdlg.selectcomp = <html>Vyber ke kterým komponentám se má motor pripojit:
MotorConfigurationPanel.lbl.motorConfiguration = <html><b>Nastavení motoru:</b>
MotorConfigurationPanel.lbl.motorConfiguration = Nastavení motoru
edtmotorconfdlg.lbl.Configname = Jméno nastavení:
edtmotorconfdlg.lbl.Leavenamedefault = Nechej prázdné polícko jako výchozí hodnotu.

View File

@ -176,10 +176,10 @@ MotorConfigurationPanel.btn.removeMotor = Motor entfernen
MotorConfigurationPanel.btn.selectMotor = Motor auswählen
edtmotorconfdlg.but.Removeconfiguration = Konfiguration entfernen
edtmotorconfdlg.but.Newconfiguration = Neue Konfiguration
MotorConfigurationPanel.lbl.motorMounts = <html><b>Motorhalterungen:</b>
MotorConfigurationPanel.lbl.motorMounts = Motorhalterungen
edtmotorconfdlg.title.Editmotorconf = Motorkonfiguration bearbeiten
edtmotorconfdlg.selectcomp = <html>Auswählen, welche Komponenten Motorhalterungen sind:
MotorConfigurationPanel.lbl.motorConfiguration = <html><b>Motorkonfigurationen:</b>
MotorConfigurationPanel.lbl.motorConfiguration = Motorkonfigurationen
edtmotorconfdlg.lbl.Configname = Name der Konfiguration:
edtmotorconfdlg.lbl.Leavenamedefault = Leer lassen für Standardwert.

View File

@ -574,8 +574,8 @@ MotorConfigurationPanel.btn.resetIgnition = Reiniciar ignici\u00f3n
MotorConfigurationPanel.btn.selectIgnition = Seleccionar ignici\u00f3n
MotorConfigurationPanel.btn.selectMotor = Seleccionar motor
MotorConfigurationPanel.description = <b>Seleccione los motores y los eventos de ignici\u00f3n en la configuraci\u00f3n del vuelo elegida.</b><br> <em>Porta motores:</em> Seleccione qu\u00e9 compontentes funcionan como porta motores.<br> <em>Configuraciones de motor:</em> Seleccioner el motor y el evento de ignici\u00f3n para cada tubo Prota motor.
MotorConfigurationPanel.lbl.motorConfiguration = <html><b>Configuraciones del motor:</b>
MotorConfigurationPanel.lbl.motorMounts = <html><b>Porta motor:</b>
MotorConfigurationPanel.lbl.motorConfiguration = Configuraciones del motor
MotorConfigurationPanel.lbl.motorMounts = Porta motor
MotorConfigurationPanel.lbl.nomotors = No hay monturas de motores seleccionados. Seleccione uno o mas tubos de la lista en la izquierda para usarlo como montura de motor.
MotorConfigurationTableModel.table.ignition.default = Por defecto ({0})

View File

@ -567,8 +567,8 @@ MotorConfigurationPanel.btn.resetIgnition = R\u00E9initialiser l'allumage
MotorConfigurationPanel.btn.selectIgnition = Choisir l'allumage
MotorConfigurationPanel.btn.selectMotor = Choisir le moteur
MotorConfigurationPanel.description = <b>Choisir les moteurs et les \u00E9v\u00E9nements d'allumage de la configuration de vol choisie.</b><br> <em>Portes moteurs:</em> Choisir quels pieces sont des portes moteurs.<br> <em>Configurations moteur:</em> Choisir le moteur et l'evenement d'allumage pour chaque porte moteur.
MotorConfigurationPanel.lbl.motorConfiguration = <html><b>Configurations moteur:</b>
MotorConfigurationPanel.lbl.motorMounts = <html><b>Portes moteur:</b>
MotorConfigurationPanel.lbl.motorConfiguration = Configurations moteur
MotorConfigurationPanel.lbl.motorMounts = Portes moteur
MotorConfigurationTableModel.table.ignition.default = Par Ddfault ({0})

View File

@ -178,10 +178,10 @@ MotorConfigurationPanel.btn.removeMotor = Rimuovi il motore
MotorConfigurationPanel.btn.selectMotor = Seleziona il motore
edtmotorconfdlg.but.Removeconfiguration = Rimuovi la configurazione
edtmotorconfdlg.but.Newconfiguration = Nuova configurazione
MotorConfigurationPanel.lbl.motorMounts = <html><b>Alloggiamenti motore:</b>
MotorConfigurationPanel.lbl.motorMounts = Alloggiamenti motore
edtmotorconfdlg.title.Editmotorconf = Modifica la configurazione del motore
edtmotorconfdlg.selectcomp = <html>Seleziona quali componenti fungono da alloggiamenti per il motore:
MotorConfigurationPanel.lbl.motorConfiguration = <html><b>Configurazione dei motori:</b>
MotorConfigurationPanel.lbl.motorConfiguration = Configurazione dei motori
edtmotorconfdlg.lbl.Configname = Nome della configurazione:
edtmotorconfdlg.lbl.Leavenamedefault = Lascia il campo vuoto per il nome prestabilito.

View File

@ -174,11 +174,11 @@ MotorConfigurationPanel.btn.removeMotor = \u30E2\u30FC\u30BF\u30FC\u306E\u524A\
MotorConfigurationPanel.btn.selectMotor = \u30E2\u30FC\u30BF\u30FC\u306E\u9078\u629E
edtmotorconfdlg.but.Removeconfiguration = \u30B3\u30F3\u30D5\u30A3\u30AE\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\u304B\u3089\u524A\u9664
edtmotorconfdlg.but.Newconfiguration = \u65B0\u3057\u3044\u30E2\u30FC\u30BF\u30FC
MotorConfigurationPanel.lbl.motorMounts = <html><b>\u30E2\u30FC\u30BF\u30FC\u30DE\u30A6\u30F3\u30C8\uFF1A</b>
MotorConfigurationPanel.lbl.motorMounts = \u30E2\u30FC\u30BF\u30FC\u30DE\u30A6\u30F3\u30C8
edtmotorconfdlg.title.Editmotorconf = \u30E2\u30FC\u30BF\u30FC\u30B3\u30F3\u30D5\u30A3\u30AE\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\u306E\u7DE8\u96C6
edtmotorconfdlg.selectcomp = <html>\u3069\u306E\u90E8\u54C1\u3092\u30E2\u30FC\u30BF\u30FC\u30DE\u30A6\u30F3\u30C8\u3068\u3059\u308B\u304B\uFF1A
MotorConfigurationPanel.lbl.motorConfiguration = <html><b>\u30E2\u30FC\u30BF\u30FC\u30B3\u30F3\u30D5\u30A3\u30AE\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\uFF1A</b>
edtmotorconfdlg.lbl.Configname = \u30B3\u30F3\u30D5\u30A3\u30AE\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\u306E\u540D\u524D\uFF1A
MotorConfigurationPanel.lbl.motorConfiguration = \u30E2\u30FC\u30BF\u30FC\u30B3\u30F3\u30D5\u30A3\u30AE\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\uFF1A
edtmotorconfdlg.lbl.Configname = \u30B3\u30F3\u30D5\u30A3\u30AE\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\u306E\u540D\u524D
edtmotorconfdlg.lbl.Leavenamedefault = Leave name empty for default.
! Example design dialog

View File

@ -2034,8 +2034,8 @@ EditDecalHelper.launchSystemEditorException = Kan grafische systeemeditor niet s
EditDecalHelper.launchCustomEditorException = Kan grafische editor niet starten met commando ''{0}''
EditDecalHelper.editPreferencesHelp = De gebruikte editor kan worden gewijzigd in het Voorkeuren dialoogvenster.
MotorConfigurationPanel.lbl.motorMounts = Motorbevestigingen:
MotorConfigurationPanel.lbl.motorConfiguration = Motorconfiguraties:
MotorConfigurationPanel.lbl.motorMounts = Motorbevestigingen
MotorConfigurationPanel.lbl.motorConfiguration = Motorconfiguraties
MotorConfigurationPanel.btn.removeMotor = Verwijder motor
MotorConfigurationPanel.btn.selectMotor = Selecteer motor
MotorConfigurationPanel.btn.selectIgnition = Selecteer ontsteking

View File

@ -176,10 +176,10 @@
MotorConfigurationPanel.btn.selectMotor = Wybierz silnik
edtmotorconfdlg.but.Removeconfiguration = Usu\u0144 konfiguracj\u0119
edtmotorconfdlg.but.Newconfiguration = Nowa konfiguracja
MotorConfigurationPanel.lbl.motorMounts = <html><b>Gniazda silnikowe:</b>
MotorConfigurationPanel.lbl.motorMounts = Gniazda silnikowe
edtmotorconfdlg.title.Editmotorconf = Edytuj konfiguracje silnika
edtmotorconfdlg.selectcomp = <html>Wybierz cz\u0119\u015Bci, które pe\u0142ni\u0105 funkcj\u0119 gniazd silnikowych:
MotorConfigurationPanel.lbl.motorConfiguration = <html><b>Konfiguracje silników:</b>
MotorConfigurationPanel.lbl.motorConfiguration = Konfiguracje silników
edtmotorconfdlg.lbl.Configname = Nazwa konfiguracji:
edtmotorconfdlg.lbl.Leavenamedefault = Pozostaw bez nazwy w celu u\u017Cycia nazwy domy\u015Blnej.

View File

@ -552,8 +552,8 @@ MotorConfigurationPanel.btn.resetIgnition = Reset ignition
MotorConfigurationPanel.btn.selectIgnition = Select ignition
MotorConfigurationPanel.btn.selectMotor = Selecionar motor
MotorConfigurationPanel.description = <b>Selecionar os motores e eventos de igni\u00e7\u00e3o da configura\u00e7\u00e3o de voo selecionada.</b><br> <em>Montagem do Motor:</em> Selecione as fun\u00e7\u00f5es dos componentes da montagem do motor.<br> <em>Configura\u00e7\u00f5es do motor:</em> Selecione o motor e o evento de igni\u00e7\u00e3o para cada montagem do motor.
MotorConfigurationPanel.lbl.motorConfiguration = <html><b>Configura\u00e7\u00f5es de motor:</b>
MotorConfigurationPanel.lbl.motorMounts = <html><b>Montagem do motor:</b>
MotorConfigurationPanel.lbl.motorConfiguration = Configura\u00e7\u00f5es de motor
MotorConfigurationPanel.lbl.motorMounts = Montagem do motor
MotorConfigurationTableModel.table.ignition.default = Default ({0})

View File

@ -1870,8 +1870,8 @@ EditDecalHelper.launchSystemEditorException = \u041d\u0435\u0432\u043e\u0437\u04
EditDecalHelper.launchCustomEditorException = \u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 ''{0}''
EditDecalHelper.editPreferencesHelp = \u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445.
MotorConfigurationPanel.lbl.motorMounts = <html><b>\u041a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u0439:</b>
MotorConfigurationPanel.lbl.motorConfiguration = <html><b>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u0439:</b>
MotorConfigurationPanel.lbl.motorMounts = \u041a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u044f \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u0439
MotorConfigurationPanel.lbl.motorConfiguration = \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u0439
MotorConfigurationPanel.btn.removeMotor = \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c
MotorConfigurationPanel.btn.selectMotor = \u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c
MotorConfigurationPanel.btn.selectIgnition = \u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u0436\u0438\u0433\u0430\u043d\u0438\u0435

View File

@ -1877,8 +1877,8 @@ EditDecalHelper.launchSystemEditorException = Cannot launch system graphics edit
EditDecalHelper.launchCustomEditorException = Cannot launch graphics editor with command ''{0}''
EditDecalHelper.editPreferencesHelp = The editor used can be modified in the Preferences dialog.
MotorConfigurationPanel.lbl.motorMounts = Motor mounts:
MotorConfigurationPanel.lbl.motorConfiguration = Motor configurations:
MotorConfigurationPanel.lbl.motorMounts = Motor mounts
MotorConfigurationPanel.lbl.motorConfiguration = Motor configurations
MotorConfigurationPanel.btn.removeMotor = Remove motor
MotorConfigurationPanel.btn.selectMotor = Select motor
MotorConfigurationPanel.btn.selectIgnition = Select ignition

View File

@ -593,8 +593,8 @@ MotorConfigurationPanel.btn.resetIgnition = \u91CD\u7F6E\u70B9\u706B
MotorConfigurationPanel.btn.selectIgnition = \u9009\u62E9\u70B9\u706B
MotorConfigurationPanel.btn.selectMotor = \u9009\u62E9\u53D1\u52A8\u673A
MotorConfigurationPanel.description = <b>\u9009\u62E9\u53D1\u52A8\u673A\u4EE5\u53CA\u70B9\u706B\u4E8B\u4EF6\u5E94\u7528\u4E0E\u5F53\u524D\u914D\u7F6E.</b><br> <em>\u53D1\u52A8\u673A\u5EA7:</em> \u9009\u62E9\u4F5C\u4E3A\u53D1\u52A8\u673A\u5EA7\u7684\u7EC4\u4EF6.<br> <em>\u53D1\u52A8\u673A\u914D\u7F6E:</em> \u4E3A\u6BCF\u4E00\u4E2A\u53D1\u52A8\u673A\u5EA7\u9009\u62E9\u53D1\u52A8\u673A\u53CA\u70B9\u706B\u4E8B\u4EF6.
MotorConfigurationPanel.lbl.motorConfiguration = \u53D1\u52A8\u673A\u914D\u7F6E:
MotorConfigurationPanel.lbl.motorMounts = \u53D1\u52A8\u673A\u5EA7:
MotorConfigurationPanel.lbl.motorConfiguration = \u53D1\u52A8\u673A\u914D\u7F6E
MotorConfigurationPanel.lbl.motorMounts = \u53D1\u52A8\u673A\u5EA7
MotorConfigurationPanel.lbl.nomotors = \u65E0\u53D1\u52A8\u673A\u5EA7.\u8BF7\u5148\u5728\u5DE6\u4FA7\u9009\u62E9\u7BAD\u4F53\u4F5C\u4E3A\u53D1\u52A8\u673A\u5EA7.
MotorConfigurationTableModel.table.ignition.default = \u9ED8\u8BA4 ({0})

View File

@ -8,6 +8,7 @@ import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.BorderFactory;
import javax.swing.AbstractAction;
import javax.swing.Box;
import javax.swing.BoxLayout;
@ -63,25 +64,28 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
{
//// Select motor mounts
JPanel subpanel = new JPanel(new MigLayout(""));
JLabel label = new StyledLabel(trans.get("lbl.motorMounts"), Style.BOLD);
subpanel.add(label, "wrap");
JPanel subpanel = new JPanel(new MigLayout("inset 0, fill"));
subpanel.setBorder(BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(),
"<html><b>" + trans.get("lbl.motorMounts") + "</b></html>"));
MotorMountConfigurationPanel mountConfigPanel = new MotorMountConfigurationPanel(this, rocket);
subpanel.add(mountConfigPanel, "grow");
this.add(subpanel, "split, w 200lp, growy");
this.add(subpanel, "split, growy");
}
cards = new JPanel(new CardLayout());
this.add(cards);
JLabel helpText = new JLabel(trans.get("MotorConfigurationPanel.lbl.nomotors"));
cards.add(helpText, HELP_LABEL);
cards.add(helpText, HELP_LABEL );
JPanel configurationPanel = new JPanel(new MigLayout("fill, insets n n 5px n"));
configurationPanel.setBorder(BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(),
"<html><b>" + trans.get("MotorConfigurationPanel.lbl.motorConfiguration") + "</b></html>"));
JScrollPane scroll = new JScrollPane(table);
cards.add(scroll, TABLE_LABEL);
this.add(cards, "grow, wrap");
configurationPanel.add(scroll, "spanx, grow, wrap");
//// Select motor
selectMotorButton = new SelectColorButton(trans.get("MotorConfigurationPanel.btn.selectMotor"));
@ -91,7 +95,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
selectMotor();
}
});
this.add(selectMotorButton, "split, align right, sizegroup button");
configurationPanel.add(selectMotorButton, "split, align right, sizegroup button");
//// Remove motor button
removeMotorButton = new SelectColorButton(trans.get("MotorConfigurationPanel.btn.removeMotor"));
@ -101,7 +105,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
removeMotor();
}
});
this.add(removeMotorButton, "sizegroup button");
configurationPanel.add(removeMotorButton, "sizegroup button");
//// Select Ignition button
selectIgnitionButton = new SelectColorButton(trans.get("MotorConfigurationPanel.btn.selectIgnition"));
@ -111,7 +115,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
selectIgnition();
}
});
this.add(selectIgnitionButton, "sizegroup button");
configurationPanel.add(selectIgnitionButton, "sizegroup button");
//// Reset Ignition button
resetIgnitionButton = new SelectColorButton(trans.get("MotorConfigurationPanel.btn.resetIgnition"));
@ -121,7 +125,11 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
resetIgnition();
}
});
this.add(resetIgnitionButton, "sizegroup button, wrap");
configurationPanel.add(resetIgnitionButton, "sizegroup button, wrap");
cards.add(configurationPanel, TABLE_LABEL );
this.add(cards, "gapleft para, grow, wrap");
// Set 'Enter' key action to open the motor selection dialog
table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(