Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
5ffad006
by Tony Chemit at 2020-12-22T16:26:21+01:00
6 changed files:
- client/core/src/main/i18n/getters/java.getter
- client/core/src/main/java/fr/ird/observe/client/main/body/ClientConfigUI.java
- client/datasource/editor/api/src/main/i18n/getters/jaxx.getter
- client/i18n/src/main/i18n/translations/observe_en_GB.properties
- client/i18n/src/main/i18n/translations/observe_es_ES.properties
- client/i18n/src/main/i18n/translations/observe_fr_FR.properties
Changes:
| ... | ... | @@ -7,6 +7,8 @@ observe.config.category.application |
| 7 | 7 |
observe.config.category.application.description
|
| 8 | 8 |
observe.config.category.expert
|
| 9 | 9 |
observe.config.category.expert.description
|
| 10 |
+observe.config.category.map
|
|
| 11 |
+observe.config.category.map.description
|
|
| 10 | 12 |
observe.config.category.observation
|
| 11 | 13 |
observe.config.category.observation.description
|
| 12 | 14 |
observe.config.category.speciesList.longline
|
| ... | ... | @@ -107,7 +107,7 @@ public class ClientConfigUI extends JXTitledPanel { |
| 107 | 107 |
private final SpeciesListsTableCellRenderer speciesListsTableCellRenderer;
|
| 108 | 108 |
|
| 109 | 109 |
protected ObserveConfigUIBuilder(ClientConfig config,
|
| 110 |
- ObserveUICallbackManager uiCallbackManager, SpeciesListTableCellEditor speciesListTableCellEditor,
|
|
| 110 |
+ SpeciesListTableCellEditor speciesListTableCellEditor,
|
|
| 111 | 111 |
SpeciesListsTableCellRenderer speciesListsTableCellRenderer) {
|
| 112 | 112 |
super(config, config.get(), config.get().getUserConfigFile());
|
| 113 | 113 |
this.speciesListTableCellEditor = speciesListTableCellEditor;
|
| ... | ... | @@ -189,7 +189,6 @@ public class ClientConfigUI extends JXTitledPanel { |
| 189 | 189 |
@Override
|
| 190 | 190 |
public void setValue(Object value) {
|
| 191 | 191 |
if (value instanceof String) {
|
| 192 |
- |
|
| 193 | 192 |
value = SpeciesListTableCellEditor.this.entityMap.get(String.valueOf(value));
|
| 194 | 193 |
}
|
| 195 | 194 |
component.setSelectedItem((SpeciesListReference) value);
|
| ... | ... | @@ -197,10 +196,8 @@ public class ClientConfigUI extends JXTitledPanel { |
| 197 | 196 |
|
| 198 | 197 |
@Override
|
| 199 | 198 |
public Object getCellEditorValue() {
|
| 200 |
- String result = null;
|
|
| 201 | 199 |
SpeciesListReference selectedItem = component.getModel().getSelectedItem();
|
| 202 |
- result = selectedItem.getId();
|
|
| 203 |
- return result;
|
|
| 200 |
+ return selectedItem.getId();
|
|
| 204 | 201 |
}
|
| 205 | 202 |
|
| 206 | 203 |
@Override
|
| ... | ... | @@ -216,15 +213,12 @@ public class ClientConfigUI extends JXTitledPanel { |
| 216 | 213 |
public boolean stopCellEditing() {
|
| 217 | 214 |
if (component.getConfig().isEditable()) {
|
| 218 | 215 |
// Commit edited value.
|
| 219 |
- component.getCombobox().actionPerformed(
|
|
| 220 |
- new ActionEvent(SpeciesListTableCellEditor.this, 0, ""));
|
|
| 216 |
+ component.getCombobox().actionPerformed(new ActionEvent(SpeciesListTableCellEditor.this, 0, ""));
|
|
| 221 | 217 |
}
|
| 222 | 218 |
return super.stopCellEditing();
|
| 223 | 219 |
}
|
| 224 | 220 |
};
|
| 225 |
- |
|
| 226 | 221 |
}
|
| 227 |
- |
|
| 228 | 222 |
}
|
| 229 | 223 |
|
| 230 | 224 |
private void quit() {
|
| ... | ... | @@ -232,24 +226,17 @@ public class ClientConfigUI extends JXTitledPanel { |
| 232 | 226 |
}
|
| 233 | 227 |
|
| 234 | 228 |
private ObserveConfigUIBuilder buildUI(ObserveUICallbackManager uiCallbackManager, ClientConfig config, ObserveSwingDataSource dataSource, DecoratorService decoratorService) {
|
| 235 |
- |
|
| 236 | 229 |
SpeciesListTableCellEditor editor = null;
|
| 237 | 230 |
SpeciesListsTableCellRenderer renderer = null;
|
| 238 |
- |
|
| 239 | 231 |
if (dataSource != null && dataSource.isOpen()) {
|
| 240 |
- |
|
| 241 | 232 |
Set<SpeciesListReference> speciesLists = dataSource.getReferentialReferences(SpeciesListReference.class);
|
| 242 |
- |
|
| 243 | 233 |
Map<String, SpeciesListReference> speciesListMap = ReferentialDtoReference.splitById(speciesLists);
|
| 244 |
- |
|
| 245 | 234 |
ReferentialReferenceDecorator<SpeciesListReference> referenceDecorator = decoratorService.getReferentialReferenceDecorator(SpeciesListReference.class);
|
| 246 |
- |
|
| 247 | 235 |
editor = new SpeciesListTableCellEditor(speciesLists, speciesListMap, referenceDecorator);
|
| 248 | 236 |
renderer = new SpeciesListsTableCellRenderer(speciesListMap, referenceDecorator);
|
| 249 |
- |
|
| 250 | 237 |
}
|
| 251 | 238 |
|
| 252 |
- ObserveConfigUIBuilder helper = new ObserveConfigUIBuilder(config, uiCallbackManager, editor, renderer);
|
|
| 239 |
+ ObserveConfigUIBuilder helper = new ObserveConfigUIBuilder(config, editor, renderer);
|
|
| 253 | 240 |
|
| 254 | 241 |
uiCallbackManager.getCallbacks().forEach(helper::registerCallBack);
|
| 255 | 242 |
|
| ... | ... | @@ -264,6 +251,7 @@ public class ClientConfigUI extends JXTitledPanel { |
| 264 | 251 |
addApplicationOptions(helper);
|
| 265 | 252 |
addUiOptions(helper);
|
| 266 | 253 |
addNavigationOptions(helper);
|
| 254 |
+ addMapOptions(helper);
|
|
| 267 | 255 |
addDataOptions(helper, dataSource);
|
| 268 | 256 |
addExpertOptions(helper);
|
| 269 | 257 |
addTechnicalOptions(helper);
|
| ... | ... | @@ -304,6 +292,13 @@ public class ClientConfigUI extends JXTitledPanel { |
| 304 | 292 |
helper.addOption(ClientConfigOption.DEFAULT_DB_MODE);
|
| 305 | 293 |
helper.addOption(ClientConfigOption.DEFAULT_CREATION_MODE);
|
| 306 | 294 |
helper.addOption(ClientConfigOption.STORE_REMOTE_STORAGE);
|
| 295 |
+ }
|
|
| 296 |
+ |
|
| 297 |
+ private void addMapOptions(ObserveConfigUIBuilder helper) {
|
|
| 298 |
+ |
|
| 299 |
+ helper.addCategory(n("observe.config.category.map"),
|
|
| 300 |
+ n("observe.config.category.map.description"),
|
|
| 301 |
+ "ui");
|
|
| 307 | 302 |
|
| 308 | 303 |
helper.addOption(ClientConfigOption.MAP_BACKGROUND_COLOR);
|
| 309 | 304 |
ClientConfig.MAP_LAYERS.forEach(helper::addOption);
|
| ... | ... | @@ -69,4 +69,3 @@ observe.ui.usage.action.shouldReplace |
| 69 | 69 |
observe.ui.usage.replaceTitle
|
| 70 | 70 |
observe.ui.usage.usageTitle
|
| 71 | 71 |
observe.ui.view.message
|
| 72 |
-observe.ui.view.navigation
|
| ... | ... | @@ -39,6 +39,8 @@ observe.config.category.application=Application |
| 39 | 39 |
observe.config.category.application.description=Application options
|
| 40 | 40 |
observe.config.category.expert=Expert
|
| 41 | 41 |
observe.config.category.expert.description=Export mode options
|
| 42 |
+observe.config.category.map=Map
|
|
| 43 |
+observe.config.category.map.description=Maps configuration
|
|
| 42 | 44 |
observe.config.category.observation=Qualification of observations
|
| 43 | 45 |
observe.config.category.observation.description=Qualification of observations
|
| 44 | 46 |
observe.config.category.speciesList.longline=Species lists for longline
|
| ... | ... | @@ -1689,6 +1691,5 @@ observe.ui.usage.action.shouldReplace=Remplace desactivated referential ? |
| 1689 | 1691 |
observe.ui.usage.replaceTitle=Replacement object
|
| 1690 | 1692 |
observe.ui.usage.usageTitle=Founded references
|
| 1691 | 1693 |
observe.ui.view.message=Messages
|
| 1692 |
-observe.ui.view.navigation=Navigation
|
|
| 1693 | 1694 |
observe.warning.nimbus.landf=Could not use Look and Fell Nimbus, need at least version 1.6u10 of java.
|
| 1694 | 1695 |
observe.warning.no.ui=No gui environment found
|
| ... | ... | @@ -39,6 +39,8 @@ observe.config.category.application=Aplicación |
| 39 | 39 |
observe.config.category.application.description=Opciones de la aplicación
|
| 40 | 40 |
observe.config.category.expert=Experto
|
| 41 | 41 |
observe.config.category.expert.description=Opciones de modo experto
|
| 42 |
+observe.config.category.map=Mapa
|
|
| 43 |
+observe.config.category.map.description=Mapa Configuración
|
|
| 42 | 44 |
observe.config.category.observation=Calificación de las observaciones
|
| 43 | 45 |
observe.config.category.observation.description=Gestion de los indicadores de calificación de los programas
|
| 44 | 46 |
observe.config.category.speciesList.longline=Configuración de las listas de especies (Palangre)
|
| ... | ... | @@ -1689,6 +1691,5 @@ observe.ui.usage.action.shouldReplace=Reemplaza referencial desactivado? |
| 1689 | 1691 |
observe.ui.usage.replaceTitle=Objeto de sustitución
|
| 1690 | 1692 |
observe.ui.usage.usageTitle=Referencias encontradas
|
| 1691 | 1693 |
observe.ui.view.message=Mensajes
|
| 1692 |
-observe.ui.view.navigation=Navegación
|
|
| 1693 | 1694 |
observe.warning.nimbus.landf=El look and Feel Nimbus no fue encontrado, se necesita como mínimo la versión 1.6 ó 10 de java.
|
| 1694 | 1695 |
observe.warning.no.ui=Ninguno entorno gráfico fue detectado
|
| ... | ... | @@ -39,6 +39,8 @@ observe.config.category.application=Application |
| 39 | 39 |
observe.config.category.application.description=Options applicatives
|
| 40 | 40 |
observe.config.category.expert=Avancé
|
| 41 | 41 |
observe.config.category.expert.description=Configuration avancée
|
| 42 |
+observe.config.category.map=Cartographie
|
|
| 43 |
+observe.config.category.map.description=Configuration de la cartographie
|
|
| 42 | 44 |
observe.config.category.observation=Qualification des observations
|
| 43 | 45 |
observe.config.category.observation.description=Gestion des indicateurs de qualification des programmes
|
| 44 | 46 |
observe.config.category.speciesList.longline=Configuration des listes d'espèces (Palangre)
|
| ... | ... | @@ -1689,6 +1691,5 @@ observe.ui.usage.action.shouldReplace=Remplacer le référentiel désactivé ? |
| 1689 | 1691 |
observe.ui.usage.replaceTitle=Objet de remplacement
|
| 1690 | 1692 |
observe.ui.usage.usageTitle=Références trouvées
|
| 1691 | 1693 |
observe.ui.view.message=Messages
|
| 1692 |
-observe.ui.view.navigation=Navigation
|
|
| 1693 | 1694 |
observe.warning.nimbus.landf=Le look and Feel Nimbus n'a pas été trouvé, il faut au moins la version 1.6u10 de java.
|
| 1694 | 1695 |
observe.warning.no.ui=Aucun environnement graphique détecté
|