r766 - in trunk: tutti-persistence/src/main/java/fr/ifremer/tutti/persistence tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service tutti-persistence/src/main/resources tutti-persistence/src/main/xmi tutti-service/src/main/java/fr/ifremer/tutti/service tutti-ui-swing/src/main/filtered-resources tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches tutti-ui-swing/src/main/java/fr
Author: kmorin Date: 2013-04-11 17:00:54 +0200 (Thu, 11 Apr 2013) New Revision: 766 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/766 Log: refs #1866 [CAPTURE] - Captures accidentelles Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/RemoveAccidentalBatchAction.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUIModel.java Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceImpl.java trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/TuttiEnumerationFile.java trunk/tutti-persistence/src/main/resources/tutti-db-enumerations.properties trunk/tutti-persistence/src/main/xmi/tutti-persistence.zargo trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiDataContext.java trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchTableModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchTableModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/RemoveIndividualObservationBatchAction.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapCellComponent.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorTableModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIModel.java trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIModel-error-validation.xml trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java =================================================================== --- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistence.java 2013-04-11 15:00:54 UTC (rev 766) @@ -218,6 +218,8 @@ Caracteristic getHorizontalOpeningDoorCaracteristic(); + Caracteristic getDeadOrAliveCaracteristic(); + List<Gear> getAllScientificGear(); List<Gear> getAllFishingGear(); Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceImpl.java =================================================================== --- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceImpl.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceImpl.java 2013-04-11 15:00:54 UTC (rev 766) @@ -330,6 +330,11 @@ } @Override + public Caracteristic getDeadOrAliveCaracteristic() { + return referentialService.getDeadOrAliveCaracteristic(); + } + + @Override public List<Gear> getAllScientificGear() { return referentialService.getAllScientificGear(); } Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java =================================================================== --- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java 2013-04-11 15:00:54 UTC (rev 766) @@ -187,6 +187,11 @@ } @Override + public Caracteristic getDeadOrAliveCaracteristic() { + throw new RuntimeException("method not implemented"); + } + + @Override public List<Gear> getAllScientificGear() { throw new RuntimeException("method not implemented"); } Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java =================================================================== --- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceService.java 2013-04-11 15:00:54 UTC (rev 766) @@ -212,6 +212,8 @@ Caracteristic getHorizontalOpeningDoorCaracteristic(); + Caracteristic getDeadOrAliveCaracteristic(); + List<Gear> getAllScientificGear(); List<Gear> getAllFishingGear(); Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java =================================================================== --- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/ReferentialPersistenceServiceImpl.java 2013-04-11 15:00:54 UTC (rev 766) @@ -569,6 +569,13 @@ } @Override + public Caracteristic getDeadOrAliveCaracteristic() { + Integer pmfmId = enumeration.PMFM_ID_DEAD_OR_ALIVE; + Caracteristic result = thisService.getCaracteristic(pmfmId); + return result; + } + + @Override public Caracteristic getCaracteristic(Integer pmfmId) { Object[] source = queryUniqueWithStatus("pmfmById", "pmfmId", IntegerType.INSTANCE, pmfmId, Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/TuttiEnumerationFile.java =================================================================== --- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/TuttiEnumerationFile.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/TuttiEnumerationFile.java 2013-04-11 15:00:54 UTC (rev 766) @@ -242,6 +242,9 @@ @Value("${PmfmId.HORIZONTAL_OPENING_DOOR}") public final Integer PMFM_ID_HORIZONTAL_OPENING_DOOR= null; + @Value("${PmfmId.DEAD_OR_ALIVE}") + public final Integer PMFM_ID_DEAD_OR_ALIVE= null; + //FIXME-TC Remove this when no more used @Value("${PmfmId.SURVEY_PART}") public final Integer PMFM_ID_MEASUREMENT_FILE = null; Modified: trunk/tutti-persistence/src/main/resources/tutti-db-enumerations.properties =================================================================== --- trunk/tutti-persistence/src/main/resources/tutti-db-enumerations.properties 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-persistence/src/main/resources/tutti-db-enumerations.properties 2013-04-11 15:00:54 UTC (rev 766) @@ -382,6 +382,9 @@ # PSFM "Ouverture horizontale aux panneaux" (pour export operation) PmfmId.HORIZONTAL_OPENING_DOOR=830 +#PSFM "Remis à l'eau mort ou vivant" +PmfmId.DEAD_OR_ALIVE=1393 + # (20=observateur volant, 95=Administrateur SIH) -> L'avantage du 20 est qu'il est inactif (=20), donc plus facilement detectable PersonId.UNKNOWN_RECORDER_PERSON=20 Modified: trunk/tutti-persistence/src/main/xmi/tutti-persistence.zargo =================================================================== (Binary files differ) Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java 2013-04-11 15:00:54 UTC (rev 766) @@ -428,6 +428,11 @@ } @Override + public Caracteristic getDeadOrAliveCaracteristic() { + return driver.getDeadOrAliveCaracteristic(); + } + + @Override public Vessel getVessel(String vesselCode) { return driver.getVessel(vesselCode); } Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiDataContext.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiDataContext.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiDataContext.java 2013-04-11 15:00:54 UTC (rev 766) @@ -32,11 +32,7 @@ import fr.ifremer.tutti.persistence.entities.data.Program; import fr.ifremer.tutti.persistence.entities.protocol.SpeciesProtocol; import fr.ifremer.tutti.persistence.entities.protocol.TuttiProtocol; -import fr.ifremer.tutti.persistence.entities.referential.Caracteristic; -import fr.ifremer.tutti.persistence.entities.referential.Gear; -import fr.ifremer.tutti.persistence.entities.referential.Person; -import fr.ifremer.tutti.persistence.entities.referential.Species; -import fr.ifremer.tutti.persistence.entities.referential.Vessel; +import fr.ifremer.tutti.persistence.entities.referential.*; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -119,6 +115,10 @@ protected List<Caracteristic> lengthStepCaracteristics; + protected List<CaracteristicQualitativeValue> genderValues; + + protected List<CaracteristicQualitativeValue> deadOrAliveValues; + protected List<Person> persons; protected List<Species> species; @@ -370,7 +370,7 @@ if (isProtocolFilled()) { String id = getProtocolId(); if (log.isInfoEnabled()) { - log.info("Loading cruise: " + id); + log.info("Loading protocol: " + id); } protocol = service.getProtocol(id); } @@ -432,6 +432,28 @@ return lengthStepCaracteristics; } + public List<CaracteristicQualitativeValue> getGenderValues() { + checkOpened(); + if (genderValues == null) { + if (log.isInfoEnabled()) { + log.info("Loading genderValues"); + } + genderValues = service.getSexCaracteristic().getQualitativeValue(); + } + return genderValues; + } + + public List<CaracteristicQualitativeValue> getDeadOrAliveValues() { + checkOpened(); + if (deadOrAliveValues == null) { + if (log.isInfoEnabled()) { + log.info("Loading deadOrAliveValues"); + } + deadOrAliveValues = service.getDeadOrAliveCaracteristic().getQualitativeValue(); + } + return deadOrAliveValues; + } + public List<Species> getReferentSpeciesWithSurveyCode() { checkOpened(); if (referentSpeciesWithSurveyCode == null) { Modified: trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties =================================================================== --- trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,13 @@ #Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo -#Tue Apr 09 12:35:56 CEST 2013 +#Thu Apr 11 16:29:39 CEST 2013 +tutti.createAccidentalBatch.action.cancel.help= +tutti.createAccidentalBatch.action.save.help= +tutti.createAccidentalBatch.field.accidentalDeadOrAlive.help= +tutti.createAccidentalBatch.field.accidentalGender.help= +tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic.help= +tutti.createAccidentalBatch.field.accidentalSize.help= +tutti.createAccidentalBatch.field.accidentalSpecies.help= +tutti.createAccidentalBatch.field.accidentalWeight.help= tutti.createBenthosBatch.action.addSpecies.help=createBenthosBatch.html\#actions tutti.createBenthosBatch.action.cancel.help=createBenthosBatch.html\#actions tutti.createBenthosBatch.action.save.help=createBenthosBatch.html\#actions @@ -7,6 +15,8 @@ tutti.createBenthosBatch.field.sortedUnsortedCategory.help=createBenthosBatch.html\#fields tutti.createBenthosBatch.field.species.help=createBenthosBatch.html\#fields tutti.createBenthosBatch.help=createBenthosBatch.html +tutti.createIndividualObservationBatch.action.cancel.help= +tutti.createIndividualObservationBatch.action.save.help= tutti.createIndividualObservationBatch.field.individualObservationLengthStepCaracteristic.help= tutti.createIndividualObservationBatch.field.individualObservationSize.help= tutti.createIndividualObservationBatch.field.individualObservationSpecies.help= @@ -33,6 +43,8 @@ tutti.dbManager.action.openDb.help=dbManager.html\#actions tutti.dbManager.action.upgradeDb.help=dbManager.html\#actions tutti.dbManager.help=dbManager.html +tutti.editAccidentalBatch.action.createBatch.help= +tutti.editAccidentalBatch.action.removeBatch.help= tutti.editBenthosBatch.action.createBatch.help=editBenthosBatch.html\#fields tutti.editBenthosBatch.action.removeBatch.help=editBenthosBatch.html\#fields tutti.editBenthosBatch.action.renameBatch.help=editBenthosBatch.html\#fields Modified: trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties =================================================================== --- trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,13 @@ #Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo -#Tue Apr 09 12:35:56 CEST 2013 +#Thu Apr 11 16:29:39 CEST 2013 +tutti.createAccidentalBatch.action.cancel.help= +tutti.createAccidentalBatch.action.save.help= +tutti.createAccidentalBatch.field.accidentalDeadOrAlive.help= +tutti.createAccidentalBatch.field.accidentalGender.help= +tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic.help= +tutti.createAccidentalBatch.field.accidentalSize.help= +tutti.createAccidentalBatch.field.accidentalSpecies.help= +tutti.createAccidentalBatch.field.accidentalWeight.help= tutti.createBenthosBatch.action.addSpecies.help=createBenthosBatch.html\#actions tutti.createBenthosBatch.action.cancel.help=createBenthosBatch.html\#actions tutti.createBenthosBatch.action.save.help=createBenthosBatch.html\#actions @@ -7,6 +15,8 @@ tutti.createBenthosBatch.field.sortedUnsortedCategory.help=createBenthosBatch.html\#fields tutti.createBenthosBatch.field.species.help=createBenthosBatch.html\#fields tutti.createBenthosBatch.help=createBenthosBatch.html +tutti.createIndividualObservationBatch.action.cancel.help= +tutti.createIndividualObservationBatch.action.save.help= tutti.createIndividualObservationBatch.field.individualObservationLengthStepCaracteristic.help= tutti.createIndividualObservationBatch.field.individualObservationSize.help= tutti.createIndividualObservationBatch.field.individualObservationSpecies.help= @@ -33,6 +43,8 @@ tutti.dbManager.action.openDb.help=dbManager.html\#actions tutti.dbManager.action.upgradeDb.help=dbManager.html\#actions tutti.dbManager.help=dbManager.html +tutti.editAccidentalBatch.action.createBatch.help= +tutti.editAccidentalBatch.action.removeBatch.help= tutti.editBenthosBatch.action.createBatch.help=editBenthosBatch.html\#actions tutti.editBenthosBatch.action.createMelag.help=editBenthosBatch.html\#actions tutti.editBenthosBatch.action.removeBatch.help=editBenthosBatch.html\#actions Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java 2013-04-11 15:00:54 UTC (rev 766) @@ -560,9 +560,9 @@ ui.getSpeciesTabFishingOperationReminderLabel().setTitle(fishingOperationText); ui.getBenthosTabFishingOperationReminderLabel().setTitle(fishingOperationText); ui.getMarineLitterTabFishingOperationReminderLabel().setTitle(fishingOperationText); + ui.getAccidentalTabFishingOperationReminderLabel().setTitle(fishingOperationText); ui.getIndividualObservationTabFishingOperationReminderLabel().setTitle(fishingOperationText); // ui.getPlanktonTabFishingOperationReminderLabel().setTitle(fishingOperationText); -// ui.getAccidentalTabFishingOperationReminderLabel().setTitle(fishingOperationText); if (loadOtherTabs) { @@ -571,9 +571,9 @@ ui.getSpeciesTabContent().getHandler().selectFishingOperation(batch == null ? null : bean); ui.getBenthosTabContent().getHandler().selectFishingOperation(batch == null ? null : bean); ui.getMarineLitterTabContent().getHandler().selectFishingOperation(batch == null ? null : bean); + ui.getAccidentalTabContent().getHandler().selectFishingOperation(batch == null ? null : bean); ui.getIndividualObservationTabContent().getHandler().selectFishingOperation(batch == null ? null : bean); // ui.getPlanktonTabContent().getHandler().selectFishingOperation(bean); -// ui.getAccidentalTabContent().getHandler().selectFishingOperation(bean); } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css 2013-04-11 15:00:54 UTC (rev 766) @@ -72,6 +72,14 @@ rightDecoration: {marineLitterTabContent.getMarineLitterBatchTabToolBar()}; } +#accidentalTabFishingOperationReminderLabel { + rightDecoration: {accidentalTabContent.getAccidentalBatchTabToolBar()}; +} + +#individualObservationTabFishingOperationReminderLabel { + rightDecoration: {individualObservationTabContent.getIndividualObservationBatchTabToolBar()}; +} + #catchTable { border: {BorderFactory.createTitledBorder(_("tutti.editCatchBatch.legend.total"))}; } @@ -298,10 +306,14 @@ enabled: {false}; } -#accidentalTab { - enabled: {false}; +#accidentalTabPanel { + layout:{accidentalTabPanelLayout}; } +#accidentalTable { + border: {BorderFactory.createTitledBorder(_("tutti.editCatchBatch.legend.accidental"))}; +} + #individualObservationTabPanel { layout:{individualObservationTabPanelLayout}; } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx 2013-04-11 15:00:54 UTC (rev 766) @@ -29,6 +29,7 @@ fr.ifremer.tutti.ui.swing.content.operation.FishingOperationsUI fr.ifremer.tutti.ui.swing.content.operation.catches.accidental.AccidentalBatchUI + fr.ifremer.tutti.ui.swing.content.operation.catches.accidental.create.CreateAccidentalBatchUI fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.BenthosBatchUI fr.ifremer.tutti.ui.swing.content.operation.catches.marinelitter.MarineLitterBatchUI fr.ifremer.tutti.ui.swing.content.operation.catches.marinelitter.create.CreateMarineLitterBatchUI @@ -103,6 +104,9 @@ <CardLayout2Ext id='marineLitterTabPanelLayout' constructorParams='this, "marineLitterTabPanel"'/> + <CardLayout2Ext id='accidentalTabPanelLayout' + constructorParams='this, "accidentalTabPanel"'/> + <CardLayout2Ext id='individualObservationTabPanelLayout' constructorParams='this, "individualObservationTabPanel"'/> @@ -374,9 +378,17 @@ </tab> <tab id='accidentalTab' title='tutti.label.tab.accidentel'> - <!--JXTitledPanel id='accidentalTabFishingOperationReminderLabel'> - <AccidentalBatchUI id='accidentalTabContent' constructorParams='this'/> - </JXTitledPanel--> + <JPanel id='accidentalTabPanel'> + <JXTitledPanel id='accidentalTabFishingOperationReminderLabel' + constraints='EditCatchesUIHandler.MAIN_CARD'> + <AccidentalBatchUI id='accidentalTabContent' constructorParams='this'/> + </JXTitledPanel> + <JXTitledPanel id='accidentalTabCreateBatchReminderLabel' + constraints='EditCatchesUIHandler.CREATE_BATCH_CARD'> + <CreateAccidentalBatchUI id='accidentalTabCreateBatch' + constructorParams='this'/> + </JXTitledPanel> + </JPanel> </tab> <tab id='individualObservationTab' title='tutti.label.tab.individualObservation'> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java 2013-04-11 15:00:54 UTC (rev 766) @@ -140,7 +140,7 @@ closeUI(ui.getBenthosTabContent()); closeUI(ui.getMarineLitterTabContent()); // closeUI(ui.getPlanktonTabContent()); -// closeUI(ui.getAccidentalTabContent()); + closeUI(ui.getAccidentalTabContent()); } @Override @@ -435,4 +435,37 @@ } } + public void setAccidentalSelectedCard(String card) { + JPanel panel = ui.getAccidentalTabPanel(); + CardLayout2Ext layout = (CardLayout2Ext) panel.getLayout(); + if (!card.equals(layout.getSelected())) { + layout.setSelected(card); + + JPanel actionPanel = getUI().getCreateFishingOperationActions(); + if (MAIN_CARD.equals(card)) { + registerValidators(); + actionPanel.setVisible(true); + + } else { + actionPanel.setVisible(false); + TuttiUI tuttiUi = null; + JXTitledPanel titlePanel = null; + String title = ""; + + if (CREATE_BATCH_CARD.equals(card)) { + tuttiUi = ui.getAccidentalTabCreateBatch(); + titlePanel = ui.getAccidentalTabCreateBatchReminderLabel(); + title = n_("tutti.createAccidentalBatch.title"); + } + + if (tuttiUi != null) { + registerValidators(tuttiUi.getHandler().getValidator()); + } + if (titlePanel != null) { + titlePanel.setTitle(ui.getAccidentalTabCreateBatchReminderLabel().getTitle() + " - " + _(title)); + } + } + } + } + } \ No newline at end of file Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchRowModel.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchRowModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -25,11 +25,14 @@ */ import com.google.common.collect.Lists; +import fr.ifremer.tutti.persistence.entities.CaracteristicMap; import fr.ifremer.tutti.persistence.entities.TuttiBeanFactory; import fr.ifremer.tutti.persistence.entities.data.AccidentalBatch; import fr.ifremer.tutti.persistence.entities.data.AttachementObjectTypeEnum; import fr.ifremer.tutti.persistence.entities.data.Attachment; import fr.ifremer.tutti.persistence.entities.data.FishingOperation; +import fr.ifremer.tutti.persistence.entities.referential.Caracteristic; +import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue; import fr.ifremer.tutti.persistence.entities.referential.Species; import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel; import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware; @@ -45,7 +48,8 @@ * @author tchemit <chemit@codelutin.com> * @since 0.2 */ -public class AccidentalBatchRowModel extends AbstractTuttiBeanUIModel<AccidentalBatch, AccidentalBatchRowModel> implements AccidentalBatch, AttachmentModelAware { +public class AccidentalBatchRowModel extends AbstractTuttiBeanUIModel<AccidentalBatch, AccidentalBatchRowModel> + implements AttachmentModelAware, AccidentalBatch { private static final long serialVersionUID = 1L; @@ -58,27 +62,29 @@ TuttiBeanFactory.newAccidentalBatch(); /** - * Attachments. + * Attachments (should never be null). * * @since 0.2 */ - protected List<Attachment> attachment = Lists.newArrayList(); + protected final List<Attachment> attachment = Lists.newArrayList(); protected static final Binder<AccidentalBatch, AccidentalBatchRowModel> fromBeanBinder = BinderFactory.newBinder(AccidentalBatch.class, - AccidentalBatchRowModel.class); + AccidentalBatchRowModel.class); protected static final Binder<AccidentalBatchRowModel, AccidentalBatch> toBeanBinder = BinderFactory.newBinder(AccidentalBatchRowModel.class, - AccidentalBatch.class); + AccidentalBatch.class); public AccidentalBatchRowModel() { super(AccidentalBatch.class, fromBeanBinder, toBeanBinder); } - public AccidentalBatchRowModel(AccidentalBatch aBatch) { + public AccidentalBatchRowModel(AccidentalBatch aBatch, + List<Attachment> attachments) { this(); fromBean(aBatch); + this.attachment.addAll(attachments); } @Override @@ -87,10 +93,32 @@ } //------------------------------------------------------------------------// - //-- AccidentalBatch --// + //-- MarineLitterBatch --// //------------------------------------------------------------------------// @Override + public FishingOperation getFishingOperation() { + return editObject.getFishingOperation(); + } + + @Override + public void setFishingOperation(FishingOperation fishingOperation) { + editObject.setFishingOperation(fishingOperation); + } + + @Override + public Float getWeight() { + return editObject.getWeight(); + } + + @Override + public void setWeight(Float weight) { + Object oldValue = getWeight(); + editObject.setWeight(weight); + firePropertyChange(PROPERTY_WEIGHT, oldValue, weight); + } + + @Override public Species getSpecies() { return editObject.getSpecies(); } @@ -103,28 +131,54 @@ } @Override - public FishingOperation getFishingOperation() { - return editObject.getFishingOperation(); + public Float getSize() { + return editObject.getSize(); } @Override - public void setFishingOperation(FishingOperation fishingOperation) { - editObject.setFishingOperation(fishingOperation); + public void setSize(Float size) { + Object oldValue = getSize(); + editObject.setSize(size); + firePropertyChange(PROPERTY_SIZE, oldValue, size); } @Override - public Float getWeight() { - return editObject.getWeight(); + public Caracteristic getLengthStepCaracteristic() { + return editObject.getLengthStepCaracteristic(); } @Override - public void setWeight(Float weight) { - Object oldValue = getWeight(); - editObject.setWeight(weight); - firePropertyChange(PROPERTY_WEIGHT, oldValue, weight); + public void setLengthStepCaracteristic(Caracteristic lengthStepCaracteristic) { + Object oldValue = getLengthStepCaracteristic(); + editObject.setLengthStepCaracteristic(lengthStepCaracteristic); + firePropertyChange(PROPERTY_LENGTH_STEP_CARACTERISTIC, oldValue, lengthStepCaracteristic); } @Override + public CaracteristicQualitativeValue getGender() { + return editObject.getGender(); + } + + @Override + public void setGender(CaracteristicQualitativeValue gender) { + Object oldValue = getLengthStepCaracteristic(); + editObject.setGender(gender); + firePropertyChange(PROPERTY_GENDER, oldValue, gender); + } + + @Override + public CaracteristicQualitativeValue getDeadOrAlive() { + return editObject.getDeadOrAlive(); + } + + @Override + public void setDeadOrAlive(CaracteristicQualitativeValue deadOrAlive) { + Object oldValue = getLengthStepCaracteristic(); + editObject.setDeadOrAlive(deadOrAlive); + firePropertyChange(PROPERTY_DEAD_OR_ALIVE, oldValue, deadOrAlive); + } + + @Override public String getComment() { return editObject.getComment(); } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchTableModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchTableModel.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchTableModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -39,23 +39,38 @@ private static final long serialVersionUID = 1L; - public static final ColumnIdentifier<AccidentalBatchRowModel> SPECIES_BY_CODE = ColumnIdentifier.newId( - BenthosBatchRowModel.PROPERTY_SPECIES, - n_("tutti.editAccidentalBatch.table.header.speciesByCode"), - n_("tutti.editAccidentalBatch.table.header.speciesByCode.tip")); + public static final ColumnIdentifier<BenthosBatchRowModel> SPECIES = ColumnIdentifier.newId( + AccidentalBatchRowModel.PROPERTY_SPECIES, + n_("tutti.editAccidentalBatch.table.header.species"), + n_("tutti.editAccidentalBatch.table.header.species.tip")); - public static final ColumnIdentifier<AccidentalBatchRowModel> SPECIES_BY_GENUS_CODE = ColumnIdentifier.newId( - BenthosBatchRowModel.PROPERTY_SPECIES, - n_("tutti.editAccidentalBatch.table.header.speciesByGenusCode"), - n_("tutti.editAccidentalBatch.table.header.speciesByGenusCode.tip")); + public static final ColumnIdentifier<BenthosBatchRowModel> GENDER = ColumnIdentifier.newId( + AccidentalBatchRowModel.PROPERTY_GENDER, + n_("tutti.editAccidentalBatch.table.header.gender"), + n_("tutti.editAccidentalBatch.table.header.gender.tip")); - public static final ColumnIdentifier<AccidentalBatchRowModel> WEIGHT = ColumnIdentifier.newId( - BenthosBatchRowModel.PROPERTY_WEIGHT, + public static final ColumnIdentifier<BenthosBatchRowModel> WEIGHT = ColumnIdentifier.newId( + AccidentalBatchRowModel.PROPERTY_WEIGHT, n_("tutti.editAccidentalBatch.table.header.weight"), n_("tutti.editAccidentalBatch.table.header.weight.tip")); + public static final ColumnIdentifier<BenthosBatchRowModel> SIZE = ColumnIdentifier.newId( + AccidentalBatchRowModel.PROPERTY_SIZE, + n_("tutti.editAccidentalBatch.table.header.size"), + n_("tutti.editAccidentalBatch.table.header.size.tip")); + + public static final ColumnIdentifier<BenthosBatchRowModel> LENGTH_STEP_CARACTERISTIC = ColumnIdentifier.newId( + AccidentalBatchRowModel.PROPERTY_LENGTH_STEP_CARACTERISTIC, + n_("tutti.editAccidentalBatch.table.header.lengthStepCaracteristic"), + n_("tutti.editAccidentalBatch.table.header.lengthStepCaracteristic.tip")); + + public static final ColumnIdentifier<BenthosBatchRowModel> DEAD_OR_ALIVE = ColumnIdentifier.newId( + AccidentalBatchRowModel.PROPERTY_DEAD_OR_ALIVE, + n_("tutti.editAccidentalBatch.table.header.deadOrAlive"), + n_("tutti.editAccidentalBatch.table.header.deadOrAlive.tip")); + public static final ColumnIdentifier<AccidentalBatchRowModel> COMMENT = ColumnIdentifier.newId( - BenthosBatchRowModel.PROPERTY_COMMENT, + AccidentalBatchRowModel.PROPERTY_COMMENT, n_("tutti.editAccidentalBatch.table.header.comment"), n_("tutti.editAccidentalBatch.table.header.comment.tip")); @@ -66,7 +81,7 @@ public AccidentalBatchTableModel(TableColumnModelExt columnModel) { - super(columnModel, true, true); + super(columnModel, false, false); setNoneEditableCols(); } @@ -79,36 +94,4 @@ result.setValid(false); return result; } - - @Override - public void setValueAt(Object aValue, - int rowIndex, - int columnIndex, - ColumnIdentifier<AccidentalBatchRowModel> propertyName, - AccidentalBatchRowModel entry) { - super.setValueAt(aValue, rowIndex, columnIndex, propertyName, entry); - - if (propertyName == SPECIES_BY_CODE) { - - // update also other columns - fireTableCellUpdated(rowIndex, SPECIES_BY_GENUS_CODE); - - } else if (propertyName == SPECIES_BY_GENUS_CODE) { - - // update also other columns - fireTableCellUpdated(rowIndex, SPECIES_BY_CODE); - } - } - - @Override - protected boolean isCellEditable(int rowIndex, - int columnIndex, - ColumnIdentifier<AccidentalBatchRowModel> propertyName) { - - boolean result = super.isCellEditable(rowIndex, - columnIndex, - propertyName); - - return result; - } } \ No newline at end of file Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.css 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.css 2013-04-11 15:00:54 UTC (rev 766) @@ -33,9 +33,41 @@ _help: {"tuttihelp.editAccidentalBatch.help"}; } +#accidentalBatchTabToolBar { + floatable: false; + opaque: false; + borderPainted: false; +} + +#accidentalBatchAttachmentsButton { + enabled: {model.getObjectId() != null}; +} + +#tablePopup { + label: "tutti.editAccidentalBatch.title.batchActions"; +} + #table { selectionMode: {ListSelectionModel.SINGLE_SELECTION}; selectionBackground: {null}; selectionForeground: {Color.BLACK}; sortable: false; } + +#createAccidentalBatchButton { + actionIcon: batch-create; + text: "tutti.editAccidentalBatch.action.createBatch"; + toolTipText: "tutti.editAccidentalBatch.action.createBatch.tip"; + i18nMnemonic: "tutti.editAccidentalBatch.action.createBatch.mnemonic"; + _help: {"tutti.editAccidentalBatch.action.createBatch.help"}; +} + +#removeAccidentalBatchMenu { + actionIcon: batch-delete; + text: "tutti.editAccidentalBatch.action.removeBatch"; + toolTipText: "tutti.editAccidentalBatch.action.removeBatch.tip"; + i18nMnemonic: "tutti.editAccidentalBatch.action.removeBatch.mnemonic"; + _tuttiAction: {RemoveAccidentalBatchAction.class}; + enabled: {model.isRemoveBatchEnabled()}; + _help: {"tutti.editAccidentalBatch.action.removeBatch.help"}; +} Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.jaxx 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUI.jaxx 2013-04-11 15:00:54 UTC (rev 766) @@ -29,6 +29,7 @@ fr.ifremer.tutti.ui.swing.TuttiHelpBroker fr.ifremer.tutti.ui.swing.TuttiUIContext fr.ifremer.tutti.ui.swing.util.TuttiUI + fr.ifremer.tutti.ui.swing.util.attachment.ButtonAttachment jaxx.runtime.swing.editor.NumberEditor @@ -59,11 +60,42 @@ <AccidentalBatchUIModel id='model' initializer='getContextValue(AccidentalBatchUIModel.class)'/> + + <BeanValidator id='validator' bean='model' + uiClass='jaxx.runtime.validator.swing.ui.ImageValidationUI'> + </BeanValidator> + <TuttiHelpBroker id='broker' constructorParams='"tuttihelp.editAccidentalBatch.help"'/> + <JToolBar id='accidentalBatchTabToolBar'> + <ButtonAttachment id='accidentalBatchAttachmentsButton' + constructorParams='getHandler().getContext(), getModel()'/> + </JToolBar> + + <JPopupMenu id='tablePopup'> + <JMenuItem id='removeAccidentalBatchMenu'/> + </JPopupMenu> + + <Table id='form' fill='both' constraints='BorderLayout.NORTH'> + + <!-- Toolbar / Filter --> + <row> + <cell columns="2"> + <JPanel id='tableToolbar' layout='{new BorderLayout()}'> + <JPanel layout='{new GridLayout(1,0)}' + constraints='BorderLayout.WEST'> + <JButton id='createAccidentalBatchButton' + onActionPerformed='handler.createBatch()'/> + </JPanel> + </JPanel> + </cell> + </row> + </Table> + <JScrollPane id='tableScrollPane' constraints='BorderLayout.CENTER'> - <JXTable id='table'/> + <JXTable id='table' + onMouseClicked='handler.autoSelectRowInTable(event, tablePopup)'/> </JScrollPane> </JPanel> \ No newline at end of file Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIHandler.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIHandler.java 2013-04-11 15:00:54 UTC (rev 766) @@ -25,27 +25,46 @@ */ import com.google.common.collect.Lists; +import fr.ifremer.tutti.PropagatePropertyChangeListener; import fr.ifremer.tutti.persistence.entities.TuttiEntities; -import fr.ifremer.tutti.persistence.entities.data.AccidentalBatch; -import fr.ifremer.tutti.persistence.entities.data.Attachment; -import fr.ifremer.tutti.persistence.entities.data.FishingOperation; +import fr.ifremer.tutti.persistence.entities.data.*; +import fr.ifremer.tutti.persistence.entities.referential.Caracteristic; +import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue; import fr.ifremer.tutti.persistence.entities.referential.Species; +import fr.ifremer.tutti.service.DecoratorService; import fr.ifremer.tutti.ui.swing.content.operation.AbstractTuttiBatchTableUIHandler; +import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUI; +import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIHandler; import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIModel; +import fr.ifremer.tutti.ui.swing.content.operation.catches.accidental.create.CreateAccidentalBatchUI; +import fr.ifremer.tutti.ui.swing.content.operation.catches.accidental.create.CreateAccidentalBatchUIModel; +import fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation.IndividualObservationBatchRowModel; +import fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation.IndividualObservationBatchTableModel; +import fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation.IndividualObservationBatchUIModel; import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor; import fr.ifremer.tutti.ui.swing.util.TuttiUI; +import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil; import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellEditor; import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentCellRenderer; import fr.ifremer.tutti.ui.swing.util.comment.CommentCellEditor; import fr.ifremer.tutti.ui.swing.util.comment.CommentCellRenderer; +import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction; +import jaxx.runtime.SwingUtil; import jaxx.runtime.validator.swing.SwingValidator; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jdesktop.swingx.JXTable; +import org.jdesktop.swingx.decorator.ComponentAdapter; +import org.jdesktop.swingx.decorator.HighlightPredicate; +import org.jdesktop.swingx.decorator.Highlighter; import org.jdesktop.swingx.table.DefaultTableColumnModelExt; import org.nuiton.util.decorator.Decorator; import javax.swing.*; +import java.awt.*; +import java.util.Collection; import java.util.List; /** @@ -62,8 +81,13 @@ AccidentalBatchUI ui) { super(parentUi, ui, AccidentalBatchRowModel.PROPERTY_SPECIES, + AccidentalBatchRowModel.PROPERTY_GENDER, AccidentalBatchRowModel.PROPERTY_WEIGHT, - AccidentalBatchRowModel.PROPERTY_COMMENT); + AccidentalBatchRowModel.PROPERTY_SIZE, + AccidentalBatchRowModel.PROPERTY_LENGTH_STEP_CARACTERISTIC, + AccidentalBatchRowModel.PROPERTY_DEAD_OR_ALIVE, + AccidentalBatchRowModel.PROPERTY_COMMENT, + AccidentalBatchRowModel.PROPERTY_ATTACHMENT); } //------------------------------------------------------------------------// @@ -89,19 +113,24 @@ } rows = Lists.newArrayList(); - if (!TuttiEntities.isNew(bean)) { - List<AccidentalBatch> catches = - persistenceService.getAllAccidentalBatch(bean.getId()); - for (AccidentalBatch aBatch : catches) { - AccidentalBatchRowModel entry = - new AccidentalBatchRowModel(aBatch); - rows.add(entry); - } - } } model.setRows(rows); + recomputeBatchActionEnable(); } + protected AccidentalBatchRowModel loadBatch(AccidentalBatchRowModel aBatch) { + + Integer id = aBatch.getIdAsInt(); + + List<Attachment> attachments = + persistenceService.getAllAttachments(id); + + AccidentalBatchRowModel newRow = + new AccidentalBatchRowModel(aBatch, attachments); + + return newRow; + } + //------------------------------------------------------------------------// //-- AbstractTuttiTableUIHandler methods --// //------------------------------------------------------------------------// @@ -118,7 +147,7 @@ @Override protected boolean isRowValid(AccidentalBatchRowModel row) { - boolean result = row.getSpecies() != null && row.getWeight() != null; + boolean result = row.getSpecies() != null; return result; } @@ -130,41 +159,88 @@ Object newValue) { recomputeRowValidState(row); saveSelectedRowIfNeeded(); + + // when row valid state has changed, recompute action enabled states + recomputeBatchActionEnable(); } @Override protected void saveSelectedRowIfRequired(TuttiBeanMonitor<AccidentalBatchRowModel> rowMonitor, AccidentalBatchRowModel row) { - if (row.isValid()) { - // there is a valid bean attached to the monitor + if (row != null && row.isValid() && rowMonitor.wasModified()) { - if (rowMonitor.wasModified()) { + // monitored bean was modified, save it + if (log.isInfoEnabled()) { + log.info("Row " + row + " was modified, will save it"); + } - // monitored bean was modified, save it - if (log.isInfoEnabled()) { - log.info("Row " + row + " was modified, will save it"); - } + rowMonitor.setBean(null); + saveRow(row); + rowMonitor.setBean(row); - rowMonitor.setBean(null); - saveRow(row); - rowMonitor.setBean(row); + // clear modified flag on the monitor + rowMonitor.clearModified(); + } + } - // clear modified flag on the monitor - rowMonitor.clearModified(); - } - } else { + @Override + protected void onRowValidStateChanged(int rowIndex, + AccidentalBatchRowModel row, + Boolean oldValue, + Boolean newValue) { + super.onRowValidStateChanged(rowIndex, row, oldValue, newValue); - // row is not valid can not save it + // when row valid state has changed, recompute action enabled states + recomputeBatchActionEnable(); + } - AccidentalBatch catchBean = row.toBean(); + @Override + protected void onAfterSelectedRowChanged(int oldRowIndex, + AccidentalBatchRowModel oldRow, + int newRowIndex, + AccidentalBatchRowModel newRow) { + super.onAfterSelectedRowChanged(oldRowIndex, oldRow, newRowIndex, newRow); - if (!TuttiEntities.isNew(catchBean)) { + // when selected row has changed, recompute action enabled states + recomputeBatchActionEnable(); + } - // remove this - persistenceService.deleteAccidentalBatch(catchBean.getId()); - } - } + @Override + protected void addHighlighters(JXTable table) { + super.addHighlighters(table); + + // paint in a special color for comment cell (with not null value) + Color cellWithValueColor = getConfig().getColorCellWithValue(); + + Highlighter commentHighlighter = TuttiUIUtil.newBackgroundColorHighlighter( + new HighlightPredicate.AndHighlightPredicate( + new HighlightPredicate.IdentifierHighlightPredicate(IndividualObservationBatchTableModel.COMMENT), + // for not null value + new HighlightPredicate() { + @Override + public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { + String value = (String) adapter.getValue(); + return StringUtils.isNotBlank(value); + } + }), cellWithValueColor); + table.addHighlighter(commentHighlighter); + + // paint in a special color for attachment cell (when some attachments) + + Highlighter attachmentHighlighter = TuttiUIUtil.newBackgroundColorHighlighter( + new HighlightPredicate.AndHighlightPredicate( + new HighlightPredicate.IdentifierHighlightPredicate(IndividualObservationBatchTableModel.ATTACHMENT), + // for not null value + new HighlightPredicate() { + @Override + public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { + Collection attachments = (Collection) adapter.getValue(); + return CollectionUtils.isNotEmpty(attachments); + } + } + ), cellWithValueColor); + table.addHighlighter(attachmentHighlighter); } //------------------------------------------------------------------------// @@ -205,31 +281,31 @@ DefaultTableColumnModelExt columnModel = new DefaultTableColumnModelExt(); - List<Species> allSpecies = getDataContext().getSpecies(); + Decorator<CaracteristicQualitativeValue> caracteristicQualitativeValueDecorator = + getDecorator(CaracteristicQualitativeValue.class, null); { - // Species (by code) column + // Species column - Decorator<Species> decorator = getDecorator( - Species.class, null); + Decorator<Species> speciesDecorator = getDecorator( + Species.class, DecoratorService.FROM_PROTOCOL); + addComboDataColumnToModel(columnModel, + AccidentalBatchTableModel.SPECIES, + speciesDecorator, + getDataContext().getReferentSpecies()); - addComboDataColumnToModel(columnModel, - AccidentalBatchTableModel.SPECIES_BY_CODE, - decorator, allSpecies); } - { - // Species (by genusCode) column + { // Gender caracteristic column - Decorator<Species> decorator = getDecorator( - Species.class, null); - addComboDataColumnToModel(columnModel, - AccidentalBatchTableModel.SPECIES_BY_GENUS_CODE, - decorator, allSpecies); + AccidentalBatchTableModel.GENDER, + caracteristicQualitativeValueDecorator, + getDataContext().getGenderValues()); } + { // Weight column addFloatColumnToModel(columnModel, @@ -237,6 +313,32 @@ TuttiUI.DECIMAL3_PATTERN); } + { // Size column + + addFloatColumnToModel(columnModel, + AccidentalBatchTableModel.SIZE, + TuttiUI.DECIMAL3_PATTERN); + } + + { // Length step caracteristic column + Decorator<Caracteristic> caracteristicDecorator = + getDecorator(Caracteristic.class, null); + addComboDataColumnToModel(columnModel, + AccidentalBatchTableModel.LENGTH_STEP_CARACTERISTIC, + caracteristicDecorator, + getDataContext().getLengthStepCaracteristics()); + + } + + { // Dead or alive caracteristic column + + addComboDataColumnToModel(columnModel, + AccidentalBatchTableModel.DEAD_OR_ALIVE, + caracteristicQualitativeValueDecorator, + getDataContext().getDeadOrAliveValues()); + + } + { // Comment column addColumnToModel(columnModel, @@ -262,6 +364,7 @@ table.setColumnModel(columnModel); initBatchTable(table, columnModel, tableModel); + recomputeBatchActionEnable(); } @Override @@ -274,32 +377,78 @@ if (log.isDebugEnabled()) { log.debug("closing: " + ui); } + ui.getAccidentalBatchAttachmentsButton().onCloseUI(); } //------------------------------------------------------------------------// //-- Public methods --// //------------------------------------------------------------------------// + public void createBatch() { + EditCatchesUI parent = SwingUtil.getParentContainer(ui, EditCatchesUI.class); + CreateAccidentalBatchUI createBatchEditor = parent.getAccidentalTabCreateBatch(); + + createBatchEditor.getHandler().openUI(); + parent.getHandler().setAccidentalSelectedCard(EditCatchesUIHandler.CREATE_BATCH_CARD); + } + + public void addBatch(CreateAccidentalBatchUIModel model) { + if (model.isValid()) { + + AccidentalBatchTableModel tableModel = getTableModel(); + + AccidentalBatchRowModel newRow = tableModel.createNewRow(); + newRow.setSpecies(model.getSpecies()); + newRow.setWeight(model.getWeight()); + newRow.setSize(model.getSize()); + newRow.setLengthStepCaracteristic(model.getLengthStepCaracteristic()); + + recomputeRowValidState(newRow); + + saveRow(newRow); + + tableModel.addNewRow(newRow); + AbstractSelectTableAction.doSelectCell(getTable(), tableModel.getRowCount() - 1, 0); + } + + recomputeBatchActionEnable(); + } + //------------------------------------------------------------------------// //-- Internal methods --// //------------------------------------------------------------------------// - protected void saveRow(AccidentalBatchRowModel row) { + protected void recomputeBatchActionEnable() { - AccidentalBatch catchBean = row.toBean(); + int rowIndex = getTable().getSelectedRow(); - FishingOperation fishingOperation = getModel().getFishingOperation(); - catchBean.setFishingOperation(fishingOperation); - if (log.isInfoEnabled()) { - log.info("Selected fishingOperation: " + fishingOperation.getId()); - } + boolean enableRemove = false; - if (TuttiEntities.isNew(catchBean)) { + if (rowIndex != -1) { - catchBean = persistenceService.createAccidentalBatch(catchBean); - row.setId(catchBean.getId()); - } else { - persistenceService.saveAccidentalBatch(catchBean); + // there is a selected row + enableRemove = true; } + AccidentalBatchUIModel model = getModel(); + model.setRemoveBatchEnabled(enableRemove); } + + protected void saveRow(AccidentalBatchRowModel row) { + +// AccidentalBatch catchBean = row.toBean(); +// +// FishingOperation fishingOperation = getModel().getFishingOperation(); +// catchBean.setFishingOperation(fishingOperation); +// if (log.isInfoEnabled()) { +// log.info("Selected fishingOperation: " + fishingOperation.getId()); +// } +// +// if (TuttiEntities.isNew(catchBean)) { +// +// catchBean = persistenceService.createAccidentalBatch(catchBean); +// row.setId(catchBean.getId()); +// } else { +// persistenceService.saveAccidentalBatch(catchBean); +// } + } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIModel.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchUIModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -24,19 +24,135 @@ * #L% */ +import com.google.common.collect.Lists; +import fr.ifremer.tutti.persistence.entities.data.AttachementObjectTypeEnum; +import fr.ifremer.tutti.persistence.entities.data.Attachment; import fr.ifremer.tutti.ui.swing.content.operation.AbstractTuttiBatchUIModel; import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIModel; +import fr.ifremer.tutti.ui.swing.util.TabContentModel; +import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware; +import org.apache.commons.collections.CollectionUtils; +import java.util.Collection; +import java.util.List; + /** * @author tchemit <chemit@codelutin.com> * @since 0.2 */ -public class AccidentalBatchUIModel extends AbstractTuttiBatchUIModel<AccidentalBatchRowModel, AccidentalBatchUIModel> { +public class AccidentalBatchUIModel extends AbstractTuttiBatchUIModel<AccidentalBatchRowModel, AccidentalBatchUIModel> + implements AttachmentModelAware, TabContentModel { private static final long serialVersionUID = 1L; + public static final String PROPERTY_REMOVE_BATCH_ENABLED = "removeBatchEnabled"; + + protected final List<Attachment> attachment = Lists.newArrayList(); + + /** + * Can user remove a selected batch? + */ + protected boolean removeBatchEnabled; + + private String rootBatchId; + public AccidentalBatchUIModel(EditCatchesUIModel catchesUIModel) { super(catchesUIModel); } + public boolean isRemoveBatchEnabled() { + return removeBatchEnabled; + } + + public void setRemoveBatchEnabled(boolean removeBatchEnabled) { + Object oldValue = isRemoveBatchEnabled(); + this.removeBatchEnabled = removeBatchEnabled; + firePropertyChange(PROPERTY_REMOVE_BATCH_ENABLED, oldValue, removeBatchEnabled); + } + + public void setRootBatchId(String rootBatchId) { + String oldValue = getObjectId(); + this.rootBatchId = rootBatchId; + firePropertyChange(PROPERTY_OBJECT_ID, oldValue, getObjectId()); + } + + public String getRootBatchId() { + return rootBatchId; + } + + //------------------------------------------------------------------------// + //-- AttachmentModelAware --// + //------------------------------------------------------------------------// + + @Override + public AttachementObjectTypeEnum getObjectType() { + return AttachementObjectTypeEnum.CATCH_BATCH; + } + + @Override + public String getObjectId() { + return rootBatchId; + } + + @Override + public List<Attachment> getAttachment() { + return attachment; + } + + @Override + public void addAllAttachment(Collection<Attachment> attachments) { + this.attachment.addAll(attachments); + firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment()); + } + + @Override + public void addAttachment(Attachment attachment) { + this.attachment.add(attachment); + firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment()); + } + + @Override + public void removeAllAttachment(Collection<Attachment> attachments) { + this.attachment.removeAll(attachments); + firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment()); + } + + @Override + public void removeAttachment(Attachment attachment) { + this.attachment.remove(attachment); + firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment()); + } + + //------------------------------------------------------------------------// + //-- TabContentModel --// + //------------------------------------------------------------------------// + + @Override + public boolean isEmpty() { + boolean result = CollectionUtils.isEmpty(getAttachment()); + if (result && CollectionUtils.isNotEmpty(getRows())) { + + // check if every line is not valid + for (AccidentalBatchRowModel row : rows) { + if (row.isValid()) { + + // found a valid row so not empty + result = false; + break; + } + } + } + return result; + } + + @Override + public String getTitle() { + return "tutti.label.tab.accidental"; + } + + @Override + public String getIcon() { + return null; + } + } \ No newline at end of file Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/RemoveAccidentalBatchAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/RemoveAccidentalBatchAction.java (rev 0) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/RemoveAccidentalBatchAction.java 2013-04-11 15:00:54 UTC (rev 766) @@ -0,0 +1,103 @@ +package fr.ifremer.tutti.ui.swing.content.operation.catches.accidental; + +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import com.google.common.base.Preconditions; +import fr.ifremer.tutti.persistence.TuttiPersistence; +import fr.ifremer.tutti.persistence.entities.TuttiEntities; +import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction; +import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.jdesktop.swingx.JXTable; + +/** + * @author kmorin <kmorin@codelutin.com> + * @since 1.4 + */ +public class RemoveAccidentalBatchAction extends AbstractTuttiAction<AccidentalBatchUIModel, AccidentalBatchUI, AccidentalBatchUIHandler> { + + private static final Log log = + LogFactory.getLog(RemoveAccidentalBatchAction.class); + + public RemoveAccidentalBatchAction(AccidentalBatchUIHandler handler) { + super(handler, false); + } + + int rowIndex; + + @Override + protected void doAction() throws Exception { + + JXTable table = handler.getTable(); + + rowIndex = table.getSelectedRow(); + + Preconditions.checkState(rowIndex != -1, + "Cant remove batch if none is selected"); + + AccidentalBatchTableModel tableModel = handler.getTableModel(); + AccidentalBatchRowModel selectedBatch = tableModel.getEntry(rowIndex); + + boolean persisted = !TuttiEntities.isNew(selectedBatch); + + if (persisted) { + + // remove it from db + + String id = selectedBatch.getId(); + + if (log.isInfoEnabled()) { + log.info("Remove marineLitter with id: " + id); + } + + TuttiPersistence persistenceService = + getContext().getPersistenceService(); + +// persistenceService.deleteMarineLitterBatch(id); + } + } + + @Override + public void postSuccessAction() { + super.postSuccessAction(); + + JXTable table = handler.getTable(); + + AccidentalBatchTableModel tableModel = handler.getTableModel(); + + tableModel.removeRow(rowIndex); + + if (!tableModel.getRows().isEmpty()) { + + // select first row + AbstractSelectTableAction.doSelectCell(table, 0, 0); + } + + if (table.isEditing()) { + + // but no edit it + table.getCellEditor().stopCellEditing(); + } + } +} Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUI.css (rev 0) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUI.css 2013-04-11 15:00:54 UTC (rev 766) @@ -0,0 +1,129 @@ +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ +BeanFilterableComboBox { + showReset: true; + i18nPrefix: "tutti.property."; + bean: {model}; +} + +NumberEditor { + autoPopup: {handler.getConfig().isAutoPopupNumberEditor()}; + showPopupButton: {handler.getConfig().isShowNumberEditorButton()}; + showReset: true; +} + +#createAccidentalBatchTopPanel { + _help: {"tutti.createIndividualObservationBatch.help"}; +} + +#accidentalSpeciesLabel { + text: "tutti.createAccidentalBatch.field.accidentalSpecies"; + toolTipText: "tutti.createAccidentalBatch.field.accidentalSpecies.tip"; + labelFor: {accidentalSpeciesComboBox}; + _help: {"tutti.createAccidentalBatch.field.accidentalSpecies.help"}; +} + +#accidentalSpeciesComboBox { + property: species; + selectedItem: {model.getSpecies()}; +} + +#accidentalGenderLabel { + text: "tutti.createAccidentalBatch.field.accidentalGender"; + toolTipText: "tutti.createAccidentalBatch.field.accidentalGender.tip"; + labelFor: {accidentalGenderComboBox}; + _help: {"tutti.createAccidentalBatch.field.accidentalGender.help"}; +} + +#accidentalGenderComboBox { + property: gender; + selectedItem: {model.getGender()}; +} + +#accidentalWeightLabel { + text: "tutti.createAccidentalBatch.field.accidentalWeight"; + toolTipText: "tutti.createAccidentalBatch.field.accidentalWeight.tip"; + labelFor: {accidentalWeightField}; + _help: {"tutti.createAccidentalBatch.field.accidentalWeight.help"}; +} + +#accidentalWeightField { + property: weight; + useFloat: true; + numberPattern: {DECIMAL3_PATTERN}; + bean: {model}; +} + +#accidentalSizeLabel { + text: "tutti.createAccidentalBatch.field.accidentalSize"; + toolTipText: "tutti.createAccidentalBatch.field.accidentalSize.tip"; + labelFor: {accidentalSizeField}; + _help: {"tutti.createAccidentalBatch.field.accidentalSize.help"}; +} + +#accidentalSizeField { + property: size; + useFloat: true; + numberPattern: {DECIMAL3_PATTERN}; + bean: {model}; +} + +#accidentalLengthStepCaracteristicLabel { + text: "tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic"; + toolTipText: "tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic.tip"; + labelFor: {accidentalLengthStepCaracteristicComboBox}; + _help: {"tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic.help"}; +} + +#accidentalLengthStepCaracteristicComboBox { + property: lengthStepCaracteristic; + selectedItem: {model.getLengthStepCaracteristic()}; +} + +#accidentalDeadOrAliveLabel { + text: "tutti.createAccidentalBatch.field.accidentalDeadOrAlive"; + toolTipText: "tutti.createAccidentalBatch.field.accidentalDeadOrAlive.tip"; + labelFor: {accidentalDeadOrAliveComboBox}; + _help: {"tutti.createAccidentalBatch.field.accidentalDeadOrAlive.help"}; +} + +#accidentalDeadOrAliveComboBox { + property: deadOrAlive; + selectedItem: {model.getDeadOrAlive()}; +} + +#saveButton { + actionIcon: save; + text: "tutti.createAccidentalBatch.action.save"; + toolTipText: "tutti.createAccidentalBatch.action.save.tip"; + i18nMnemonic: "tutti.createAccidentalBatch.action.save.mnemonic"; + enabled: {model.isValid()}; + _help: {"tutti.createAccidentalBatch.action.save.help"}; +} + +#cancelButton { + actionIcon: cancel; + text: "tutti.createAccidentalBatch.action.cancel"; + toolTipText: "tutti.createAccidentalBatch.action.cancel.tip"; + i18nMnemonic: "tutti.createAccidentalBatch.action.cancel.mnemonic"; + _help: {"tutti.createAccidentalBatch.action.cancel.help"}; +} \ No newline at end of file Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUI.jaxx (rev 0) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUI.jaxx 2013-04-11 15:00:54 UTC (rev 766) @@ -0,0 +1,155 @@ +<!-- + #%L + Tutti :: UI + %% + Copyright (C) 2012 - 2013 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> +<JPanel id='createAccidentalBatchTopPanel' layout='{new BorderLayout()}' + decorator='help' + implements='fr.ifremer.tutti.ui.swing.util.TuttiUI<CreateAccidentalBatchUIModel, CreateAccidentalBatchUIHandler>'> + <import> + + fr.ifremer.tutti.persistence.entities.referential.Species + fr.ifremer.tutti.persistence.entities.referential.Caracteristic + fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue + + fr.ifremer.tutti.ui.swing.TuttiHelpBroker + fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUI + fr.ifremer.tutti.ui.swing.util.TuttiUI + + jaxx.runtime.swing.editor.bean.BeanFilterableComboBox + jaxx.runtime.swing.editor.NumberEditor + + static org.nuiton.i18n.I18n._ + </import> + + <script><![CDATA[ + +public CreateAccidentalBatchUI(EditCatchesUI parentUI) { + JAXXUtil.initContext(this, parentUI); + CreateAccidentalBatchUIHandler handler = new CreateAccidentalBatchUIHandler(parentUI, this); + setContextValue(handler); + handler.beforeInitUI(); +} + +protected void $afterCompleteSetup() { handler.afterInitUI(); } + ]]></script> + + <CreateAccidentalBatchUIHandler id='handler' + initializer='getContextValue(CreateAccidentalBatchUIHandler.class)'/> + + <CreateAccidentalBatchUIModel id='model' + initializer='getContextValue(CreateAccidentalBatchUIModel.class)'/> + + <BeanValidator id='validator' bean='model' + uiClass='jaxx.runtime.validator.swing.ui.ImageValidationUI'> + <field name='species' + component='accidentalSpeciesComboBox'/> + <field name='gender' + component='accidentalGenderComboBox'/> + <field name='weight' + component='accidentalWeightField'/> + <field name='size' + component='accidentalSizeField'/> + <field name='lengthStepCaracteristic' + component='accidentalLengthStepCaracteristicComboBox'/> + <field name='deadOrAlive' + component='accidentalDeadOrAliveComboBox'/> + </BeanValidator> + + <TuttiHelpBroker id='broker' + constructorParams='"tutti.createAccidentalBatch.help"'/> + + <Table id='configurationPanel' constraints='BorderLayout.CENTER' fill='both'> + + <!-- accidental species --> + <row> + <cell anchor='west'> + <JLabel id='accidentalSpeciesLabel'/> + </cell> + <cell weightx='1.0'> + <BeanFilterableComboBox id='accidentalSpeciesComboBox' + constructorParams='this' + genericType='Species'/> + </cell> + </row> + + <!-- accidental gender --> + <row> + <cell anchor='west'> + <JLabel id='accidentalGenderLabel'/> + </cell> + <cell weightx='1.0'> + <BeanFilterableComboBox id='accidentalGenderComboBox' + constructorParams='this' + genericType='CaracteristicQualitativeValue'/> + </cell> + </row> + + <!-- accidental weight --> + <row> + <cell anchor='west'> + <JLabel id='accidentalWeightLabel'/> + </cell> + <cell weightx='1.0' columns='2'> + <NumberEditor id='accidentalWeightField' constructorParams='this'/> + </cell> + </row> + + <!-- accidental size --> + <row> + <cell anchor='west'> + <JLabel id='accidentalSizeLabel'/> + </cell> + <cell weightx='1.0' columns='2'> + <NumberEditor id='accidentalSizeField' constructorParams='this'/> + </cell> + </row> + + <!-- accidental LengthStepCaracteristic --> + <row> + <cell anchor='west'> + <JLabel id='accidentalLengthStepCaracteristicLabel'/> + </cell> + <cell weightx='1.0' columns='2'> + <BeanFilterableComboBox id='accidentalLengthStepCaracteristicComboBox' + constructorParams='this' + genericType='Caracteristic'/> + </cell> + </row> + + <!-- accidental deadOrAlive --> + <row> + <cell anchor='west'> + <JLabel id='accidentalDeadOrAliveLabel'/> + </cell> + <cell weightx='1.0'> + <BeanFilterableComboBox id='accidentalDeadOrAliveComboBox' + constructorParams='this' + genericType='CaracteristicQualitativeValue'/> + </cell> + </row> + + </Table> + + <!-- Form Actions --> + <JPanel layout='{new GridLayout(1, 0)}' constraints='BorderLayout.SOUTH'> + <JButton id='cancelButton' onActionPerformed='handler.cancel()'/> + <JButton id='saveButton' onActionPerformed='handler.save()'/> + </JPanel> +</JPanel> \ No newline at end of file Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUIHandler.java (rev 0) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUIHandler.java 2013-04-11 15:00:54 UTC (rev 766) @@ -0,0 +1,173 @@ +package fr.ifremer.tutti.ui.swing.content.operation.catches.accidental.create; + +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ifremer.tutti.persistence.TuttiPersistence; +import fr.ifremer.tutti.persistence.entities.referential.Species; +import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUI; +import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIHandler; +import fr.ifremer.tutti.ui.swing.util.AbstractTuttiUIHandler; +import fr.ifremer.tutti.ui.swing.util.Cancelable; +import fr.ifremer.tutti.ui.swing.util.TuttiUI; +import fr.ifremer.tutti.ui.swing.util.species.SelectSpeciesUI; +import fr.ifremer.tutti.ui.swing.util.species.SelectSpeciesUIModel; +import jaxx.runtime.SwingUtil; +import jaxx.runtime.validator.swing.SwingValidator; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.swing.*; +import java.awt.*; +import java.util.List; + +/** + * @author kmorin <kmorin@codelutin.com> + */ +public class CreateAccidentalBatchUIHandler extends AbstractTuttiUIHandler<CreateAccidentalBatchUIModel, CreateAccidentalBatchUI> + implements Cancelable { + + private static final Log log = + LogFactory.getLog(CreateAccidentalBatchUIHandler.class); + + private final TuttiPersistence persistenceService; + + public CreateAccidentalBatchUIHandler(TuttiUI parentUi, + CreateAccidentalBatchUI ui) { + super(parentUi.getHandler().getContext(), ui); + this.persistenceService = context.getPersistenceService(); + } + + //------------------------------------------------------------------------// + //-- AbstractTuttiUIHandler methods --// + //------------------------------------------------------------------------// + + @Override + public void beforeInitUI() { + CreateAccidentalBatchUIModel model = new CreateAccidentalBatchUIModel(); + ui.setContextValue(model); + listModelIsModify(model); + } + + @Override + public void afterInitUI() { + + initUI(ui); + + initBeanFilterableComboBox(ui.getAccidentalSpeciesComboBox(), + getDataContext().getReferentSpecies(), + null); + + initBeanFilterableComboBox(ui.getAccidentalGenderComboBox(), + getDataContext().getGenderValues(), + null); + + initBeanFilterableComboBox(ui.getAccidentalLengthStepCaracteristicComboBox(), + getDataContext().getLengthStepCaracteristics(), + null); + + initBeanFilterableComboBox(ui.getAccidentalDeadOrAliveComboBox(), + getDataContext().getDeadOrAliveValues(), + null); + + listenValidatorValid(ui.getValidator(), getModel()); + } + + @Override + protected JComponent getComponentToFocus() { + return getUI().getAccidentalSpeciesComboBox(); + } + + @Override + public void onCloseUI() { + + if (log.isDebugEnabled()) { + log.debug("closing: " + ui); + } + + // evict model from validator + ui.getValidator().setBean(null); + + // when canceling always invalid model + getModel().setValid(false); + + EditCatchesUI parent = SwingUtil.getParentContainer(ui, EditCatchesUI.class); + parent.getHandler().setAccidentalSelectedCard(EditCatchesUIHandler.MAIN_CARD); + } + + @Override + public SwingValidator<CreateAccidentalBatchUIModel> getValidator() { + return ui.getValidator(); + } + + //------------------------------------------------------------------------// + //-- Cancelable methods --// + //------------------------------------------------------------------------// + + @Override + public void cancel() { + if (log.isInfoEnabled()) { + log.info("Cancel UI " + ui); + } + closeUI(ui); + } + + //------------------------------------------------------------------------// + //-- Public methods --// + //------------------------------------------------------------------------// + + public void openUI() { + + CreateAccidentalBatchUIModel model = getModel(); + + // connect model to validator + ui.getValidator().setBean(model); + + model.reset(); + + } + + public void save() { + + if (log.isInfoEnabled()) { + log.info("Save UI " + ui); + } + + EditCatchesUI parent = SwingUtil.getParentContainer(ui, EditCatchesUI.class); + parent.getAccidentalTabContent().getHandler().addBatch(getModel()); + + // close dialog + closeUI(ui); + } + + public Species openAddSpeciesDialog(String title, List<Species> species) { + SelectSpeciesUI dialogContent = new SelectSpeciesUI(ui); + SelectSpeciesUIModel model = dialogContent.getModel(); + model.setSelectedSpecies(null); + model.setSpecies(species); + + openDialog(dialogContent, title, new Dimension(400, 130)); + + Species result = model.getSelectedSpecies(); + return result; + } +} Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUIModel.java (rev 0) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/create/CreateAccidentalBatchUIModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -0,0 +1,127 @@ +package fr.ifremer.tutti.ui.swing.content.operation.catches.accidental.create; + +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import fr.ifremer.tutti.persistence.entities.TuttiBeanFactory; +import fr.ifremer.tutti.persistence.entities.data.AccidentalBatch; +import fr.ifremer.tutti.persistence.entities.data.IndividualObservationBatch; +import fr.ifremer.tutti.persistence.entities.referential.Caracteristic; +import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue; +import fr.ifremer.tutti.persistence.entities.referential.Species; +import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel; + +/** + * @author kmorin <kmorin@codelutin.com> + * @since 1.4 + */ +public class CreateAccidentalBatchUIModel extends AbstractTuttiBeanUIModel<CreateAccidentalBatchUIModel, CreateAccidentalBatchUIModel> { + + + private static final long serialVersionUID = 1L; + + /** + * Delegate edit object. + * + * @since 1.3 + */ + protected final AccidentalBatch editObject = + TuttiBeanFactory.newAccidentalBatch(); + + public CreateAccidentalBatchUIModel() { + super(CreateAccidentalBatchUIModel.class, null, null); + } + + public Species getSpecies() { + return editObject.getSpecies(); + } + + public void setSpecies(Species accidentalSpecies) { + Object oldValue = getSpecies(); + editObject.setSpecies(accidentalSpecies); + firePropertyChange(AccidentalBatch.PROPERTY_SPECIES, oldValue, accidentalSpecies); + } + + public CaracteristicQualitativeValue getGender() { + return editObject.getGender(); + } + + public void setGender(CaracteristicQualitativeValue accidentalGender) { + Object oldValue = getGender(); + editObject.setGender(accidentalGender); + firePropertyChange(AccidentalBatch.PROPERTY_GENDER, oldValue, accidentalGender); + } + + public Float getWeight() { + return editObject.getWeight(); + } + + public void setWeight(Float individualObservationWeight) { + Object oldValue = getWeight(); + editObject.setWeight(individualObservationWeight); + firePropertyChange(AccidentalBatch.PROPERTY_WEIGHT, oldValue, individualObservationWeight); + } + + public Float getSize() { + return editObject.getSize(); + } + + public void setSize(Float individualObservationSize) { + Object oldValue = getSize(); + editObject.setSize(individualObservationSize); + firePropertyChange(AccidentalBatch.PROPERTY_SIZE, oldValue, individualObservationSize); + } + + public Caracteristic getLengthStepCaracteristic() { + return editObject.getLengthStepCaracteristic(); + } + + public void setLengthStepCaracteristic(Caracteristic individualObservationLengthStepCaracteristic) { + Object oldValue = getLengthStepCaracteristic(); + editObject.setLengthStepCaracteristic(individualObservationLengthStepCaracteristic); + firePropertyChange(AccidentalBatch.PROPERTY_LENGTH_STEP_CARACTERISTIC, oldValue, individualObservationLengthStepCaracteristic); + } + + public CaracteristicQualitativeValue getDeadOrAlive() { + return editObject.getDeadOrAlive(); + } + + public void setDeadOrAlive(CaracteristicQualitativeValue accidentalDeadOrAlive) { + Object oldValue = getDeadOrAlive(); + editObject.setDeadOrAlive(accidentalDeadOrAlive); + firePropertyChange(AccidentalBatch.PROPERTY_DEAD_OR_ALIVE, oldValue, accidentalDeadOrAlive); + } + + @Override + protected CreateAccidentalBatchUIModel newEntity() { + return new CreateAccidentalBatchUIModel(); + } + + public void reset() { + setSpecies(null); + setGender(null); + setWeight(null); + setSize(null); + setLengthStepCaracteristic(null); + setDeadOrAlive(null); + } +} Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchRowModel.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchRowModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.collect.Lists; import fr.ifremer.tutti.persistence.entities.CaracteristicMap; import fr.ifremer.tutti.persistence.entities.TuttiBeanFactory; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchTableModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchTableModel.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchTableModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ifremer.tutti.ui.swing.content.operation.catches.marinelitter.MarineLitterBatchRowModel; import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableModel; import fr.ifremer.tutti.ui.swing.util.table.ColumnIdentifier; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUI.jaxx 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUI.jaxx 2013-04-11 15:00:54 UTC (rev 766) @@ -1,3 +1,24 @@ +<!-- + #%L + Tutti :: UI + %% + Copyright (C) 2012 - 2013 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> <JPanel id='editIndividualObservationBatchTopPanel' layout='{new BorderLayout()}' decorator='help' Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIHandler.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIHandler.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.collect.Lists; import fr.ifremer.tutti.PropagatePropertyChangeListener; import fr.ifremer.tutti.persistence.entities.TuttiEntities; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIModel.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/IndividualObservationBatchUIModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.collect.Lists; import fr.ifremer.tutti.persistence.entities.data.AttachementObjectTypeEnum; import fr.ifremer.tutti.persistence.entities.data.Attachment; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/RemoveIndividualObservationBatchAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/RemoveIndividualObservationBatchAction.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/RemoveIndividualObservationBatchAction.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.base.Preconditions; import fr.ifremer.tutti.persistence.TuttiPersistence; import fr.ifremer.tutti.persistence.entities.TuttiEntities; @@ -18,10 +40,8 @@ extends AbstractTuttiAction<IndividualObservationBatchUIModel, IndividualObservationBatchUI, IndividualObservationBatchUIHandler> { private static final Log log = - LogFactory.getLog(RemoveMarineLitterBatchAction.class); + LogFactory.getLog(RemoveIndividualObservationBatchAction.class); - protected RemoveSpeciesSubBatchAction removeSpeciesSubBatchAction; - public RemoveIndividualObservationBatchAction(IndividualObservationBatchUIHandler handler) { super(handler, false); } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapCellComponent.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapCellComponent.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapCellComponent.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation.caracteristics; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.base.Preconditions; import fr.ifremer.tutti.persistence.entities.CaracteristicMap; import fr.ifremer.tutti.persistence.entities.referential.Caracteristic; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorRowModel.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorRowModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation.caracteristics; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ifremer.tutti.ui.swing.content.operation.fishing.AbstractCaracteristicRowModel; /** Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorTableModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorTableModel.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorTableModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation.caracteristics; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableModel; import fr.ifremer.tutti.ui.swing.util.table.ColumnIdentifier; import org.jdesktop.swingx.table.TableColumnModelExt; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUI.css 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUI.css 2013-04-11 15:00:54 UTC (rev 766) @@ -1,3 +1,24 @@ +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ BeanFilterableComboBox { i18nPrefix: "tutti.property."; showReset: true; @@ -22,17 +43,17 @@ #cancelButton { actionIcon: cancel; - text: "tutti.editSpeciesFrequencies.action.cancel"; - toolTipText: "tutti.editSpeciesFrequencies.action.cancel.tip"; - i18nMnemonic: "tutti.editSpeciesFrequencies.action.cancel.mnemonic"; - _help: {"tutti.editSpeciesFrequencies.action.cancel.help"}; + text: "tutti.editIndividualObservationCaracteristics.action.cancel"; + toolTipText: "tutti.editIndividualObservationCaracteristics.action.cancel.tip"; + i18nMnemonic: "tutti.editIndividualObservationCaracteristics.action.cancel.mnemonic"; + _help: {"tutti.editIndividualObservationCaracteristics.action.cancel.help"}; } #saveButton { actionIcon: save; - text: "tutti.editSpeciesFrequencies.action.save"; - toolTipText: "tutti.editSpeciesFrequencies.action.save.tip"; - i18nMnemonic: "tutti.editSpeciesFrequencies.action.save.mnemonic"; + text: "tutti.editIndividualObservationCaracteristics.action.save"; + toolTipText: "tutti.editIndividualObservationCaracteristics.action.save.tip"; + i18nMnemonic: "tutti.editIndividualObservationCaracteristics.action.save.mnemonic"; enabled: {model.isValid()}; - _help: {"tutti.editSpeciesFrequencies.action.save.help"}; + _help: {"tutti.editIndividualObservationCaracteristics.action.save.help"}; } \ No newline at end of file Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUI.jaxx 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUI.jaxx 2013-04-11 15:00:54 UTC (rev 766) @@ -1,3 +1,24 @@ +<!-- + #%L + Tutti :: UI + %% + Copyright (C) 2012 - 2013 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> <Table implements='fr.ifremer.tutti.ui.swing.util.TuttiUI<CaracteristicMapEditorUIModel, CaracteristicMapEditorUIHandler>'> <import> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUIHandler.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUIHandler.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation.caracteristics; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import fr.ifremer.tutti.persistence.entities.CaracteristicMap; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUIModel.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/caracteristics/CaracteristicMapEditorUIModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation.caracteristics; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.base.Predicates; import com.google.common.collect.Iterables; import fr.ifremer.tutti.persistence.entities.CaracteristicMap; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUI.css 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUI.css 2013-04-11 15:00:54 UTC (rev 766) @@ -1,3 +1,24 @@ +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ BeanFilterableComboBox { showReset: true; i18nPrefix: "tutti.property."; @@ -68,17 +89,17 @@ #saveButton { actionIcon: save; - text: "tutti.createMarineLitterBatch.action.save"; - toolTipText: "tutti.createMarineLitterBatch.action.save.tip"; - i18nMnemonic: "tutti.createMarineLitterBatch.action.save.mnemonic"; + text: "tutti.createIndividualObservationBatch.action.save"; + toolTipText: "tutti.createIndividualObservationBatch.action.save.tip"; + i18nMnemonic: "tutti.createIndividualObservationBatch.action.save.mnemonic"; enabled: {model.isValid()}; - _help: {"tutti.createMarineLitterBatch.action.save.help"}; + _help: {"tutti.createIndividualObservationBatch.action.save.help"}; } #cancelButton { actionIcon: cancel; - text: "tutti.createMarineLitterBatch.action.cancel"; - toolTipText: "tutti.createMarineLitterBatch.action.cancel.tip"; - i18nMnemonic: "tutti.createMarineLitterBatch.action.cancel.mnemonic"; - _help: {"tutti.createMarineLitterBatch.action.cancel.help"}; + text: "tutti.createIndividualObservationBatch.action.cancel"; + toolTipText: "tutti.createIndividualObservationBatch.action.cancel.tip"; + i18nMnemonic: "tutti.createIndividualObservationBatch.action.cancel.mnemonic"; + _help: {"tutti.createIndividualObservationBatch.action.cancel.help"}; } \ No newline at end of file Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUI.jaxx 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUI.jaxx 2013-04-11 15:00:54 UTC (rev 766) @@ -1,3 +1,24 @@ +<!-- + #%L + Tutti :: UI + %% + Copyright (C) 2012 - 2013 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> <JPanel id='createIndividualObservationBatchTopPanel' layout='{new BorderLayout()}' decorator='help' implements='fr.ifremer.tutti.ui.swing.util.TuttiUI<CreateIndividualObservationBatchUIModel, CreateIndividualObservationBatchUIHandler>'> @@ -47,7 +68,7 @@ </BeanValidator> <TuttiHelpBroker id='broker' - constructorParams='"tutti.createMarineLitterBatch.help"'/> + constructorParams='"tutti.createIndividualObservationBatch.help"'/> <Table id='configurationPanel' constraints='BorderLayout.CENTER' fill='both'> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIHandler.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIHandler.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation.create; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ifremer.tutti.persistence.TuttiPersistence; import fr.ifremer.tutti.persistence.entities.referential.Caracteristic; import fr.ifremer.tutti.persistence.entities.referential.Species; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIModel.java 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIModel.java 2013-04-11 15:00:54 UTC (rev 766) @@ -1,5 +1,27 @@ package fr.ifremer.tutti.ui.swing.content.operation.catches.individualobservation.create; +/* + * #%L + * Tutti :: UI + * %% + * Copyright (C) 2012 - 2013 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ifremer.tutti.persistence.entities.TuttiBeanFactory; import fr.ifremer.tutti.persistence.entities.data.IndividualObservationBatch; import fr.ifremer.tutti.persistence.entities.referential.Caracteristic; Modified: trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIModel-error-validation.xml =================================================================== --- trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIModel-error-validation.xml 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/resources/fr/ifremer/tutti/ui/swing/content/operation/catches/individualobservation/create/CreateIndividualObservationBatchUIModel-error-validation.xml 2013-04-11 15:00:54 UTC (rev 766) @@ -1,4 +1,26 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + Tutti :: UI + %% + Copyright (C) 2012 - 2013 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> + <!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0.3//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties =================================================================== --- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-11 15:00:54 UTC (rev 766) @@ -103,6 +103,25 @@ tutti.config.option.weights.rate.difference.totalAndSorted.description= tutti.config.sampleOrder.title= tutti.config.title= +tutti.createAccidentalBatch.action.cancel= +tutti.createAccidentalBatch.action.cancel.mnemonic= +tutti.createAccidentalBatch.action.cancel.tip= +tutti.createAccidentalBatch.action.save= +tutti.createAccidentalBatch.action.save.mnemonic= +tutti.createAccidentalBatch.action.save.tip= +tutti.createAccidentalBatch.field.accidentalDeadOrAlive= +tutti.createAccidentalBatch.field.accidentalDeadOrAlive.tip= +tutti.createAccidentalBatch.field.accidentalGender= +tutti.createAccidentalBatch.field.accidentalGender.tip= +tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic= +tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic.tip= +tutti.createAccidentalBatch.field.accidentalSize= +tutti.createAccidentalBatch.field.accidentalSize.tip= +tutti.createAccidentalBatch.field.accidentalSpecies= +tutti.createAccidentalBatch.field.accidentalSpecies.tip= +tutti.createAccidentalBatch.field.accidentalWeight= +tutti.createAccidentalBatch.field.accidentalWeight.tip= +tutti.createAccidentalBatch.title= tutti.createBenthosBatch.action.addSpecies= tutti.createBenthosBatch.action.addSpecies.mnemonic= tutti.createBenthosBatch.action.addSpecies.tip= @@ -121,6 +140,12 @@ tutti.createBenthosBatch.title= tutti.createBenthosMelag.error.message= tutti.createBenthosMelag.error.title= +tutti.createIndividualObservationBatch.action.cancel= +tutti.createIndividualObservationBatch.action.cancel.mnemonic= +tutti.createIndividualObservationBatch.action.cancel.tip= +tutti.createIndividualObservationBatch.action.save= +tutti.createIndividualObservationBatch.action.save.mnemonic= +tutti.createIndividualObservationBatch.action.save.tip= tutti.createIndividualObservationBatch.field.individualObservationLengthStepCaracteristic= tutti.createIndividualObservationBatch.field.individualObservationLengthStepCaracteristic.tip= tutti.createIndividualObservationBatch.field.individualObservationSize= @@ -198,10 +223,26 @@ tutti.dbManager.info.no.db.loaded= tutti.dbManager.title.choose.dbExportFile= tutti.dbManager.title.choose.dbImportFile= +tutti.editAccidentalBatch.action.createBatch= +tutti.editAccidentalBatch.action.createBatch.mnemonic= +tutti.editAccidentalBatch.action.createBatch.tip= +tutti.editAccidentalBatch.action.removeBatch= +tutti.editAccidentalBatch.action.removeBatch.mnemonic= +tutti.editAccidentalBatch.action.removeBatch.tip= tutti.editAccidentalBatch.table.header.comment= tutti.editAccidentalBatch.table.header.comment.tip= +tutti.editAccidentalBatch.table.header.deadOrAlive= +tutti.editAccidentalBatch.table.header.deadOrAlive.tip= tutti.editAccidentalBatch.table.header.file= tutti.editAccidentalBatch.table.header.file.tip= +tutti.editAccidentalBatch.table.header.gender= +tutti.editAccidentalBatch.table.header.gender.tip= +tutti.editAccidentalBatch.table.header.lengthStepCaracteristic= +tutti.editAccidentalBatch.table.header.lengthStepCaracteristic.tip= +tutti.editAccidentalBatch.table.header.size= +tutti.editAccidentalBatch.table.header.size.tip= +tutti.editAccidentalBatch.table.header.species= +tutti.editAccidentalBatch.table.header.species.tip= tutti.editAccidentalBatch.table.header.speciesByCode= tutti.editAccidentalBatch.table.header.speciesByCode.tip= tutti.editAccidentalBatch.table.header.speciesByGenusCode= @@ -530,6 +571,12 @@ tutti.editIndividualObservationBatch.table.header.species.tip= tutti.editIndividualObservationBatch.table.header.weight= tutti.editIndividualObservationBatch.table.header.weight.tip= +tutti.editIndividualObservationCaracteristics.action.cancel= +tutti.editIndividualObservationCaracteristics.action.cancel.mnemonic= +tutti.editIndividualObservationCaracteristics.action.cancel.tip= +tutti.editIndividualObservationCaracteristics.action.save= +tutti.editIndividualObservationCaracteristics.action.save.mnemonic= +tutti.editIndividualObservationCaracteristics.action.save.tip= tutti.editMarineLitterBatch.action.createBatch= tutti.editMarineLitterBatch.action.createBatch.mnemonic= tutti.editMarineLitterBatch.action.createBatch.tip= Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties =================================================================== --- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-11 11:12:42 UTC (rev 765) +++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-11 15:00:54 UTC (rev 766) @@ -96,15 +96,34 @@ tutti.config.option.weights.rate.difference.totalAndSorted.description=Pourcentage de différence entre les Poids totaux VRAC triés et les poids totaux VRAC en dessous duquel on demande confirmation sur la saisie. tutti.config.sampleOrder.title=Catégorie d'échantillonnage tutti.config.title=Configuration +tutti.createAccidentalBatch.action.cancel=Annuler +tutti.createAccidentalBatch.action.cancel.mnemonic=A +tutti.createAccidentalBatch.action.cancel.tip=Annuler la création de la capture accidentelle +tutti.createAccidentalBatch.action.save=Enregistrer +tutti.createAccidentalBatch.action.save.mnemonic=E +tutti.createAccidentalBatch.action.save.tip=Enregister la capture accidentelle +tutti.createAccidentalBatch.field.accidentalDeadOrAlive=Mort ou vivant +tutti.createAccidentalBatch.field.accidentalDeadOrAlive.tip=L'animal a-t-il été remis à l'eau mort ou vivant ? +tutti.createAccidentalBatch.field.accidentalGender=Sexe +tutti.createAccidentalBatch.field.accidentalGender.tip=Sexe +tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic=Classe de taille +tutti.createAccidentalBatch.field.accidentalLengthStepCaracteristic.tip=Classe de taille +tutti.createAccidentalBatch.field.accidentalSize=Taille +tutti.createAccidentalBatch.field.accidentalSize.tip=Taille +tutti.createAccidentalBatch.field.accidentalSpecies=Espèce +tutti.createAccidentalBatch.field.accidentalSpecies.tip=Espèce +tutti.createAccidentalBatch.field.accidentalWeight=Poids (kg) +tutti.createAccidentalBatch.field.accidentalWeight.tip=Poids (kg) +tutti.createAccidentalBatch.title=Créer une capture accidentelle tutti.createBenthosBatch.action.addSpecies=... tutti.createBenthosBatch.action.addSpecies.mnemonic=. tutti.createBenthosBatch.action.addSpecies.tip=Sélectionner une autre espèce tutti.createBenthosBatch.action.cancel=Annuler tutti.createBenthosBatch.action.cancel.mnemonic=A -tutti.createBenthosBatch.action.cancel.tip=Annuler la création du lôt espèce +tutti.createBenthosBatch.action.cancel.tip=Annuler la création du lot espèce tutti.createBenthosBatch.action.save=Enregistrer tutti.createBenthosBatch.action.save.mnemonic=E -tutti.createBenthosBatch.action.save.tip=Enregister la création du lôt espèce +tutti.createBenthosBatch.action.save.tip=Enregister la création du lot espèce tutti.createBenthosBatch.field.batchWeight=Poids du lot (kg) tutti.createBenthosBatch.field.batchWeight.tip= tutti.createBenthosBatch.field.sortedUnsortedCategory=V / HV @@ -122,37 +141,43 @@ tutti.createBenthosMelag.error.title=Erreur tutti.createBenthosMelag.message=Combien pesait le MELAG (kg) ? tutti.createBenthosMelag.title=Poids du MELAG (kg) +tutti.createIndividualObservationBatch.action.cancel=Annuler +tutti.createIndividualObservationBatch.action.cancel.mnemonic=A +tutti.createIndividualObservationBatch.action.cancel.tip=Annuler la création de l'observation individuelle +tutti.createIndividualObservationBatch.action.save=Enregistrer +tutti.createIndividualObservationBatch.action.save.mnemonic=E +tutti.createIndividualObservationBatch.action.save.tip=Enregistrer l'observation individuelle tutti.createIndividualObservationBatch.field.individualObservationLengthStepCaracteristic=Classe de taille tutti.createIndividualObservationBatch.field.individualObservationLengthStepCaracteristic.tip=Classe de taille tutti.createIndividualObservationBatch.field.individualObservationSize=Taille tutti.createIndividualObservationBatch.field.individualObservationSize.tip=Taille tutti.createIndividualObservationBatch.field.individualObservationSpecies=Espèce tutti.createIndividualObservationBatch.field.individualObservationSpecies.tip=Espèce -tutti.createIndividualObservationBatch.field.individualObservationWeight=Poids +tutti.createIndividualObservationBatch.field.individualObservationWeight=Poids (g) tutti.createIndividualObservationBatch.field.individualObservationWeight.tip=Poids tutti.createIndividualObservationBatch.title=Créer une observation tutti.createMarineLitterBatch.action.cancel=Annuler tutti.createMarineLitterBatch.action.cancel.mnemonic=A -tutti.createMarineLitterBatch.action.cancel.tip=Annuler la création du lôt macro-déchet +tutti.createMarineLitterBatch.action.cancel.tip=Annuler la création du lot macro-déchet tutti.createMarineLitterBatch.action.save=Enregistrer tutti.createMarineLitterBatch.action.save.mnemonic=E -tutti.createMarineLitterBatch.action.save.tip=Enregistrer la création du lôt macro-déchet +tutti.createMarineLitterBatch.action.save.tip=Enregistrer la création du lot macro-déchet tutti.createMarineLitterBatch.field.marineLitterCategory=Catégorie de déchets tutti.createMarineLitterBatch.field.marineLitterCategory.tip= tutti.createMarineLitterBatch.field.marineLitterSizeCategory=Catégorie de taille tutti.createMarineLitterBatch.field.marineLitterSizeCategory.tip= tutti.createMarineLitterBatch.field.number=Nombre tutti.createMarineLitterBatch.field.number.tip= -tutti.createMarineLitterBatch.title=Créer un lôt +tutti.createMarineLitterBatch.title=Créer un lot tutti.createSpeciesBatch.action.addSpecies=... tutti.createSpeciesBatch.action.addSpecies.mnemonic=. tutti.createSpeciesBatch.action.addSpecies.tip=Sélectionner une autre espèce tutti.createSpeciesBatch.action.cancel=Annuler tutti.createSpeciesBatch.action.cancel.mnemonic=A -tutti.createSpeciesBatch.action.cancel.tip=Annuler la création du lôt espèce +tutti.createSpeciesBatch.action.cancel.tip=Annuler la création du lot espèce tutti.createSpeciesBatch.action.save=Enregistrer tutti.createSpeciesBatch.action.save.mnemonic=E -tutti.createSpeciesBatch.action.save.tip=Enregister la création du lôt espèce +tutti.createSpeciesBatch.action.save.tip=Enregister la création du lot espèce tutti.createSpeciesBatch.field.batchWeight=Poids du lot (kg) tutti.createSpeciesBatch.field.batchWeight.tip= tutti.createSpeciesBatch.field.sortedUnsortedCategory=V / HV @@ -199,16 +224,28 @@ tutti.dbManager.info.no.db.loaded=Tutti possède une base mais elle n'est pas actuellement ouverte. tutti.dbManager.title.choose.dbExportFile=Exporter la base de données tutti.dbManager.title.choose.dbImportFile=Importer la base de données +tutti.editAccidentalBatch.action.createBatch=Créer une capture accidentelle +tutti.editAccidentalBatch.action.createBatch.mnemonic=C +tutti.editAccidentalBatch.action.createBatch.tip=Créer une capture accidentelle +tutti.editAccidentalBatch.action.removeBatch=Supprimer la capture courante +tutti.editAccidentalBatch.action.removeBatch.mnemonic=S +tutti.editAccidentalBatch.action.removeBatch.tip=Supprimer la capture courante (celle de la ligne sélectionnée) tutti.editAccidentalBatch.table.header.comment=Commentaire -tutti.editAccidentalBatch.table.header.comment.tip= +tutti.editAccidentalBatch.table.header.comment.tip=Commentaire +tutti.editAccidentalBatch.table.header.deadOrAlive=Mort ou vivant +tutti.editAccidentalBatch.table.header.deadOrAlive.tip=L'animal a-t-il été remis à l'eau mort ou vivant ? tutti.editAccidentalBatch.table.header.file=Pièces-jointes -tutti.editAccidentalBatch.table.header.file.tip= -tutti.editAccidentalBatch.table.header.speciesByCode=Espèce -tutti.editAccidentalBatch.table.header.speciesByCode.tip= -tutti.editAccidentalBatch.table.header.speciesByGenusCode=Espèce -tutti.editAccidentalBatch.table.header.speciesByGenusCode.tip= -tutti.editAccidentalBatch.table.header.weight=Poids observé -tutti.editAccidentalBatch.table.header.weight.tip= +tutti.editAccidentalBatch.table.header.file.tip=Pièces-jointes +tutti.editAccidentalBatch.table.header.gender=Sexe +tutti.editAccidentalBatch.table.header.gender.tip=Sexe (Male, femelle, autre...) +tutti.editAccidentalBatch.table.header.lengthStepCaracteristic=Classe de taille +tutti.editAccidentalBatch.table.header.lengthStepCaracteristic.tip=Classe de taille +tutti.editAccidentalBatch.table.header.size=Taille +tutti.editAccidentalBatch.table.header.size.tip=Taille (l'unité dépend de la classe de taille) +tutti.editAccidentalBatch.table.header.species=Espèce +tutti.editAccidentalBatch.table.header.species.tip=Espèce +tutti.editAccidentalBatch.table.header.weight=Poids observé (kg) +tutti.editAccidentalBatch.table.header.weight.tip=Poids observé tutti.editBenthosBatch.action.createBatch=Créer un lot pour une espèce tutti.editBenthosBatch.action.createBatch.mnemonic=C tutti.editBenthosBatch.action.createBatch.tip=Créer un nouveau lot pour une espèce @@ -534,8 +571,14 @@ tutti.editIndividualObservationBatch.table.header.size.tip=Taille tutti.editIndividualObservationBatch.table.header.species=Espèce tutti.editIndividualObservationBatch.table.header.species.tip=Espèce -tutti.editIndividualObservationBatch.table.header.weight=Poids -tutti.editIndividualObservationBatch.table.header.weight.tip=Poids (Kg) +tutti.editIndividualObservationBatch.table.header.weight=Poids (g) +tutti.editIndividualObservationBatch.table.header.weight.tip=Poids (g) +tutti.editIndividualObservationCaracteristics.action.cancel=Annuler +tutti.editIndividualObservationCaracteristics.action.cancel.mnemonic=A +tutti.editIndividualObservationCaracteristics.action.cancel.tip=Annuler l'édition des caractéristiques de l'observation +tutti.editIndividualObservationCaracteristics.action.save=Enregistrer +tutti.editIndividualObservationCaracteristics.action.save.mnemonic=E +tutti.editIndividualObservationCaracteristics.action.save.tip=Enregistrer les caractéristiques de l'observation tutti.editMarineLitterBatch.action.createBatch=Créer un lot de déchet tutti.editMarineLitterBatch.action.createBatch.mnemonic=C tutti.editMarineLitterBatch.action.createBatch.tip=Créer un nouveau lot de déchet
participants (1)
-
kmorin@users.forge.codelutin.com