Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
7 changed files:
- client-configuration/src/main/config/Client.ini
- client-configuration/src/main/resources/i18n/client-configuration_en_GB.properties
- client-configuration/src/main/resources/i18n/client-configuration_es_ES.properties
- client-configuration/src/main/resources/i18n/client-configuration_fr_FR.properties
- client/src/main/java/fr/ird/observe/client/ui/actions/main/menu/config/ShowConfigAction.java
- client/src/main/java/fr/ird/observe/client/ui/content/ContentUIInitializer.java
- client/src/main/java/fr/ird/observe/client/ui/content/data/seine/FloatingObjectUIHandler.java
Changes:
| ... | ... | @@ -524,6 +524,13 @@ key = ui.noFocusBorderColor.color |
| 524 | 524 |
type = java.awt.Color
|
| 525 | 525 |
defaultValue = "java.awt.Color[r=192,g=192,b=192]"
|
| 526 | 526 |
|
| 527 |
+ |
|
| 528 |
+[option floatingObjectMaterialErrorColor]
|
|
| 529 |
+description = observe.config.ui.dcp.error.color
|
|
| 530 |
+key = ui.dcp.error.color
|
|
| 531 |
+type = color
|
|
| 532 |
+defaultValue = java.awt.Color[r=255,g=100,b=100]
|
|
| 533 |
+ |
|
| 527 | 534 |
[option showMnemonic]
|
| 528 | 535 |
description = observe.config.ui.showMnemonic
|
| 529 | 536 |
key = ui.showMnemonic
|
| ... | ... | @@ -78,6 +78,7 @@ observe.config.swingSessionFile.description=Swing session file. |
| 78 | 78 |
observe.config.temperature.format=Default temperature format
|
| 79 | 79 |
observe.config.ui.autoPopupNumberEditor=Flag sets to true when number editor show automaticly popup
|
| 80 | 80 |
observe.config.ui.changeSynchroSrc=Flag sets to true if you can change local source in admin tasks
|
| 81 |
+observe.config.ui.dcp.error.color=Color to notify errors while validating floating object materials.
|
|
| 81 | 82 |
observe.config.ui.focusBorderColor=Color of the focus container border
|
| 82 | 83 |
observe.config.ui.fullscreen=Flag sets to true to lauch application in full screen mode
|
| 83 | 84 |
observe.config.ui.loadLocalStorage=Flag sets to true to load local data source when application starts
|
| ... | ... | @@ -78,6 +78,7 @@ observe.config.swingSessionFile.description=Fichier de sauvegarde des états des |
| 78 | 78 |
observe.config.temperature.format=Default temperature format \#TODO
|
| 79 | 79 |
observe.config.ui.autoPopupNumberEditor=Para mostrar automáticamente el editor numérico durante la edición de un número
|
| 80 | 80 |
observe.config.ui.changeSynchroSrc=Pour autoriser la sélection de la base source dans les opérations sur base
|
| 81 |
+observe.config.ui.dcp.error.color=Color to notify errors while validating floating object materials. \#TODO
|
|
| 81 | 82 |
observe.config.ui.focusBorderColor=Couleur de la bordure de la zone qui a le focus \#TODO
|
| 82 | 83 |
observe.config.ui.fullscreen=Para mostrar en modo pantalla completa la aplicación
|
| 83 | 84 |
observe.config.ui.loadLocalStorage=Cambiar la base local al iniciar la aplicación
|
| ... | ... | @@ -78,6 +78,7 @@ observe.config.swingSessionFile.description=Fichier de sauvegarde des états des |
| 78 | 78 |
observe.config.temperature.format=Unité de température
|
| 79 | 79 |
observe.config.ui.autoPopupNumberEditor=Pour afficher automatiquement l'éditeur numérique lors de l'édition d'un nombre
|
| 80 | 80 |
observe.config.ui.changeSynchroSrc=Pour autoriser la sélection de la base source dans les opérations sur base
|
| 81 |
+observe.config.ui.dcp.error.color=Couleur pour notifier les erreurs sur la composition des dcps
|
|
| 81 | 82 |
observe.config.ui.focusBorderColor=Couleur de la bordure de la zone qui a le focus
|
| 82 | 83 |
observe.config.ui.fullscreen=Pour afficher l'application en mode pleine écran
|
| 83 | 84 |
observe.config.ui.loadLocalStorage=Charger la base locale au démarrage de l'application
|
| ... | ... | @@ -206,6 +206,7 @@ public class ShowConfigAction extends MenuActionSupport { |
| 206 | 206 |
|
| 207 | 207 |
helper.addOption(ClientConfigOption.FOCUS_BORDER_COLOR);
|
| 208 | 208 |
helper.addOption(ClientConfigOption.NO_FOCUS_BORDER_COLOR);
|
| 209 |
+ helper.addOption(ClientConfigOption.FLOATING_OBJECT_MATERIAL_ERROR_COLOR);
|
|
| 209 | 210 |
|
| 210 | 211 |
helper.addOption(ClientConfigOption.DEFAULT_DB_MODE);
|
| 211 | 212 |
helper.addOption(ClientConfigOption.DEFAULT_CREATION_MODE);
|
| ... | ... | @@ -693,6 +693,9 @@ public class ContentUIInitializer<E extends IdDto, UI extends ContentUI<E, UI>> |
| 693 | 693 |
picker.addActionListener(e -> {
|
| 694 | 694 |
JXDatePicker source = (JXDatePicker) e.getSource();
|
| 695 | 695 |
Date date = source.getDate();
|
| 696 |
+ if (getBean()==null) {
|
|
| 697 |
+ return;
|
|
| 698 |
+ }
|
|
| 696 | 699 |
if (Objects.equals(date, UIHelper.getProperty(getBean(), propertyName))) {
|
| 697 | 700 |
// On n'envoie pas la demande, car cela va modifier ensuite le formulaire
|
| 698 | 701 |
// car avec oldValue=null et newValue=null, les pcs sont déclanchés...
|
| ... | ... | @@ -22,7 +22,6 @@ |
| 22 | 22 |
package fr.ird.observe.client.ui.content.data.seine;
|
| 23 | 23 |
|
| 24 | 24 |
import com.google.common.collect.ImmutableSet;
|
| 25 |
-import com.google.common.collect.Maps;
|
|
| 26 | 25 |
import fr.ird.observe.client.ObserveSwingApplicationContext;
|
| 27 | 26 |
import fr.ird.observe.client.db.ClientDataContext;
|
| 28 | 27 |
import fr.ird.observe.client.db.ObserveSwingDataSource;
|
| ... | ... | @@ -72,7 +71,6 @@ import javax.swing.event.TableModelListener; |
| 72 | 71 |
import javax.swing.event.TreeModelEvent;
|
| 73 | 72 |
import java.awt.Color;
|
| 74 | 73 |
import java.util.HashSet;
|
| 75 |
-import java.util.List;
|
|
| 76 | 74 |
import java.util.Map;
|
| 77 | 75 |
import java.util.Objects;
|
| 78 | 76 |
import java.util.Optional;
|
| ... | ... | @@ -430,17 +428,16 @@ public class FloatingObjectUIHandler extends ContentUIHandler<FloatingObjectDto, |
| 430 | 428 |
FloatingObjectPartsTreeNode node = (FloatingObjectPartsTreeNode) component.getPathForRow(row).getLastPathComponent();
|
| 431 | 429 |
boolean valid1 = node.isValid(1);
|
| 432 | 430 |
boolean valid2 = node.isValid(2);
|
| 433 |
- boolean valid = valid1 && valid2;
|
|
| 434 | 431 |
switch (adapter.convertRowIndexToModel(adapter.column)) {
|
| 435 | 432 |
case 0:
|
| 436 |
- return !valid;
|
|
| 433 |
+ return false;
|
|
| 437 | 434 |
case 1:
|
| 438 | 435 |
return !valid1;
|
| 439 | 436 |
case 2:
|
| 440 | 437 |
return !valid2;
|
| 441 | 438 |
}
|
| 442 | 439 |
return true;
|
| 443 |
- }, Color.RED, Color.WHITE));
|
|
| 440 |
+ }, ObserveSwingApplicationContext.get().getConfig().getFloatingObjectMaterialErrorColor(), Color.WHITE));
|
|
| 444 | 441 |
}
|
| 445 | 442 |
|
| 446 | 443 |
protected void computeTabValidState(SwingValidatorMessageTableModel errorTableModel) {
|