Author: tchemit Date: 2013-01-02 11:58:52 +0100 (Wed, 02 Jan 2013) New Revision: 141 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/141 Log: adding species sample category Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryType.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/FrequencyCellComponent.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryType.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryType.java 2013-01-02 10:14:19 UTC (rev 140) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SampleCategoryType.java 2013-01-02 10:58:52 UTC (rev 141) @@ -38,6 +38,9 @@ * @since 0.3 */ public enum SampleCategoryType implements DecoratorService.LabelAware { + species( + n_("tutti.sampleCategoryType.species"), + null), sortedUnsorted( n_("tutti.sampleCategoryType.sortedUnsorted"), SampleCategoryEnum.sortedUnsorted), Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java 2013-01-02 10:14:19 UTC (rev 140) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java 2013-01-02 10:58:52 UTC (rev 141) @@ -49,10 +49,14 @@ private static final long serialVersionUID = 1L; - public static final String PROPERTY_SPECIES = "species"; - public static final String PROPERTY_SPECIES_TO_CONFIRM = "speciesToConfirm"; + public static final String PROPERTY_SPECIES_SAMPLE_CATEGORY = "speciesSampleCategory"; + + public static final String PROPERTY_SPECIES_CATEGORY = "speciesCategory"; + + public static final String PROPERTY_SPECIES_CATEGORY_WEIGHT = "speciesCategoryWeight"; + public static final String PROPERTY_SORTED_UNSORTED_SAMPLE_CATEGORY = "sortedUnsortedSampleCategory"; public static final String PROPERTY_SORTED_UNSORTED_CATEGORY = "sortedUnsortedCategory"; @@ -106,6 +110,13 @@ public static final String PROPERTY_BATCH_ROOT = "batchRoot"; /** + * Species category. + * + * @since 0.2 + */ + protected final SampleCategory<Species> speciesSampleCategory; + + /** * Is catch is vrac or horsVrac?. * * @since 0.2 @@ -230,6 +241,7 @@ public SpeciesBatchRowModel() { super(SpeciesBatch.class, fromBeanBinder, toBeanBinder); frequency = Lists.newArrayList(); + speciesSampleCategory = SampleCategory.newSample(SampleCategoryType.species); sortedUnsortedSampleCategory = SampleCategory.newSample(SampleCategoryType.sortedUnsorted); sizeSampleCategory = SampleCategory.newSample(SampleCategoryType.size); sexSampleCategory = SampleCategory.newSample(SampleCategoryType.sex); @@ -245,52 +257,42 @@ SpeciesFrequencyRowModel.fromBeans(frequencies); frequency.addAll(frequencyRows); Collections.sort(frequency); - updateTotalFromFrequencies(); } - public void updateTotalFromFrequencies() { - Float totalNumber = null; - Float totalWeight = null; - if (CollectionUtils.isNotEmpty(frequency)) { - totalNumber = 0f; - totalWeight = 0f; - for (SpeciesFrequencyRowModel frequencyModel : frequency) { - totalNumber += frequencyModel.getNumber(); - Float w = frequencyModel.getWeight(); - if (w == null) { + //------------------------------------------------------------------------// + //-- Species category --// + //------------------------------------------------------------------------// - // can't sum when a null value appears - totalWeight = null; - } else if (totalWeight != null) { + public SampleCategory<Species> getSpeciesSampleCategory() { + return speciesSampleCategory; + } - // still can sum weights - totalWeight += w; - } - } - } - - setComputedNumber(totalNumber); - setComputedWeight(totalWeight); + public Species getSpeciesCategory() { + return speciesSampleCategory.getCategoryValue(); } - public Species getSpecies() { - return species; + public void setSpeciesCategory(Species speciesCategory) { + Object oldValue = getSpeciesCategory(); + speciesSampleCategory.setCategoryValue(speciesCategory); + firePropertyChange(PROPERTY_SPECIES_CATEGORY, oldValue, speciesCategory); } - public void setSpecies(Species species) { - Object oldValue = getSpecies(); - this.species = species; - firePropertyChange(PROPERTY_SPECIES, oldValue, species); + public Float getSpeciesCategoryWeight() { + return speciesSampleCategory.getCategoryWeight(); } - public Boolean getSpeciesToConfirm() { - return speciesToConfirm; + public void setSpeciesCategoryWeight(Float speciesCategoryWeight) { + Object oldValue = getSpeciesCategoryWeight(); + speciesSampleCategory.setCategoryWeight(speciesCategoryWeight); + firePropertyChange(PROPERTY_SPECIES_CATEGORY_WEIGHT, oldValue, speciesCategoryWeight); } - public void setSpeciesToConfirm(Boolean speciesToConfirm) { - Object oldValue = getSpeciesToConfirm(); - this.speciesToConfirm = speciesToConfirm; - firePropertyChange(PROPERTY_SPECIES_TO_CONFIRM, oldValue, speciesToConfirm); + //------------------------------------------------------------------------// + //-- SortedUnsorted category --// + //------------------------------------------------------------------------// + + public SampleCategory<CaracteristicQualitativeValue> getSortedUnsortedSampleCategory() { + return sortedUnsortedSampleCategory; } public CaracteristicQualitativeValue getSortedUnsortedCategory() { @@ -313,6 +315,14 @@ firePropertyChange(PROPERTY_SORTED_UNSORTED_CATEGORY_WEIGHT, oldValue, sortedUnsortedCategoryWeight); } + //------------------------------------------------------------------------// + //-- Size category --// + //------------------------------------------------------------------------// + + public SampleCategory<CaracteristicQualitativeValue> getSizeSampleCategory() { + return sizeSampleCategory; + } + public CaracteristicQualitativeValue getSizeCategory() { return sizeSampleCategory.getCategoryValue(); } @@ -333,6 +343,14 @@ firePropertyChange(PROPERTY_SIZE_CATEGORY_WEIGHT, oldValue, sizeCategoryWeight); } + //------------------------------------------------------------------------// + //-- Sex category --// + //------------------------------------------------------------------------// + + public SampleCategory<CaracteristicQualitativeValue> getSexSampleCategory() { + return sexSampleCategory; + } + public CaracteristicQualitativeValue getSexCategory() { return sexSampleCategory.getCategoryValue(); } @@ -353,6 +371,14 @@ firePropertyChange(PROPERTY_SEX_CATEGORY_WEIGHT, oldValue, sexCategoryWeight); } + //------------------------------------------------------------------------// + //-- Maturity category --// + //------------------------------------------------------------------------// + + public SampleCategory<CaracteristicQualitativeValue> getMaturitySampleCategory() { + return maturitySampleCategory; + } + public CaracteristicQualitativeValue getMaturityCategory() { return maturitySampleCategory.getCategoryValue(); } @@ -373,6 +399,14 @@ firePropertyChange(PROPERTY_MATURITY_CATEGORY_WEIGHT, oldValue, maturityCategoryWeight); } + //------------------------------------------------------------------------// + //-- Age category --// + //------------------------------------------------------------------------// + + public SampleCategory<Float> getAgeSampleCategory() { + return ageSampleCategory; + } + public Float getAgeCategory() { return ageSampleCategory.getCategoryValue(); } @@ -393,6 +427,54 @@ firePropertyChange(PROPERTY_AGE_CATEGORY_WEIGHT, oldValue, ageCategoryWeight); } + //------------------------------------------------------------------------// + //-- Navigation properties --// + //------------------------------------------------------------------------// + + public SpeciesBatchRowModel getBatchParent() { + return batchParent; + } + + public void setBatchParent(SpeciesBatchRowModel batchParent) { + Object oldValue = getBatchParent(); + this.batchParent = batchParent; + firePropertyChange(PROPERTY_BATCH_PARENT, oldValue, batchParent); + firePropertyChange(PROPERTY_BATCH_ROOT, null, isBatchRoot()); + } + + public List<SpeciesBatchRowModel> getBatchChild() { + return batchChild; + } + + public void setChilds(List<SpeciesBatchRowModel> batchChild) { + this.batchChild = batchChild; + // force to propagate child changes + firePropertyChange(PROPERTY_BATCH_CHILD, null, batchChild); + firePropertyChange(PROPERTY_BATCH_LEAF, null, isBatchLeaf()); + } + + public boolean isBatchLeaf() { + return CollectionUtils.isEmpty(batchChild); + } + + public boolean isBatchRoot() { + return batchParent == null; + } + + //------------------------------------------------------------------------// + //-- Other properties --// + //------------------------------------------------------------------------// + + public Boolean getSpeciesToConfirm() { + return speciesToConfirm; + } + + public void setSpeciesToConfirm(Boolean speciesToConfirm) { + Object oldValue = getSpeciesToConfirm(); + this.speciesToConfirm = speciesToConfirm; + firePropertyChange(PROPERTY_SPECIES_TO_CONFIRM, oldValue, speciesToConfirm); + } + public Float getWeight() { return weight; } @@ -443,36 +525,6 @@ firePropertyChange(PROPERTY_FREQUENCY, null, frequency); } - public SpeciesBatchRowModel getBatchParent() { - return batchParent; - } - - public void setBatchParent(SpeciesBatchRowModel batchParent) { - Object oldValue = getBatchParent(); - this.batchParent = batchParent; - firePropertyChange(PROPERTY_BATCH_PARENT, oldValue, batchParent); - firePropertyChange(PROPERTY_BATCH_ROOT, null, isBatchRoot()); - } - - public List<SpeciesBatchRowModel> getBatchChild() { - return batchChild; - } - - public void setChilds(List<SpeciesBatchRowModel> batchChild) { - this.batchChild = batchChild; - // force to propagate child changes - firePropertyChange(PROPERTY_BATCH_CHILD, null, batchChild); - firePropertyChange(PROPERTY_BATCH_LEAF, null, isBatchLeaf()); - } - - public boolean isBatchLeaf() { - return CollectionUtils.isEmpty(batchChild); - } - - public boolean isBatchRoot() { - return batchParent == null; - } - public Float getComputedWeight() { return computedWeight; } @@ -495,23 +547,4 @@ computedNumber); } - public SampleCategory<CaracteristicQualitativeValue> getSortedUnsortedSampleCategory() { - return sortedUnsortedSampleCategory; - } - - public SampleCategory<CaracteristicQualitativeValue> getSizeSampleCategory() { - return sizeSampleCategory; - } - - public SampleCategory<CaracteristicQualitativeValue> getSexSampleCategory() { - return sexSampleCategory; - } - - public SampleCategory<CaracteristicQualitativeValue> getMaturitySampleCategory() { - return maturitySampleCategory; - } - - public SampleCategory<Float> getAgeSampleCategory() { - return ageSampleCategory; - } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java 2013-01-02 10:14:19 UTC (rev 140) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java 2013-01-02 10:58:52 UTC (rev 141) @@ -72,16 +72,12 @@ } } - public static final ColumnIdentifier<SpeciesBatchRowModel> SPECIES_BY_CODE = ColumnIdentifier.newId( - SpeciesBatchRowModel.PROPERTY_SPECIES, - n_("tutti.table.species.batch.header.speciesByCode"), - n_("tutti.table.species.batch.header.speciesByCode")); + public static final ColumnIdentifier<SpeciesBatchRowModel> SPECIES_CATEGORY = SampleColumnIdentifier.newId( + SpeciesBatchRowModel.PROPERTY_SPECIES_SAMPLE_CATEGORY, + SpeciesBatchRowModel.PROPERTY_SPECIES_CATEGORY_WEIGHT, + n_("tutti.table.species.batch.header.speciesCategory"), + n_("tutti.table.species.batch.header.speciesCategory")); - public static final ColumnIdentifier<SpeciesBatchRowModel> SPECIES_BY_GENUS_CODE = ColumnIdentifier.newId( - SpeciesBatchRowModel.PROPERTY_SPECIES, - n_("tutti.table.species.batch.header.speciesByGenusCode"), - n_("tutti.table.species.batch.header.speciesByGenusCode")); - public static final ColumnIdentifier<SpeciesBatchRowModel> SORTED_UNSORTED_CATEGORY = SampleColumnIdentifier.newId( SpeciesBatchRowModel.PROPERTY_SORTED_UNSORTED_SAMPLE_CATEGORY, SpeciesBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY_WEIGHT, @@ -155,12 +151,13 @@ super(columnModel, false, false); setNoneEditableCols(); -// setNoneEditableCols(SAMPLE_WEIGHT, SAMPLING_RATIO); + noneEditableColIfNoSpecies = Sets.newHashSet(); noneEditableColIfNoSpecies.add(COMPUTED_NUMBER); noneEditableColIfNoSpecies.add(COMPUTED_WEIGHT); sampleCols = Sets.newHashSet(); + sampleCols.add(SPECIES_CATEGORY); sampleCols.add(SORTED_UNSORTED_CATEGORY); sampleCols.add(SIZE_CATEGORY); sampleCols.add(SEX_CATEGORY); @@ -190,24 +187,9 @@ super.setValueAt(aValue, rowIndex, columnIndex, propertyName, entry); } - if (propertyName == SPECIES_BY_CODE) { + if (propertyName == COMPUTED_NUMBER) { // update also other columns - fireTableCellUpdated(rowIndex, - SPECIES_BY_GENUS_CODE, - COMPUTED_NUMBER, - COMPUTED_WEIGHT); - - } else if (propertyName == SPECIES_BY_GENUS_CODE) { - - // update also other columns - fireTableCellUpdated(rowIndex, - SPECIES_BY_CODE, - COMPUTED_NUMBER, - COMPUTED_WEIGHT); - } else if (propertyName == COMPUTED_NUMBER) { - - // update also other columns fireTableCellUpdated(rowIndex, COMPUTED_WEIGHT); } else if (propertyName == COMPUTED_WEIGHT) { @@ -238,7 +220,7 @@ // must have filled a species to edit this column SpeciesBatchRowModel entry = getEntry(rowIndex); - result = entry.getSpecies() != null; + result = entry.isValid() && entry.isBatchLeaf(); } else if (sampleCols.contains(propertyName)) { // can only edit if a category value is setted Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-01-02 10:14:19 UTC (rev 140) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-01-02 10:58:52 UTC (rev 141) @@ -89,7 +89,7 @@ SpeciesBatchRowModel.PROPERTY_WEIGHT); public static final Set<String> SAMPLING_PROPERTIES = Sets.newHashSet( - SpeciesBatchRowModel.PROPERTY_SPECIES, + SpeciesBatchRowModel.PROPERTY_SPECIES_CATEGORY, SpeciesBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY, SpeciesBatchRowModel.PROPERTY_SIZE_CATEGORY, SpeciesBatchRowModel.PROPERTY_SEX_CATEGORY, @@ -113,7 +113,8 @@ SpeciesBatchUI ui) { super(parentUi, SpeciesBatchRowModel.PROPERTY_SPECIES_TO_CONFIRM, - SpeciesBatchRowModel.PROPERTY_SPECIES, + SpeciesBatchRowModel.PROPERTY_SPECIES_CATEGORY, + SpeciesBatchRowModel.PROPERTY_SPECIES_CATEGORY_WEIGHT, SpeciesBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY, SpeciesBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY_WEIGHT, SpeciesBatchRowModel.PROPERTY_SIZE_CATEGORY, @@ -170,7 +171,7 @@ SpeciesBatchRowModel entry = new SpeciesBatchRowModel(aBatch, frequencies); rows.add(entry); - speciesUsed.add(entry.getSpecies()); + speciesUsed.add(entry.getSpeciesCategory()); } availableSpecies.removeAll(speciesUsed); } @@ -197,20 +198,12 @@ @Override protected boolean isRowValid(SpeciesBatchRowModel row) { - boolean result = row.getSpecies() != null; - if (result) { - result = row.getWeight() != null; - - if (!result) { - - // No weight filled, so at least one sample category must be valid - result = row.getSortedUnsortedSampleCategory().isValid() || + boolean result = row.getSpeciesSampleCategory().isValid() || + row.getSortedUnsortedSampleCategory().isValid() || row.getSizeSampleCategory().isValid() || row.getSexSampleCategory().isValid() || row.getMaturitySampleCategory().isValid() || row.getAgeSampleCategory().isValid(); - } - } return result; } @@ -415,26 +408,16 @@ Decorator<CaracteristicQualitativeValue> caracteristicDecorator = getDecorator(CaracteristicQualitativeValue.class, null); - { // Species (by code) column + { // SpeciesCategory column - Decorator<Species> decorator = getDecorator( - Species.class, DecoratorService.SPECIES_BY_CODE); + Decorator<Species> decorator = getDecorator(Species.class, null); - addComboDataColumnToModel(columnModel, - SpeciesBatchTableModel.SPECIES_BY_CODE, - decorator, allSpecies); + addSampleCategoryColumnToModel(columnModel, + SpeciesBatchTableModel.SPECIES_CATEGORY, + caracteristicDecorator, + defaultRenderer); } - { // Species (by genusCode) column - - Decorator<Species> decorator = getDecorator( - Species.class, DecoratorService.SPECIES_BY_GENUS); - - addComboDataColumnToModel(columnModel, - SpeciesBatchTableModel.SPECIES_BY_GENUS_CODE, - decorator, allSpecies); - } - { // SortedUnsortedCategory column addSampleCategoryColumnToModel(columnModel, @@ -611,8 +594,8 @@ SpeciesBatchTableModel tableModel = getTableModel(); SpeciesBatchRowModel newRow = tableModel.createNewRow(); - newRow.setSpecies(createModel.getSpecies()); - newRow.setWeight(createModel.getBatchWeight()); + newRow.setSpeciesCategory(createModel.getSpecies()); + newRow.setSexCategoryWeight(createModel.getBatchWeight()); recomputeRowValidState(newRow); @@ -621,7 +604,7 @@ saveRow(newRow); // update available species list - getModel().getAvailableSpecies().remove(newRow.getSpecies()); + getModel().getAvailableSpecies().remove(newRow.getSpeciesCategory()); } @@ -675,7 +658,7 @@ // can keep this row SpeciesBatchRowModel newBatch = tableModel.createNewRow(); - newBatch.setSpecies(parentBatch.getSpecies()); + newBatch.setSpeciesCategory(parentBatch.getSpeciesCategory()); newBatch.setSpeciesToConfirm(parentBatch.getSpeciesToConfirm()); if (selectedCategory == SampleCategoryType.sortedUnsorted) { newBatch.setSortedUnsortedCategory((CaracteristicQualitativeValue) row.getCategoryValue()); @@ -787,6 +770,33 @@ return speciesFrequencyEditor; } + public void updateTotalFromFrequencies(SpeciesBatchRowModel row) { + Float totalNumber = null; + Float totalWeight = null; + List<SpeciesFrequencyRowModel> frequency = row.getFrequency(); + + if (CollectionUtils.isNotEmpty(frequency)) { + totalNumber = 0f; + totalWeight = 0f; + for (SpeciesFrequencyRowModel frequencyModel : frequency) { + totalNumber += frequencyModel.getNumber(); + Float w = frequencyModel.getWeight(); + if (w == null) { + + // can't sum when a null value appears + totalWeight = null; + } else if (totalWeight != null) { + + // still can sum weights + totalWeight += w; + } + } + } + + row.setComputedNumber(totalNumber); + row.setComputedWeight(totalWeight); + } + //------------------------------------------------------------------------// //-- Internal methods --// //------------------------------------------------------------------------// Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/FrequencyCellComponent.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/FrequencyCellComponent.java 2013-01-02 10:14:19 UTC (rev 140) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/FrequencyCellComponent.java 2013-01-02 10:58:52 UTC (rev 141) @@ -29,6 +29,7 @@ import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchRowModel; import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchTableModel; import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchUI; +import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchUIHandler; import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction; import fr.ifremer.tutti.ui.swing.util.table.ColumnIdentifier; import jaxx.runtime.SwingUtil; @@ -137,15 +138,16 @@ log.info("Will edit frequencies for row: " + rowIndex); } + SpeciesBatchUIHandler handler = ui.getHandler(); SpeciesFrequencyUI frequencyEditor = - ui.getHandler().getSpeciesFrequencyEditor(); + handler.getSpeciesFrequencyEditor(); frequencyEditor.editBatch(editRow); // open frequency dialog - ui.getHandler().openDialog(ui, - frequencyEditor, - _("tutti.title.frequency"), - ui.getPreferredSize()); + handler.openDialog(ui, + frequencyEditor, + _("tutti.title.frequency"), + ui.getPreferredSize()); SpeciesFrequencyUIModel frequencyModel = frequencyEditor.getModel(); @@ -171,7 +173,8 @@ // push back to batch editRow.setFrequency(frequency); - editRow.updateTotalFromFrequencies(); + // update frequencies total + handler.updateTotalFromFrequencies(editRow); } frequencyEditor.editBatch(null); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java 2013-01-02 10:14:19 UTC (rev 140) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java 2013-01-02 10:58:52 UTC (rev 141) @@ -38,7 +38,7 @@ * @since 0.3 */ public class SplitSpeciesBatchUIModel - extends AbstractTuttiTableUIModel<SpeciesBatchRowModel, SplitSpeciesBatchRowModel, SplitSpeciesBatchUIModel> { + extends AbstractTuttiTableUIModel<SpeciesBatchRowModel, SplitSpeciesBatchRowModel, SplitSpeciesBatchUIModel> { private static final long serialVersionUID = 1L; @@ -111,7 +111,7 @@ } public Species getSpecies() { - return batch == null ? null : batch.getSpecies(); + return batch == null ? null : batch.getSpeciesCategory(); } public List<SampleCategoryType> getCategory() { 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-01-02 10:14:19 UTC (rev 140) +++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-01-02 10:58:52 UTC (rev 141) @@ -172,6 +172,7 @@ tutti.sampleCategoryType.sex=Sexe tutti.sampleCategoryType.size=Class Tri. tutti.sampleCategoryType.sortedUnsorted=V/HV +tutti.sampleCategoryType.species=Espèce tutti.table.accidental.batch.header.comment=Commentaire tutti.table.accidental.batch.header.file=Pièces-jointes tutti.table.accidental.batch.header.speciesByCode=Espèce @@ -226,6 +227,7 @@ tutti.table.species.batch.header.sortedUnsortedCategory=Vrac / Hors Vrac tutti.table.species.batch.header.speciesByCode=Espèce tutti.table.species.batch.header.speciesByGenusCode=Espèce +tutti.table.species.batch.header.speciesCategory= tutti.table.species.batch.header.toConfirm=A Confirmer tutti.table.species.batch.header.weight=Poids tutti.table.species.frequency.header.computedWeight=Poids calculé
participants (1)
-
tchemit@users.forge.codelutin.com