diff --git a/core/resources/l10n/messages.properties b/core/resources/l10n/messages.properties
index fcf0b1298..e00acb367 100644
--- a/core/resources/l10n/messages.properties
+++ b/core/resources/l10n/messages.properties
@@ -28,7 +28,7 @@ RocketActions.DelSimuAct.ttip.Delete = Delete the selected simulation.
RocketActions.DelAct.Delete = Delete
RocketActions.DelAct.ttip.Delete = Delete the selected component or simulation.
RocketActions.CutAction.Cut = Cut
-RocketActions.CutAction.ttip.Cut = Cut this component or simulation to the clipboard and remove from this design
+RocketActions.CutAction.ttip.Cut = Cut this component or simulation to the clipboard and delete from this design
RocketActions.CopyAct.Copy = Copy
RocketActions.CopyAct.ttip.Copy = Copy this component (and subcomponents) to the clipboard.
RocketActions.PasteAct.Paste = Paste
@@ -190,7 +190,7 @@ MotorChooserDialog.title = Select a rocket motor
! Edit Motor configuration dialog
edtmotorconfdlg.col.configuration = Configuration
-edtmotorconfdlg.but.Removeconfiguration = Remove Configuration
+edtmotorconfdlg.but.Deleteconfiguration = Delete Configuration
edtmotorconfdlg.but.Renameconfiguration = Rename Configuration
edtmotorconfdlg.but.Newconfiguration = New Configuration
edtmotorconfdlg.but.Duplicateconfiguration = Duplicate Configuration
@@ -376,7 +376,7 @@ simedtdlg.but.runsimulation = Run simulation
simedtdlg.but.resettodefault = Reset to default
simedtdlg.but.savedefault = Save as default
simedtdlg.but.add = Add
-simedtdlg.but.remove = Remove
+simedtdlg.but.delete = Delete
simedtdlg.title.Editsim = Edit simulation
simedtdlg.lbl.Simname = Simulation name:
simedtdlg.tab.Launchcond = Launch conditions
@@ -608,7 +608,7 @@ customExpressionPanel.but.ttip.Import = Import custom expressions from another .
customExpressionPanel.lbl.UpdateNote = You must run the simulation before data will be available for plotting.
customExpressionPanel.lbl.CalcNote = Expressions will be calculated in the order shown.
customExpressionPanel.lbl.CustomExpressions = Custom Expressions
-customExpression.Units.but.ttip.Remove = Remove this expression
+customExpression.Units.but.ttip.Delete = Delete this expression
customExpression.Units.but.ttip.Edit = Edit this expression
customExpression.Units.but.ttip.MoveUp = Move expression up in calculation order
customExpression.Units.but.ttip.MoveDown = Move expression down in calculation order
@@ -692,7 +692,7 @@ simplotpanel.but.All = All
simplotpanel.but.None = None
simplotpanel.but.NewYaxisplottype = New Y axis plot type
simplotpanel.lbl.Axis = Axis:
-simplotpanel.but.ttip.Removethisplot = Remove this plot
+simplotpanel.but.ttip.Deletethisplot = Delete this plot
simplotpanel.Desc = The data will be plotted in time order even if the X axis type is not time.
simplotpanel.OptionPane.lbl1 = A maximum of 15 plots is allowed.
simplotpanel.OptionPane.lbl2 = Cannot add plot
@@ -1006,7 +1006,7 @@ FreeformFinSetCfg.lbl.Thickness = Thickness:
FreeformFinSetConfig.lbl.doubleClick1 = Double-click
FreeformFinSetConfig.lbl.doubleClick2 = to edit
FreeformFinSetConfig.lbl.clickDrag = Click+drag: Add and move points
-FreeformFinSetConfig.lbl.ctrlClick = Ctrl+click: Remove point
+FreeformFinSetConfig.lbl.ctrlClick = Ctrl+click: Delete point
FreeformFinSetConfig.lbl.scaleFin = Scale Fin
FreeformFinSetConfig.lbl.exportCSV = Export CSV
@@ -1095,7 +1095,7 @@ MotorCfg.lbl.longA2 = Stages can be added by clicking \"New stage\".
MotorCfg.lbl.longB1 = The current design has
MotorCfg.lbl.longB2 = stages.
MotorCfg.but.Selectmotor = Select motor
-MotorCfg.but.Removemotor = Remove motor
+MotorCfg.but.Deletemotor = Delete motor
MotorCfg.lbl.motorLabel = None
! NoseConeConfig
@@ -1961,10 +1961,10 @@ GeneralOptimizationDialog.btn.stop = Stop optimization
GeneralOptimizationDialog.lbl.paramsToOptimize = Parameters to optimize:
GeneralOptimizationDialog.btn.add = Add
GeneralOptimizationDialog.btn.add.ttip = Add the selected parameter to the optimization
-GeneralOptimizationDialog.btn.remove = Remove
-GeneralOptimizationDialog.btn.remove.ttip = Remove the selected parameter from the optimization
-GeneralOptimizationDialog.btn.removeAll = Remove all
-GeneralOptimizationDialog.btn.removeAll.ttip = Remove all parameters from the optimization
+GeneralOptimizationDialog.btn.delete = Delete
+GeneralOptimizationDialog.btn.delete.ttip = Delete the selected parameter from the optimization
+GeneralOptimizationDialog.btn.deleteAll = Delete all
+GeneralOptimizationDialog.btn.deleteAll.ttip = Delete all parameters from the optimization
GeneralOptimizationDialog.lbl.availableParams = Available parameters:
GeneralOptimizationDialog.lbl.optimizationOpts = Optimization options
GeneralOptimizationDialog.lbl.optimizeSim = Optimize simulation:
@@ -2099,7 +2099,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Match fore diameter
ComponentPresetChooserDialog.menu.sortAsc = Sort Ascending
ComponentPresetChooserDialog.menu.sortDesc = Sort Descending
ComponentPresetChooserDialog.menu.units = Units
-ComponentPresetChooserDialog.checkbox.showAllCompatible = Show all compatible
ComponentPresetChooserDialog.checkbox.showLegacyCheckBox = Show Legacy Database
ComponentPresetChooserDialog.lbl.favorites = Check to add preset to the preset drop-down menu in the component edit dialog
Directly apply a preset by double-clicking it or by selecting it and closing this window.
table.column.Favorite = Favorite
@@ -2152,7 +2151,7 @@ EditDecalHelper.editPreferencesHelp = The editor used can be modified in the Pre
MotorConfigurationPanel.lbl.motorMounts = Motor mounts
MotorConfigurationPanel.lbl.motorConfiguration = Motor configurations
-MotorConfigurationPanel.btn.removeMotor = Remove motor
+MotorConfigurationPanel.btn.deleteMotor = Delete motor
MotorConfigurationPanel.btn.selectMotor = Select motor
MotorConfigurationPanel.btn.selectIgnition = Select ignition
MotorConfigurationPanel.btn.resetIgnition = Reset ignition
diff --git a/core/resources/l10n/messages_cs.properties b/core/resources/l10n/messages_cs.properties
index ae8ba7d23..3d2ebb086 100644
--- a/core/resources/l10n/messages_cs.properties
+++ b/core/resources/l10n/messages_cs.properties
@@ -173,9 +173,9 @@ debuglogdlg.lbl.Stacktrace = Tracov
! Edit Motor configuration dialog
-MotorConfigurationPanel.btn.removeMotor = Odeber motor
+MotorConfigurationPanel.btn.deleteMotor = Odeber motor
MotorConfigurationPanel.btn.selectMotor = Vyber motor
-edtmotorconfdlg.but.Removeconfiguration = Odeber nastavení
+edtmotorconfdlg.but.Deleteconfiguration = Odeber nastavení
edtmotorconfdlg.but.Newconfiguration = Nové nastavení
MotorConfigurationPanel.lbl.motorMounts = Pripojení motoru
edtmotorconfdlg.title.Editmotorconf = Úprava nastavení motoru
@@ -283,7 +283,7 @@ update.dlg.latestVersion = Je spu\u0161tena nejnovej\u0161
simedtdlg.but.runsimulation = Simulace be\u017Eí
simedtdlg.but.resettodefault = Reset do výchozí hodnoty
simedtdlg.but.add = Pridej
-simedtdlg.but.remove = Odeber
+simedtdlg.but.delete = Odeber
simedtdlg.title.Editsim = Uprav simulaci
simedtdlg.lbl.Simname = Jméno simulace:
simedtdlg.tab.Launchcond = Startovací podmínky
@@ -472,7 +472,7 @@ simplotpanel.but.None = Nic
simplotpanel.but.NewYaxisplottype = Nový typ osy Y
simplotpanel.but.Plotflight = Letový graf
simplotpanel.lbl.Axis = Osy:
-simplotpanel.but.ttip.Removethisplot = Odeber tento graf
+simplotpanel.but.ttip.Deletethisplot = Odeber tento graf
simplotpanel.Desc = Data budou vykreslena v casovém poradí i kdy\u017E osa x nebude nastavena jako cas.
simplotpanel.OptionPane.lbl1 = Maximálne 15 grafu je povoleno.
simplotpanel.OptionPane.lbl2 = Nemohu pridat graf
@@ -780,7 +780,7 @@ MotorCfg.lbl.longA2 = Stupne mohou b
MotorCfg.lbl.longB1 = Soucasný návrh má
MotorCfg.lbl.longB2 = stupnu.
MotorCfg.but.Selectmotor = Vyber motor
-MotorCfg.but.Removemotor = Odeber motor
+MotorCfg.but.Deletemotor = Odeber motor
MotorCfg.lbl.motorLabel = Nic
! NoseConeConfig
@@ -1470,10 +1470,10 @@ GeneralOptimizationDialog.btn.stop = Konec optimalizace
GeneralOptimizationDialog.lbl.paramsToOptimize = Parametry optimalizace:
GeneralOptimizationDialog.btn.add = Pridej
GeneralOptimizationDialog.btn.add.ttip = Pridej oznacené parametry k optimalizaci
-GeneralOptimizationDialog.btn.remove = Odeber
-GeneralOptimizationDialog.btn.remove.ttip = Odeber oznacené parametry z optimalizace
-GeneralOptimizationDialog.btn.removeAll = Odeber v\u0161e
-GeneralOptimizationDialog.btn.removeAll.ttip = Odeber v\u0161echny parametry z optimalizace
+GeneralOptimizationDialog.btn.delete = Odeber
+GeneralOptimizationDialog.btn.delete.ttip = Odeber oznacené parametry z optimalizace
+GeneralOptimizationDialog.btn.deleteAll = Odeber v\u0161e
+GeneralOptimizationDialog.btn.deleteAll.ttip = Odeber v\u0161echny parametry z optimalizace
GeneralOptimizationDialog.lbl.availableParams = Dostupné parametry:
GeneralOptimizationDialog.lbl.optimizationOpts = Nastavení optimalizace
GeneralOptimizationDialog.lbl.optimizeSim = Optimalizuj simulaci:
@@ -1598,7 +1598,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Shoda predn
ComponentPresetChooserDialog.menu.sortAsc = Serad vzestupne
ComponentPresetChooserDialog.menu.sortDesc = Serad sestupne
ComponentPresetChooserDialog.menu.units = Jednotky
-ComponentPresetChooserDialog.checkbox.showAllCompatible = Uka\u017E v\u0161e co je kompaktibilní
table.column.Favorite = Oblíbené
table.column.Manufacturer = Výrobce
table.column.PartNo = Císlo soucástky
diff --git a/core/resources/l10n/messages_de.properties b/core/resources/l10n/messages_de.properties
index a308fd80b..ba51cc96e 100644
--- a/core/resources/l10n/messages_de.properties
+++ b/core/resources/l10n/messages_de.properties
@@ -174,9 +174,9 @@ debuglogdlg.lbl.Stacktrace = Stacktrace:
! Edit Motor configuration dialog
-MotorConfigurationPanel.btn.removeMotor = Motor entfernen
+MotorConfigurationPanel.btn.deleteMotor = Motor entfernen
MotorConfigurationPanel.btn.selectMotor = Motor auswählen
-edtmotorconfdlg.but.Removeconfiguration = Konfiguration entfernen
+edtmotorconfdlg.but.Deleteconfiguration = Konfiguration entfernen
edtmotorconfdlg.but.Newconfiguration = Neue Konfiguration
MotorConfigurationPanel.lbl.motorMounts = Motorhalterungen
edtmotorconfdlg.title.Editmotorconf = Motorkonfiguration bearbeiten
@@ -285,7 +285,7 @@ update.dlg.latestVersion = Sie benutzen die neueste Version von OpenRocket, Vers
simedtdlg.but.runsimulation = Simulation starten
simedtdlg.but.resettodefault = Auf Standardeinstellungen zurücksetzen
simedtdlg.but.add = Hinzufügen
-simedtdlg.but.remove = Entfernen
+simedtdlg.but.delete = Entfernen
simedtdlg.title.Editsim = Simulation bearbeiten
simedtdlg.lbl.Simname = Name der Simulation:
simedtdlg.tab.Launchcond = Startbedingungen
@@ -462,7 +462,7 @@ customExpressionPanel.but.NewExpression = Neuer Ausdruck
customExpressionPanel.lbl.UpdateNote = Die Simulation muss erst ausgeführt werden, bevor die Daten zum Plotten verfügbar sind.
customExpressionPanel.lbl.CalcNote = Ausdrücke werden in der angezeigten Reihenfolge berechnet.
customExpressionPanel.lbl.CustomExpressions = Benutzerdefinierte Ausdrücke:
-customExpression.Units.but.ttip.Remove = Diesen Ausdruck entfernen
+customExpression.Units.but.ttip.Delete = Diesen Ausdruck entfernen
customExpression.Units.but.ttip.Edit = Diesen Ausdruck bearbeiten
customExpression.Units.but.ttip.MoveUp = Ausdruck in der Berechnungsreihenfolge nach oben schieben
customExpression.Units.but.ttip.MoveDown = Ausdruck in der Berechnungsreihenfolge nach unten schieben
@@ -530,7 +530,7 @@ simplotpanel.but.None = Keine
simplotpanel.but.NewYaxisplottype = Neuer Y-Achsenplot-Typ
simplotpanel.but.Plotflight = Flug plotten
simplotpanel.lbl.Axis = Achsen:
-simplotpanel.but.ttip.Removethisplot = Diesen Plot löschen
+simplotpanel.but.ttip.Deletethisplot = Diesen Plot löschen
simplotpanel.Desc = Die Daten werden in zeitlicher Reihenfolge geplottet, auch wenn der X-Achsen-Typ nicht Zeit ist.
simplotpanel.OptionPane.lbl1 = Es sind maximal 15 Plots erlaubt.
simplotpanel.OptionPane.lbl2 = Plot konnte nicht hinzugefügt werden
@@ -837,7 +837,7 @@ MotorCfg.lbl.longA2 = Stufen k
MotorCfg.lbl.longB1 = Das aktuelle Design hat im Moment nur eine Stufe.
MotorCfg.lbl.longB2 = Stufen.
MotorCfg.but.Selectmotor = Motor auswählen
-MotorCfg.but.Removemotor = Motor entfernen
+MotorCfg.but.Deletemotor = Motor entfernen
MotorCfg.lbl.motorLabel = Keiner
! NoseConeConfig
@@ -1530,10 +1530,10 @@ GeneralOptimizationDialog.btn.stop = Optimierung stoppen
GeneralOptimizationDialog.lbl.paramsToOptimize = Zu optimierende Parameter:
GeneralOptimizationDialog.btn.add = Hinzufügen
GeneralOptimizationDialog.btn.add.ttip = Fügt den ausgewählten Parameter der Optimierung hinzu.
-GeneralOptimizationDialog.btn.remove = Entfernen
-GeneralOptimizationDialog.btn.remove.ttip = Entfernt den ausgewählten Parameter aus der Optimierung
-GeneralOptimizationDialog.btn.removeAll = Alle entfernen
-GeneralOptimizationDialog.btn.removeAll.ttip = Entfernt alle Parameter aus der Optimierung
+GeneralOptimizationDialog.btn.delete = Entfernen
+GeneralOptimizationDialog.btn.delete.ttip = Entfernt den ausgewählten Parameter aus der Optimierung
+GeneralOptimizationDialog.btn.deleteAll = Alle entfernen
+GeneralOptimizationDialog.btn.deleteAll.ttip = Entfernt alle Parameter aus der Optimierung
GeneralOptimizationDialog.lbl.availableParams = Verfügbare Parameter:
GeneralOptimizationDialog.lbl.optimizationOpts = Optimierungsoptionen
GeneralOptimizationDialog.lbl.optimizeSim = Simulation optimieren:
@@ -1656,7 +1656,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Vorderer Durchmesser
ComponentPresetChooserDialog.menu.sortAsc = Aufsteigend sortieren
ComponentPresetChooserDialog.menu.sortDesc = Absteigend sortieren
ComponentPresetChooserDialog.menu.units = Einheiten
-ComponentPresetChooserDialog.checkbox.showAllCompatible = Alle kompatiblen anzeigen
table.column.Favorite = Favorit
table.column.Manufacturer = Hersteller
table.column.PartNo = Teile-Nummer
diff --git a/core/resources/l10n/messages_es.properties b/core/resources/l10n/messages_es.properties
index 854ec0214..2b756618a 100644
--- a/core/resources/l10n/messages_es.properties
+++ b/core/resources/l10n/messages_es.properties
@@ -153,7 +153,6 @@ ComponentIcons.disabled = (Deshabilitado)
ComponentPresetChooserDialog.checkbox.filterAftDiameter = Ajustado al di\u00e1metro trasero
ComponentPresetChooserDialog.checkbox.filterForeDiameter = Ajustado al di\u00e1metro delantero
-ComponentPresetChooserDialog.checkbox.showAllCompatible = Mostrar todos los compatibles
ComponentPresetChooserDialog.filter.label = Filtro:
ComponentPresetChooserDialog.lbl.favorites = Seleccione los items que aparecer\u00e1n en el desplegable de materiales.
ComponentPresetChooserDialog.menu.sortAsc = Orden ascendente
@@ -388,10 +387,10 @@ GeneralOptimizationDialog.btn.close = Cerrar
GeneralOptimizationDialog.btn.close.ttip = Cerrar el cuadro de di\u00e1logo sin modificar el dise\u00f1o actual del cohete.
GeneralOptimizationDialog.btn.plotPath = Gr\u00e1fica del proceso
GeneralOptimizationDialog.btn.plotPath.ttip = Gr\u00e1fica del proceso de optimizaci\u00f3n (s\u00f3lo para 1 o 2 dimensiones).
-GeneralOptimizationDialog.btn.remove = Eliminar
-GeneralOptimizationDialog.btn.remove.ttip = Eliminar el par\u00e1metro seleccionado de la optimizaci\u00f3n.
-GeneralOptimizationDialog.btn.removeAll = Eliminar todo
-GeneralOptimizationDialog.btn.removeAll.ttip = Eliminar todos los par\u00e1metros de optimizaci\u00f3n.
+GeneralOptimizationDialog.btn.delete = Eliminar
+GeneralOptimizationDialog.btn.delete.ttip = Eliminar el par\u00e1metro seleccionado de la optimizaci\u00f3n.
+GeneralOptimizationDialog.btn.deleteAll = Eliminar todo
+GeneralOptimizationDialog.btn.deleteAll.ttip = Eliminar todos los par\u00e1metros de optimizaci\u00f3n.
GeneralOptimizationDialog.btn.reset = Reiniciar
GeneralOptimizationDialog.btn.reset.ttip = Reiniciar el dise\u00f1o actual del cohete con el dise\u00f1o optimizado.
GeneralOptimizationDialog.btn.save = Guardar resultados
@@ -544,7 +543,7 @@ MaximumVelocityParameter.name = Velocidad m\u00e1xima
MotorCfg.but.FlightcfgEdit = Editar
MotorCfg.but.New = Nuevo
-MotorCfg.but.Removemotor = Quitar motor
+MotorCfg.but.Deletemotor = Quitar motor
MotorCfg.but.Selectmotor = Seleccionar motor
! MotorConfig
MotorCfg.checkbox.compmotormount = Este componente es un porta motor
@@ -568,7 +567,7 @@ MotorCfgModel.Editcfg = Editar configuraciones
MotorChooserDialog.title = Seleccione un motor
! Edit Motor configuration dialog
-MotorConfigurationPanel.btn.removeMotor = Quitar motor
+MotorConfigurationPanel.btn.deleteMotor = Quitar motor
MotorConfigurationPanel.btn.resetIgnition = Reiniciar ignici\u00f3n
MotorConfigurationPanel.btn.selectIgnition = Seleccionar ignici\u00f3n
MotorConfigurationPanel.btn.selectMotor = Seleccionar motor
@@ -1346,7 +1345,7 @@ customExpression.Units = Unidades
customExpression.Units.but.ttip.Edit = Editar esta expresi\u00f3n
customExpression.Units.but.ttip.MoveDown = Mover la expresi\u00f3n hacia abajo en el orden de c\u00e1lculo
customExpression.Units.but.ttip.MoveUp = Mover la expresi\u00f3n hacia arriba en el orden de c\u00e1lculo
-customExpression.Units.but.ttip.Remove = Eliminar esta expresi\u00f3n
+customExpression.Units.but.ttip.Delete = Eliminar esta expresi\u00f3n
customExpressionPanel.but.Import = Importar
! Custom expression panel
@@ -1384,7 +1383,7 @@ dlg.but.ok = OK
edtmotorconfdlg.but.Duplicateconfiguration = Duplicar
edtmotorconfdlg.but.Newconfiguration = Nueva configuraci\u00f3n
! Edit Motor configuration dialog
-edtmotorconfdlg.but.Removeconfiguration = Quitar configuraci\u00f3n
+edtmotorconfdlg.but.Deleteconfiguration = Quitar configuraci\u00f3n
edtmotorconfdlg.but.Renameconfiguration = Renombrar configuraci\u00f3n
edtmotorconfdlg.but.Resetdeployment = Reiniciar despliegue
edtmotorconfdlg.but.Resetseparation = Reiniciar separaci\u00f3n
@@ -1734,7 +1733,7 @@ simedtdlg.border.Simlist = Extensiones del simulador
simedtdlg.border.Simopt = Opciones del simulador
simedtdlg.but.FlightcfgEdit = Editar
simedtdlg.but.add = Agregar
-simedtdlg.but.remove = Quitar
+simedtdlg.but.delete = Quitar
simedtdlg.but.resettodefault = Restaurar por defecto
! Simulation edit dialog
simedtdlg.but.runsimulation = Lanzar la simulaci\u00f3n
@@ -1850,7 +1849,7 @@ simplotpanel.but.All = Todo
simplotpanel.but.NewYaxisplottype = A\u00f1adir nuevo eje Y en la gr\u00e1fica
simplotpanel.but.None = Ninguno
simplotpanel.but.Plotflight = Ver gr\u00e1fica
-simplotpanel.but.ttip.Removethisplot = Eliminar esta curva
+simplotpanel.but.ttip.Deletethisplot = Eliminar esta curva
simplotpanel.lbl.Axis = Ejes:
simplotpanel.lbl.Flightevents = Eventos del vuelo:
! Simulation plot panel
diff --git a/core/resources/l10n/messages_fr.properties b/core/resources/l10n/messages_fr.properties
index d15c994e5..551c474a9 100644
--- a/core/resources/l10n/messages_fr.properties
+++ b/core/resources/l10n/messages_fr.properties
@@ -143,7 +143,6 @@ ComponentIcons.disabled = (d\u00E9sactiv\u00E9)
ComponentPresetChooserDialog.checkbox.filterAftDiameter = Match aft diameter
ComponentPresetChooserDialog.checkbox.filterForeDiameter = Match fore diameter
-ComponentPresetChooserDialog.checkbox.showAllCompatible = Montrer tous ceux qui sont compatibles
ComponentPresetChooserDialog.filter.label = Filtrer:
ComponentPresetChooserDialog.lbl.favorites = Select to add preset to drop-down menu
ComponentPresetChooserDialog.menu.sortAsc = Trier par ordre croissant
@@ -379,10 +378,10 @@ GeneralOptimizationDialog.btn.close = Fermer
GeneralOptimizationDialog.btn.close.ttip = Fermer la fen\u00EAtre de dialogue sans modifier la fus\u00E9e
GeneralOptimizationDialog.btn.plotPath = Tracer le chemin
GeneralOptimizationDialog.btn.plotPath.ttip = Tracer le chemin de l'optimisation (optimisation \u00E0 une ou deux dimensions seulement)
-GeneralOptimizationDialog.btn.remove = Enlever
-GeneralOptimizationDialog.btn.remove.ttip = Enlever le param\u00E8tre s\u00E9lectionn\u00E9 des param\u00E8tres \u00E0 optimiser
-GeneralOptimizationDialog.btn.removeAll = Tout enlever
-GeneralOptimizationDialog.btn.removeAll.ttip = Enlever tous les param\u00E8tres de l'optimisation
+GeneralOptimizationDialog.btn.delete = Enlever
+GeneralOptimizationDialog.btn.delete.ttip = Enlever le param\u00E8tre s\u00E9lectionn\u00E9 des param\u00E8tres \u00E0 optimiser
+GeneralOptimizationDialog.btn.deleteAll = Tout enlever
+GeneralOptimizationDialog.btn.deleteAll.ttip = Enlever tous les param\u00E8tres de l'optimisation
GeneralOptimizationDialog.btn.reset = R\u00E9initialiser
GeneralOptimizationDialog.btn.reset.ttip = R\u00E9initialiser le "design" de la fus\u00E9e au "design" actuel de la fus\u00E9e
GeneralOptimizationDialog.btn.save = Chemin pour la sauvegarder
@@ -537,7 +536,7 @@ MaximumVelocityParameter.name = Vitesse maximum
MotorCfg.but.FlightcfgEdit = Modifier
MotorCfg.but.New = Nouveau
-MotorCfg.but.Removemotor = Enlever le moteur
+MotorCfg.but.Deletemotor = Enlever le moteur
MotorCfg.but.Selectmotor = Choisir le moteur
! MotorConfig
MotorCfg.checkbox.compmotormount = Cette pi\u00E8ce est un porte moteur
@@ -561,7 +560,7 @@ MotorCfgModel.Editcfg = Modifier les configurations
MotorChooserDialog.title = S\u00E9lectionnez un moteur fus\u00E9e
! Edit Motor configuration dialog
-MotorConfigurationPanel.btn.removeMotor = Enlever le moteur
+MotorConfigurationPanel.btn.deleteMotor = Enlever le moteur
MotorConfigurationPanel.btn.resetIgnition = R\u00E9initialiser l'allumage
MotorConfigurationPanel.btn.selectIgnition = Choisir l'allumage
MotorConfigurationPanel.btn.selectMotor = Choisir le moteur
@@ -1341,7 +1340,7 @@ customExpression.Units = Unit\u00E9s
customExpression.Units.but.ttip.Edit = Modifier cette expression
customExpression.Units.but.ttip.MoveDown = D\u00E9placer en bas l'expression dans l'ordre de calcul
customExpression.Units.but.ttip.MoveUp = D\u00E9placer en haut l'expression dans l'ordre de calcul
-customExpression.Units.but.ttip.Remove = Supprimer cette expression
+customExpression.Units.but.ttip.Delete = Supprimer cette expression
customExpressionPanel.but.Import = Importer
! Custom expression panel
@@ -1378,7 +1377,7 @@ dlg.but.ok = Accepter
edtmotorconfdlg.but.Duplicateconfiguration = Dupliquer
edtmotorconfdlg.but.Newconfiguration = Nouvelle configuration
-edtmotorconfdlg.but.Removeconfiguration = Supprimer la configuration
+edtmotorconfdlg.but.Deleteconfiguration = Supprimer la configuration
edtmotorconfdlg.but.Renameconfiguration = Renommer
edtmotorconfdlg.but.Resetdeployment = R\u00E9initialiserle d\u00E9ploiement
edtmotorconfdlg.but.Resetseparation = R\u00E9initialiser la s\u00E9paration
@@ -1726,7 +1725,7 @@ simedtdlg.border.Simlist = Auditeurs de simulation
simedtdlg.border.Simopt = Options de simulation
simedtdlg.but.FlightcfgEdit = Modifier
simedtdlg.but.add = Ajouter
-simedtdlg.but.remove = Enlever
+simedtdlg.but.delete = Enlever
simedtdlg.but.resettodefault = Restaurer les param\u00E8tres par d\u00E9faut
! Simulation edit dialog
simedtdlg.but.runsimulation = Lancer la simulation
@@ -1842,7 +1841,7 @@ simplotpanel.but.All = Tous
simplotpanel.but.NewYaxisplottype = Nouveau type de trac\u00E9 de l'axe Y
simplotpanel.but.None = Aucun
simplotpanel.but.Plotflight = Tracer le vol
-simplotpanel.but.ttip.Removethisplot = Effacer le trac\u00E9
+simplotpanel.but.ttip.Deletethisplot = Effacer le trac\u00E9
simplotpanel.lbl.Axis = Axes:
simplotpanel.lbl.Flightevents = Ev\u00E9nements du vol:
! Simulation plot panel
diff --git a/core/resources/l10n/messages_it.properties b/core/resources/l10n/messages_it.properties
index 447e4eff8..d27278f71 100644
--- a/core/resources/l10n/messages_it.properties
+++ b/core/resources/l10n/messages_it.properties
@@ -176,9 +176,9 @@ debuglogdlg.lbl.Stacktrace = traccia della memoria:
! Edit Motor configuration dialog
-MotorConfigurationPanel.btn.removeMotor = Rimuovi il motore
+MotorConfigurationPanel.btn.deleteMotor = Rimuovi il motore
MotorConfigurationPanel.btn.selectMotor = Seleziona il motore
-edtmotorconfdlg.but.Removeconfiguration = Rimuovi la configurazione
+edtmotorconfdlg.but.Deleteconfiguration = Rimuovi la configurazione
edtmotorconfdlg.but.Newconfiguration = Nuova configurazione
MotorConfigurationPanel.lbl.motorMounts = Alloggiamenti motore
edtmotorconfdlg.title.Editmotorconf = Modifica la configurazione del motore
@@ -287,7 +287,7 @@ update.dlg.latestVersion = Stai usando l'ultima versione di OpenRocket, versione
simedtdlg.but.runsimulation = Avvia simulazione
simedtdlg.but.resettodefault = Riporta ai predefiniti
simedtdlg.but.add = Aggiungi
-simedtdlg.but.remove = Rimuovi
+simedtdlg.but.delete = Rimuovi
simedtdlg.title.Editsim = Modifica simulazione
simedtdlg.lbl.Simname = Nome della simulazione:
simedtdlg.tab.Launchcond = Condizioni di lancio
@@ -463,7 +463,7 @@ customExpressionPanel.but.NewExpression = Nuova espressione
customExpressionPanel.lbl.UpdateNote = Devi lanciare la simulazione prima che siano disponibili i dati per il disegno.
customExpressionPanel.lbl.CalcNote = Le espressioni saranno calcolate nell'ordine proposto.
customExpressionPanel.lbl.CustomExpressions = Espressioni personalizzate :
-customExpression.Units.but.ttip.Remove = Rimuovi questa espressione
+customExpression.Units.but.ttip.Delete = Rimuovi questa espressione
customExpression.Units.but.ttip.Edit = Modifica questa espressione
customExpression.Units.but.ttip.MoveUp = Sposta in s\u00f9 nell'ordine di calcolo delle espressioni
customExpression.Units.but.ttip.MoveDown = Sposta in gi\u00f9 nell'ordine di calcolo delle espressioni
@@ -531,7 +531,7 @@ simplotpanel.but.None = Nessuno
simplotpanel.but.NewYaxisplottype = Nuovo asse Y
simplotpanel.but.Plotflight = Grafico di volo
simplotpanel.lbl.Axis = Assi:
-simplotpanel.but.ttip.Removethisplot = Rimuovi questo grafico
+simplotpanel.but.ttip.Deletethisplot = Rimuovi questo grafico
simplotpanel.Desc = I dati verranno disegnati in ordine cronologico anche se l'asse X non rappresenta il tempo.
simplotpanel.OptionPane.lbl1 = Sono permessi al massimo 15 grafici.
simplotpanel.OptionPane.lbl2 = Non posso aggiungere il grafico
@@ -839,7 +839,7 @@ MotorCfg.lbl.longA2 = Nuovi stadi possono essere aggiunti cliccando \"Nuovo stad
MotorCfg.lbl.longB1 = Il disegno attuale ha
MotorCfg.lbl.longB2 = stadi.
MotorCfg.but.Selectmotor = Seleziona il motore
-MotorCfg.but.Removemotor = Rimuovi il motore
+MotorCfg.but.Deletemotor = Rimuovi il motore
MotorCfg.lbl.motorLabel = Nessuno
! NoseConeConfig
@@ -1534,10 +1534,10 @@ GeneralOptimizationDialog.btn.stop = Ferma l'ottimizzazione
GeneralOptimizationDialog.lbl.paramsToOptimize = Parametri da ottimizzare:
GeneralOptimizationDialog.btn.add = Aggiungi
GeneralOptimizationDialog.btn.add.ttip = Aggiungi il parametro selezionato all'ottimizzazione
-GeneralOptimizationDialog.btn.remove = Rimuovi
-GeneralOptimizationDialog.btn.remove.ttip = Rimuovi il parametro selezionato dall'ottimizzazione
-GeneralOptimizationDialog.btn.removeAll = Rimuovi tutti
-GeneralOptimizationDialog.btn.removeAll.ttip = Rimuovi tutti i parametri dall'ottimizzazione
+GeneralOptimizationDialog.btn.delete = Rimuovi
+GeneralOptimizationDialog.btn.delete.ttip = Rimuovi il parametro selezionato dall'ottimizzazione
+GeneralOptimizationDialog.btn.deleteAll = Rimuovi tutti
+GeneralOptimizationDialog.btn.deleteAll.ttip = Rimuovi tutti i parametri dall'ottimizzazione
GeneralOptimizationDialog.lbl.availableParams = Parametri disponibili:
GeneralOptimizationDialog.lbl.optimizationOpts = Opzioni di ottimizzazione
GeneralOptimizationDialog.lbl.optimizeSim = Ottimizza la simulazione:
@@ -1662,7 +1662,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Allinea al diametro a
ComponentPresetChooserDialog.menu.sortAsc = Ordine ascendente
ComponentPresetChooserDialog.menu.sortDesc = Ordine decrescente
ComponentPresetChooserDialog.menu.units = Unit\u00e0
-ComponentPresetChooserDialog.checkbox.showAllCompatible = Mostra tutti i compatibili
table.column.Favorite = Preferito
table.column.Manufacturer = Produttore
table.column.PartNo = Numero del pezzo
diff --git a/core/resources/l10n/messages_ja.properties b/core/resources/l10n/messages_ja.properties
index bfef9700f..639f7e797 100644
--- a/core/resources/l10n/messages_ja.properties
+++ b/core/resources/l10n/messages_ja.properties
@@ -172,9 +172,9 @@ debuglogdlg.lbl.Stacktrace = Stack trace:
MotorChooserDialog.title = \u30ED\u30B1\u30C3\u30C8\u30E2\u30FC\u30BF\u30FC\u306E\u9078\u629E
! Edit Motor configuration dialog
-MotorConfigurationPanel.btn.removeMotor = \u30E2\u30FC\u30BF\u30FC\u306E\u524A\u9664
+MotorConfigurationPanel.btn.deleteMotor = \u30E2\u30FC\u30BF\u30FC\u306E\u524A\u9664
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.Deleteconfiguration = \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 = \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
@@ -284,7 +284,7 @@ update.dlg.latestVersion = \u3053\u306EOpenRocket\u306F\u6700\u65B0\u7248\u3067\
simedtdlg.but.runsimulation = \u30B7\u30DF\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\u306E\u5B9F\u884C
simedtdlg.but.resettodefault = \u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u623B\u3059
simedtdlg.but.add = \u8FFD\u52A0
-simedtdlg.but.remove = \u524A\u9664
+simedtdlg.but.delete = \u524A\u9664
simedtdlg.title.Editsim = \u30B7\u30DF\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\u306E\u7DE8\u96C6
simedtdlg.lbl.Simname = \u30B7\u30DF\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\u306E\u540D\u524D\uFF1A
simedtdlg.tab.Launchcond = \u30ED\u30FC\u30F3\u30C1\u30B3\u30F3\u30C7\u30A3\u30B7\u30E7\u30F3
@@ -472,7 +472,7 @@ customExpressionPanel.but.ttip.Import = .ork\u30D5\u30A1\u30A4\u30EB\u304B\u308
customExpressionPanel.lbl.UpdateNote = \u30B0\u30E9\u30D5\u3092\u5F97\u308B\u305F\u3081\u306B\u306F\u30B7\u30DF\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3\u3092\u8A08\u7B97\u3055\u305B\u3066\u304A\u304B\u306A\u3044\u3068\u3044\u3051\u306A\u3044
customExpressionPanel.lbl.CalcNote = \u5F0F\u306F\u8868\u793A\u3055\u308C\u305F\u9806\u5E8F\u3067\u8A08\u7B97\u3055\u308C\u308B
customExpressionPanel.lbl.CustomExpressions = \u30AB\u30B9\u30BF\u30E0\u5F0F
-customExpression.Units.but.ttip.Remove = \u3053\u306E\u5F0F\u3092\u524A\u9664
+customExpression.Units.but.ttip.Delete = \u3053\u306E\u5F0F\u3092\u524A\u9664
customExpression.Units.but.ttip.Edit = \u3053\u306E\u5F0F\u3092\u7DE8\u96C6
customExpression.Units.but.ttip.MoveUp = \u5F0F\u3092\u4E0A\u306B\u79FB\u52D5
customExpression.Units.but.ttip.MoveDown = \u5F0F\u3092\u4E0B\u306B\u79FB\u52D5
@@ -556,7 +556,7 @@ simplotpanel.but.None = \u5168\u3066\u975E\u9078\u629E
simplotpanel.but.NewYaxisplottype = Y\u8EF8\u8FFD\u52A0
simplotpanel.but.Plotflight = \u30D7\u30ED\u30C3\u30C8
simplotpanel.lbl.Axis = \u8EF8\uFF1A
-simplotpanel.but.ttip.Removethisplot = \u3053\u306E\u30D7\u30ED\u30C3\u30C8\u3092\u524A\u9664
+simplotpanel.but.ttip.Deletethisplot = \u3053\u306E\u30D7\u30ED\u30C3\u30C8\u3092\u524A\u9664
simplotpanel.Desc = X\u8EF8\u304C\u6642\u9593\u3067\u306A\u3044\u6642\u306F\u30C7\u30FC\u30BF\u306F\u6642\u9593\u9806\u5E8F\u3067\u30D7\u30ED\u30C3\u30C8\u3055\u308C\u308B
simplotpanel.OptionPane.lbl1 = Y\u8EF8\u306F15\u5909\u6570\u307E\u3067
simplotpanel.OptionPane.lbl2 = \u8FFD\u52A0\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u306A\u3044
@@ -869,7 +869,7 @@ MotorCfg.lbl.longA2 = \u30B9\u30C6\u30FC\u30B8\u306F\"\u65B0\u3057\u3044\u30B9\
MotorCfg.lbl.longB1 = \u73FE\u5728\u306E\u30C7\u30B6\u30A4\u30F3\u3067\u306F
MotorCfg.lbl.longB2 = \u30B9\u30C6\u30FC\u30B8\u304C\u3042\u308B
MotorCfg.but.Selectmotor = \u30E2\u30FC\u30BF\u30FC\u306E\u9078\u629E
-MotorCfg.but.Removemotor = \u30E2\u30FC\u30BF\u30FC\u306E\u524A\u9664
+MotorCfg.but.Deletemotor = \u30E2\u30FC\u30BF\u30FC\u306E\u524A\u9664
MotorCfg.lbl.motorLabel = None
! NoseConeConfig
@@ -1597,10 +1597,10 @@ GeneralOptimizationDialog.btn.stop = \u6700\u9069\u5316\u4E2D\u6B62
GeneralOptimizationDialog.lbl.paramsToOptimize = \u6700\u9069\u5316\u30D1\u30E9\u30E1\u30FC\u30BF\uFF1A
GeneralOptimizationDialog.btn.add = \u8FFD\u52A0
GeneralOptimizationDialog.btn.add.ttip = \u6700\u9069\u5316\u306B\u9078\u629E\u3057\u305F\u30D1\u30E9\u30E1\u30FC\u30BF\u8FFD\u52A0
-GeneralOptimizationDialog.btn.remove = \u524A\u9664
-GeneralOptimizationDialog.btn.remove.ttip = \u6700\u9069\u5316\u304B\u3089\u9078\u629E\u3057\u305F\u30D1\u30E9\u30E1\u30FC\u30BF\u524A\u9664
-GeneralOptimizationDialog.btn.removeAll = \u5168\u3066\u524A\u9664
-GeneralOptimizationDialog.btn.removeAll.ttip = \u6700\u9069\u5316\u304B\u3089\u3059\u3079\u3066\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u524A\u9664
+GeneralOptimizationDialog.btn.delete = \u524A\u9664
+GeneralOptimizationDialog.btn.delete.ttip = \u6700\u9069\u5316\u304B\u3089\u9078\u629E\u3057\u305F\u30D1\u30E9\u30E1\u30FC\u30BF\u524A\u9664
+GeneralOptimizationDialog.btn.deleteAll = \u5168\u3066\u524A\u9664
+GeneralOptimizationDialog.btn.deleteAll.ttip = \u6700\u9069\u5316\u304B\u3089\u3059\u3079\u3066\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u524A\u9664
GeneralOptimizationDialog.lbl.availableParams = \u9078\u629E\u53EF\u80FD\u306A\u30D1\u30E9\u30E1\u30FC\u30BF\uFF1A
GeneralOptimizationDialog.lbl.optimizationOpts = \u6700\u9069\u5316\u30AA\u30D7\u30B7\u30E7\u30F3
GeneralOptimizationDialog.lbl.optimizeSim = \u6700\u9069\u5316\u30B7\u30DF\u30E5\u30EC\u30FC\u30B7\u30E7\u30F3
@@ -1724,7 +1724,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = \u524D\u65B9\u306E\u
ComponentPresetChooserDialog.menu.sortAsc = \u6607\u9806\u30BD\u30FC\u30C8
ComponentPresetChooserDialog.menu.sortDesc = \u964D\u9806\u30BD\u30FC\u30C8
ComponentPresetChooserDialog.menu.units = \u5358\u4F4D
-ComponentPresetChooserDialog.checkbox.showAllCompatible = \u3059\u3079\u3066\u306E\u90E8\u54C1\u3092\u8868\u793A
ComponentPresetChooserDialog.lbl.favorites = Select to add preset to drop-down menu
table.column.Favorite = \u304A\u6C17\u306B\u5165\u308A
table.column.Manufacturer = \u88FD\u9020\u4F1A\u793E
diff --git a/core/resources/l10n/messages_nl.properties b/core/resources/l10n/messages_nl.properties
index 4557ca938..743cbfd9d 100644
--- a/core/resources/l10n/messages_nl.properties
+++ b/core/resources/l10n/messages_nl.properties
@@ -178,7 +178,7 @@ MotorChooserDialog.title = Selecteer een raketmotor
! Edit Motor configuration dialog
edtmotorconfdlg.col.configuration = Configuratie
-edtmotorconfdlg.but.Removeconfiguration = Verwijder Configuratie
+edtmotorconfdlg.but.Deleteconfiguration = Verwijder Configuratie
edtmotorconfdlg.but.Renameconfiguration = Hernoem Configuratie
edtmotorconfdlg.but.Newconfiguration = Nieuwe Configuratie
edtmotorconfdlg.but.Duplicateconfiguration = Dupliceer Configuratie
@@ -340,7 +340,7 @@ simedtdlg.but.runsimulation = Simulatie uitvoeren
simedtdlg.but.resettodefault = Herstel naar standaard
simedtdlg.but.savedefault = Sla op als standaard
simedtdlg.but.add = Voeg toe
-simedtdlg.but.remove = Verwijder
+simedtdlg.but.delete = Verwijder
simedtdlg.title.Editsim = Bewerk simulatie
simedtdlg.lbl.Simname = Simulatienaam:
simedtdlg.tab.Launchcond = Lanceeromstandigheden
@@ -563,7 +563,7 @@ customExpressionPanel.but.ttip.Import = Importeer aangepaste uitdrukkingen uit e
customExpressionPanel.lbl.UpdateNote = U moet de simulatie uitvoeren voordat er gegevens beschikbaar zijn om te plotten.
customExpressionPanel.lbl.CalcNote = Uitdrukkingen worden berekend in de getoonde volgorde.
customExpressionPanel.lbl.CustomExpressions = Aangepaste Uitdrukkingen
-customExpression.Units.but.ttip.Remove = Verwijder deze uitdrukking
+customExpression.Units.but.ttip.Delete = Verwijder deze uitdrukking
customExpression.Units.but.ttip.Edit = Pas deze uitdrukking aan
customExpression.Units.but.ttip.MoveUp = Verplaats uitdrukking omhoog in berekeningsvolgorde
customExpression.Units.but.ttip.MoveDown = Verplaats uitdrukking omlaag in berekeningsvolgorde
@@ -646,7 +646,7 @@ simplotpanel.but.All = Alles
simplotpanel.but.None = Geen
simplotpanel.but.NewYaxisplottype = Nieuw type plot op de Y-as
simplotpanel.lbl.Axis = As:
-simplotpanel.but.ttip.Removethisplot = Verwijder deze plot
+simplotpanel.but.ttip.Deletethisplot = Verwijder deze plot
simplotpanel.Desc = De gegevens worden in tijdsvolgorde uitgezet, zelfs als het type X-as niet tijd is.
simplotpanel.OptionPane.lbl1 = Maximaal 15 plots zijn toegestaan.
simplotpanel.OptionPane.lbl2 = Kan geen plot toevoegen
@@ -1016,7 +1016,7 @@ MotorCfg.lbl.longA2 = Trappen kunnen toegevoegd worden door te klikken op \"Nieu
MotorCfg.lbl.longB1 = Het huidige ontwerp heeft
MotorCfg.lbl.longB2 = trap(pen).
MotorCfg.but.Selectmotor = Selecteer motor
-MotorCfg.but.Removemotor = Verwijder motor
+MotorCfg.but.Deletemotor = Verwijder motor
MotorCfg.lbl.motorLabel = Geen
! NoseConeConfig
@@ -1851,10 +1851,10 @@ GeneralOptimizationDialog.btn.stop = Stop optimalisatie
GeneralOptimizationDialog.lbl.paramsToOptimize = Parameters om te optimaliseren:
GeneralOptimizationDialog.btn.add = Voeg toe
GeneralOptimizationDialog.btn.add.ttip = Voeg de geslecteerde parameter toe aan de optimalisatie
-GeneralOptimizationDialog.btn.remove = Verwijder
-GeneralOptimizationDialog.btn.remove.ttip = Verwijder de geslecteerde parameter uit de optimalisatie
-GeneralOptimizationDialog.btn.removeAll = Verwijder alles
-GeneralOptimizationDialog.btn.removeAll.ttip = Verwijder alle parameters uit de optimalisatie
+GeneralOptimizationDialog.btn.delete = Verwijder
+GeneralOptimizationDialog.btn.delete.ttip = Verwijder de geslecteerde parameter uit de optimalisatie
+GeneralOptimizationDialog.btn.deleteAll = Verwijder alles
+GeneralOptimizationDialog.btn.deleteAll.ttip = Verwijder alle parameters uit de optimalisatie
GeneralOptimizationDialog.lbl.availableParams = Beschikbare parameters:
GeneralOptimizationDialog.lbl.optimizationOpts = Optimalisatie-opties
GeneralOptimizationDialog.lbl.optimizeSim = Optimaliseer simulatie:
@@ -1985,7 +1985,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Gelijke voordiameter
ComponentPresetChooserDialog.menu.sortAsc = Sorteer oplopend
ComponentPresetChooserDialog.menu.sortDesc = Sorteer aflopend
ComponentPresetChooserDialog.menu.units = Eenheden
-ComponentPresetChooserDialog.checkbox.showAllCompatible = Toon alle compatibele
ComponentPresetChooserDialog.lbl.favorites = Selecteer om preset aan drop-down menu toe te voegen
table.column.Favorite = Favoriet
table.column.Manufacturer = Fabrikant
@@ -2032,7 +2031,7 @@ EditDecalHelper.editPreferencesHelp = De gebruikte editor kan worden gewijzigd i
MotorConfigurationPanel.lbl.motorMounts = Motorbevestigingen
MotorConfigurationPanel.lbl.motorConfiguration = Motorconfiguraties
-MotorConfigurationPanel.btn.removeMotor = Verwijder motor
+MotorConfigurationPanel.btn.deleteMotor = Verwijder motor
MotorConfigurationPanel.btn.selectMotor = Selecteer motor
MotorConfigurationPanel.btn.selectIgnition = Selecteer ontsteking
MotorConfigurationPanel.btn.resetIgnition = Herstel ontsteking
diff --git a/core/resources/l10n/messages_pl.properties b/core/resources/l10n/messages_pl.properties
index 1bc052188..14c8d5388 100644
--- a/core/resources/l10n/messages_pl.properties
+++ b/core/resources/l10n/messages_pl.properties
@@ -174,9 +174,9 @@
! Edit Motor configuration dialog
- MotorConfigurationPanel.btn.removeMotor = Usu\u0144 silnik
+ MotorConfigurationPanel.btn.deleteMotor = Usu\u0144 silnik
MotorConfigurationPanel.btn.selectMotor = Wybierz silnik
- edtmotorconfdlg.but.Removeconfiguration = Usu\u0144 konfiguracj\u0119
+ edtmotorconfdlg.but.Deleteconfiguration = Usu\u0144 konfiguracj\u0119
edtmotorconfdlg.but.Newconfiguration = Nowa konfiguracja
MotorConfigurationPanel.lbl.motorMounts = Gniazda silnikowe
edtmotorconfdlg.title.Editmotorconf = Edytuj konfiguracje silnika
@@ -285,7 +285,7 @@ update.dlg.latestVersion = Korzystasz z najnowszej wersji OpenRocket: %s.
simedtdlg.but.runsimulation = Przeprowad\u017A symulacj\u0119
simedtdlg.but.resettodefault = Przywró\u0107 domy\u015Blny
simedtdlg.but.add = Dodaj
- simedtdlg.but.remove = Usu\u0144
+ simedtdlg.but.delete = Usu\u0144
simedtdlg.title.Editsim = Edytuj symulacj\u0119
simedtdlg.lbl.Simname = Nazwa symulacji:
simedtdlg.tab.Launchcond = Warunki startowe
@@ -474,7 +474,7 @@ update.dlg.latestVersion = Korzystasz z najnowszej wersji OpenRocket: %s.
simplotpanel.but.NewYaxisplottype = Nowy typ osi Y
simplotpanel.but.Plotflight = Narysuj wykres lotu
simplotpanel.lbl.Axis = O\u015B:
- simplotpanel.but.ttip.Removethisplot = Usu\u0144 ten wykres
+ simplotpanel.but.ttip.Deletethisplot = Usu\u0144 ten wykres
simplotpanel.Desc = Dane zostan\u0105 umieszczone na wykresie w porz\u0105dku chronologicznym, nawet je\u017Celi o\u015B X nie jest typu czasowego.
simplotpanel.OptionPane.lbl1 = Maksymalna liczba wykresów to 15.
simplotpanel.OptionPane.lbl2 = Nie mo\u017Cna doda\u0107 wykresu
@@ -782,7 +782,7 @@ update.dlg.latestVersion = Korzystasz z najnowszej wersji OpenRocket: %s.
MotorCfg.lbl.longB1 = Obecny model ma
MotorCfg.lbl.longB2 = stopnie.
MotorCfg.but.Selectmotor = Wybierz silnik
- MotorCfg.but.Removemotor = Usu\u0144 silnik
+ MotorCfg.but.Deletemotor = Usu\u0144 silnik
MotorCfg.lbl.motorLabel = \u017Badne
! NoseConeConfig
@@ -1476,10 +1476,10 @@ update.dlg.latestVersion = Korzystasz z najnowszej wersji OpenRocket: %s.
GeneralOptimizationDialog.lbl.paramsToOptimize = Parametry do optymalizacji:
GeneralOptimizationDialog.btn.add = Dodaj
GeneralOptimizationDialog.btn.add.ttip = Dodaj wybrany parametr do optymalizacji
- GeneralOptimizationDialog.btn.remove = Usu\u0144
- GeneralOptimizationDialog.btn.remove.ttip = Usu\u0144 wybrany parametr z listy do optymalizacji
- GeneralOptimizationDialog.btn.removeAll = Usu\u0144 wszystko
- GeneralOptimizationDialog.btn.removeAll.ttip = Usu\u0144 wszystkie parametry z listy do optymalizacji
+ GeneralOptimizationDialog.btn.delete = Usu\u0144
+ GeneralOptimizationDialog.btn.delete.ttip = Usu\u0144 wybrany parametr z listy do optymalizacji
+ GeneralOptimizationDialog.btn.deleteAll = Usu\u0144 wszystko
+ GeneralOptimizationDialog.btn.deleteAll.ttip = Usu\u0144 wszystkie parametry z listy do optymalizacji
GeneralOptimizationDialog.lbl.availableParams = Dost\u0119pne parametry:
GeneralOptimizationDialog.lbl.optimizationOpts = Opcje optymalizacji:
GeneralOptimizationDialog.lbl.optimizeSim = Optymalizuj symulacj\u0119:
@@ -1603,7 +1603,6 @@ update.dlg.latestVersion = Korzystasz z najnowszej wersji OpenRocket: %s.
ComponentPresetChooserDialog.menu.sortAsc = Szereguj rosn\u0105co
ComponentPresetChooserDialog.menu.sortDesc = Szereguj malej\u0105co
ComponentPresetChooserDialog.menu.units = Jednostki
- ComponentPresetChooserDialog.checkbox.showAllCompatible = Poka\u017C wszystkie kompatybilne
table.column.Favorite = Ulubione
table.column.Manufacturer = Producent
table.column.PartNo = Numer cz\u0119\u015Bci
diff --git a/core/resources/l10n/messages_pt.properties b/core/resources/l10n/messages_pt.properties
index 4bdb89578..3e91ae460 100644
--- a/core/resources/l10n/messages_pt.properties
+++ b/core/resources/l10n/messages_pt.properties
@@ -135,7 +135,6 @@ ComponentIcons.disabled = (desabilitado)
ComponentPresetChooserDialog.checkbox.filterAftDiameter = Ajuste do di\u00e2metro traseiro
ComponentPresetChooserDialog.checkbox.filterForeDiameter = Ajustar di\u00e2metro dianteiro
-ComponentPresetChooserDialog.checkbox.showAllCompatible = Mostrar todos compat\u00edveis
ComponentPresetChooserDialog.filter.label = Filtrar por texto:
ComponentPresetChooserDialog.lbl.favorites = Selecione para adicionar predefinido para menu drop-down
ComponentPresetChooserDialog.menu.sortAsc = Classifica\u00e7\u00e3o Crescente
@@ -368,10 +367,10 @@ GeneralOptimizationDialog.btn.close = Fechar
GeneralOptimizationDialog.btn.close.ttip = Feche a caixa de di\u00e1logo sem modificar o projeto do foguete
GeneralOptimizationDialog.btn.plotPath = Tra\u00e7ar caminho
GeneralOptimizationDialog.btn.plotPath.ttip = Plotar o caminho de otimiza\u00e7\u00e3o (apenas para otimiza\u00e7\u00e3o de uma ou duas dimens\u00f5es)
-GeneralOptimizationDialog.btn.remove = Remover
-GeneralOptimizationDialog.btn.remove.ttip = Remova o par\u00e2metro selecionado da otimiza\u00e7\u00e3o
-GeneralOptimizationDialog.btn.removeAll = Remover todos
-GeneralOptimizationDialog.btn.removeAll.ttip = Remova todos os par\u00e2metros da otimiza\u00e7\u00e3o
+GeneralOptimizationDialog.btn.delete = Remover
+GeneralOptimizationDialog.btn.delete.ttip = Remova o par\u00e2metro selecionado da otimiza\u00e7\u00e3o
+GeneralOptimizationDialog.btn.deleteAll = Remover todos
+GeneralOptimizationDialog.btn.deleteAll.ttip = Remova todos os par\u00e2metros da otimiza\u00e7\u00e3o
GeneralOptimizationDialog.btn.reset = Restaurar
GeneralOptimizationDialog.btn.reset.ttip = Redefinir o projeto do foguete para o projeto do foguete atual
GeneralOptimizationDialog.btn.save = Salvar destino
@@ -523,7 +522,7 @@ MaximumVelocityParameter.name = Velocidade m\u00e1xima
MotorCfg.but.FlightcfgEdit = Edit
MotorCfg.but.New = Novo
-MotorCfg.but.Removemotor = Remova o motor
+MotorCfg.but.Deletemotor = Remova o motor
MotorCfg.but.Selectmotor = Selecionar do motor
# MotorConfig
MotorCfg.checkbox.compmotormount = Este componente \u00e9 uma montagem do motor
@@ -547,7 +546,7 @@ MotorCfgModel.Editcfg = Editar configura\u00e7\u00f5es
MotorChooserDialog.title = Selecione um motor do foguete
# Edit Motor configuration dialog
-MotorConfigurationPanel.btn.removeMotor = Remover o motor
+MotorConfigurationPanel.btn.deleteMotor = Remover o motor
MotorConfigurationPanel.btn.resetIgnition = Reset ignition
MotorConfigurationPanel.btn.selectIgnition = Select ignition
MotorConfigurationPanel.btn.selectMotor = Selecionar motor
@@ -1305,7 +1304,7 @@ customExpression.Units = Unidades
customExpression.Units.but.ttip.Edit = Editar esta express\u00e3o
customExpression.Units.but.ttip.MoveDown = Mova para baixo express\u00e3o na ordem de c\u00e1lculo
customExpression.Units.but.ttip.MoveUp = Mova acima a express\u00e3o na ordem de c\u00e1lculo
-customExpression.Units.but.ttip.Remove = Remover esta express\u00e3o
+customExpression.Units.but.ttip.Delete = Remover esta express\u00e3o
customExpressionPanel.but.Import = Importar
# Custom expression panel
@@ -1342,7 +1341,7 @@ dlg.but.ok = Ok
edtmotorconfdlg.but.Duplicateconfiguration = Duplikat
edtmotorconfdlg.but.Newconfiguration = Nova configura\u00e7\u00e3o
-edtmotorconfdlg.but.Removeconfiguration = Remover configura\u00e7\u00e3o
+edtmotorconfdlg.but.Deleteconfiguration = Remover configura\u00e7\u00e3o
edtmotorconfdlg.but.Renameconfiguration = Renomear
edtmotorconfdlg.but.Resetdeployment = Retornar o lan\u00e7amento
edtmotorconfdlg.but.Resetseparation = Retornar a separa\u00e7\u00e3o
@@ -1681,7 +1680,7 @@ simedtdlg.border.Simlist = Observa\u00e7\u00e3o da simula\u00
simedtdlg.border.Simopt = Op\u00e7\u00f5es do simulador
simedtdlg.but.FlightcfgEdit = Edit
simedtdlg.but.add = Adicionar
-simedtdlg.but.remove = Remover
+simedtdlg.but.delete = Remover
simedtdlg.but.resettodefault = Restaurar padr\u00e3o
# Simulation edit dialog
simedtdlg.but.runsimulation = Executar a simula\u00e7\u00e3o
@@ -1796,7 +1795,7 @@ simplotpanel.but.All = Todos
simplotpanel.but.NewYaxisplottype = Novo tipo de plotagem para o eixo Y
simplotpanel.but.None = Nenhum
simplotpanel.but.Plotflight = Plotagem do voo
-simplotpanel.but.ttip.Removethisplot = Remover esta plotagem
+simplotpanel.but.ttip.Deletethisplot = Remover esta plotagem
simplotpanel.lbl.Axis = Eixos:
simplotpanel.lbl.Flightevents = Eventos de voo:
# Simulation plot panel
diff --git a/core/resources/l10n/messages_ru.properties b/core/resources/l10n/messages_ru.properties
index e2be1a52e..fe73ee0c3 100644
--- a/core/resources/l10n/messages_ru.properties
+++ b/core/resources/l10n/messages_ru.properties
@@ -190,7 +190,7 @@ MotorChooserDialog.title = \u0412\u044B\u0431\u043E\u0440 \u0440\u0430\u043A\u04
! Edit Motor configuration dialog
edtmotorconfdlg.col.configuration = \u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F
-edtmotorconfdlg.but.Removeconfiguration = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E
+edtmotorconfdlg.but.Deleteconfiguration = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E
edtmotorconfdlg.but.Renameconfiguration = \u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C
edtmotorconfdlg.but.Newconfiguration = \u041D\u043E\u0432\u0430\u044F \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F
edtmotorconfdlg.but.Duplicateconfiguration = \u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E
@@ -377,7 +377,7 @@ simedtdlg.but.runsimulation = \u0412\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u
simedtdlg.but.resettodefault = \u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E
simedtdlg.but.savedefault = \u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E
simedtdlg.but.add = \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C
-simedtdlg.but.remove = \u0423\u0434\u0430\u043B\u0438\u0442\u044C
+simedtdlg.but.delete = \u0423\u0434\u0430\u043B\u0438\u0442\u044C
simedtdlg.title.Editsim = \u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A \u0440\u0430\u0441\u0447\u0435\u0442\u0430
simedtdlg.lbl.Simname = \u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0440\u0430\u0441\u0447\u0435\u0442\u0430:
simedtdlg.tab.Launchcond = \u0423\u0441\u043B\u043E\u0432\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u0430
@@ -609,7 +609,7 @@ customExpressionPanel.but.ttip.Import = \u0418\u043C\u043F\u043E\u0440\u0442\u04
customExpressionPanel.lbl.UpdateNote = \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0440\u0430\u0441\u0447\u0435\u0442, \u043F\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043C \u043F\u043E\u0441\u0442\u0440\u043E\u0435\u043D\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043A\u043E\u0432 \u0441\u0442\u0430\u043D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E.
customExpressionPanel.lbl.CalcNote = \u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u0431\u0443\u0434\u0443\u0442 \u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u044B \u0432 \u0442\u043E\u043C \u0436\u0435 \u043F\u043E\u0440\u044F\u0434\u043A\u0435, \u0432 \u043A\u0430\u043A\u043E\u043C \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u044B.
customExpressionPanel.lbl.CustomExpressions = \u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F
-customExpression.Units.but.ttip.Remove = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
+customExpression.Units.but.ttip.Delete = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
customExpression.Units.but.ttip.Edit = \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044D\u0442\u043E \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435
customExpression.Units.but.ttip.MoveUp = \u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0432\u0432\u0435\u0440\u0445 \u0432 \u043F\u043E\u0440\u044F\u0434\u043A\u0435 \u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u044F
customExpression.Units.but.ttip.MoveDown = \u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0432\u043D\u0438\u0437 \u0432 \u043F\u043E\u0440\u044F\u0434\u043A\u0435 \u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u044F
@@ -693,7 +693,7 @@ simplotpanel.but.All = \u0412\u0441\u0435
simplotpanel.but.None = \u041D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E
simplotpanel.but.NewYaxisplottype = \u041D\u043E\u0432\u044B\u0439 \u0442\u0438\u043F \u043E\u0441\u0438 Y \u0433\u0440\u0430\u0444\u0438\u043A\u0430
simplotpanel.lbl.Axis = \u041E\u0441\u044C:
-simplotpanel.but.ttip.Removethisplot = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0433\u0440\u0430\u0444\u0438\u043A
+simplotpanel.but.ttip.Deletethisplot = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0433\u0440\u0430\u0444\u0438\u043A
simplotpanel.Desc = \u0414\u0430\u043D\u043D\u044B\u0435 \u0431\u0443\u0434\u0443\u0442 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u044B \u0432\u043E \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u043C \u043F\u043E\u0440\u044F\u0434\u043A\u0435, \u0434\u0430\u0436\u0435 \u0435\u0441\u043B\u0438 \u0442\u0438\u043F \u043E\u0441\u0438 X \u043D\u0435 \u0432\u0440\u0435\u043C\u044F.
simplotpanel.OptionPane.lbl1 = \u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u0433\u0440\u0430\u0444\u0438\u043A\u043E\u0432 - 15
simplotpanel.OptionPane.lbl2 = \u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0433\u0440\u0430\u0444\u0438\u043A
@@ -1096,7 +1096,7 @@ MotorCfg.lbl.longA2 = \u0421\u0442\u0443\u043F\u0435\u043D\u0438 \u043C\u043E\u0
MotorCfg.lbl.longB1 = \u0412 \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0441\u0445\u0435\u043C\u0435
MotorCfg.lbl.longB2 = \u0441\u0442\u0443\u043F\u0435\u043D\u0435\u0439.
MotorCfg.but.Selectmotor = \u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044C
-MotorCfg.but.Removemotor = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044C
+MotorCfg.but.Deletemotor = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044C
MotorCfg.lbl.motorLabel = \u041D\u0435\u0442
! NoseConeConfig
@@ -1965,10 +1965,10 @@ GeneralOptimizationDialog.btn.stop = \u041E\u0441\u0442\u0430\u043D\u043E\u0432\
GeneralOptimizationDialog.lbl.paramsToOptimize = \u041E\u043F\u0442\u0438\u043C\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B:
GeneralOptimizationDialog.btn.add = \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C
GeneralOptimizationDialog.btn.add.ttip = \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432 \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0430\u0446\u0438\u044E
-GeneralOptimizationDialog.btn.remove = \u0423\u0434\u0430\u043B\u0438\u0442\u044C
-GeneralOptimizationDialog.btn.remove.ttip = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0438\u0437 \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0430\u0446\u0438\u0438
-GeneralOptimizationDialog.btn.removeAll = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435
-GeneralOptimizationDialog.btn.removeAll.ttip = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0438\u0437 \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0430\u0446\u0438\u0438
+GeneralOptimizationDialog.btn.delete = \u0423\u0434\u0430\u043B\u0438\u0442\u044C
+GeneralOptimizationDialog.btn.delete.ttip = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0438\u0437 \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0430\u0446\u0438\u0438
+GeneralOptimizationDialog.btn.deleteAll = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435
+GeneralOptimizationDialog.btn.deleteAll.ttip = \u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0438\u0437 \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0430\u0446\u0438\u0438
GeneralOptimizationDialog.lbl.availableParams = \u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B:
GeneralOptimizationDialog.lbl.optimizationOpts = \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0430\u0446\u0438\u0438
GeneralOptimizationDialog.lbl.optimizeSim = \u041E\u043F\u0442\u0438\u043C\u0438\u0437\u0438\u0440\u0443\u0435\u043C\u044B\u0439 \u0440\u0430\u0441\u0447\u0435\u0442:
@@ -2103,7 +2103,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = \u0418\u0441\u043A\u0
ComponentPresetChooserDialog.menu.sortAsc = \u041F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E
ComponentPresetChooserDialog.menu.sortDesc = \u041F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E
ComponentPresetChooserDialog.menu.units = \u0415\u0434\u0438\u043D\u0438\u0446\u044B \u0438\u0437\u043C\u0435\u0440\u0435\u043D\u0438\u044F
-ComponentPresetChooserDialog.checkbox.showAllCompatible = \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 \u0441\u043E\u0432\u043C\u0435\u0441\u0442\u0438\u043C\u044B\u0435
ComponentPresetChooserDialog.checkbox.showLegacyCheckBox = \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u0430\u0437\u0443 \u0434\u0430\u043D\u043D\u044B\u0445 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445
ComponentPresetChooserDialog.lbl.favorites = \u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u044D\u0442\u043E\u0442 \u0444\u043B\u0430\u0436\u043E\u043A, \u0447\u0442\u043E\u0431\u044B \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u0433\u043E\u0442\u043E\u0432\u043A\u0443 \u0432 \u0440\u0430\u0441\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0435\u0435\u0441\u044F \u043C\u0435\u043D\u044E \u0437\u0430\u0433\u043E\u0442\u043E\u0432\u043E\u043A \u0432 \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432\u043E\u043C \u043E\u043A\u043D\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0430.
table.column.Favorite = \u0418\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0435
@@ -2152,7 +2151,7 @@ EditDecalHelper.editPreferencesHelp = \u0413\u0440\u0430\u0444\u0438\u0447\u0435
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.deleteMotor = \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
MotorConfigurationPanel.btn.resetIgnition = \u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0437\u0430\u0436\u0438\u0433\u0430\u043D\u0438\u0435
diff --git a/core/resources/l10n/messages_uk_UA.properties b/core/resources/l10n/messages_uk_UA.properties
index 5c4eb0c59..4cb554daa 100644
--- a/core/resources/l10n/messages_uk_UA.properties
+++ b/core/resources/l10n/messages_uk_UA.properties
@@ -180,7 +180,7 @@ MotorChooserDialog.title = Select a rocket motor
! Edit Motor configuration dialog
edtmotorconfdlg.col.configuration = Configuration
-edtmotorconfdlg.but.Removeconfiguration = Remove Configuration
+edtmotorconfdlg.but.Deleteconfiguration = Delete Configuration
edtmotorconfdlg.but.Renameconfiguration = Rename Configuration
edtmotorconfdlg.but.Newconfiguration = New Configuration
edtmotorconfdlg.but.Duplicateconfiguration = Duplicate Configuration
@@ -324,7 +324,7 @@ simedtdlg.but.runsimulation = Run simulation
simedtdlg.but.resettodefault = Reset to default
simedtdlg.but.savedefault = Save as default
simedtdlg.but.add = Add
-simedtdlg.but.remove = Remove
+simedtdlg.but.delete = Delete
simedtdlg.title.Editsim = Edit simulation
simedtdlg.lbl.Simname = Simulation name:
simedtdlg.tab.Launchcond = Launch conditions
@@ -520,7 +520,7 @@ customExpressionPanel.but.ttip.Import = Import custom expressions from another .
customExpressionPanel.lbl.UpdateNote = You must run the simulation before data will be available for plotting.
customExpressionPanel.lbl.CalcNote = Expressions will be calculated in the order shown.
customExpressionPanel.lbl.CustomExpressions = Custom Expressions
-customExpression.Units.but.ttip.Remove = Remove this expression
+customExpression.Units.but.ttip.Delete = Delete this expression
customExpression.Units.but.ttip.Edit = Edit this expression
customExpression.Units.but.ttip.MoveUp = Move expression up in calculation order
customExpression.Units.but.ttip.MoveDown = Move expression down in calculation order
@@ -603,7 +603,7 @@ simplotpanel.but.All = All
simplotpanel.but.None = None
simplotpanel.but.NewYaxisplottype = New Y axis plot type
simplotpanel.lbl.Axis = Axis:
-simplotpanel.but.ttip.Removethisplot = Remove this plot
+simplotpanel.but.ttip.Deletethisplot = Delete this plot
simplotpanel.Desc = The data will be plotted in time order even if the X axis type is not time.
simplotpanel.OptionPane.lbl1 = A maximum of 15 plots is allowed.
simplotpanel.OptionPane.lbl2 = Cannot add plot
@@ -878,7 +878,7 @@ FreeformFinSetCfg.lbl.Thickness = Thickness:
FreeformFinSetConfig.lbl.doubleClick1 = Double-click
FreeformFinSetConfig.lbl.doubleClick2 = to edit
FreeformFinSetConfig.lbl.clickDrag = Click+drag: Add and move points
-FreeformFinSetConfig.lbl.ctrlClick = Ctrl+click: Remove point
+FreeformFinSetConfig.lbl.ctrlClick = Ctrl+click: Delete point
FreeformFinSetConfig.lbl.scaleFin = Scale Fin
@@ -942,7 +942,7 @@ MotorCfg.lbl.longA2 = Stages can be added by clicking \"New stage\".
MotorCfg.lbl.longB1 = The current design has
MotorCfg.lbl.longB2 = stages.
MotorCfg.but.Selectmotor = Select motor
-MotorCfg.but.Removemotor = Remove motor
+MotorCfg.but.Deletemotor = Delete motor
MotorCfg.lbl.motorLabel = None
! NoseConeConfig
@@ -1696,10 +1696,10 @@ GeneralOptimizationDialog.btn.stop = Stop optimization
GeneralOptimizationDialog.lbl.paramsToOptimize = Parameters to optimize:
GeneralOptimizationDialog.btn.add = Add
GeneralOptimizationDialog.btn.add.ttip = Add the selected parameter to the optimization
-GeneralOptimizationDialog.btn.remove = Remove
-GeneralOptimizationDialog.btn.remove.ttip = Remove the selected parameter from the optimization
-GeneralOptimizationDialog.btn.removeAll = Remove all
-GeneralOptimizationDialog.btn.removeAll.ttip = Remove all parameters from the optimization
+GeneralOptimizationDialog.btn.delete = Delete
+GeneralOptimizationDialog.btn.delete.ttip = Delete the selected parameter from the optimization
+GeneralOptimizationDialog.btn.deleteAll = Delete all
+GeneralOptimizationDialog.btn.deleteAll.ttip = Delete all parameters from the optimization
GeneralOptimizationDialog.lbl.availableParams = Available parameters:
GeneralOptimizationDialog.lbl.optimizationOpts = Optimization options
GeneralOptimizationDialog.lbl.optimizeSim = Optimize simulation:
@@ -1830,7 +1830,6 @@ ComponentPresetChooserDialog.checkbox.filterForeDiameter = Match fore diameter
ComponentPresetChooserDialog.menu.sortAsc = Sort Ascending
ComponentPresetChooserDialog.menu.sortDesc = Sort Descending
ComponentPresetChooserDialog.menu.units = Units
-ComponentPresetChooserDialog.checkbox.showAllCompatible = Show all compatible
ComponentPresetChooserDialog.lbl.favorites = Select to add preset to drop-down menu
table.column.Favorite = Favorite
table.column.Manufacturer = Manufacturer
@@ -1875,7 +1874,7 @@ EditDecalHelper.editPreferencesHelp = The editor used can be modified in the Pre
MotorConfigurationPanel.lbl.motorMounts = Motor mounts
MotorConfigurationPanel.lbl.motorConfiguration = Motor configurations
-MotorConfigurationPanel.btn.removeMotor = Remove motor
+MotorConfigurationPanel.btn.deleteMotor = Delete motor
MotorConfigurationPanel.btn.selectMotor = Select motor
MotorConfigurationPanel.btn.selectIgnition = Select ignition
MotorConfigurationPanel.btn.resetIgnition = Reset ignition
diff --git a/core/resources/l10n/messages_zh_CN.properties b/core/resources/l10n/messages_zh_CN.properties
index 6d98ddb49..1b326fa08 100644
--- a/core/resources/l10n/messages_zh_CN.properties
+++ b/core/resources/l10n/messages_zh_CN.properties
@@ -158,7 +158,6 @@ ComponentIcons.disabled = (\u5DF2\u7981\u7528)
ComponentPresetChooserDialog.checkbox.filterAftDiameter = \u5339\u914D\u540E\u76F4\u5F84
ComponentPresetChooserDialog.checkbox.filterForeDiameter = \u5339\u914D\u524D\u76F4\u5F84
-ComponentPresetChooserDialog.checkbox.showAllCompatible = \u663E\u793A\u6240\u6709\u517C\u5BB9\u7EC4\u4EF6
ComponentPresetChooserDialog.filter.label = \u6587\u672C\u8FC7\u6EE4:
ComponentPresetChooserDialog.lbl.favorites = \u6DFB\u52A0\u5230\u9884\u8BBE\u4E0B\u62C9\u6846
ComponentPresetChooserDialog.menu.sortAsc = \u5347\u5E8F
@@ -405,10 +404,10 @@ GeneralOptimizationDialog.btn.close = \u5173\u95ED
GeneralOptimizationDialog.btn.close.ttip = \u5173\u95ED\u7A97\u53E3\u4E0D\u6539\u53D8\u706B\u7BAD\u8BBE\u8BA1
GeneralOptimizationDialog.btn.plotPath = \u7ED8\u5236\u4F18\u5316\u8DEF\u5F84
GeneralOptimizationDialog.btn.plotPath.ttip = \u7ED8\u5236\u4F18\u5316\u8DEF\u5F84 (\u4EC5\u4F7F\u75281\u7EF4\u548C2\u7EF4\u4F18\u5316)
-GeneralOptimizationDialog.btn.remove = \u79FB\u9664
-GeneralOptimizationDialog.btn.remove.ttip = \u79FB\u9664\u4F18\u5316\u5217\u8868\u4E2D\u7684\u53C2\u6570
-GeneralOptimizationDialog.btn.removeAll = \u79FB\u9664\u6240\u6709
-GeneralOptimizationDialog.btn.removeAll.ttip = \u79FB\u9664\u4F18\u5316\u5217\u8868\u4E2D\u7684\u6240\u6709\u53C2\u6570
+GeneralOptimizationDialog.btn.delete = \u79FB\u9664
+GeneralOptimizationDialog.btn.delete.ttip = \u79FB\u9664\u4F18\u5316\u5217\u8868\u4E2D\u7684\u53C2\u6570
+GeneralOptimizationDialog.btn.deleteAll = \u79FB\u9664\u6240\u6709
+GeneralOptimizationDialog.btn.deleteAll.ttip = \u79FB\u9664\u4F18\u5316\u5217\u8868\u4E2D\u7684\u6240\u6709\u53C2\u6570
GeneralOptimizationDialog.btn.reset = \u91CD\u7F6E
GeneralOptimizationDialog.btn.reset.ttip = \u91CD\u7F6E\u706B\u7BAD\u8BBE\u8BA1\u4E3A\u5F53\u524D\u706B\u7BAD\u8BBE\u8BA1
GeneralOptimizationDialog.btn.save = \u4FDD\u5B58\u4F18\u5316\u8DEF\u5F84
@@ -569,7 +568,7 @@ MaximumVelocityParameter.name = \u6700\u5927\u901F\u5EA6
MotorCfg.but.FlightcfgEdit = \u7F16\u8F91
MotorCfg.but.New = \u65B0\u5EFA
-MotorCfg.but.Removemotor = \u79FB\u9664\u53D1\u52A8\u673A
+MotorCfg.but.Deletemotor = \u79FB\u9664\u53D1\u52A8\u673A
MotorCfg.but.Selectmotor = \u9009\u62E9\u53D1\u52A8\u673A
! MotorConfig
MotorCfg.checkbox.compmotormount = \u8BE5\u7EC4\u4EF6\u4E3A\u53D1\u52A8\u673A\u5EA7
@@ -588,7 +587,7 @@ MotorCfg.lbl.seconds = \u79D2
! MotorChooserDialog
MotorChooserDialog.title = \u9009\u62E9\u706B\u7BAD\u53D1\u52A8\u673A
-MotorConfigurationPanel.btn.removeMotor = \u79FB\u9664\u53D1\u52A8\u673A
+MotorConfigurationPanel.btn.deleteMotor = \u79FB\u9664\u53D1\u52A8\u673A
MotorConfigurationPanel.btn.resetIgnition = \u91CD\u7F6E\u70B9\u706B
MotorConfigurationPanel.btn.selectIgnition = \u9009\u62E9\u70B9\u706B
MotorConfigurationPanel.btn.selectMotor = \u9009\u62E9\u53D1\u52A8\u673A
@@ -1424,7 +1423,7 @@ customExpression.Units = \u5355\u4F4D
customExpression.Units.but.ttip.Edit = \u7F16\u8F91\u8868\u8FBE\u5F0F
customExpression.Units.but.ttip.MoveDown = \u5EF6\u540E\u8868\u8FBE\u5F0F\u8BA1\u7B97\u987A\u5E8F
customExpression.Units.but.ttip.MoveUp = \u63D0\u524D\u8868\u8FBE\u5F0F\u8BA1\u7B97\u987A\u5E8F
-customExpression.Units.but.ttip.Remove = \u79FB\u9664\u8868\u8FBE\u5F0F
+customExpression.Units.but.ttip.Delete = \u79FB\u9664\u8868\u8FBE\u5F0F
customExpressionPanel.but.Import = \u5BFC\u5165
! Custom expression panel
@@ -1461,7 +1460,7 @@ dlg.but.ok = OK
edtmotorconfdlg.but.Copyconfiguration = \u590D\u5236
edtmotorconfdlg.but.Newconfiguration = \u65B0\u5EFA
! Edit Motor configuration dialog
-edtmotorconfdlg.but.Removeconfiguration = \u79FB\u9664
+edtmotorconfdlg.but.Deleteconfiguration = \u79FB\u9664
edtmotorconfdlg.but.Renameconfiguration = \u91CD\u547D\u540D
edtmotorconfdlg.but.Resetdeployment = \u91CD\u7F6E\u5230\u9ED8\u8BA4\u503C
edtmotorconfdlg.but.Resetseparation = \u91CD\u7F6E\u5230\u9ED8\u8BA4\u503C
@@ -1822,7 +1821,7 @@ simedtdlg.border.Launchrod = \u53D1\u5C04\u67B6
simedtdlg.border.SimExt = \u6A21\u62DF\u6269\u5C55
simedtdlg.border.Simopt = \u4EFF\u771F\u9009\u9879
simedtdlg.but.add = \u6DFB\u52A0
-simedtdlg.but.remove = \u79FB\u9664
+simedtdlg.but.delete = \u79FB\u9664
simedtdlg.but.resettodefault = \u6062\u590D\u9ED8\u8BA4
! Simulation edit dialog
simedtdlg.but.runsimulation = \u8FD0\u884C\u4EFF\u771F
@@ -1943,7 +1942,7 @@ simplotpanel.RIGHT_NAME = \u53F3
simplotpanel.but.All = \u5168\u9009\u4E8B\u4EF6
simplotpanel.but.NewYaxisplottype = \u65B0\u5EFAY\u8F74\u7C7B\u522B
simplotpanel.but.None = \u53D6\u6D88\u5168\u9009\u4E8B\u4EF6
-simplotpanel.but.ttip.Removethisplot = \u5220\u9664\u8BE5Y\u8F74\u7C7B\u522B
+simplotpanel.but.ttip.Deletethisplot = \u5220\u9664\u8BE5Y\u8F74\u7C7B\u522B
simplotpanel.lbl.Axis = \u8F74:
simplotpanel.lbl.Flightevents = \u98DE\u884C\u4E8B\u4EF6:
! Simulation plot panel
diff --git a/core/src/net/sf/openrocket/preset/ComponentPreset.java b/core/src/net/sf/openrocket/preset/ComponentPreset.java
index b92c4fcaa..993fc0f82 100644
--- a/core/src/net/sf/openrocket/preset/ComponentPreset.java
+++ b/core/src/net/sf/openrocket/preset/ComponentPreset.java
@@ -174,24 +174,10 @@ public class ComponentPreset implements Comparable, Serializabl
this.displayedColumns = displayedColumns;
}
- public List getCompatibleTypes() {
- return compatibleTypeMap.get(Type.this);
- }
-
public TypedKey>[] getDisplayedColumns() {
return displayedColumns;
}
- private static final Map> compatibleTypeMap = new HashMap>();
-
- static {
- compatibleTypeMap.put(BODY_TUBE, Arrays.asList(BODY_TUBE, TUBE_COUPLER, LAUNCH_LUG));
- compatibleTypeMap.put(TUBE_COUPLER, Arrays.asList(BODY_TUBE, TUBE_COUPLER, LAUNCH_LUG));
- compatibleTypeMap.put(LAUNCH_LUG, Arrays.asList(BODY_TUBE, TUBE_COUPLER, LAUNCH_LUG));
- compatibleTypeMap.put(CENTERING_RING, Arrays.asList(CENTERING_RING, ENGINE_BLOCK));
- compatibleTypeMap.put(NOSE_CONE, Arrays.asList(NOSE_CONE, TRANSITION));
- }
-
}
public final static TypedKey LEGACY = new TypedKey("Legacy", Boolean.class);
diff --git a/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java b/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java
index d8f21cbc9..72fdacac1 100644
--- a/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java
+++ b/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java
@@ -305,6 +305,9 @@ public class FlightConfiguration implements FlightConfigurableParameter {
SimulationModifier mod = getSelectedModifier();
if (mod == null) {
@@ -297,8 +297,8 @@ public class GeneralOptimizationDialog extends JDialog {
disableComponents.add(removeButton);
sub.add(removeButton, "wrap para*2, sg button");
- removeAllButton = new SelectColorButton(trans.get("btn.removeAll"));
- removeAllButton.setToolTipText(trans.get("btn.removeAll.ttip"));
+ removeAllButton = new SelectColorButton(trans.get("btn.deleteAll"));
+ removeAllButton.setToolTipText(trans.get("btn.deleteAll.ttip"));
removeAllButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
diff --git a/swing/src/net/sf/openrocket/gui/dialogs/optimization/OptimizationPlotDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/optimization/OptimizationPlotDialog.java
index fd91fc4b2..be5495a88 100644
--- a/swing/src/net/sf/openrocket/gui/dialogs/optimization/OptimizationPlotDialog.java
+++ b/swing/src/net/sf/openrocket/gui/dialogs/optimization/OptimizationPlotDialog.java
@@ -116,6 +116,8 @@ public class OptimizationPlotDialog extends JDialog {
GUIUtil.setDisposableDialogOptions(this, close);
GUIUtil.rememberWindowSize(this);
+ this.setLocationByPlatform(true);
+ GUIUtil.rememberWindowPosition(this);
}
diff --git a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java
index eaf0afa87..36b42640b 100644
--- a/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java
+++ b/swing/src/net/sf/openrocket/gui/dialogs/preset/ComponentPresetChooserDialog.java
@@ -2,6 +2,7 @@ package net.sf.openrocket.gui.dialogs.preset;
import java.awt.Dialog;
+import java.awt.Dimension;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -82,7 +83,11 @@ public class ComponentPresetChooserDialog extends JDialog {
this.presetType = component.getPresetType();
this.presetModel = presetModel;
this.presets = Application.getComponentPresetDao().listForType(component.getPresetType());
-
+
+ if (owner.getParent() != null) {
+ this.setPreferredSize(new Dimension((int)(0.7 * owner.getParent().getWidth()), (int) (0.7 * owner.getParent().getHeight())));
+ this.setLocationRelativeTo(owner.getParent());
+ }
List> displayedColumnKeys = Arrays.asList(component.getPresetType().getDisplayedColumns());
{
@@ -143,7 +148,7 @@ public class ComponentPresetChooserDialog extends JDialog {
// need to create componentSelectionTable before filter checkboxes,
// but add to panel after
componentSelectionTable = new ComponentPresetTable(presetType, presets, displayedColumnKeys);
- // GUIUtil.setAutomaticColumnTableWidths(componentSelectionTable, 20);
+ GUIUtil.setAutomaticColumnTableWidths(componentSelectionTable, 20);
int w = componentSelectionTable.getRowHeight() + 4;
XTableColumnModel tm = componentSelectionTable.getXColumnModel();
//TableColumn tc = componentSelectionTable.getColumnModel().getColumn(0);
@@ -156,7 +161,7 @@ public class ComponentPresetChooserDialog extends JDialog {
JScrollPane scrollpane = new JScrollPane();
scrollpane.setViewportView(componentSelectionTable);
- panel.add(scrollpane, "grow, width 700lp, height 300lp, pushy, spanx, wrap rel");
+ panel.add(scrollpane, "grow, pushy, spanx, wrap rel");
panel.add(new StyledLabel(String.format("%s %s", Chars.UP_ARROW, trans.get("lbl.favorites")), -1), "spanx, gapleft 5px, wrap para");
@@ -183,9 +188,12 @@ public class ComponentPresetChooserDialog extends JDialog {
panel.add(closeButton, "spanx, right, tag close");
this.add(panel);
-
- GUIUtil.rememberWindowSize(this);
+
GUIUtil.setDisposableDialogOptions(this, closeButton);
+ GUIUtil.rememberWindowSize(this);
+ this.setLocationByPlatform(true);
+ GUIUtil.rememberWindowPosition(this);
+ GUIUtil.rememberTableColumnWidths(componentSelectionTable, "Presets" + component.getClass().getCanonicalName());
updateFilters();
}
@@ -208,28 +216,6 @@ public class ComponentPresetChooserDialog extends JDialog {
private JPanel getFilterCheckboxes(XTableColumnModel tm, int legacyColumnIndex) {
JPanel panel = new JPanel(new MigLayout("ins 0"));
-
- /*
- * Add show all compatible check box.
- */
- final List compatibleTypes = component.getPresetType().getCompatibleTypes();
- final ComponentPreset.Type nativeType = component.getPresetType();
- if (compatibleTypes != null && compatibleTypes.size() > 0) {
- JCheckBox showAll = new JCheckBox();
- showAll.setText(trans.get("ComponentPresetChooserDialog.checkbox.showAllCompatible"));
- panel.add(showAll, "wrap");
- showAll.addItemListener(new ItemListener() {
- @Override
- public void itemStateChanged(ItemEvent e) {
- if (((JCheckBox) e.getItem()).isSelected()) {
- presets = Application.getComponentPresetDao().listForTypes(compatibleTypes);
- } else {
- presets = Application.getComponentPresetDao().listForType(nativeType);
- }
- componentSelectionTable.updateData(presets);
- }
- });
- }
/*
* Add legacy component filter checkbox
diff --git a/swing/src/net/sf/openrocket/gui/figure3d/photo/PhotoPanel.java b/swing/src/net/sf/openrocket/gui/figure3d/photo/PhotoPanel.java
index 4e9c4d34f..d51dded35 100644
--- a/swing/src/net/sf/openrocket/gui/figure3d/photo/PhotoPanel.java
+++ b/swing/src/net/sf/openrocket/gui/figure3d/photo/PhotoPanel.java
@@ -393,7 +393,7 @@ public class PhotoPanel extends JPanel implements GLEventListener {
gl.glTranslated(dx - p.getAdvance(), 0, 0);
- if (p.isFlame()) {
+ if (p.isFlame() && configuration.hasMotors()) {
convertColor(p.getFlameColor(), color);
gl.glLightfv(GLLightingFunc.GL_LIGHT2, GLLightingFunc.GL_AMBIENT,
diff --git a/swing/src/net/sf/openrocket/gui/help/tours/SlideShowDialog.java b/swing/src/net/sf/openrocket/gui/help/tours/SlideShowDialog.java
index 4671cdc13..78a3806f5 100644
--- a/swing/src/net/sf/openrocket/gui/help/tours/SlideShowDialog.java
+++ b/swing/src/net/sf/openrocket/gui/help/tours/SlideShowDialog.java
@@ -94,8 +94,9 @@ public class SlideShowDialog extends JDialog {
addKeyActions();
GUIUtil.setDisposableDialogOptions(this, nextButton);
nextButton.grabFocus();
- GUIUtil.rememberWindowPosition(this);
GUIUtil.rememberWindowSize(this);
+ this.setLocationByPlatform(true);
+ GUIUtil.rememberWindowPosition(this);
// this.setAlwaysOnTop(true);
}
diff --git a/swing/src/net/sf/openrocket/gui/main/BasicFrame.java b/swing/src/net/sf/openrocket/gui/main/BasicFrame.java
index 499ce66ef..cf2455623 100644
--- a/swing/src/net/sf/openrocket/gui/main/BasicFrame.java
+++ b/swing/src/net/sf/openrocket/gui/main/BasicFrame.java
@@ -4,9 +4,7 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
-import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
@@ -19,16 +17,12 @@ import java.net.URL;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import javax.swing.*;
import javax.swing.border.BevelBorder;
-import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
-import javax.swing.event.TreeSelectionEvent;
-import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultTreeSelectionModel;
import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
@@ -60,7 +54,6 @@ import net.sf.openrocket.gui.dialogs.preferences.PreferencesDialog;
import net.sf.openrocket.gui.figure3d.photo.PhotoFrame;
import net.sf.openrocket.gui.help.tours.GuidedTourSelectionDialog;
import net.sf.openrocket.gui.main.componenttree.ComponentTree;
-import net.sf.openrocket.gui.main.flightconfigpanel.FlightConfigurationPanel;
import net.sf.openrocket.gui.scalefigure.RocketPanel;
import net.sf.openrocket.gui.util.DummyFrameMenuOSX;
import net.sf.openrocket.gui.util.FileHelper;
@@ -75,7 +68,6 @@ import net.sf.openrocket.logging.Markers;
import net.sf.openrocket.rocketcomponent.AxialStage;
import net.sf.openrocket.rocketcomponent.ComponentChangeEvent;
import net.sf.openrocket.rocketcomponent.ComponentChangeListener;
-import net.sf.openrocket.rocketcomponent.PodSet;
import net.sf.openrocket.rocketcomponent.Rocket;
import net.sf.openrocket.rocketcomponent.RocketComponent;
import net.sf.openrocket.startup.Application;
@@ -108,9 +100,10 @@ public class BasicFrame extends JFrame {
public static final int SHIFT_SHORTCUT_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx() |
SHIFT_DOWN_MASK;
- public static final int COMPONENT_TAB = 0;
- public static final int CONFIGURATION_TAB = 1;
+ public static final int DESIGN_TAB = 0;
+ public static final int FLIGHT_CONFIGURATION_TAB = 1;
public static final int SIMULATION_TAB = 2;
+ private int previousTab = DESIGN_TAB;
/**
@@ -142,7 +135,9 @@ public class BasicFrame extends JFrame {
/** Actions available for rocket modifications */
private final RocketActions actions;
- private SimulationPanel simulationPanel;
+ private final DesignPanel designPanel;
+ private final FlightConfigurationPanel flightConfigurationPanel;
+ private final SimulationPanel simulationPanel;
public static BasicFrame lastFrameInstance = null; // Latest BasicFrame that was created
private static boolean quitCalled = false; // Keeps track whether the quit action has been called
@@ -166,57 +161,64 @@ public class BasicFrame extends JFrame {
componentSelectionModel = new DefaultTreeSelectionModel();
componentSelectionModel.setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
- // Obtain the simulation selection model that will be used
- simulationPanel = new SimulationPanel(document);
- simulationSelectionModel = simulationPanel.getSimulationListSelectionModel();
-
- // Combine into a DocumentSelectionModel
- selectionModel = new DocumentSelectionModel(document);
- selectionModel.attachComponentTreeSelectionModel(componentSelectionModel);
- selectionModel.attachSimulationListSelectionModel(simulationSelectionModel);
-
- actions = new RocketActions(document, selectionModel, this, simulationPanel);
-
- // Populate the popup menu
- popupMenu = new JPopupMenu();
- popupMenu.add(actions.getEditAction());
- popupMenu.add(actions.getCutAction());
- popupMenu.add(actions.getCopyAction());
- popupMenu.add(actions.getPasteAction());
- popupMenu.add(actions.getDuplicateAction());
- popupMenu.add(actions.getDeleteAction());
- popupMenu.addSeparator();
- popupMenu.add(actions.getScaleAction());
-
+ // ----- Create the different BasicFrame panels -----
log.debug("Constructing the BasicFrame UI");
- // The main vertical split pane
- JSplitPane vertical = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true);
- vertical.setResizeWeight(0.5);
- this.add(vertical);
+ //// Top segment, tabbed pane
+ simulationPanel = new SimulationPanel(document);
+ {
+ // Obtain the simulation selection model that will be used
+ simulationSelectionModel = simulationPanel.getSimulationListSelectionModel();
- // The top tabbed pane
+ // Combine into a DocumentSelectionModel
+ selectionModel = new DocumentSelectionModel(document);
+ selectionModel.attachComponentTreeSelectionModel(componentSelectionModel);
+ selectionModel.attachSimulationListSelectionModel(simulationSelectionModel);
+
+ // Create RocketActions
+ actions = new RocketActions(document, selectionModel, this, simulationPanel);
+ }
+ {
+ // Create the component tree
+ tree = new ComponentTree(document);
+ tree.setSelectionModel(componentSelectionModel);
+ }
+
+ designPanel = new DesignPanel(this, document, tree);
+ flightConfigurationPanel = new FlightConfigurationPanel(this, document);
tabbedPane = new JTabbedPane();
- //// Rocket design
- tabbedPane.addTab(trans.get("BasicFrame.tab.Rocketdesign"), null, designTab());
- //// Flight configurations
- tabbedPane.addTab(trans.get("BasicFrame.tab.Flightconfig"), null, new FlightConfigurationPanel(this, document));
- //// Flight simulations
+ tabbedPane.addTab(trans.get("BasicFrame.tab.Rocketdesign"), null, designPanel);
+ tabbedPane.addTab(trans.get("BasicFrame.tab.Flightconfig"), null, flightConfigurationPanel);
tabbedPane.addTab(trans.get("BasicFrame.tab.Flightsim"), null, simulationPanel);
// Add change listener to catch when the tabs are changed. This is to run simulations
// automatically when the simulation tab is selected.
tabbedPane.addChangeListener(new BasicFrame_changeAdapter(this));
- vertical.setTopComponent(tabbedPane);
-
- // Bottom segment, rocket figure
-
+ //// Bottom segment, rocket figure
rocketpanel = new RocketPanel(document, this);
- vertical.setBottomComponent(rocketpanel);
-
rocketpanel.setSelectionModel(tree.getSelectionModel());
+ //// The main vertical split pane
+ JSplitPane vertical = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true);
+ vertical.setResizeWeight(0.5);
+ vertical.setTopComponent(tabbedPane);
+ vertical.setBottomComponent(rocketpanel);
+ this.add(vertical);
+
+ // Populate the popup menu
+ {
+ popupMenu = new JPopupMenu();
+ popupMenu.add(actions.getEditAction());
+ popupMenu.add(actions.getCutAction());
+ popupMenu.add(actions.getCopyAction());
+ popupMenu.add(actions.getPasteAction());
+ popupMenu.add(actions.getDuplicateAction());
+ popupMenu.add(actions.getDeleteAction());
+ popupMenu.addSeparator();
+ popupMenu.add(actions.getScaleAction());
+ }
+
createMenu();
@@ -241,6 +243,7 @@ public class BasicFrame extends JFrame {
GUIUtil.rememberWindowSize(this);
this.setLocationByPlatform(true);
+ GUIUtil.rememberWindowPosition(this);
GUIUtil.setWindowIcons(this);
@@ -271,201 +274,6 @@ public class BasicFrame extends JFrame {
}
- /**
- * Construct the "Rocket design" tab. This contains a horizontal split pane
- * with the left component the design tree and the right component buttons
- * for adding components.
- */
- private JComponent designTab() {
- JSplitPane horizontal = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true);
- horizontal.setResizeWeight(0.5);
-
-
- // Upper-left segment, component tree
-
- JPanel panel = new JPanel(new MigLayout("fill, flowy", "[grow][grow 0]","[grow]"));
-
- tree = new ComponentTree(document);
- tree.setSelectionModel(componentSelectionModel);
-
- // Remove JTree key events that interfere with menu accelerators
- InputMap im = SwingUtilities.getUIInputMap(tree, JComponent.WHEN_FOCUSED);
- im.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, SHORTCUT_KEY), null);
- im.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, SHORTCUT_KEY), null);
- im.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, SHORTCUT_KEY), null);
- im.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, SHORTCUT_KEY), null);
- im.put(KeyStroke.getKeyStroke(KeyEvent.VK_S, SHORTCUT_KEY), null);
- im.put(KeyStroke.getKeyStroke(KeyEvent.VK_O, SHORTCUT_KEY), null);
- im.put(KeyStroke.getKeyStroke(KeyEvent.VK_N, SHORTCUT_KEY), null);
-
- // Visually select all child components of a stage/rocket/podset when it is selected
- componentSelectionModel.addTreeSelectionListener(new TreeSelectionListener() {
- @Override
- public void valueChanged(TreeSelectionEvent e) {
- if (tree == null || tree.getSelectionPaths() == null || tree.getSelectionPaths().length == 0
- || rocketpanel == null) return;
-
- // Get all the components that need to be selected = currently selected components + children of stages/boosters/podsets
- List children = new ArrayList<>(Arrays.asList(rocketpanel.getFigure().getSelection()));
- for (TreePath p : tree.getSelectionPaths()) {
- if (p != null) {
- RocketComponent c = (RocketComponent) p.getLastPathComponent();
- if (c instanceof AxialStage || c instanceof Rocket || c instanceof PodSet) {
- Iterator iter = c.iterator(false);
- while (iter.hasNext()) {
- RocketComponent child = iter.next();
- children.add(child);
- }
- }
- }
- }
-
- // Select all the child components
- if (rocketpanel.getFigure() != null && rocketpanel.getFigure3d() != null) {
- rocketpanel.getFigure().setSelection(children.toArray(new RocketComponent[0]));
- rocketpanel.getFigure3d().setSelection(children.toArray(new RocketComponent[0]));
- }
- }
- });
-
- // Double-click opens config dialog
- MouseListener ml = new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent e) {
- int selRow = tree.getRowForLocation(e.getX(), e.getY());
- TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
- if (selRow != -1) {
- if (selPath == null) return;
-
- // Double-click
- if ((e.getButton() == MouseEvent.BUTTON1) && (e.getClickCount() == 2) && !ComponentConfigDialog.isDialogVisible()) {
- RocketComponent component = (RocketComponent) selPath.getLastPathComponent();
-
- // Multi-component edit if shift/meta key is pressed
- if ((e.isShiftDown() || e.isMetaDown()) && tree.getSelectionPaths() != null) {
- // Add the other selected components as listeners to the last selected component
- for (TreePath p : tree.getSelectionPaths()) {
- if (p != null) {
- if (p.getLastPathComponent() == component) continue;
- RocketComponent c = (RocketComponent) p.getLastPathComponent();
- c.clearConfigListeners();
- component.addConfigListener(c);
- }
- }
-
- // Add the selection path to the tree selection
- List paths = new LinkedList<>(Arrays.asList(tree.getSelectionPaths()));
- paths.add(selPath);
- tree.setSelectionPaths(paths.toArray(new TreePath[0]));
- }
-
- ComponentConfigDialog.showDialog(BasicFrame.this, BasicFrame.this.document, component);
- }
- // Context menu
- else if ((e.getButton() == MouseEvent.BUTTON3) && (e.getClickCount() == 1)) {
- if (!tree.isPathSelected(selPath)) {
- // Select new path
- tree.setSelectionPath(selPath);
- }
-
- doComponentTreePopup(e);
- }
- } else { // Clicked on blank space
- tree.clearSelection();
- }
- }
- };
- tree.addMouseListener(ml);
-
- // Update dialog when selection is changed
- componentSelectionModel.addTreeSelectionListener(new TreeSelectionListener() {
- @Override
- public void valueChanged(TreeSelectionEvent e) {
- // Scroll tree to the selected item
- TreePath[] paths = componentSelectionModel.getSelectionPaths();
- if (paths == null || paths.length == 0)
- return;
-
- for (TreePath path : paths) {
- tree.scrollPathToVisible(path);
- }
-
- if (!ComponentConfigDialog.isDialogVisible())
- return;
- else
- ComponentConfigDialog.disposeDialog();
-
- RocketComponent c = (RocketComponent) paths[0].getLastPathComponent();
- c.clearConfigListeners();
- for (int i = 1; i < paths.length; i++) {
- RocketComponent listener = (RocketComponent) paths[i].getLastPathComponent();
- listener.clearConfigListeners();
- c.addConfigListener(listener);
- }
- ComponentConfigDialog.showDialog(BasicFrame.this, BasicFrame.this.document, c);
- }
- });
-
- // Place tree inside scroll pane
- JScrollPane scroll = new JScrollPane(tree);
- panel.add(scroll, "spany, grow, wrap");
-
-
- // Buttons
- JButton button = new IconButton();
- button.setHorizontalAlignment(SwingConstants.LEFT);
- RocketActions.tieActionToButton(button, actions.getMoveUpAction());
- panel.add(button, "sizegroup buttons, aligny 65%");
-
- button = new IconButton();
- button.setHorizontalAlignment(SwingConstants.LEFT);
- RocketActions.tieActionToButton(button, actions.getMoveDownAction());
- panel.add(button, "sizegroup buttons, aligny 0%");
-
- button = new IconButton();
- button.setHorizontalAlignment(SwingConstants.LEFT);
- RocketActions.tieActionToButton(button, actions.getEditAction());
- button.setMnemonic(0);
- panel.add(button, "sizegroup buttons, gaptop 20%");
-
- button = new IconButton();
- button.setHorizontalAlignment(SwingConstants.LEFT);
- RocketActions.tieActionToButton(button, actions.getDuplicateAction());
- button.setMnemonic(0);
- panel.add(button, "sizegroup buttons");
-
- button = new IconButton();
- button.setHorizontalAlignment(SwingConstants.LEFT);
- RocketActions.tieActionToButton(button, actions.getDeleteAction());
- button.setMnemonic(0);
- panel.add(button, "sizegroup buttons");
-
- horizontal.setLeftComponent(panel);
-
-
- // Upper-right segment, component addition buttons
-
- panel = new JPanel(new MigLayout("fill, insets 0", "[0::]"));
-
- scroll = new JScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
- ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
- scroll.setViewportView(new ComponentAddButtons(document, componentSelectionModel,
- scroll.getViewport()));
- scroll.setBorder(null);
- scroll.setViewportBorder(null);
-
- TitledBorder border = BorderFactory.createTitledBorder(trans.get("BasicFrame.title.Addnewcomp"));
- GUIUtil.changeFontStyle(border, Font.BOLD);
- scroll.setBorder(border);
-
- panel.add(scroll, "grow");
-
- horizontal.setRightComponent(panel);
-
- return horizontal;
- }
-
-
/**
* Return the currently selected rocket component, or null if none selected.
*/
@@ -991,6 +799,10 @@ public class BasicFrame extends JFrame {
this.setJMenuBar(menubar);
}
+ public RocketActions getRocketActions() {
+ return actions;
+ }
+
public void doComponentTreePopup(MouseEvent e) {
popupMenu.show(e.getComponent(), e.getX(), e.getY());
}
@@ -1256,7 +1068,7 @@ public class BasicFrame extends JFrame {
/**
* Select the tab on the main pane.
*
- * @param tab one of {@link #COMPONENT_TAB} or {@link #SIMULATION_TAB}.
+ * @param tab one of {@link #DESIGN_TAB}, {@link #FLIGHT_CONFIGURATION_TAB} or {@link #SIMULATION_TAB}.
*/
public void selectTab(int tab) {
tabbedPane.setSelectedIndex(tab);
@@ -1940,8 +1752,21 @@ public class BasicFrame extends JFrame {
public void stateChanged(ChangeEvent e) {
JTabbedPane tabSource = (JTabbedPane) e.getSource();
int tab = tabSource.getSelectedIndex();
- if (tab == SIMULATION_TAB) {
- simulationPanel.activating();
+ if (previousTab == SIMULATION_TAB) {
+ simulationPanel.updatePreviousSelection();
+ }
+ previousTab = tab;
+ switch (tab) {
+ case DESIGN_TAB:
+ designPanel.takeTheSpotlight();
+ break;
+ case FLIGHT_CONFIGURATION_TAB:
+ flightConfigurationPanel.takeTheSpotlight();
+ break;
+ case SIMULATION_TAB:
+ simulationPanel.takeTheSpotlight();
+ simulationPanel.activating();
+ break;
}
}
diff --git a/swing/src/net/sf/openrocket/gui/main/DesignPanel.java b/swing/src/net/sf/openrocket/gui/main/DesignPanel.java
new file mode 100644
index 000000000..72065c9ed
--- /dev/null
+++ b/swing/src/net/sf/openrocket/gui/main/DesignPanel.java
@@ -0,0 +1,237 @@
+package net.sf.openrocket.gui.main;
+
+import net.miginfocom.swing.MigLayout;
+import net.sf.openrocket.document.OpenRocketDocument;
+import net.sf.openrocket.gui.configdialog.ComponentConfigDialog;
+import net.sf.openrocket.gui.main.componenttree.ComponentTree;
+import net.sf.openrocket.gui.scalefigure.RocketPanel;
+import net.sf.openrocket.gui.util.GUIUtil;
+import net.sf.openrocket.gui.widgets.SelectColorButton;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.rocketcomponent.AxialStage;
+import net.sf.openrocket.rocketcomponent.PodSet;
+import net.sf.openrocket.rocketcomponent.Rocket;
+import net.sf.openrocket.rocketcomponent.RocketComponent;
+import net.sf.openrocket.startup.Application;
+
+import javax.swing.BorderFactory;
+import javax.swing.InputMap;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.KeyStroke;
+import javax.swing.ScrollPaneConstants;
+import javax.swing.SwingUtilities;
+import javax.swing.border.TitledBorder;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
+import javax.swing.tree.TreePath;
+import java.awt.Component;
+import java.awt.Font;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import static net.sf.openrocket.gui.main.BasicFrame.SHORTCUT_KEY;
+
+/**
+ * Construct the "Rocket design" tab. This contains a horizontal split pane
+ * with the left component the design tree and the right component buttons
+ * for adding components.
+ */
+public class DesignPanel extends JSplitPane {
+ private static final Translator trans = Application.getTranslator();
+ private final Component tree;
+
+ public DesignPanel(final BasicFrame parent, final OpenRocketDocument document, final ComponentTree tree) {
+ super(JSplitPane.HORIZONTAL_SPLIT, true);
+ setResizeWeight(0.5);
+ this.tree = tree;
+
+ // Upper-left segment, component tree
+ JPanel panel = new JPanel(new MigLayout("fill, flowy", "[grow][grow 0]","[grow]"));
+
+ // Remove JTree key events that interfere with menu accelerators
+ InputMap im = SwingUtilities.getUIInputMap(tree, JComponent.WHEN_FOCUSED);
+ im.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, SHORTCUT_KEY), null);
+ im.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, SHORTCUT_KEY), null);
+ im.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, SHORTCUT_KEY), null);
+ im.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, SHORTCUT_KEY), null);
+ im.put(KeyStroke.getKeyStroke(KeyEvent.VK_S, SHORTCUT_KEY), null);
+ im.put(KeyStroke.getKeyStroke(KeyEvent.VK_O, SHORTCUT_KEY), null);
+ im.put(KeyStroke.getKeyStroke(KeyEvent.VK_N, SHORTCUT_KEY), null);
+
+ // Visually select all child components of a stage/rocket/podset when it is selected
+ tree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() {
+ @Override
+ public void valueChanged(TreeSelectionEvent e) {
+ if (tree == null || tree.getSelectionPaths() == null || tree.getSelectionPaths().length == 0
+ || parent.getRocketPanel() == null) return;
+
+ // Get all the components that need to be selected = currently selected components + children of stages/boosters/podsets
+ List children = new ArrayList<>(Arrays.asList(parent.getRocketPanel().getFigure().getSelection()));
+ for (TreePath p : tree.getSelectionPaths()) {
+ if (p != null) {
+ RocketComponent c = (RocketComponent) p.getLastPathComponent();
+ if (c instanceof AxialStage || c instanceof Rocket || c instanceof PodSet) {
+ Iterator iter = c.iterator(false);
+ while (iter.hasNext()) {
+ RocketComponent child = iter.next();
+ children.add(child);
+ }
+ }
+ }
+ }
+
+ // Select all the child components
+ if (parent.getRocketPanel().getFigure() != null && parent.getRocketPanel().getFigure3d() != null) {
+ parent.getRocketPanel().getFigure().setSelection(children.toArray(new RocketComponent[0]));
+ parent.getRocketPanel().getFigure3d().setSelection(children.toArray(new RocketComponent[0]));
+ }
+ }
+ });
+
+ // Double-click opens config dialog
+ MouseListener ml = new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent e) {
+ int selRow = tree.getRowForLocation(e.getX(), e.getY());
+ TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
+ if (selRow != -1) {
+ if (selPath == null) return;
+
+ // Double-click
+ if ((e.getButton() == MouseEvent.BUTTON1) && (e.getClickCount() == 2) && !ComponentConfigDialog.isDialogVisible()) {
+ RocketComponent component = (RocketComponent) selPath.getLastPathComponent();
+
+ // Multi-component edit if shift/meta key is pressed
+ if ((e.isShiftDown() || e.isMetaDown()) && tree.getSelectionPaths() != null) {
+ // Add the other selected components as listeners to the last selected component
+ for (TreePath p : tree.getSelectionPaths()) {
+ if (p != null) {
+ if (p.getLastPathComponent() == component) continue;
+ RocketComponent c = (RocketComponent) p.getLastPathComponent();
+ c.clearConfigListeners();
+ component.addConfigListener(c);
+ }
+ }
+
+ // Add the selection path to the tree selection
+ List paths = new LinkedList<>(Arrays.asList(tree.getSelectionPaths()));
+ paths.add(selPath);
+ tree.setSelectionPaths(paths.toArray(new TreePath[0]));
+ }
+
+ ComponentConfigDialog.showDialog(parent, document, component);
+ }
+ // Context menu
+ else if ((e.getButton() == MouseEvent.BUTTON3) && (e.getClickCount() == 1)) {
+ if (!tree.isPathSelected(selPath)) {
+ // Select new path
+ tree.setSelectionPath(selPath);
+ }
+
+ parent.doComponentTreePopup(e);
+ }
+ } else { // Clicked on blank space
+ tree.clearSelection();
+ }
+ }
+ };
+ tree.addMouseListener(ml);
+
+ // Update dialog when selection is changed
+ tree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() {
+ @Override
+ public void valueChanged(TreeSelectionEvent e) {
+ // Scroll tree to the selected item
+ TreePath[] paths = tree.getSelectionModel().getSelectionPaths();
+ if (paths == null || paths.length == 0)
+ return;
+
+ for (TreePath path : paths) {
+ tree.scrollPathToVisible(path);
+ }
+
+ if (!ComponentConfigDialog.isDialogVisible())
+ return;
+ else
+ ComponentConfigDialog.disposeDialog();
+
+ RocketComponent c = (RocketComponent) paths[0].getLastPathComponent();
+ c.clearConfigListeners();
+ for (int i = 1; i < paths.length; i++) {
+ RocketComponent listener = (RocketComponent) paths[i].getLastPathComponent();
+ listener.clearConfigListeners();
+ c.addConfigListener(listener);
+ }
+ ComponentConfigDialog.showDialog(parent, document, c);
+ }
+ });
+
+ // Place tree inside scroll pane
+ JScrollPane scroll = new JScrollPane(tree);
+ panel.add(scroll, "spany, grow, wrap");
+
+
+ // Buttons
+ JButton button = new SelectColorButton(parent.getRocketActions().getMoveUpAction());
+ panel.add(button, "sizegroup buttons, aligny 65%");
+
+ button = new SelectColorButton(parent.getRocketActions().getMoveDownAction());
+ panel.add(button, "sizegroup buttons, aligny 0%");
+
+ button = new SelectColorButton(parent.getRocketActions().getEditAction());
+ button.setIcon(null);
+ button.setMnemonic(0);
+ panel.add(button, "sizegroup buttons, gaptop 20%");
+
+ button = new SelectColorButton(parent.getRocketActions().getDuplicateAction());
+ button.setIcon(null);
+ button.setMnemonic(0);
+ panel.add(button, "sizegroup buttons");
+
+ button = new SelectColorButton(parent.getRocketActions().getDeleteAction());
+ button.setIcon(null);
+ button.setMnemonic(0);
+ panel.add(button, "sizegroup buttons");
+
+ this.setLeftComponent(panel);
+
+
+ // Upper-right segment, component addition buttons
+
+ panel = new JPanel(new MigLayout("fill, insets 0", "[0::]"));
+
+ scroll = new JScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
+ ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
+ scroll.setViewportView(new ComponentAddButtons(document, tree.getSelectionModel(),
+ scroll.getViewport()));
+ scroll.setBorder(null);
+ scroll.setViewportBorder(null);
+
+ TitledBorder border = BorderFactory.createTitledBorder(trans.get("BasicFrame.title.Addnewcomp"));
+ GUIUtil.changeFontStyle(border, Font.BOLD);
+ scroll.setBorder(border);
+
+ panel.add(scroll, "grow");
+
+ this.setRightComponent(panel);
+ }
+
+ /**
+ * Focus on the component tree.
+ */
+ public void takeTheSpotlight() {
+ tree.requestFocusInWindow();
+ }
+
+}
diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/FlightConfigurationPanel.java
similarity index 83%
rename from swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java
rename to swing/src/net/sf/openrocket/gui/main/FlightConfigurationPanel.java
index e33335488..e94289377 100644
--- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurationPanel.java
+++ b/swing/src/net/sf/openrocket/gui/main/FlightConfigurationPanel.java
@@ -1,4 +1,4 @@
-package net.sf.openrocket.gui.main.flightconfigpanel;
+package net.sf.openrocket.gui.main;
import java.awt.event.ActionEvent;
import java.awt.event.MouseEvent;
@@ -20,6 +20,10 @@ import net.miginfocom.swing.MigLayout;
import net.sf.openrocket.document.OpenRocketDocument;
import net.sf.openrocket.document.Simulation;
import net.sf.openrocket.gui.dialogs.flightconfiguration.RenameConfigDialog;
+import net.sf.openrocket.gui.main.flightconfigpanel.FlightConfigurablePanel;
+import net.sf.openrocket.gui.main.flightconfigpanel.MotorConfigurationPanel;
+import net.sf.openrocket.gui.main.flightconfigpanel.RecoveryConfigurationPanel;
+import net.sf.openrocket.gui.main.flightconfigpanel.SeparationConfigurationPanel;
import net.sf.openrocket.gui.main.BasicFrame;
import net.sf.openrocket.gui.main.RocketActions;
import net.sf.openrocket.gui.util.Icons;
@@ -55,7 +59,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
private final JPopupMenu popupMenuConfig;
private final AbstractAction newConfigAction;
private final AbstractAction renameConfigAction;
- private final AbstractAction removeConfigAction;
+ private final AbstractAction deleteConfigAction;
private final AbstractAction duplicateConfigAction;
private final static int MOTOR_TAB_INDEX = 0;
@@ -74,11 +78,11 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
popupMenuConfig = new JPopupMenu();
newConfigAction = new NewConfigAction();
renameConfigAction = new RenameConfigAction();
- removeConfigAction = new RemoveConfigAction();
+ deleteConfigAction = new DeleteConfigAction();
duplicateConfigAction = new DuplicateConfigAction();
popupMenuConfig.add(newConfigAction);
popupMenuConfig.add(renameConfigAction);
- popupMenuConfig.add(removeConfigAction);
+ popupMenuConfig.add(deleteConfigAction);
popupMenuConfig.add(duplicateConfigAction);
//// Tabs for advanced view.
@@ -108,7 +112,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
//// Remove configuration
removeConfButton = new IconButton();
- RocketActions.tieActionToButton(removeConfButton, removeConfigAction);
+ RocketActions.tieActionToButton(removeConfButton, deleteConfigAction);
this.add(removeConfButton,"gapright para");
//// Duplicate configuration
@@ -117,20 +121,30 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
this.add(duplicateConfButton, "wrap");
tabs.addChangeListener(new ChangeListener() {
+ private FlightConfigurablePanel> previousPanel = motorConfigurationPanel;
@Override
public void stateChanged(ChangeEvent e) {
// Trigger a selection of the motor/recovery/configuration item
+ FlightConfigurablePanel> panel = null;
switch (tabs.getSelectedIndex()) {
case MOTOR_TAB_INDEX:
- motorConfigurationPanel.updateButtonState();
+ panel = motorConfigurationPanel;
break;
case RECOVERY_TAB_INDEX:
- recoveryConfigurationPanel.updateButtonState();
+ panel = recoveryConfigurationPanel;
break;
case SEPARATION_TAB_INDEX:
- separationConfigurationPanel.updateButtonState();
+ panel = separationConfigurationPanel;
break;
}
+
+ // Update the panel selection, focus, and button state
+ if (panel == null) return;
+ synchronizePanelSelection(previousPanel, panel);
+ panel.updateButtonState();
+ panel.takeTheSpotlight();
+ panel.updateRocketViewSelection();
+ previousPanel = panel;
}
});
@@ -236,6 +250,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
}
configurationChanged(ComponentChangeEvent.NONFUNCTIONAL_CHANGE);
+ takeTheSpotlight();
}
public void doPopupConfig(MouseEvent e) {
@@ -250,8 +265,8 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
return renameConfigAction;
}
- public AbstractAction getRemoveConfigAction() {
- return removeConfigAction;
+ public AbstractAction getDeleteConfigAction() {
+ return deleteConfigAction;
}
public AbstractAction getDuplicateConfigAction() {
@@ -301,6 +316,19 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
}
+ /**
+ * Synchronize the table row selection of a target panel with the selection in the source panel.
+ */
+ private void synchronizePanelSelection(FlightConfigurablePanel> source, FlightConfigurablePanel> target) {
+ if (source == null || target == null) return;
+ List fids = source.getSelectedConfigurationIds();
+ if (fids == null || fids.isEmpty()) {
+ target.clearSelection();
+ } else {
+ target.setSelectedConfigurationIds(fids);
+ }
+ }
+
private List getSelectedConfigurationIds() {
switch (tabs.getSelectedIndex()) {
case MOTOR_TAB_INDEX:
@@ -354,9 +382,9 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
}
}
- private class RemoveConfigAction extends AbstractAction {
- public RemoveConfigAction() {
- putValue(NAME, trans.get("edtmotorconfdlg.but.Removeconfiguration"));
+ private class DeleteConfigAction extends AbstractAction {
+ public DeleteConfigAction() {
+ putValue(NAME, trans.get("edtmotorconfdlg.but.Deleteconfiguration"));
putValue(SMALL_ICON, Icons.EDIT_DELETE);
}
@@ -377,4 +405,24 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
newOrDuplicateConfigAction(true);
}
}
+
+ /**
+ * Focus on the table of the config panel that is currently opened.
+ */
+ public void takeTheSpotlight() {
+ switch (tabs.getSelectedIndex()) {
+ case MOTOR_TAB_INDEX:
+ motorConfigurationPanel.takeTheSpotlight();
+ motorConfigurationPanel.updateRocketViewSelection();
+ break;
+ case RECOVERY_TAB_INDEX:
+ recoveryConfigurationPanel.takeTheSpotlight();
+ recoveryConfigurationPanel.updateRocketViewSelection();
+ break;
+ case SEPARATION_TAB_INDEX:
+ separationConfigurationPanel.takeTheSpotlight();
+ separationConfigurationPanel.updateRocketViewSelection();
+ break;
+ }
+ }
}
diff --git a/swing/src/net/sf/openrocket/gui/main/RocketActions.java b/swing/src/net/sf/openrocket/gui/main/RocketActions.java
index c0c4d64a2..41b99a93f 100644
--- a/swing/src/net/sf/openrocket/gui/main/RocketActions.java
+++ b/swing/src/net/sf/openrocket/gui/main/RocketActions.java
@@ -630,7 +630,7 @@ public class RocketActions {
parentFrame.selectTab(BasicFrame.SIMULATION_TAB);
} else {
deleteComponentAction.actionPerformed(e);
- parentFrame.selectTab(BasicFrame.COMPONENT_TAB);
+ parentFrame.selectTab(BasicFrame.DESIGN_TAB);
}
}
@@ -684,7 +684,7 @@ public class RocketActions {
OpenRocketClipboard.setClipboard(copiedComponents);
delete(components);
- parentFrame.selectTab(BasicFrame.COMPONENT_TAB);
+ parentFrame.selectTab(BasicFrame.DESIGN_TAB);
} else if (isSimulationSelected()) {
Simulation[] simsCopy = new Simulation[sims.length];
@@ -741,7 +741,7 @@ public class RocketActions {
List copiedComponents = new LinkedList<>(copyComponentsMaintainParent(components));
OpenRocketClipboard.setClipboard(copiedComponents);
- parentFrame.selectTab(BasicFrame.COMPONENT_TAB);
+ parentFrame.selectTab(BasicFrame.DESIGN_TAB);
} else if (sims != null && sims.length > 0) {
Simulation[] simsCopy = new Simulation[sims.length];
for (int i=0; i < sims.length; i++) {
@@ -821,7 +821,7 @@ public class RocketActions {
selectionModel.setSelectedComponents(successfullyPasted);
- parentFrame.selectTab(BasicFrame.COMPONENT_TAB);
+ parentFrame.selectTab(BasicFrame.DESIGN_TAB);
} else if (sims != null) {
@@ -918,7 +918,7 @@ public class RocketActions {
selectionModel.setSelectedComponents(duplicateComponents);
- parentFrame.selectTab(BasicFrame.COMPONENT_TAB);
+ parentFrame.selectTab(BasicFrame.DESIGN_TAB);
} else if (sims != null && sims.length > 0) {
ArrayList copySims = new ArrayList();
diff --git a/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java b/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java
index 83fc2824e..bd6ad592e 100644
--- a/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java
+++ b/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java
@@ -106,6 +106,8 @@ public class SimulationPanel extends JPanel {
private final SimulationAction duplicateSimulationAction;
private final SimulationAction deleteSimulationAction;
+ private int[] previousSelection = null;
+
public SimulationPanel(OpenRocketDocument doc) {
super(new MigLayout("fill", "[grow][][][][][][grow]"));
@@ -164,6 +166,7 @@ public class SimulationPanel extends JPanel {
simulationTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
simulationTable.setDefaultRenderer(Object.class, new JLabelRenderer());
simulationTableModel.setColumnWidths(simulationTable.getColumnModel());
+ simulationTable.setFillsViewportHeight(true);
// Context menu
pm = new JPopupMenu();
@@ -192,19 +195,33 @@ public class SimulationPanel extends JPanel {
public void mouseClicked(MouseEvent e) {
int selectedRow = simulationTable.getSelectedRow();
- if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {
- int selected = simulationTable.convertRowIndexToModel(selectedRow);
+ if (e.getButton() == MouseEvent.BUTTON1) {
+ // Clear the table selection when clicked outside the table rows.
+ if (e.getClickCount() == 1) {
+ int row = simulationTable.rowAtPoint(e.getPoint());
+ int column = simulationTable.columnAtPoint(e.getPoint());
- int column = simulationTable.columnAtPoint(e.getPoint());
- if (column == 0) {
- SimulationWarningDialog.showWarningDialog(SimulationPanel.this, document.getSimulations().get(selected));
- } else {
- simulationTable.clearSelection();
- simulationTable.addRowSelectionInterval(selectedRow, selectedRow);
-
- openDialog(document.getSimulations().get(selected));
+ if (row == -1 || column == -1) {
+ simulationTable.clearSelection();
+ }
}
- } else if (e.getButton() == MouseEvent.BUTTON3 && e.getClickCount() == 1) {
+ // Edit the simulation or plot/export
+ else if (e.getClickCount() == 2) {
+ int selected = simulationTable.convertRowIndexToModel(selectedRow);
+
+ int column = simulationTable.columnAtPoint(e.getPoint());
+ if (column == 0) {
+ SimulationWarningDialog.showWarningDialog(SimulationPanel.this, document.getSimulations().get(selected));
+ } else {
+ simulationTable.clearSelection();
+ simulationTable.addRowSelectionInterval(selectedRow, selectedRow);
+
+ openDialog(document.getSimulations().get(selected));
+ }
+ }
+ }
+ // Show context menu
+ else if (e.getButton() == MouseEvent.BUTTON3 && e.getClickCount() == 1) {
// Get the row that the right-click action happened on
int r = simulationTable.rowAtPoint(e.getPoint());
@@ -262,6 +279,10 @@ public class SimulationPanel extends JPanel {
updateButtonStates();
}
+ public void updatePreviousSelection() {
+ this.previousSelection = simulationTable.getSelectedRows();
+ }
+
private void newSimulation() {
Simulation sim = new Simulation(document.getRocket());
sim.setName(document.getNextSimulationName());
@@ -293,6 +314,7 @@ public class SimulationPanel extends JPanel {
}
fireMaintainSelection();
+ takeTheSpotlight();
openDialog(true, sim);
}
@@ -342,6 +364,7 @@ public class SimulationPanel extends JPanel {
document.removeSimulation(selection[i]);
}
simulationTableModel.fireTableDataChanged();
+ takeTheSpotlight();
}
private void runSimulation() {
@@ -353,6 +376,7 @@ public class SimulationPanel extends JPanel {
SimulationPanel.this), document, sims).setVisible(true);
log.info("Running simulations took " + (System.currentTimeMillis() - t) + " ms");
fireMaintainSelection();
+ takeTheSpotlight();
}
public void editSimulation() {
@@ -489,11 +513,13 @@ public class SimulationPanel extends JPanel {
}
d.setVisible(true);
fireMaintainSelection();
+ takeTheSpotlight();
}
private void openDialog(final Simulation sim) {
boolean plotMode = false;
- if (sim.hasSimulationData() && (sim.getStatus() == Status.UPTODATE || sim.getStatus() == Status.EXTERNAL)) {
+ if (sim.hasSimulationData() && (sim.getStatus() == Status.UPTODATE || sim.getStatus() == Status.LOADED
+ || sim.getStatus() == Status.EXTERNAL)) {
plotMode = true;
}
openDialog(plotMode, sim);
@@ -986,6 +1012,24 @@ public class SimulationPanel extends JPanel {
}
}
+ /**
+ * Focus on the simulation table and maintain the previous row selection(s).
+ */
+ public void takeTheSpotlight() {
+ simulationTable.requestFocusInWindow();
+ if (simulationTable.getSelectedRows().length > 0) {
+ return;
+ }
+ if (previousSelection == null || previousSelection.length == 0) {
+ simulationTable.setRowSelectionInterval(0, 0);
+ } else {
+ simulationTable.clearSelection();
+ for (int row : previousSelection) {
+ simulationTable.addRowSelectionInterval(row, row);
+ }
+ }
+ }
+
private static class NextRowAction extends AbstractAction {
private final JTable table;
private final boolean cycle;
@@ -1047,6 +1091,5 @@ public class SimulationPanel extends JPanel {
table.getSelectionModel().setSelectionInterval(nextRow, nextRow);
table.getColumnModel().getSelectionModel().setSelectionInterval(0, 0);
}
-
}
}
diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java
index 593cbdc8a..69dc1d532 100644
--- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java
+++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/FlightConfigurablePanel.java
@@ -1,333 +1,408 @@
-package net.sf.openrocket.gui.main.flightconfigpanel;
-
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Font;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTable;
-import javax.swing.ListSelectionModel;
-import javax.swing.UIManager;
-import javax.swing.border.Border;
-import javax.swing.border.EmptyBorder;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import javax.swing.table.AbstractTableModel;
-import javax.swing.table.DefaultTableCellRenderer;
-
-import net.sf.openrocket.util.ArrayList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import net.miginfocom.swing.MigLayout;
-import net.sf.openrocket.formatting.RocketDescriptor;
-import net.sf.openrocket.gui.util.GUIUtil;
-import net.sf.openrocket.l10n.Translator;
-import net.sf.openrocket.rocketcomponent.ComponentChangeEvent;
-import net.sf.openrocket.rocketcomponent.ComponentChangeListener;
-import net.sf.openrocket.rocketcomponent.FlightConfigurableComponent;
-import net.sf.openrocket.rocketcomponent.FlightConfigurationId;
-import net.sf.openrocket.rocketcomponent.Rocket;
-import net.sf.openrocket.startup.Application;
-import net.sf.openrocket.util.Pair;
-
-
-@SuppressWarnings("serial")
-public abstract class FlightConfigurablePanel extends JPanel implements ComponentChangeListener {
-
- protected static final Translator trans = Application.getTranslator();
- private static final Logger log = LoggerFactory.getLogger(FlightConfigurablePanel.class);
- protected RocketDescriptor descriptor = Application.getInjector().getInstance(RocketDescriptor.class);
-
- protected final FlightConfigurationPanel flightConfigurationPanel;
- protected final Rocket rocket;
- protected final JTable table;
-
- public FlightConfigurablePanel(final FlightConfigurationPanel flightConfigurationPanel, Rocket rocket) {
- super(new MigLayout("fill"));
- this.flightConfigurationPanel = flightConfigurationPanel;
- this.rocket = rocket;
- table = doTableInitialization();
-
- installTableListener();
- synchronizeConfigurationSelection();
- }
-
- /**
- * Update the data in the table, with component change event type {cce}
- * @param cce index of the ComponentChangeEvent to use (e.g. ComponentChangeEvent.NONFUNCTIONAL_CHANGE)
- */
- public void fireTableDataChanged(int cce) {
- int selectedRow = table.getSelectedRow();
- int selectedColumn = table.getSelectedColumn();
- this.rocket.fireComponentChangeEvent(cce);
- ((AbstractTableModel)table.getModel()).fireTableDataChanged();
- restoreSelection(selectedRow,selectedColumn);
- updateButtonState();
- }
-
- protected abstract void updateButtonState();
-
- @Override
- public void componentChanged(ComponentChangeEvent e) {
- this.synchronizeConfigurationSelection();
- }
-
- /**
- * Initialize the table using the specific implementation's initializeTable
- * method and then select the row to match what the rocket's current selected
- * configuration is.
- *
- * @return the JTable created
- */
- private final JTable doTableInitialization() {
- JTable table = this.initializeTable();
- FlightConfigurationId current = this.rocket.getSelectedConfiguration().getFlightConfigurationID();
- int col = (table.getColumnCount() > 1) ? table.getColumnCount() - 1 : 0;
- for (int row = 0; row < table.getRowCount(); row++) {
- FlightConfigurationId rowFCID = rocket.getId(row);
- if (rowFCID.equals(current)) {
- table.changeSelection(row, col, false, false);
- break;
- }
- }
- return table;
- }
-
- protected final void synchronizeConfigurationSelection() {
- FlightConfigurationId currentRocketFCID = rocket.getSelectedConfiguration().getFlightConfigurationID();
- FlightConfigurationId selectedFCID = getSelectedConfigurationId();
-
- if ( currentRocketFCID == FlightConfigurationId.DEFAULT_VALUE_FCID ) {
- // need to unselect
- table.clearSelection();
- } else if ( !currentRocketFCID.equals(selectedFCID)){
- // Need to change selection
- // We'll select the correct row, in the currently selected column.
- int col = table.getSelectedColumn();
- if ( col < 0 ) {
- col = (table.getColumnCount() > 1) ? table.getColumnCount() - 1 : 0;
- }
-
- for( int rowNum = 0; rowNum < table.getRowCount(); rowNum++ ) {
- FlightConfigurationId rowFCID = rocket.getId(rowNum );
- if ( rowFCID.equals(currentRocketFCID) ) {
- table.changeSelection(rowNum, col, false, false);
- break;
- }
- }
- }
- }
-
- protected void restoreSelection( int row, int col ) {
- if ( row <= 0 || col <= 0 ) {
- synchronizeConfigurationSelection();
- return;
- }
- if ( row >= table.getRowCount() || col >= table.getColumnCount() ) {
- synchronizeConfigurationSelection();
- return;
- }
- table.changeSelection(row, col, true, false);
- }
-
- protected void installTableListener() {
- table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
-
- @Override
- public void valueChanged(ListSelectionEvent e) {
- if ( e.getValueIsAdjusting() ) {
- return;
- }
-
- /* Find the selected row and set it as the current selected configuration
- * for the rocket. This will propagate the event to ensure that other
- * pieces of the UI are updated and match the table selection.
- */
- int firstrow = e.getFirstIndex();
- int lastrow = e.getLastIndex();
- ListSelectionModel model = (ListSelectionModel) e.getSource();
- for( int row = firstrow; row <= lastrow; row ++) {
- if ( model.isSelectedIndex(row) ) {
- FlightConfigurationId fcid = (FlightConfigurationId) table.getValueAt(row, table.convertColumnIndexToView(0));
- rocket.setSelectedConfiguration(fcid);
- return;
- }
- }
- }
-
- });
- }
-
- /**
- * Override this method to create the embedded JTable and it's backing Model.
- *
- * @return
- */
- protected abstract JTable initializeTable();
-
- protected T getSelectedComponent() {
-
- int col = table.convertColumnIndexToModel(table.getSelectedColumn());
- int row = table.convertRowIndexToModel(table.getSelectedRow());
- if ( row < 0 || col < 0 ) {
- return null;
- }
- Object tableValue = table.getModel().getValueAt(row, col);
- if ( tableValue instanceof Pair ) {
- @SuppressWarnings("unchecked")
- Pair selectedComponent = (Pair) tableValue;
- return selectedComponent.getV();
- }
- return null;
- }
-
- protected List getSelectedComponents() {
- int[] cols = Arrays.stream(table.getSelectedColumns()).map(table::convertRowIndexToModel).toArray();
- int[] rows = Arrays.stream(table.getSelectedRows()).map(table::convertRowIndexToModel).toArray();
- if (Arrays.stream(cols).min().isEmpty() || Arrays.stream(rows).min().isEmpty() ||
- Arrays.stream(cols).min().getAsInt() < 0 || Arrays.stream(rows).min().getAsInt() < 0) {
- return null;
- }
- List components = new ArrayList<>();
- for (int row : rows) {
- for (int col : cols) {
- Object tableValue = table.getModel().getValueAt(row, col);
- if (tableValue instanceof Pair) {
- @SuppressWarnings("unchecked")
- Pair selectedComponent = (Pair) tableValue;
- components.add(selectedComponent.getV());
- }
- }
- }
- return components;
- }
-
- protected FlightConfigurationId getSelectedConfigurationId() {
- int col = table.convertColumnIndexToModel(table.getSelectedColumn());
- int row = table.convertRowIndexToModel(table.getSelectedRow());
- if ( row < 0 || col < 0 || row >= table.getRowCount() || col >= table.getColumnCount() ) {
- return null;
- }
- Object tableValue = table.getModel().getValueAt(row, col);
- if ( tableValue instanceof Pair ) {
- @SuppressWarnings("unchecked")
- Pair selectedComponent = (Pair) tableValue;
- FlightConfigurationId fcid = selectedComponent.getU();
- return fcid;
- } else if ( tableValue instanceof FlightConfigurationId ){
- return (FlightConfigurationId) tableValue;
- }
- return FlightConfigurationId.ERROR_FCID;
- }
-
- protected List getSelectedConfigurationIds() {
- int col = table.convertColumnIndexToModel(table.getSelectedColumn());
- int[] rows = Arrays.stream(table.getSelectedRows()).map(table::convertRowIndexToModel).toArray();
- if (Arrays.stream(rows).min().isEmpty() || Arrays.stream(rows).min().getAsInt() < 0 || col < 0 ||
- Arrays.stream(rows).max().getAsInt() >= table.getRowCount() || col >= table.getColumnCount() ) {
- return null;
- }
- Object[] tableValues = Arrays.stream(rows).mapToObj(c -> table.getModel().getValueAt(c, col)).toArray();
- List Ids = new ArrayList<>();
- for (Object tableValue : tableValues) {
- if (tableValue instanceof Pair) {
- @SuppressWarnings("unchecked")
- Pair selectedComponent = (Pair) tableValue;
- FlightConfigurationId fcid = selectedComponent.getU();
- Ids.add(fcid);
- } else if (tableValue instanceof FlightConfigurationId) {
- Ids.add((FlightConfigurationId) tableValue);
- } else {
- Ids.add(FlightConfigurationId.ERROR_FCID);
- }
- }
-
- return Ids;
- }
-
- protected abstract class FlightConfigurableCellRenderer extends DefaultTableCellRenderer {
-
- @Override
- public Component getTableCellRendererComponent(JTable table, Object newValue, boolean isSelected, boolean hasFocus, int row, int column) {
- JLabel label = (JLabel) super.getTableCellRendererComponent(table, newValue, isSelected, hasFocus, row, column);
- Object oldValue = table.getModel().getValueAt(row, column);
-
- // this block is more for the benefit of the reader than the computer --
- // this assignment is technically redundant, but useful to point out that the new value here is often null,
- // while the old value seems to always be valid.
- if( null == newValue ){
- log.warn("Detected null newValue to render... (oldValue: "+oldValue+")");
- newValue = oldValue;
- }
-
- column = table.convertColumnIndexToModel(column);
- switch (column) {
- case 0: {
- label.setText(descriptor.format(rocket, (FlightConfigurationId) oldValue));
- regular(label);
- setSelected(label, table, isSelected, hasFocus);
- return label;
- }
- default: {
- @SuppressWarnings("unchecked")
- Pair v = (Pair) oldValue;
-
- if(v!=null){
- FlightConfigurationId fcid = v.getU();
- T component = v.getV();
- label = format(component, fcid, label );
- }
- for (Component c : label.getComponents()) {
- if (c instanceof JLabel) {
- setSelected((JLabel)c, table, isSelected, hasFocus);
- }
- }
- setSelected(label, table, isSelected, hasFocus);
- return label;
- }
- }
- }
-
- private final void setSelected( JComponent c, JTable table, boolean isSelected, boolean hasFocus ) {
- c.setOpaque(true);
- if ( isSelected) {
- c.setBackground(table.getSelectionBackground());
- c.setForeground((Color)UIManager.get("Table.selectionForeground"));
- } else {
- c.setBackground(table.getBackground());
- c.setForeground(c.getForeground());
- }
- Border b = null;
- if ( hasFocus ) {
- if (isSelected) {
- b = UIManager.getBorder("Table.focusSelectedCellHighlightBorder");
- } else {
- b = UIManager.getBorder("Table.focusCellHighligtBorder");
- }
- } else {
- b = new EmptyBorder(1,1,1,1);
- }
- c.setBorder(b);
- }
-
- protected final void shaded(JLabel label) {
- GUIUtil.changeFontStyle(label, Font.ITALIC);
- label.setForeground(Color.GRAY);
- }
-
- protected final void regular(JLabel label) {
- GUIUtil.changeFontStyle(label, Font.PLAIN);
- label.setForeground(Color.BLACK);
- }
-
- protected abstract JLabel format( T component, FlightConfigurationId configId, JLabel label );
-
- }
-
+package net.sf.openrocket.gui.main.flightconfigpanel;
+
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Font;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
+import javax.swing.UIManager;
+import javax.swing.border.Border;
+import javax.swing.border.EmptyBorder;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.DefaultTableCellRenderer;
+
+import net.sf.openrocket.gui.main.FlightConfigurationPanel;
+import net.sf.openrocket.util.ArrayList;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import net.miginfocom.swing.MigLayout;
+import net.sf.openrocket.formatting.RocketDescriptor;
+import net.sf.openrocket.gui.util.GUIUtil;
+import net.sf.openrocket.l10n.Translator;
+import net.sf.openrocket.rocketcomponent.ComponentChangeEvent;
+import net.sf.openrocket.rocketcomponent.ComponentChangeListener;
+import net.sf.openrocket.rocketcomponent.FlightConfigurableComponent;
+import net.sf.openrocket.rocketcomponent.FlightConfigurationId;
+import net.sf.openrocket.rocketcomponent.Rocket;
+import net.sf.openrocket.startup.Application;
+import net.sf.openrocket.util.Pair;
+
+
+@SuppressWarnings("serial")
+public abstract class FlightConfigurablePanel extends JPanel implements ComponentChangeListener {
+
+ protected static final Translator trans = Application.getTranslator();
+ private static final Logger log = LoggerFactory.getLogger(FlightConfigurablePanel.class);
+ protected RocketDescriptor descriptor = Application.getInjector().getInstance(RocketDescriptor.class);
+
+ protected final FlightConfigurationPanel flightConfigurationPanel;
+ protected final Rocket rocket;
+ protected final JTable table;
+
+ public FlightConfigurablePanel(final FlightConfigurationPanel flightConfigurationPanel, Rocket rocket) {
+ super(new MigLayout("fill"));
+ this.flightConfigurationPanel = flightConfigurationPanel;
+ this.rocket = rocket;
+ table = doTableInitialization();
+
+ installTableListener();
+ synchronizeConfigurationSelection();
+ }
+
+ /**
+ * Update the data in the table, with component change event type {cce}
+ * @param cce index of the ComponentChangeEvent to use (e.g. ComponentChangeEvent.NONFUNCTIONAL_CHANGE)
+ */
+ public void fireTableDataChanged(int cce) {
+ int selectedRow = table.getSelectedRow();
+ int selectedColumn = table.getSelectedColumn();
+ this.rocket.fireComponentChangeEvent(cce);
+ ((AbstractTableModel)table.getModel()).fireTableDataChanged();
+ restoreSelection(selectedRow,selectedColumn);
+ updateButtonState();
+ }
+
+ public abstract void updateButtonState();
+
+ @Override
+ public void componentChanged(ComponentChangeEvent e) {
+ this.synchronizeConfigurationSelection();
+ }
+
+ /**
+ * Initialize the table using the specific implementation's initializeTable
+ * method and then select the row to match what the rocket's current selected
+ * configuration is.
+ *
+ * @return the JTable created
+ */
+ private final JTable doTableInitialization() {
+ JTable table = this.initializeTable();
+ table.setFillsViewportHeight(true);
+ FlightConfigurationId current = this.rocket.getSelectedConfiguration().getFlightConfigurationID();
+ int col = (table.getColumnCount() > 1) ? table.getColumnCount() - 1 : 0;
+ for (int row = 0; row < table.getRowCount(); row++) {
+ FlightConfigurationId rowFCID = rocket.getId(row);
+ if (rowFCID.equals(current)) {
+ table.changeSelection(row, col, false, false);
+ break;
+ }
+ }
+ return table;
+ }
+
+ public final void synchronizeConfigurationSelection() {
+ FlightConfigurationId currentRocketFCID = rocket.getSelectedConfiguration().getFlightConfigurationID();
+ FlightConfigurationId selectedFCID = getSelectedConfigurationId();
+
+ if ( currentRocketFCID == FlightConfigurationId.DEFAULT_VALUE_FCID ) {
+ // need to unselect
+ table.clearSelection();
+ } else if ( !currentRocketFCID.equals(selectedFCID)){
+ // Need to change selection
+ // We'll select the correct row, in the currently selected column.
+ int col = table.getSelectedColumn();
+ if ( col < 0 ) {
+ col = (table.getColumnCount() > 1) ? table.getColumnCount() - 1 : 0;
+ }
+
+ for( int rowNum = 0; rowNum < table.getRowCount(); rowNum++ ) {
+ FlightConfigurationId rowFCID = rocket.getId(rowNum );
+ if ( rowFCID.equals(currentRocketFCID) ) {
+ table.changeSelection(rowNum, col, false, false);
+ break;
+ }
+ }
+ }
+ }
+
+ protected void restoreSelection( int row, int col ) {
+ if ( row <= 0 || col <= 0 ) {
+ synchronizeConfigurationSelection();
+ return;
+ }
+ if ( row >= table.getRowCount() || col >= table.getColumnCount() ) {
+ synchronizeConfigurationSelection();
+ return;
+ }
+ table.changeSelection(row, col, true, false);
+ table.requestFocusInWindow();
+ }
+
+ protected void installTableListener() {
+ table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
+
+ @Override
+ public void valueChanged(ListSelectionEvent e) {
+ if ( e.getValueIsAdjusting() ) {
+ return;
+ }
+
+ // Don't update the flight configuration for multi-selections
+ if (table.getSelectionModel().getSelectedItemsCount() > 1) {
+ return;
+ }
+
+ /* Find the selected row and set it as the current selected configuration
+ * for the rocket. This will propagate the event to ensure that other
+ * pieces of the UI are updated and match the table selection.
+ */
+ int firstrow = e.getFirstIndex();
+ int lastrow = e.getLastIndex();
+ ListSelectionModel model = (ListSelectionModel) e.getSource();
+ for( int row = firstrow; row <= lastrow; row ++) {
+ if ( model.isSelectedIndex(row) ) {
+ FlightConfigurationId fcid = (FlightConfigurationId) table.getValueAt(row, table.convertColumnIndexToView(0));
+ rocket.setSelectedConfiguration(fcid);
+ return;
+ }
+ }
+ }
+
+ });
+
+ // Clear the table selection when clicked outside the table rows.
+ table.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent e) {
+ if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 1) {
+ int row = table.rowAtPoint(e.getPoint());
+ int col = table.columnAtPoint(e.getPoint());
+ if (row == -1 || col == -1) {
+ clearSelection();
+ }
+ }
+ }
+ });
+
+ table.getColumnModel().getSelectionModel().addListSelectionListener(new ListSelectionListener() {
+ @Override
+ public void valueChanged(ListSelectionEvent e) {
+ updateRocketViewSelection(e);
+ }
+ });
+ }
+
+ /**
+ * Override this method to create the embedded JTable and it's backing Model.
+ *
+ * @return
+ */
+ protected abstract JTable initializeTable();
+
+ public void clearSelection() {
+ table.clearSelection();
+ }
+
+ public void updateRocketViewSelection() {
+ ListSelectionEvent e = new ListSelectionEvent(this, 0, 0, false);
+ updateRocketViewSelection(e);
+ }
+
+ /**
+ * Update the selection in the rocket design view, based on the currently selected motor, recovery device, or stage.
+ */
+ public abstract void updateRocketViewSelection(ListSelectionEvent e);
+
+ protected T getSelectedComponent() {
+
+ int col = table.convertColumnIndexToModel(table.getSelectedColumn());
+ int row = table.convertRowIndexToModel(table.getSelectedRow());
+ if ( row < 0 || col < 0 ) {
+ return null;
+ }
+ Object tableValue = table.getModel().getValueAt(row, col);
+ if ( tableValue instanceof Pair ) {
+ @SuppressWarnings("unchecked")
+ Pair selectedComponent = (Pair) tableValue;
+ return selectedComponent.getV();
+ }
+ return null;
+ }
+
+ protected List getSelectedComponents() {
+ int[] cols = Arrays.stream(table.getSelectedColumns()).map(table::convertRowIndexToModel).toArray();
+ int[] rows = Arrays.stream(table.getSelectedRows()).map(table::convertRowIndexToModel).toArray();
+ if (Arrays.stream(cols).min().isEmpty() || Arrays.stream(rows).min().isEmpty() ||
+ Arrays.stream(cols).min().getAsInt() < 0 || Arrays.stream(rows).min().getAsInt() < 0) {
+ return null;
+ }
+ List components = new ArrayList<>();
+ for (int row : rows) {
+ for (int col : cols) {
+ Object tableValue = table.getModel().getValueAt(row, col);
+ if (tableValue instanceof Pair) {
+ @SuppressWarnings("unchecked")
+ Pair selectedComponent = (Pair) tableValue;
+ components.add(selectedComponent.getV());
+ }
+ }
+ }
+ return components;
+ }
+
+ protected FlightConfigurationId getSelectedConfigurationId() {
+ int col = table.convertColumnIndexToModel(table.getSelectedColumn());
+ int row = table.convertRowIndexToModel(table.getSelectedRow());
+ if ( row < 0 || col < 0 || row >= table.getRowCount() || col >= table.getColumnCount() ) {
+ return null;
+ }
+ Object tableValue = table.getModel().getValueAt(row, col);
+ if ( tableValue instanceof Pair ) {
+ @SuppressWarnings("unchecked")
+ Pair selectedComponent = (Pair) tableValue;
+ FlightConfigurationId fcid = selectedComponent.getU();
+ return fcid;
+ } else if ( tableValue instanceof FlightConfigurationId ){
+ return (FlightConfigurationId) tableValue;
+ }
+ return FlightConfigurationId.ERROR_FCID;
+ }
+
+ public List getSelectedConfigurationIds() {
+ int col = table.convertColumnIndexToModel(table.getSelectedColumn());
+ int[] rows = Arrays.stream(table.getSelectedRows()).map(table::convertRowIndexToModel).toArray();
+ if (Arrays.stream(rows).min().isEmpty() || Arrays.stream(rows).min().getAsInt() < 0 || col < 0 ||
+ Arrays.stream(rows).max().getAsInt() >= table.getRowCount() || col >= table.getColumnCount() ) {
+ return null;
+ }
+ Object[] tableValues = Arrays.stream(rows).mapToObj(c -> table.getModel().getValueAt(c, col)).toArray();
+ List Ids = new ArrayList<>();
+ for (Object tableValue : tableValues) {
+ if (tableValue instanceof Pair) {
+ @SuppressWarnings("unchecked")
+ Pair selectedComponent = (Pair) tableValue;
+ FlightConfigurationId fcid = selectedComponent.getU();
+ Ids.add(fcid);
+ } else if (tableValue instanceof FlightConfigurationId) {
+ Ids.add((FlightConfigurationId) tableValue);
+ } else {
+ Ids.add(FlightConfigurationId.ERROR_FCID);
+ }
+ }
+
+ return Ids;
+ }
+
+ /**
+ * Select the rows of the table that correspond to the given FlightConfigurationIds. The second column of the table
+ * will be used for the selection.
+ * @param fids flight configuration ids to select
+ */
+ public void setSelectedConfigurationIds(List fids) {
+ if (fids == null || fids.isEmpty() || table.getColumnCount() == 0) return;
+
+ if (getSelectedConfigurationIds() != null && new HashSet<>(getSelectedConfigurationIds()).containsAll(fids)) return;
+
+ table.clearSelection();
+ for (FlightConfigurationId id : fids) {
+ if (id == FlightConfigurationId.DEFAULT_VALUE_FCID) continue;
+ for (int rowNum = 0; rowNum < table.getRowCount(); rowNum++) {
+ FlightConfigurationId rowFCID = rocket.getId(rowNum );
+ if (rowFCID.equals(id)) {
+ table.changeSelection(rowNum, 1, true, false);
+ break;
+ }
+ }
+ }
+ }
+
+ protected abstract class FlightConfigurableCellRenderer extends DefaultTableCellRenderer {
+
+ @Override
+ public Component getTableCellRendererComponent(JTable table, Object newValue, boolean isSelected, boolean hasFocus, int row, int column) {
+ JLabel label = (JLabel) super.getTableCellRendererComponent(table, newValue, isSelected, hasFocus, row, column);
+ Object oldValue = table.getModel().getValueAt(row, column);
+
+ // this block is more for the benefit of the reader than the computer --
+ // this assignment is technically redundant, but useful to point out that the new value here is often null,
+ // while the old value seems to always be valid.
+ if( null == newValue ){
+ log.warn("Detected null newValue to render... (oldValue: "+oldValue+")");
+ newValue = oldValue;
+ }
+
+ column = table.convertColumnIndexToModel(column);
+ switch (column) {
+ case 0: {
+ label.setText(descriptor.format(rocket, (FlightConfigurationId) oldValue));
+ regular(label);
+ setSelected(label, table, isSelected, hasFocus);
+ return label;
+ }
+ default: {
+ @SuppressWarnings("unchecked")
+ Pair v = (Pair) oldValue;
+
+ if(v!=null){
+ FlightConfigurationId fcid = v.getU();
+ T component = v.getV();
+ label = format(component, fcid, label );
+ }
+ for (Component c : label.getComponents()) {
+ if (c instanceof JLabel) {
+ setSelected((JLabel)c, table, isSelected, hasFocus);
+ }
+ }
+ setSelected(label, table, isSelected, hasFocus);
+ return label;
+ }
+ }
+ }
+
+ private final void setSelected( JComponent c, JTable table, boolean isSelected, boolean hasFocus ) {
+ c.setOpaque(true);
+ if ( isSelected) {
+ c.setBackground(table.getSelectionBackground());
+ c.setForeground((Color)UIManager.get("Table.selectionForeground"));
+ } else {
+ c.setBackground(table.getBackground());
+ c.setForeground(c.getForeground());
+ }
+ Border b = null;
+ if ( hasFocus ) {
+ if (isSelected) {
+ b = UIManager.getBorder("Table.focusSelectedCellHighlightBorder");
+ } else {
+ b = UIManager.getBorder("Table.focusCellHighligtBorder");
+ }
+ } else {
+ b = new EmptyBorder(1,1,1,1);
+ }
+ c.setBorder(b);
+ }
+
+ protected final void shaded(JLabel label) {
+ GUIUtil.changeFontStyle(label, Font.ITALIC);
+ label.setForeground(Color.GRAY);
+ }
+
+ protected final void regular(JLabel label) {
+ GUIUtil.changeFontStyle(label, Font.PLAIN);
+ label.setForeground(Color.BLACK);
+ }
+
+ protected abstract JLabel format( T component, FlightConfigurationId configId, JLabel label );
+
+ }
+
+ /**
+ * Focus on the table
+ */
+ public void takeTheSpotlight() {
+ table.requestFocusInWindow();
+ }
+
}
\ No newline at end of file
diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java
index f2e6a3f27..12c252af3 100644
--- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java
+++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java
@@ -3,8 +3,6 @@ package net.sf.openrocket.gui.main.flightconfigpanel;
import java.awt.CardLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
-import java.awt.event.FocusEvent;
-import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@@ -33,6 +31,7 @@ import net.miginfocom.swing.MigLayout;
import net.sf.openrocket.gui.dialogs.flightconfiguration.IgnitionSelectionDialog;
import net.sf.openrocket.gui.dialogs.flightconfiguration.MotorMountConfigurationPanel;
import net.sf.openrocket.gui.dialogs.motor.MotorChooserDialog;
+import net.sf.openrocket.gui.main.FlightConfigurationPanel;
import net.sf.openrocket.gui.widgets.SelectColorButton;
import net.sf.openrocket.motor.IgnitionEvent;
import net.sf.openrocket.motor.Motor;
@@ -53,7 +52,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
private static final String NONE = trans.get("edtmotorconfdlg.tbl.None");
- private final JButton selectMotorButton, removeMotorButton, selectIgnitionButton, resetIgnitionButton;
+ private final JButton selectMotorButton, deleteMotorButton, selectIgnitionButton, resetIgnitionButton;
private final JPanel cards;
private final static String HELP_LABEL = "help";
@@ -65,7 +64,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
private final JPopupMenu popupMenuFull; // popup menu containing all the options
- MotorConfigurationPanel(final FlightConfigurationPanel flightConfigurationPanel, Rocket rocket) {
+ public MotorConfigurationPanel(final FlightConfigurationPanel flightConfigurationPanel, Rocket rocket) {
super(flightConfigurationPanel, rocket);
motorChooserDialog = new MotorChooserDialog(SwingUtilities.getWindowAncestor(flightConfigurationPanel));
@@ -87,23 +86,23 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
// Get all the actions
AbstractAction selectMotorAction = new SelectMotorAction();
- AbstractAction removeMotorAction = new RemoveMotorAction();
+ AbstractAction deleteMotorAction = new DeleteMotorAction();
AbstractAction selectIgnitionAction = new SelectIgnitionAction();
AbstractAction resetIgnitionAction = new ResetIgnitionAction();
AbstractAction renameConfigAction = flightConfigurationPanel.getRenameConfigAction();
- AbstractAction removeConfigAction = flightConfigurationPanel.getRemoveConfigAction();
+ AbstractAction deleteConfigAction = flightConfigurationPanel.getDeleteConfigAction();
AbstractAction duplicateConfigAction = flightConfigurationPanel.getDuplicateConfigAction();
// Populate the popup menu
popupMenuFull = new JPopupMenu();
popupMenuFull.add(selectMotorAction);
- popupMenuFull.add(removeMotorAction);
+ popupMenuFull.add(deleteMotorAction);
popupMenuFull.addSeparator();
popupMenuFull.add(selectIgnitionAction);
popupMenuFull.add(resetIgnitionAction);
popupMenuFull.addSeparator();
popupMenuFull.add(renameConfigAction);
- popupMenuFull.add(removeConfigAction);
+ popupMenuFull.add(deleteConfigAction);
popupMenuFull.add(duplicateConfigAction);
JLabel helpText = new JLabel(trans.get("MotorConfigurationPanel.lbl.nomotors"));
@@ -120,9 +119,9 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
selectMotorButton = new SelectColorButton(selectMotorAction);
configurationPanel.add(selectMotorButton, "split, align right, sizegroup button");
- //// Remove motor button
- removeMotorButton = new SelectColorButton(removeMotorAction);
- configurationPanel.add(removeMotorButton, "sizegroup button");
+ //// Delete motor button
+ deleteMotorButton = new SelectColorButton(deleteMotorAction);
+ configurationPanel.add(deleteMotorButton, "sizegroup button");
//// Select Ignition button
selectIgnitionButton = new SelectColorButton(selectIgnitionAction);
@@ -250,35 +249,11 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
return configurationTable;
}
- @Override
- protected void installTableListener() {
- super.installTableListener();
-
- table.getColumnModel().getSelectionModel().addListSelectionListener(new ListSelectionListener() {
- @Override
- public void valueChanged(ListSelectionEvent e) {
- updateComponentSelection(e);
- }
- });
-
- table.addFocusListener(new FocusListener() {
- @Override
- public void focusGained(FocusEvent e) {
- updateComponentSelection(new ListSelectionEvent(this, 0, 0, false));
- }
-
- @Override
- public void focusLost(FocusEvent e) {
-
- }
- });
- }
-
private void doPopupFull(MouseEvent e) {
popupMenuFull.show(e.getComponent(), e.getX(), e.getY());
}
- public void updateComponentSelection(ListSelectionEvent e) {
+ public void updateRocketViewSelection(ListSelectionEvent e) {
if (e.getValueIsAdjusting()) {
return;
}
@@ -294,19 +269,19 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
flightConfigurationPanel.setSelectedComponents(components);
}
- protected void updateButtonState() {
+ public void updateButtonState() {
if( configurationTableModel.getColumnCount() > 1 ) {
showContent();
boolean haveSelection = (null != getSelectedComponent());
selectMotorButton.setEnabled( haveSelection );
- removeMotorButton.setEnabled( haveSelection );
+ deleteMotorButton.setEnabled( haveSelection );
selectIgnitionButton.setEnabled( haveSelection );
resetIgnitionButton.setEnabled( haveSelection );
} else {
showEmptyText();
selectMotorButton.setEnabled(false);
- removeMotorButton.setEnabled(false);
+ deleteMotorButton.setEnabled(false);
selectIgnitionButton.setEnabled(false);
resetIgnitionButton.setEnabled(false);
}
@@ -356,10 +331,12 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
if (update) {
fireTableDataChanged(ComponentChangeEvent.MOTOR_CHANGE);
+ } else {
+ table.requestFocusInWindow();
}
}
- private void removeMotor() {
+ private void deleteMotor() {
List mounts = getSelectedComponents();
List fcIds = getSelectedConfigurationIds();
if ((mounts == null) || (fcIds == null) || mounts.size() == 0 || fcIds.size() == 0) {
@@ -420,6 +397,8 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
if (update) {
fireTableDataChanged(ComponentChangeEvent.MOTOR_CHANGE);
+ } else {
+ table.requestFocusInWindow();
}
}
@@ -448,6 +427,8 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
if (update) {
fireTableDataChanged(ComponentChangeEvent.MOTOR_CHANGE);
+ } else {
+ table.requestFocusInWindow();
}
}
@@ -463,14 +444,14 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel
}
}
- private class RemoveMotorAction extends AbstractAction {
- public RemoveMotorAction() {
- putValue(NAME, trans.get("MotorConfigurationPanel.btn.removeMotor"));
+ private class DeleteMotorAction extends AbstractAction {
+ public DeleteMotorAction() {
+ putValue(NAME, trans.get("MotorConfigurationPanel.btn.deleteMotor"));
}
@Override
public void actionPerformed(ActionEvent e) {
- removeMotor();
+ deleteMotor();
}
}
diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java
index 11c991e1f..a1e6e8745 100644
--- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java
+++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/RecoveryConfigurationPanel.java
@@ -1,8 +1,6 @@
package net.sf.openrocket.gui.main.flightconfigpanel;
import java.awt.event.ActionEvent;
-import java.awt.event.FocusEvent;
-import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@@ -25,6 +23,7 @@ import javax.swing.event.ListSelectionListener;
import net.sf.openrocket.formatting.RocketDescriptor;
import net.sf.openrocket.gui.dialogs.flightconfiguration.DeploymentSelectionDialog;
+import net.sf.openrocket.gui.main.FlightConfigurationPanel;
import net.sf.openrocket.l10n.Translator;
import net.sf.openrocket.rocketcomponent.*;
import net.sf.openrocket.rocketcomponent.DeploymentConfiguration.DeployEvent;
@@ -43,7 +42,7 @@ public class RecoveryConfigurationPanel extends FlightConfigurablePanel devices = getSelectedComponents();
List fcIds = getSelectedConfigurationIds();
@@ -235,6 +210,8 @@ public class RecoveryConfigurationPanel extends FlightConfigurablePanel stages = getSelectedComponents();
List fcIds = getSelectedConfigurationIds();
@@ -245,6 +220,8 @@ public class SeparationConfigurationPanel extends FlightConfigurablePanel c, int columnIdx) {
+ return getTableColumnWidth(c.getCanonicalName(), columnIdx);
+ }
+
+ public void setTableColumnWidth(String keyName, int columnIdx, Integer width) {
+ PREFNODE.node("tables").put(
+ "cw." + keyName + "." + columnIdx, width.toString());
+ storeVersion();
+ }
+
+ public void setTableColumnWidth(Class> c, int columnIdx, Integer width) {
+ setTableColumnWidth(c.getCanonicalName(), columnIdx, width);
+ }
/**
* this class returns a java.awt.Color object for the specified key.