Merge pull request #1580 from SiboVG/issue-1405

[#1405] Remove 'Show all compatible' in preset chooser
This commit is contained in:
SiboVG 2022-08-19 23:52:27 +02:00 committed by GitHub
commit 2632dda0f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 0 additions and 49 deletions

View File

@ -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<br>Directly apply a preset by double-clicking it or by selecting it and closing this window.
table.column.Favorite = Favorite

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -174,24 +174,10 @@ public class ComponentPreset implements Comparable<ComponentPreset>, Serializabl
this.displayedColumns = displayedColumns;
}
public List<Type> getCompatibleTypes() {
return compatibleTypeMap.get(Type.this);
}
public TypedKey<?>[] getDisplayedColumns() {
return displayedColumns;
}
private static final Map<Type, List<Type>> compatibleTypeMap = new HashMap<Type, List<Type>>();
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<Boolean> LEGACY = new TypedKey<Boolean>("Legacy", Boolean.class);

View File

@ -216,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<ComponentPreset.Type> 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