Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
fb75745c
by Tony Chemit at 2020-12-04T06:23:40+01:00
5 changed files:
- client/datasource/editor/api/src/main/i18n/getters/java.getter
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/ContentUIInitializer.java
- 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:
| ... | ... | @@ -96,6 +96,7 @@ observe.referential.Referential.action.modify |
| 96 | 96 |
observe.referential.Referential.action.show.unique.keys.tip
|
| 97 | 97 |
observe.referential.Referential.action.show.usages.tip
|
| 98 | 98 |
observe.referential.Referential.code
|
| 99 |
+observe.referential.Referential.disabled
|
|
| 99 | 100 |
observe.referential.Referential.enabled
|
| 100 | 101 |
observe.referential.Referential.needComment
|
| 101 | 102 |
observe.referential.Referential.obsolete
|
| ... | ... | @@ -43,6 +43,7 @@ import fr.ird.observe.dto.decoration.decorators.ReferentialReferenceDecorator; |
| 43 | 43 |
import fr.ird.observe.dto.reference.DataDtoReference;
|
| 44 | 44 |
import fr.ird.observe.dto.reference.ReferentialDtoReference;
|
| 45 | 45 |
import io.ultreia.java4all.bean.JavaBean;
|
| 46 |
+import io.ultreia.java4all.i18n.I18n;
|
|
| 46 | 47 |
import io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox;
|
| 47 | 48 |
import io.ultreia.java4all.jaxx.widgets.choice.BooleanEditor;
|
| 48 | 49 |
import io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor;
|
| ... | ... | @@ -184,21 +185,24 @@ public class ContentUIInitializer<UI extends ContentUI> implements WithClientCon |
| 184 | 185 |
int index,
|
| 185 | 186 |
boolean isSelected,
|
| 186 | 187 |
boolean cellHasFocus) {
|
| 187 |
- Component comp = renderer.getListCellRendererComponent(
|
|
| 188 |
- list,
|
|
| 189 |
- value,
|
|
| 190 |
- index,
|
|
| 191 |
- isSelected,
|
|
| 192 |
- cellHasFocus
|
|
| 193 |
- );
|
|
| 188 |
+ Component comp = renderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
|
|
| 194 | 189 |
if (comp instanceof JLabel) {
|
| 195 | 190 |
JLabel jcomp = (JLabel) comp;
|
| 196 | 191 |
jcomp.setToolTipText(jcomp.getText());
|
| 197 | 192 |
}
|
| 198 | 193 |
if (value instanceof ReferentialDtoReference) {
|
| 199 |
- comp.setEnabled(((ReferentialDtoReference) value).isEnabled());
|
|
| 194 |
+ boolean enabled = ((ReferentialDtoReference) value).isEnabled();
|
|
| 195 |
+ if (!isSelected) {
|
|
| 196 |
+ comp.setEnabled(enabled);
|
|
| 197 |
+ } else {
|
|
| 198 |
+ if (!enabled) {
|
|
| 199 |
+ if (comp instanceof JLabel) {
|
|
| 200 |
+ JLabel jcomp = (JLabel) comp;
|
|
| 201 |
+ jcomp.setToolTipText(I18n.t("observe.referential.Referential.disabled",jcomp.getText()));
|
|
| 202 |
+ }
|
|
| 203 |
+ }
|
|
| 204 |
+ }
|
|
| 200 | 205 |
}
|
| 201 |
- |
|
| 202 | 206 |
return comp;
|
| 203 | 207 |
}
|
| 204 | 208 |
}
|
| ... | ... | @@ -1080,6 +1080,7 @@ observe.referential.Referential.action.show.unique.keys.tip=Show all natural ids |
| 1080 | 1080 |
observe.referential.Referential.action.show.usages.tip=Show all usages of this object
|
| 1081 | 1081 |
observe.referential.Referential.caracteristics=Caracteristics
|
| 1082 | 1082 |
observe.referential.Referential.codeAndStatus=Code / Status
|
| 1083 |
+observe.referential.Referential.disabled=%s (referential is disabled)
|
|
| 1083 | 1084 |
observe.referential.Referential.obsolete=Referential %s is disabled.
|
| 1084 | 1085 |
observe.referential.Referential.type=<html><body>Referential of type <i>%s</i>
|
| 1085 | 1086 |
observe.referential.common.Gear.availableGearCharacteristic=Available caracteristics
|
| ... | ... | @@ -1080,6 +1080,7 @@ observe.referential.Referential.action.show.unique.keys.tip=Ver la tabla de toda |
| 1080 | 1080 |
observe.referential.Referential.action.show.usages.tip=Ver todos los usos de este referencial
|
| 1081 | 1081 |
observe.referential.Referential.caracteristics=Características
|
| 1082 | 1082 |
observe.referential.Referential.codeAndStatus=Código
|
| 1083 |
+observe.referential.Referential.disabled=%s (El objeto está desactivado)
|
|
| 1083 | 1084 |
observe.referential.Referential.obsolete=El referencial %1$s está desactivado.
|
| 1084 | 1085 |
observe.referential.Referential.type=<html><body>Referencial de tipo <i>%s</i>
|
| 1085 | 1086 |
observe.referential.common.Gear.availableGearCharacteristic=Características disponibles
|
| ... | ... | @@ -1080,6 +1080,7 @@ observe.referential.Referential.action.show.unique.keys.tip=Voir le tableau de t |
| 1080 | 1080 |
observe.referential.Referential.action.show.usages.tip=Voir toutes les utilisations de ce référentiel
|
| 1081 | 1081 |
observe.referential.Referential.caracteristics=Caractéristiques
|
| 1082 | 1082 |
observe.referential.Referential.codeAndStatus=Code / Statut
|
| 1083 |
+observe.referential.Referential.disabled=%s (ce référentiel est désactivé)
|
|
| 1083 | 1084 |
observe.referential.Referential.obsolete=Le référentiel %1$s est désactivé.
|
| 1084 | 1085 |
observe.referential.Referential.type=<html><body>Référentiel de type <i>%s</i>
|
| 1085 | 1086 |
observe.referential.common.Gear.availableGearCharacteristic=Caractéristiques disponibles
|