Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 4fa278c4 by Tony CHEMIT at 2017-06-19T10:34:01+02:00 Correction du nom d'un onglet - - - - - 2a31f5a4 by Tony CHEMIT at 2017-06-19T10:49:34+02:00 Amélioration des controles des heures de remises à l'eau - - - - - 99b915ce by Tony CHEMIT at 2017-06-19T10:49:46+02:00 Focus sur Sex au changement de species - - - - - de2af7c5 by Tony CHEMIT at 2017-06-19T10:52:39+02:00 fix i18n - - - - - 8 changed files: - application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/NonTargetCatchReleaseDto-ui-update-error-validation.xml - application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUIModel.java - application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchReleaseUI.jcss - application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchReleaseUIHandler.java - application-swing/src/main/resources/i18n/application-swing_en_GB.properties - application-swing/src/main/resources/i18n/application-swing_es_ES.properties - application-swing/src/main/resources/i18n/application-swing_fr_FR.properties - services-validation/src/main/resources/fr/ird/observe/entities/seine/NonTargetCatchRelease-service-error-validation.xml Changes: ===================================== application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/NonTargetCatchReleaseDto-ui-update-error-validation.xml ===================================== --- a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/NonTargetCatchReleaseDto-ui-update-error-validation.xml +++ b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/seine/NonTargetCatchReleaseDto-ui-update-error-validation.xml @@ -119,7 +119,7 @@ <field-validator type="fieldexpression" short-circuit="true"> <param name="expression"> - <![CDATA[ currentSetSeine.endPursingTime.time <= detectionTime.time ]]> + <![CDATA[ currentSetSeine.endPursingTime.time < detectionTime.time ]]> </param> <message>validator.ui.nonTargetCatchRelease.detectionTime.after.endPursingTimeStamp</message> </field-validator> @@ -132,7 +132,7 @@ </field-validator> <field-validator type="fieldexpression" short-circuit="true"> <param name="expression"> - <![CDATA[ detectionTime == null || detectionTime.time <= releaseTime.time ]]> + <![CDATA[ detectionTime == null || detectionTime.time < releaseTime.time ]]> </param> <message>validator.ui.nonTargetCatchRelease.detectionTime.after.releaseTime</message> </field-validator> ===================================== application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUIModel.java ===================================== --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUIModel.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/open/impl/seine/ActivitySeineUIModel.java @@ -41,7 +41,7 @@ public class ActivitySeineUIModel extends ContentOpenableUIModel<ActivitySeineDt public static final String PROPERTY_GENERAL_TAB_VALID = "generalTabValid"; - public static final String PROPERTY_MEASUREMENTS_TAB_VALID = "materialsTabValid"; + public static final String PROPERTY_MEASUREMENTS_TAB_VALID = "measurementsTabValid"; public static final String PROPERTY_OBSERVED_SYSTEM_TAB_VALID = "observedSystemTabValid"; ===================================== application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchReleaseUI.jcss ===================================== --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchReleaseUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchReleaseUI.jcss @@ -58,7 +58,7 @@ } #lengthLabel { - text:"observe.common.length"; + text:"observe.common.length2"; labelFor:{length}; } ===================================== application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchReleaseUIHandler.java ===================================== --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchReleaseUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/table/impl/seine/NonTargetCatchReleaseUIHandler.java @@ -91,11 +91,11 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei private Map<String, SpeciesGroupDto> speciesGroupDtoMap; - protected boolean toogleTimeEditorSliderIsChanging; + private boolean toogleTimeEditorSliderIsChanging; // Change toogle target visible on all TimeEditors - protected final PropertyChangeListener onToogleTimeEditorSliderChangedListener; + private final PropertyChangeListener onToogleTimeEditorSliderChangedListener; - public NonTargetCatchReleaseUIHandler() { + NonTargetCatchReleaseUIHandler() { super(DataContextType.SetSeine); speciesChanged = evt -> { if (!getTableModel().isAdjusting()) { @@ -111,12 +111,14 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei private void updateSpecies(ReferentialReference<SpeciesDto> species, List<NonTargetCatchReleaseStatusDto> states) { + ReferentialReference<SpeciesDto> oldSpecies = getTableEditBean().getSpecies(); JPanel statesContent = getUi().getStatesContent(); statesContent.removeAll(); if (species == null) { getModel().setStates(Collections.emptyList(), states); getUi().getSpeciesGroupReleaseMode().setData(Collections.emptyList()); + UIHelper.askFocus(getUi().getSpecies()); return; } String speciesGroupId = (String) species.getPropertyValue(SpeciesDto.PROPERTY_SPECIES_GROUP + "Id"); @@ -137,6 +139,8 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei statesContent.add(u); } SwingUtilities.invokeLater(getUi()::revalidate); + + UIHelper.askFocus(getUi().getSex()); } @Override @@ -177,7 +181,6 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei } ui.getSpecies().setData(availableEspeces); - UIHelper.askFocus(requestFocus); Date releaseTime; Date detectionTime; @@ -201,6 +204,9 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei bean.removePropertyChangeListener(NonTargetCatchReleaseDto.PROPERTY_SPECIES, speciesChanged); bean.addPropertyChangeListener(NonTargetCatchReleaseDto.PROPERTY_SPECIES, speciesChanged); + + log.info("Focus to "+requestFocus.getName()); + UIHelper.askFocus(requestFocus); } private static final List<String> SPECIES_GROUP_IDS = Arrays.asList( @@ -341,10 +347,10 @@ public class NonTargetCatchReleaseUIHandler extends ContentTableUIHandler<SetSei private final NonTargetCatchReleaseUI ui; - public CatchLonglinesAutotSelectRowAndShowPopupAction(NonTargetCatchReleaseUI ui, - JScrollPane pane, - JTable table, - JPopupMenu popup) { + CatchLonglinesAutotSelectRowAndShowPopupAction(NonTargetCatchReleaseUI ui, + JScrollPane pane, + JTable table, + JPopupMenu popup) { super(pane, table, popup); this.ui = ui; } ===================================== application-swing/src/main/resources/i18n/application-swing_en_GB.properties ===================================== --- a/application-swing/src/main/resources/i18n/application-swing_en_GB.properties +++ b/application-swing/src/main/resources/i18n/application-swing_en_GB.properties @@ -439,6 +439,7 @@ observe.common.lastName=Last name observe.common.lastUpdateDate=Last update date observe.common.latitude=Latitude observe.common.length=Length +observe.common.length2=Length (cm) observe.common.length.computed.tip=Length was computed observe.common.length.inf=Length (cm inf.) observe.common.length.observed.tip=Length was observed ===================================== application-swing/src/main/resources/i18n/application-swing_es_ES.properties ===================================== --- a/application-swing/src/main/resources/i18n/application-swing_es_ES.properties +++ b/application-swing/src/main/resources/i18n/application-swing_es_ES.properties @@ -439,6 +439,7 @@ observe.common.lastName=Nombre observe.common.lastUpdateDate=Last update date observe.common.latitude=Latitud observe.common.length=Longitud eslora total +observe.common.len2gth=Longitud eslora total (cm) #TODO observe.common.length.computed.tip=Longitud calculada observe.common.length.inf=Longitud (cm inf.) observe.common.length.observed.tip=Longitud observada ===================================== application-swing/src/main/resources/i18n/application-swing_fr_FR.properties ===================================== --- a/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties +++ b/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties @@ -444,6 +444,7 @@ observe.common.lastName=Nom observe.common.lastUpdateDate=Date de dernière mise à jour observe.common.latitude=Latitude observe.common.length=Longueur hors tout +observe.common.length2=Taille (cm) observe.common.length.computed.tip=La longueur a été calculée observe.common.length.inf=Longueur (cm inf.) observe.common.length.observed.tip=La longueur a été observée ===================================== services-validation/src/main/resources/fr/ird/observe/entities/seine/NonTargetCatchRelease-service-error-validation.xml ===================================== --- a/services-validation/src/main/resources/fr/ird/observe/entities/seine/NonTargetCatchRelease-service-error-validation.xml +++ b/services-validation/src/main/resources/fr/ird/observe/entities/seine/NonTargetCatchRelease-service-error-validation.xml @@ -118,7 +118,7 @@ <field-validator type="fieldexpression" short-circuit="true"> <param name="expression"> - <![CDATA[ setSeineEntity.endPursingTime.time <= detectionTime.time ]]> + <![CDATA[ setSeineEntity.endPursingTime.time < detectionTime.time ]]> </param> <message>validator.service.nonTargetCatchRelease.detectionTime.after.endPursingTimeStamp</message> </field-validator> @@ -132,7 +132,7 @@ <field-validator type="fieldexpression" short-circuit="true"> <param name="expression"> - <![CDATA[ detectionTime == null || detectionTime.time <= releaseTime.time ]]> + <![CDATA[ detectionTime == null || detectionTime.time < releaseTime.time ]]> </param> <message>validator.service.nonTargetCatchRelease.detectionTime.after.releaseTime</message> </field-validator> View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/ed9b9af6eaa65a0ab2631a1186d... --- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/ed9b9af6eaa65a0ab2631a1186d... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT