r723 - in trunk/tutti-ui-swing/src/main: filtered-resources java/fr/ifremer/tutti/ui/swing/content/operation java/fr/ifremer/tutti/ui/swing/content/operation/catches java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton java/fr/ifremer/tutti/ui/swing/content/operation/catches/spec
Author: tchemit Date: 2013-04-03 20:25:40 +0200 (Wed, 03 Apr 2013) New Revision: 723 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/723 Log: - fix speciesToConfirm (Species and Benthos) - refs #1865: [MACRODECHET] - Gestion de la saisie des Macrod?\195?\169chets (contienu on ui) - remove CommentModelAware - continue to refactor models (using entity contract?\195?\160 Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/RemoveMarineLitterBatchAction.java Removed: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentModelAware.java Modified: 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/benthos/BenthosBatchRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchTableModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchTableModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchTableModel.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/SpeciesBatchUI.jaxx 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/SpeciesBatchUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/ButtonComment.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellEditor.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUIHandler.java 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-ui-swing/src/main/filtered-resources/tutti-help-en.properties =================================================================== --- trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-en.properties 2013-04-03 18:25:40 UTC (rev 723) @@ -1,28 +1,5 @@ -### -# #%L -# Tutti :: UI -# $Id$ -# $HeadURL$ -# %% -# 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% -### #Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo -#Fri Mar 29 10:09:57 CET 2013 +#Wed Apr 03 18:09:43 CEST 2013 tutti.createBenthosBatch.action.addSpecies.help=createBenthosBatch.html\#actions tutti.createBenthosBatch.action.cancel.help=createBenthosBatch.html\#actions tutti.createBenthosBatch.action.save.help=createBenthosBatch.html\#actions @@ -141,6 +118,7 @@ tutti.editFishingOperation.field.trawlDistance.help=editFishingOperation.html\#fields tutti.editFishingOperation.field.vessel.help=editFishingOperation.html\#fields tutti.editFishingOperation.help=editFishingOperation.html +tutti.editMarineLitterBatch.field.marineLitterTotalWeight.help= tutti.editProgram.action.cancelProgram.help=editProgram.html\#actions tutti.editProgram.action.saveProgram.help=editProgram.html\#actions tutti.editProgram.field.description.help=editProgram.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-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/filtered-resources/tutti-help-fr.properties 2013-04-03 18:25:40 UTC (rev 723) @@ -1,28 +1,5 @@ -### -# #%L -# Tutti :: UI -# $Id$ -# $HeadURL$ -# %% -# 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% -### #Generated by org.nuiton.jaxx.plugin.GenerateHelpIdsMojo -#Fri Mar 29 10:09:57 CET 2013 +#Wed Apr 03 18:09:43 CEST 2013 tutti.createBenthosBatch.action.addSpecies.help=createBenthosBatch.html\#actions tutti.createBenthosBatch.action.cancel.help=createBenthosBatch.html\#actions tutti.createBenthosBatch.action.save.help=createBenthosBatch.html\#actions @@ -150,6 +127,7 @@ tutti.editFishingOperation.field.trawlDistance.help=editFishingOperation.html\#fields tutti.editFishingOperation.field.vessel.help=editFishingOperation.html\#fields tutti.editFishingOperation.help=editFishingOperation.html +tutti.editMarineLitterBatch.field.marineLitterTotalWeight.help= tutti.editProgram.action.cancelProgram.help=editProgram.html\#actions tutti.editProgram.action.saveProgram.help=editProgram.html\#actions tutti.editProgram.field.description.help=editProgram.html\#fields 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-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationAction.java 2013-04-03 18:25:40 UTC (rev 723) @@ -559,8 +559,8 @@ ui.getCatchesCaracteristicsTabPane().setTitle(fishingOperationText); ui.getSpeciesTabFishingOperationReminderLabel().setTitle(fishingOperationText); ui.getBenthosTabFishingOperationReminderLabel().setTitle(fishingOperationText); + ui.getMarineLitterTabFishingOperationReminderLabel().setTitle(fishingOperationText); // ui.getPlanktonTabFishingOperationReminderLabel().setTitle(fishingOperationText); -// ui.getMarineLitterTabFishingOperationReminderLabel().setTitle(fishingOperationText); // ui.getAccidentalTabFishingOperationReminderLabel().setTitle(fishingOperationText); if (loadOtherTabs) { @@ -569,8 +569,8 @@ 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.getPlanktonTabContent().getHandler().selectFishingOperation(bean); -// ui.getMarineLitterTabContent().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-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css 2013-04-03 18:25:40 UTC (rev 723) @@ -68,6 +68,10 @@ rightDecoration: {benthosTabContent.getBenthosBatchTabToolBar()}; } +#marineLitterTabFishingOperationReminderLabel { + rightDecoration: {marineLitterTabContent.getMarineLitterBatchTabToolBar()}; +} + #catchTable { border: {BorderFactory.createTitledBorder(_("tutti.editCatchBatch.legend.total"))}; } @@ -263,7 +267,6 @@ _computed: true; } - #marineLitterTable { border: {BorderFactory.createTitledBorder(_("tutti.editCatchBatch.legend.marineLitter"))}; } @@ -277,17 +280,16 @@ } #marineLitterTotalWeightField { - _computed: true; + property: marineLitterTotalWeight; + model: {model.getMarineLitterTotalWeight()}; + useFloat: false; + numberPattern: {INT_6_DIGITS_PATTERN}; } #planktonTab { enabled: {false}; } -#marineLitterTab { - enabled: {false}; -} - #accidentalTab { enabled: {false}; } 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-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx 2013-04-03 18:25:40 UTC (rev 723) @@ -30,6 +30,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.benthos.BenthosBatchUI + fr.ifremer.tutti.ui.swing.content.operation.catches.marinelitter.MarineLitterBatchUI fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.frequency.BenthosFrequencyUI fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.create.CreateBenthosBatchUI fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.split.SplitBenthosBatchUI @@ -75,10 +76,7 @@ <BeanValidator id='validator' bean='model' uiClass='jaxx.runtime.validator.swing.ui.ImageValidationUI'> <field name='catchTotalWeight' component='catchTotalWeightField'/> - <!-- <field name='catchTotalSortedTremisWeight' - component='catchTotalSortedTremisWeightField'/> - <field name='catchTotalSortedCarousselWeight' - component='catchTotalSortedCarousselWeightField'/>--> + <field name='catchTotalRejectedWeight' component='catchTotalRejectedWeightField'/> @@ -288,7 +286,8 @@ <JLabel id='marineLitterTotalWeightLabel'/> </cell> <cell weightx='1.0'> - <JTextField id='marineLitterTotalWeightField'/> + <NumberEditor id='marineLitterTotalWeightField' + constructorParams='this'/> </cell> </row> @@ -347,16 +346,18 @@ </JXTitledPanel> </JPanel> </tab> + <tab id='marineLitterTab' title='tutti.label.tab.marineLitter'> + <JXTitledPanel id='marineLitterTabFishingOperationReminderLabel'> + <MarineLitterBatchUI id='marineLitterTabContent' + constructorParams='this'/> + </JXTitledPanel> + </tab> <tab id='planktonTab' title='tutti.label.tab.plancton'> <!--JXTitledPanel id='planktonTabFishingOperationReminderLabel'> <PlanktonBatchUI id='planktonTabContent' constructorParams='this'/> </JXTitledPanel--> </tab> - <tab id='marineLitterTab' title='tutti.label.tab.marineLitter'> - <!--JXTitledPanel id='marineLitterTabFishingOperationReminderLabel'> - <MarineLitterBatchUI id='marineLitterTabContent' constructorParams='this'/> - </JXTitledPanel--> - </tab> + <tab id='accidentalTab' title='tutti.label.tab.accidentel'> <!--JXTitledPanel id='accidentalTabFishingOperationReminderLabel'> <AccidentalBatchUI id='accidentalTabContent' constructorParams='this'/> 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-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java 2013-04-03 18:25:40 UTC (rev 723) @@ -86,6 +86,7 @@ super(parentUi.getHandler().getContext(), ui); this.parentUi = parentUi; this.catchBatchMonitor = new TuttiBeanMonitor<EditCatchesUIModel>( + EditCatchesUIModel.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT, EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_INERT_WEIGHT, EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_LIVING_NOT_ITEMIZED_WEIGHT, @@ -120,6 +121,7 @@ setCustomTab(0, model); setCustomTab(1, ui.getSpeciesTabContent().getModel()); setCustomTab(2, ui.getBenthosTabContent().getModel()); + setCustomTab(3, ui.getMarineLitterTabContent().getModel()); getParentUi().getFishingOperationTabContent().getModel() .addPropertyChangeListener(EditFishingOperationUIModel.PROPERTY_VESSEL, new PropertyChangeListener() { @@ -141,8 +143,8 @@ // close batches tabs, then general tab closeUI(ui.getSpeciesTabContent()); closeUI(ui.getBenthosTabContent()); + closeUI(ui.getMarineLitterTabContent()); // closeUI(ui.getPlanktonTabContent()); -// closeUI(ui.getMarineLitterTabContent()); // closeUI(ui.getAccidentalTabContent()); } @@ -185,6 +187,7 @@ ui.getCatchesCaracteristicsAttachmentsButton().onCloseUI(); ui.getSpeciesTabContent().getSpeciesBatchAttachmentsButton().onCloseUI(); ui.getBenthosTabContent().getBenthosBatchAttachmentsButton().onCloseUI(); + ui.getMarineLitterTabContent().getMarineLitterBatchAttachmentsButton().onCloseUI(); return super.onTabChanged(currentIndex, newIndex); } @@ -194,6 +197,7 @@ ui.getCatchesCaracteristicsAttachmentsButton().onCloseUI(); ui.getSpeciesTabContent().getSpeciesBatchAttachmentsButton().onCloseUI(); ui.getBenthosTabContent().getBenthosBatchAttachmentsButton().onCloseUI(); + ui.getMarineLitterTabContent().getMarineLitterBatchAttachmentsButton().onCloseUI(); //FIXME 20130203 kmorin: cannot change tab if model is modified // (I do not even know why it is set to modified and have no time // before the demo) @@ -275,7 +279,9 @@ protected void registerValidators() { registerValidators(getValidator(), ui.getSpeciesTabContent().getHandler().getValidator(), - ui.getBenthosTabContent().getHandler().getValidator()); + ui.getBenthosTabContent().getHandler().getValidator(), + ui.getMarineLitterTabContent().getHandler().getValidator() + ); } public void setSpeciesSelectedCard(String card) { @@ -293,20 +299,24 @@ TuttiUI tuttiUi = null; JXTitledPanel titlePanel = null; String title = ""; - if (CREATE_BATCH_CARD.equals(card)) { - tuttiUi = ui.getSpeciesTabCreateBatch(); - titlePanel = ui.getSpeciesTabCreateBatchReminderLabel(); - title = n_("tutti.createSpeciesBatch.title"); + switch (card) { + case CREATE_BATCH_CARD: + tuttiUi = ui.getSpeciesTabCreateBatch(); + titlePanel = ui.getSpeciesTabCreateBatchReminderLabel(); + title = n_("tutti.createSpeciesBatch.title"); - } else if (SPLIT_BATCH_CARD.equals(card)) { - tuttiUi = ui.getSpeciesTabSplitBatch(); - titlePanel = ui.getSpeciesTabSplitBatchReminderLabel(); - title = n_("tutti.splitSpeciesBatch.title"); + break; + case SPLIT_BATCH_CARD: + tuttiUi = ui.getSpeciesTabSplitBatch(); + titlePanel = ui.getSpeciesTabSplitBatchReminderLabel(); + title = n_("tutti.splitSpeciesBatch.title"); - } else if (EDIT_FREQUENCY_CARD.equals(card)) { - tuttiUi = ui.getSpeciesTabFrequencyEditor(); - titlePanel = ui.getSpeciesTabFrequencyEditorReminderLabel(); - title = n_("tutti.editSpeciesFrequencies.title"); + break; + case EDIT_FREQUENCY_CARD: + tuttiUi = ui.getSpeciesTabFrequencyEditor(); + titlePanel = ui.getSpeciesTabFrequencyEditorReminderLabel(); + title = n_("tutti.editSpeciesFrequencies.title"); + break; } if (tuttiUi != null) { @@ -334,20 +344,24 @@ TuttiUI tuttiUi = null; JXTitledPanel titlePanel = null; String title = ""; - if (CREATE_BATCH_CARD.equals(card)) { - tuttiUi = ui.getBenthosTabCreateBatch(); - titlePanel = ui.getBenthosTabCreateBatchReminderLabel(); - title = n_("tutti.createBenthosBatch.title"); + switch (card) { + case CREATE_BATCH_CARD: + tuttiUi = ui.getBenthosTabCreateBatch(); + titlePanel = ui.getBenthosTabCreateBatchReminderLabel(); + title = n_("tutti.createBenthosBatch.title"); - } else if (SPLIT_BATCH_CARD.equals(card)) { - tuttiUi = ui.getBenthosTabSplitBatch(); - titlePanel = ui.getBenthosTabSplitBatchReminderLabel(); - title = n_("tutti.splitBenthosBatch.title"); + break; + case SPLIT_BATCH_CARD: + tuttiUi = ui.getBenthosTabSplitBatch(); + titlePanel = ui.getBenthosTabSplitBatchReminderLabel(); + title = n_("tutti.splitBenthosBatch.title"); - } else if (EDIT_FREQUENCY_CARD.equals(card)) { - tuttiUi = ui.getBenthosTabFrequencyEditor(); - titlePanel = ui.getBenthosTabFrequencyEditorReminderLabel(); - title = n_("tutti.editBenthosFrequencies.title"); + break; + case EDIT_FREQUENCY_CARD: + tuttiUi = ui.getBenthosTabFrequencyEditor(); + titlePanel = ui.getBenthosTabFrequencyEditorReminderLabel(); + title = n_("tutti.editBenthosFrequencies.title"); + break; } if (tuttiUi != null) { 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-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchRowModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -49,32 +49,15 @@ private static final long serialVersionUID = 1L; - public static final String PROPERTY_SPECIES = "species"; - - public static final String PROPERTY_WEIGHT = "weight"; - /** - * Species observed. + * Delegate edit object. * - * @since 0.2 + * @since 1.3 */ - protected Species species; + protected final AccidentalBatch editObject = + TuttiBeanFactory.newAccidentalBatch(); /** - * Observed weight. - * - * @since 0.2 - */ - protected Float weight; - - /** - * Comment. - * - * @since 0.2 - */ - protected String comment; - - /** * Attachments. * * @since 0.2 @@ -98,48 +81,58 @@ fromBean(aBatch); } + @Override + protected AccidentalBatch newEntity() { + return TuttiBeanFactory.newAccidentalBatch(); + } + + //------------------------------------------------------------------------// + //-- AccidentalBatch --// + //------------------------------------------------------------------------// + + @Override public Species getSpecies() { - return species; + return editObject.getSpecies(); } + @Override public void setSpecies(Species species) { Object oldValue = getSpecies(); - this.species = species; + editObject.setSpecies(species); firePropertyChange(PROPERTY_SPECIES, oldValue, species); } @Override public FishingOperation getFishingOperation() { - return null; + return editObject.getFishingOperation(); } @Override public void setFishingOperation(FishingOperation fishingOperation) { + editObject.setFishingOperation(fishingOperation); } + @Override public Float getWeight() { - return weight; + return editObject.getWeight(); } + @Override public void setWeight(Float weight) { Object oldValue = getWeight(); - this.weight = weight; + editObject.setWeight(weight); firePropertyChange(PROPERTY_WEIGHT, oldValue, weight); } - //------------------------------------------------------------------------// - //-- CommentModelAware --// - //------------------------------------------------------------------------// - @Override public String getComment() { - return comment; + return editObject.getComment(); } @Override public void setComment(String comment) { Object oldValue = getComment(); - this.comment = comment; + editObject.setComment(comment); firePropertyChange(PROPERTY_COMMENT, oldValue, comment); } @@ -185,9 +178,4 @@ this.attachment.remove(attachment); firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment()); } - - @Override - protected AccidentalBatch newEntity() { - return TuttiBeanFactory.newAccidentalBatch(); - } } 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-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/accidental/AccidentalBatchTableModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -42,27 +42,27 @@ 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")); + n_("tutti.editAccidentalBatch.table.header.speciesByCode.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")); + n_("tutti.editAccidentalBatch.table.header.speciesByGenusCode.tip")); public static final ColumnIdentifier<AccidentalBatchRowModel> WEIGHT = ColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_WEIGHT, n_("tutti.editAccidentalBatch.table.header.weight"), - n_("tutti.editAccidentalBatch.table.header.weight")); + n_("tutti.editAccidentalBatch.table.header.weight.tip")); public static final ColumnIdentifier<AccidentalBatchRowModel> COMMENT = ColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_COMMENT, n_("tutti.editAccidentalBatch.table.header.comment"), - n_("tutti.editAccidentalBatch.table.header.comment")); + n_("tutti.editAccidentalBatch.table.header.comment.tip")); - public static final ColumnIdentifier<AccidentalBatchRowModel> ATTACHMENT = ColumnIdentifier.newId( + public static final ColumnIdentifier<AccidentalBatchRowModel> ATTACHMENT = ColumnIdentifier.newReadOnlyId( AccidentalBatchRowModel.PROPERTY_ATTACHMENT, n_("tutti.editAccidentalBatch.table.header.file"), - n_("tutti.editAccidentalBatch.table.header.file")); + n_("tutti.editAccidentalBatch.table.header.file.tip")); public AccidentalBatchTableModel(TableColumnModelExt columnModel) { Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchRowModel.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchRowModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -28,6 +28,7 @@ import fr.ifremer.tutti.persistence.entities.TuttiBeanFactory; 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.data.SampleCategoryEnum; import fr.ifremer.tutti.persistence.entities.data.SpeciesBatch; import fr.ifremer.tutti.persistence.entities.data.SpeciesBatchFrequency; @@ -38,11 +39,11 @@ import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel; import fr.ifremer.tutti.ui.swing.util.TuttiComputedOrNotData; import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware; -import fr.ifremer.tutti.ui.swing.util.comment.CommentModelAware; import org.apache.commons.collections.CollectionUtils; import org.nuiton.util.beans.Binder; import org.nuiton.util.beans.BinderFactory; +import java.io.Serializable; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -53,7 +54,7 @@ * @author tchemit <chemit@codelutin.com> * @since 0.2 */ -public class BenthosBatchRowModel extends AbstractTuttiBeanUIModel<SpeciesBatch, BenthosBatchRowModel> implements AttachmentModelAware, CommentModelAware { +public class BenthosBatchRowModel extends AbstractTuttiBeanUIModel<SpeciesBatch, BenthosBatchRowModel> implements SpeciesBatch, AttachmentModelAware { private static final long serialVersionUID = 1L; @@ -259,6 +260,11 @@ Collections.sort(frequency); } + @Override + protected SpeciesBatch newEntity() { + return TuttiBeanFactory.newSpeciesBatch(); + } + //------------------------------------------------------------------------// //-- Sample category --// //------------------------------------------------------------------------// @@ -319,10 +325,12 @@ //-- Species category --// //------------------------------------------------------------------------// + @Override public Species getSpecies() { return species; } + @Override public void setSpecies(Species species) { Object oldCategory = getSpecies(); this.species = species; @@ -494,6 +502,7 @@ //-- Navigation properties --// //------------------------------------------------------------------------// + @Override public BenthosBatchRowModel getParentBatch() { return parentBatch; } @@ -525,7 +534,7 @@ } //------------------------------------------------------------------------// - //-- CommentModelAware --// + //-- CommentAware --// //------------------------------------------------------------------------// @Override @@ -587,28 +596,34 @@ //-- Other properties --// //------------------------------------------------------------------------// - public Boolean getSpeciesToConfirm() { + @Override + public boolean isSpeciesToConfirm() { return speciesToConfirm; } - public void setSpeciesToConfirm(Boolean speciesToConfirm) { - Object oldValue = getSpeciesToConfirm(); + @Override + public void setSpeciesToConfirm(boolean speciesToConfirm) { + Object oldValue = isSpeciesToConfirm(); this.speciesToConfirm = speciesToConfirm; firePropertyChange(PROPERTY_SPECIES_TO_CONFIRM, oldValue, speciesToConfirm); } + @Override public Float getWeight() { return computedOrNotWeight.getData(); } + @Override public void setWeight(Float weight) { this.computedOrNotWeight.setData(weight); } + @Override public Integer getNumber() { return computedOrNotNumber.getData(); } + @Override public void setNumber(Integer number) { computedOrNotNumber.setData(number); } @@ -623,18 +638,22 @@ firePropertyChange(PROPERTY_FREQUENCY, null, frequency); } + @Override public Integer getComputedNumber() { return computedOrNotNumber.getComputedData(); } + @Override public void setComputedNumber(Integer computedNumber) { computedOrNotNumber.setComputedData(computedNumber); } + @Override public Float getComputedWeight() { return computedOrNotWeight.getComputedData(); } + @Override public void setComputedWeight(Float computedWeight) { computedOrNotWeight.setComputedData(computedWeight); } @@ -656,7 +675,103 @@ } @Override - protected SpeciesBatch newEntity() { - return TuttiBeanFactory.newSpeciesBatch(); + public SampleCategoryEnum getSampleCategoryType() { + return null; } + + @Override + public void setSampleCategoryType(SampleCategoryEnum sampleCategoryType) { + } + + @Override + public Serializable getSampleCategoryValue() { + return null; + } + + @Override + public void setSampleCategoryValue(Serializable sampleCategoryValue) { + } + + @Override + public Float getSampleCategoryWeight() { + return null; + } + + @Override + public void setSampleCategoryWeight(Float sampleCategoryWeight) { + } + + @Override + public Float getSampleCategoryComputedWeight() { + return null; + } + + @Override + public void setSampleCategoryComputedWeight(Float sampleCategoryComputedWeight) { + } + + @Override + public SpeciesBatch getChildBatchs(int index) { + return null; + } + + @Override + public boolean isChildBatchsEmpty() { + return false; + } + + @Override + public int sizeChildBatchs() { + return 0; + } + + @Override + public void addChildBatchs(SpeciesBatch childBatchs) { + } + + @Override + public void addAllChildBatchs(Collection<SpeciesBatch> childBatchs) { + } + + @Override + public boolean removeChildBatchs(SpeciesBatch childBatchs) { + return false; + } + + @Override + public boolean removeAllChildBatchs(Collection<SpeciesBatch> childBatchs) { + return false; + } + + @Override + public boolean containsChildBatchs(SpeciesBatch childBatchs) { + return false; + } + + @Override + public boolean containsAllChildBatchs(Collection<SpeciesBatch> childBatchs) { + return false; + } + + @Override + public List<SpeciesBatch> getChildBatchs() { + return null; + } + + @Override + public void setChildBatchs(List<SpeciesBatch> childBatchs) { + } + + @Override + public void setParentBatch(SpeciesBatch parentBatch) { + } + + @Override + public FishingOperation getFishingOperation() { + return null; + } + + @Override + public void setFishingOperation(FishingOperation fishingOperation) { + } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchTableModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchTableModel.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchTableModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -48,67 +48,67 @@ public static final ColumnIdentifier<BenthosBatchRowModel> SPECIES = ColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_SPECIES, n_("tutti.editBenthosBatch.table.header.species"), - n_("tutti.editBenthosBatch.table.header.species")); + n_("tutti.editBenthosBatch.table.header.species.tip")); public static final ColumnIdentifier<BenthosBatchRowModel> SORTED_UNSORTED_CATEGORY = SampleCategoryColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY, BenthosBatchRowModel.PROPERTY_SORTED_UNSORTED_CATEGORY_WEIGHT, SampleCategoryEnum.sortedUnsorted, n_("tutti.editBenthosBatch.table.header.sortedUnsortedCategory"), - n_("tutti.editBenthosBatch.table.header.sortedUnsortedCategory")); + n_("tutti.editBenthosBatch.table.header.sortedUnsortedCategory.tip")); public static final ColumnIdentifier<BenthosBatchRowModel> SIZE_CATEGORY = SampleCategoryColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_SIZE_CATEGORY, BenthosBatchRowModel.PROPERTY_SIZE_CATEGORY_WEIGHT, SampleCategoryEnum.size, n_("tutti.editBenthosBatch.table.header.sizeCategory"), - n_("tutti.editBenthosBatch.table.header.sizeCategory")); + n_("tutti.editBenthosBatch.table.header.sizeCategory.tip")); public static final ColumnIdentifier<BenthosBatchRowModel> SEX_CATEGORY = SampleCategoryColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_SEX_CATEGORY, BenthosBatchRowModel.PROPERTY_SEX_CATEGORY_WEIGHT, SampleCategoryEnum.sex, n_("tutti.editBenthosBatch.table.header.sexCategory"), - n_("tutti.editBenthosBatch.table.header.sexCategory")); + n_("tutti.editBenthosBatch.table.header.sexCategory.tip")); public static final ColumnIdentifier<BenthosBatchRowModel> MATURITY_CATEGORY = SampleCategoryColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_MATURITY_CATEGORY, BenthosBatchRowModel.PROPERTY_MATURITY_CATEGORY_WEIGHT, SampleCategoryEnum.maturity, n_("tutti.editBenthosBatch.table.header.maturityCategory"), - n_("tutti.editBenthosBatch.table.header.maturityCategory")); + n_("tutti.editBenthosBatch.table.header.maturityCategory.tip")); public static final ColumnIdentifier<BenthosBatchRowModel> AGE_CATEGORY = SampleCategoryColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_AGE_CATEGORY, BenthosBatchRowModel.PROPERTY_AGE_CATEGORY_WEIGHT, SampleCategoryEnum.age, n_("tutti.editBenthosBatch.table.header.ageCategory"), - n_("tutti.editBenthosBatch.table.header.ageCategory")); + n_("tutti.editBenthosBatch.table.header.ageCategory.tip")); public static final ColumnIdentifier<BenthosBatchRowModel> WEIGHT = ColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_COMPUTED_WEIGHT, n_("tutti.editBenthosBatch.table.header.weight"), - n_("tutti.editBenthosBatch.table.header.weight")); + n_("tutti.editBenthosBatch.table.header.weight.tip")); public static final ColumnIdentifier<BenthosBatchRowModel> COMPUTED_NUMBER = ColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_COMPUTED_NUMBER, n_("tutti.editBenthosBatch.table.header.computedNumber"), - n_("tutti.editBenthosBatch.table.header.computedNumber")); + n_("tutti.editBenthosBatch.table.header.computedNumber.tip")); public static final ColumnIdentifier<BenthosBatchRowModel> COMMENT = ColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_COMMENT, n_("tutti.editBenthosBatch.table.header.comment"), - n_("tutti.editBenthosBatch.table.header.comment")); + n_("tutti.editBenthosBatch.table.header.comment.tip")); public static final ColumnIdentifier<BenthosBatchRowModel> ATTACHMENT = ColumnIdentifier.newReadOnlyId( BenthosBatchRowModel.PROPERTY_ATTACHMENT, n_("tutti.editBenthosBatch.table.header.file"), - n_("tutti.editBenthosBatch.table.header.file")); + n_("tutti.editBenthosBatch.table.header.file.tip")); public static final ColumnIdentifier<BenthosBatchRowModel> SPECIES_TO_CONFIRM = ColumnIdentifier.newId( BenthosBatchRowModel.PROPERTY_SPECIES_TO_CONFIRM, n_("tutti.editBenthosBatch.table.header.toConfirm"), - n_("tutti.editBenthosBatch.table.header.toConfirm")); + n_("tutti.editBenthosBatch.table.header.toConfirm.tip")); /** * Columns for the frequency edition. Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java 2013-04-03 18:25:40 UTC (rev 723) @@ -572,7 +572,7 @@ public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { BenthosBatchRowModel row = getTableModel().getEntry(adapter.row); - return row.getSpeciesToConfirm(); + return row.isSpeciesToConfirm(); } }, toConfirmColor); @@ -593,7 +593,7 @@ public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { BenthosBatchRowModel row = getTableModel().getEntry(adapter.row); - return row.getSpeciesToConfirm() && !adapter.isEditable(); + return row.isSpeciesToConfirm() && !adapter.isEditable(); } }, toConfirmColor.darker()); @@ -1028,7 +1028,7 @@ // copy back parent data (mainly other sample categories) newRow.setSpecies(parentRow.getSpecies()); - newRow.setSpeciesToConfirm(parentRow.getSpeciesToConfirm()); + newRow.setSpeciesToConfirm(parentRow.isSpeciesToConfirm()); newRow.setParentBatch(parentRow); newRow.setSpecies(parentRow.getSpecies()); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIModel.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -143,6 +143,25 @@ EditCatchesUIModel.PROPERTY_BENTHOS_TOTAL_LIVING_NOT_ITEMIZED_WEIGHT); } + @Override + public boolean isEmpty() { + return CollectionUtils.isEmpty(getRows()) + && getBenthosTotalSortedWeight() == null + && getBenthosTotalInertWeight() == null + && getBenthosTotalLivingNotItemizedWeight() == null + && CollectionUtils.isEmpty(getAttachment()); + } + + @Override + public String getTitle() { + return "tutti.label.tab.benthos"; + } + + @Override + public String getIcon() { + return null; + } + public Float getBenthosTotalComputedWeight() { return catchesUIModel.getBenthosTotalComputedWeight(); } @@ -346,6 +365,10 @@ return rootBatchId; } + //------------------------------------------------------------------------// + //-- AttachmentModelAware --// + //------------------------------------------------------------------------// + @Override public AttachementObjectTypeEnum getObjectType() { return AttachementObjectTypeEnum.CATCH_BATCH; @@ -385,22 +408,4 @@ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment()); } - @Override - public boolean isEmpty() { - return CollectionUtils.isEmpty(getRows()) - && getBenthosTotalSortedWeight() == null - && getBenthosTotalInertWeight() == null - && getBenthosTotalLivingNotItemizedWeight() == null - && CollectionUtils.isEmpty(getAttachment()); - } - - @Override - public String getTitle() { - return "tutti.label.tab.benthos"; - } - - @Override - public String getIcon() { - return null; - } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchRowModel.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchRowModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -49,50 +49,15 @@ private static final long serialVersionUID = 1L; - public static final String PROPERTY_MARINE_LITTER_CATEGORY = "marineLitterCategory"; - - public static final String PROPERTY_MARINE_LITTER_SIZE_CATEGORY = "marineLitterSizeCategory"; - - public static final String PROPERTY_WEIGHT = "weight"; - - public static final String PROPERTY_NUMBER = "number"; - /** - * MarineLitter category. + * Delegate edit object. * - * @since 0.2 + * @since 1.3 */ - protected CaracteristicQualitativeValue marineLitterCategory; + protected final MarineLitterBatch editObject = + TuttiBeanFactory.newMarineLitterBatch(); /** - * MarineLitter size category. - * - * @since 0.3 - */ - protected CaracteristicQualitativeValue marineLitterSizeCategory; - - /** - * Observed weight. - * - * @since 0.2 - */ - protected Float weight; - - /** - * Observed number. - * - * @since 0.3 - */ - protected Integer number; - - /** - * Comment on this batch. - * - * @since 0.2 - */ - protected String comment; - - /** * Attachments (should never be null). * * @since 0.2 @@ -116,68 +81,82 @@ fromBean(aBatch); } + @Override + protected MarineLitterBatch newEntity() { + return TuttiBeanFactory.newMarineLitterBatch(); + } + + //------------------------------------------------------------------------// + //-- MarineLitterBatch --// + //------------------------------------------------------------------------// + + @Override public CaracteristicQualitativeValue getMarineLitterCategory() { - return marineLitterCategory; + return editObject.getMarineLitterCategory(); } + @Override public void setMarineLitterCategory(CaracteristicQualitativeValue marineLitterCategory) { Object oldValue = getMarineLitterCategory(); - this.marineLitterCategory = marineLitterCategory; + editObject.setMarineLitterCategory(marineLitterCategory); firePropertyChange(PROPERTY_MARINE_LITTER_CATEGORY, oldValue, marineLitterCategory); } + @Override public CaracteristicQualitativeValue getMarineLitterSizeCategory() { - return marineLitterSizeCategory; + return editObject.getMarineLitterSizeCategory(); } + @Override public void setMarineLitterSizeCategory(CaracteristicQualitativeValue marineLitterSizeCategory) { Object oldValue = getMarineLitterSizeCategory(); - this.marineLitterSizeCategory = marineLitterSizeCategory; + editObject.setMarineLitterSizeCategory(marineLitterSizeCategory); firePropertyChange(PROPERTY_MARINE_LITTER_SIZE_CATEGORY, oldValue, marineLitterSizeCategory); } @Override public FishingOperation getFishingOperation() { - return null; + return editObject.getFishingOperation(); } @Override public void setFishingOperation(FishingOperation fishingOperation) { + editObject.setFishingOperation(fishingOperation); } + @Override public Float getWeight() { - return weight; + return editObject.getWeight(); } + @Override public void setWeight(Float weight) { Object oldValue = getWeight(); - this.weight = weight; + editObject.setWeight(weight); firePropertyChange(PROPERTY_WEIGHT, oldValue, weight); } + @Override public Integer getNumber() { - return number; + return editObject.getNumber(); } + @Override public void setNumber(Integer number) { Object oldValue = getNumber(); - this.number = number; + editObject.setNumber(number); firePropertyChange(PROPERTY_NUMBER, oldValue, number); } - //------------------------------------------------------------------------// - //-- CommentModelAware --// - //------------------------------------------------------------------------// - @Override public String getComment() { - return comment; + return editObject.getComment(); } @Override public void setComment(String comment) { Object oldValue = getComment(); - this.comment = comment; + editObject.setComment(comment); firePropertyChange(PROPERTY_COMMENT, oldValue, comment); } @@ -223,9 +202,4 @@ this.attachment.remove(attachment); firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment()); } - - @Override - protected MarineLitterBatch newEntity() { - return TuttiBeanFactory.newMarineLitterBatch(); - } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchTableModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchTableModel.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchTableModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -41,32 +41,32 @@ public static final ColumnIdentifier<MarineLitterBatchRowModel> MACRO_WASTE_CATEGORY = ColumnIdentifier.newId( MarineLitterBatchRowModel.PROPERTY_MARINE_LITTER_CATEGORY, n_("tutti.editMarineLitterBatch.table.header.marineLitterCategory"), - n_("tutti.editMarineLitterBatch.table.header.marineLitterCategory")); + n_("tutti.editMarineLitterBatch.table.header.marineLitterCategory.tip")); public static final ColumnIdentifier<MarineLitterBatchRowModel> MACRO_WASTE_SIZE_CATEGORY = ColumnIdentifier.newId( MarineLitterBatchRowModel.PROPERTY_MARINE_LITTER_SIZE_CATEGORY, n_("tutti.editMarineLitterBatch.table.header.marineLitterSizeCategory"), - n_("tutti.editMarineLitterBatch.table.header.marineLitterSizeCategory")); + n_("tutti.editMarineLitterBatch.table.header.marineLitterSizeCategory.tip")); + public static final ColumnIdentifier<MarineLitterBatchRowModel> NUMBER = ColumnIdentifier.newId( + MarineLitterBatchRowModel.PROPERTY_NUMBER, + n_("tutti.editMarineLitterBatch.table.header.number"), + n_("tutti.editMarineLitterBatch.table.header.number.tip")); + public static final ColumnIdentifier<MarineLitterBatchRowModel> WEIGHT = ColumnIdentifier.newId( MarineLitterBatchRowModel.PROPERTY_WEIGHT, n_("tutti.editMarineLitterBatch.table.header.weight"), - n_("tutti.editMarineLitterBatch.table.header.weight")); + n_("tutti.editMarineLitterBatch.table.header.weight.tip")); - public static final ColumnIdentifier<MarineLitterBatchRowModel> NUMBER = ColumnIdentifier.newId( - MarineLitterBatchRowModel.PROPERTY_NUMBER, - n_("tutti.editMarineLitterBatch.table.header.number"), - n_("tutti.editMarineLitterBatch.table.header.number")); - public static final ColumnIdentifier<MarineLitterBatchRowModel> COMMENT = ColumnIdentifier.newId( MarineLitterBatchRowModel.PROPERTY_COMMENT, n_("tutti.editMarineLitterBatch.table.header.comment"), - n_("tutti.editMarineLitterBatch.table.header.comment")); + n_("tutti.editMarineLitterBatch.table.header.comment.tip")); - public static final ColumnIdentifier<MarineLitterBatchRowModel> ATTACHMENT = ColumnIdentifier.newId( + public static final ColumnIdentifier<MarineLitterBatchRowModel> ATTACHMENT = ColumnIdentifier.newReadOnlyId( MarineLitterBatchRowModel.PROPERTY_ATTACHMENT, n_("tutti.editMarineLitterBatch.table.header.file"), - n_("tutti.editMarineLitterBatch.table.header.file")); + n_("tutti.editMarineLitterBatch.table.header.file.tip")); public MarineLitterBatchTableModel(TableColumnModelExt columnModel) { super(columnModel, true, true); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUI.css 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUI.css 2013-04-03 18:25:40 UTC (rev 723) @@ -27,15 +27,28 @@ showPopupButton: {handler.getConfig().isShowNumberEditorButton()}; bean: {model}; showReset: true; + _selectOnFocus: {true}; } #editMarineLitterBatchTopPanel { _help: {"tuttihelp.editMarineLitterBatch.help"}; } +#marineLitterBatchTabToolBar { + floatable: false; + opaque: false; + borderPainted: false; +} + +#marineLitterBatchAttachmentsButton { + enabled: {model.getObjectId() != null}; +} + #marineLitterTotalWeightLabel { - text: "tutti.editCatchBatch.field.marineLitterTotalWeight"; + text: "tutti.editMarineLitterBatch.field.marineLitterTotalWeight"; + toolTipText: "tutti.editMarineLitterBatch.field.marineLitterTotalWeight.tip"; labelFor: {marineLitterTotalWeightField}; + _help: {"tutti.editMarineLitterBatch.field.marineLitterTotalWeight.help"}; } #marineLitterTotalWeightField { @@ -45,9 +58,23 @@ numberPattern: {INT_6_DIGITS_PATTERN}; } +#tablePopup { + label: "tutti.editMarineLitterBatch.title.batchActions"; +} + #table { selectionMode: {ListSelectionModel.SINGLE_SELECTION}; selectionBackground: {null}; selectionForeground: {Color.BLACK}; sortable: false; } + +#removeSpeciesBatchMenu { + actionIcon: batch-delete; + text: "tutti.editMarineLitterBatch.action.removeBatch"; + toolTipText: "tutti.editMarineLitterBatch.action.removeBatch.tip"; + i18nMnemonic: "tutti.editMarineLitterBatch.action.removeBatch.mnemonic"; + _tuttiAction: {RemoveMarineLitterBatchAction.class}; + enabled: {model.isRemoveBatchEnabled()}; + _help: {"tutti.editMarineLitterBatch.action.removeBatch.help"}; +} \ No newline at end of file Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUI.jaxx 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUI.jaxx 2013-04-03 18:25:40 UTC (rev 723) @@ -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 @@ -68,6 +69,15 @@ <TuttiHelpBroker id='broker' constructorParams='"tuttihelp.editMarineLitterBatch.help"'/> + <JToolBar id='marineLitterBatchTabToolBar'> + <ButtonAttachment id='marineLitterBatchAttachmentsButton' + constructorParams='getHandler().getContext(), getModel()'/> + </JToolBar> + + <JPopupMenu id='tablePopup'> + <JMenuItem id='removeMarineLitterBatchMenu'/> + </JPopupMenu> + <Table id='form' fill='both' constraints='BorderLayout.NORTH'> <!-- Poids total --> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIHandler.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIHandler.java 2013-04-03 18:25:40 UTC (rev 723) @@ -25,6 +25,7 @@ */ 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.Attachment; import fr.ifremer.tutti.persistence.entities.data.BatchContainer; @@ -91,9 +92,21 @@ rows = Lists.newArrayList(); if (!TuttiEntities.isNew(bean)) { + + // get all marine litter root BatchContainer<MarineLitterBatch> batchContainer = persistenceService.getRootMarineLitterBatch(bean.getId()); + model.setRootBatchId(batchContainer.getId()); + + List<Attachment> attachments = + persistenceService.getAllAttachments(Integer.valueOf(model.getObjectId())); + model.addAllAttachment(attachments); + + if (log.isInfoEnabled()) { + log.info("marineLitter root batch id: " + model.getRootBatchId()); + } + for (MarineLitterBatch aBatch : batchContainer.getChildren()) { MarineLitterBatchRowModel entry = new MarineLitterBatchRowModel(aBatch); @@ -102,6 +115,7 @@ } } model.setRows(rows); + recomputeBatchActionEnable(); } //------------------------------------------------------------------------// @@ -122,7 +136,7 @@ protected boolean isRowValid(MarineLitterBatchRowModel row) { boolean result = row.getMarineLitterCategory() != null && row.getMarineLitterSizeCategory() != null && - row.getWeight() != null; + row.getNumber() != null; return result; } @@ -133,6 +147,9 @@ Object oldValue, Object newValue) { recomputeRowValidState(row); + + // when row valid state has changed, recompute action enabled states + recomputeBatchActionEnable(); } @Override @@ -160,17 +177,39 @@ // row is not valid can not save it - MarineLitterBatch catchBean = row.toBean(); + MarineLitterBatch batch = row.toBean(); - if (!TuttiEntities.isNew(catchBean)) { + if (!TuttiEntities.isNew(batch)) { // remove this - persistenceService.deleteMarineLitterBatch(catchBean.getId()); + persistenceService.deleteMarineLitterBatch(batch.getId()); } } } } + @Override + protected void onRowValidStateChanged(int rowIndex, + MarineLitterBatchRowModel row, + Boolean oldValue, + Boolean newValue) { + super.onRowValidStateChanged(rowIndex, row, oldValue, newValue); + + // when row valid state has changed, recompute action enabled states + recomputeBatchActionEnable(); + } + + @Override + protected void onAfterSelectedRowChanged(int oldRowIndex, + MarineLitterBatchRowModel oldRow, + int newRowIndex, + MarineLitterBatchRowModel newRow) { + super.onAfterSelectedRowChanged(oldRowIndex, oldRow, newRowIndex, newRow); + + // when selected row has changed, recompute action enabled states + recomputeBatchActionEnable(); + } + //------------------------------------------------------------------------// //-- AbstractTuttiUIHandler methods --// //------------------------------------------------------------------------// @@ -192,13 +231,20 @@ MarineLitterBatchUIModel model = new MarineLitterBatchUIModel(catchesUIModel); ui.setContextValue(model); + + // propagate when value is changing + PropagatePropertyChangeListener.listenAndPropagate( + catchesUIModel, + model, + EditCatchesUIModel.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT, + EditCatchesUIModel.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT); } @Override public void afterInitUI() { - if (log.isInfoEnabled()) { - log.info("afterInit: " + ui); + if (log.isDebugEnabled()) { + log.debug("afterInit: " + ui); } initUI(ui); @@ -231,6 +277,13 @@ decorator, persistenceService.getMarineLitterSizeCategoryCaracteristic().getQualitativeValue()); } + { // Number column + + addIntegerColumnToModel(columnModel, + MarineLitterBatchTableModel.NUMBER, + TuttiUI.INT_3_DIGITS_PATTERN); + } + { // Weight column addFloatColumnToModel(columnModel, @@ -238,13 +291,6 @@ TuttiUI.DECIMAL3_PATTERN); } - { // Number column - - addIntegerColumnToModel(columnModel, - MarineLitterBatchTableModel.NUMBER, - TuttiUI.INT_3_DIGITS_PATTERN); - } - { // Comment column addColumnToModel(columnModel, @@ -269,6 +315,7 @@ table.setColumnModel(columnModel); initBatchTable(table, columnModel, tableModel); + recomputeBatchActionEnable(); } @Override @@ -276,6 +323,7 @@ if (log.isDebugEnabled()) { log.debug("closing: " + ui); } + ui.getMarineLitterBatchAttachmentsButton().onCloseUI(); } //------------------------------------------------------------------------// @@ -286,6 +334,23 @@ //-- Internal methods --// //------------------------------------------------------------------------// + protected void recomputeBatchActionEnable() { + + int rowIndex = getTable().getSelectedRow(); + + boolean enableRemove = false; + + if (rowIndex != -1) { + + // there is a selected row + + enableRemove = true; + + } + MarineLitterBatchUIModel model = getModel(); + model.setRemoveBatchEnabled(enableRemove); + } + protected void saveRow(MarineLitterBatchRowModel row) { MarineLitterBatch catchBean = row.toBean(); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIModel.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/MarineLitterBatchUIModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -24,17 +24,40 @@ * #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 MarineLitterBatchUIModel extends AbstractTuttiBatchUIModel<MarineLitterBatchRowModel, MarineLitterBatchUIModel> { +public class MarineLitterBatchUIModel extends AbstractTuttiBatchUIModel<MarineLitterBatchRowModel, MarineLitterBatchUIModel> + 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 marineLitter batch? + * + * @since 1.3 + */ + protected boolean removeBatchEnabled; + + private String rootBatchId; + public MarineLitterBatchUIModel(EditCatchesUIModel catchesUIModel) { super(catchesUIModel, EditCatchesUIModel.PROPERTY_MARINE_LITTER_TOTAL_WEIGHT); @@ -47,4 +70,100 @@ public void setMarineLitterTotalWeight(Float marineLitterTotalWeight) { catchesUIModel.setMarineLitterTotalWeight(marineLitterTotalWeight); } + + 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 = getMarineLitterTotalWeight() == null + && CollectionUtils.isEmpty(getAttachment()); + if (result && CollectionUtils.isNotEmpty(getRows())) { + + // check if every line is not valid + for (MarineLitterBatchRowModel 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.marineLitter"; + } + + @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/marinelitter/RemoveMarineLitterBatchAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/RemoveMarineLitterBatchAction.java (rev 0) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/RemoveMarineLitterBatchAction.java 2013-04-03 18:25:40 UTC (rev 723) @@ -0,0 +1,87 @@ +package fr.ifremer.tutti.ui.swing.content.operation.catches.marinelitter; + +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.content.operation.catches.species.RemoveSpeciesSubBatchAction; +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; + +/** + * To remove a selected marine litter batch in the table. + * + * @author tchemit <chemit@codelutin.com> + * @since 1.3 + */ +public class RemoveMarineLitterBatchAction extends AbstractTuttiAction<MarineLitterBatchUIModel, MarineLitterBatchUI, MarineLitterBatchUIHandler> { + + /** Logger. */ + private static final Log log = + LogFactory.getLog(RemoveMarineLitterBatchAction.class); + + protected RemoveSpeciesSubBatchAction removeSpeciesSubBatchAction; + + public RemoveMarineLitterBatchAction(MarineLitterBatchUIHandler 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"); + + MarineLitterBatchTableModel tableModel = handler.getTableModel(); + MarineLitterBatchRowModel 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(); + + MarineLitterBatchTableModel 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(); + } + } +} \ No newline at end of file Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/marinelitter/RemoveMarineLitterBatchAction.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchRowModel.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchRowModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -58,11 +58,12 @@ public static final String PROPERTY_SAMPLE_WEIGHT = "sampleWeight"; /** - * Species observed. + * Delegate edit object. * - * @since 0.2 + * @since 1.3 */ - protected Species species; + protected final PlanktonBatch editObject = + TuttiBeanFactory.newPlanktonBatch(); /** * Is the species need to be confirmed?. @@ -72,27 +73,6 @@ protected boolean speciesToConfirm; /** - * Observed weight. - * - * @since 0.2 - */ - protected Float weight; - - /** - * Sample weight. - * - * @since 0.2 - */ - protected Float sampleWeight; - - /** - * Comment. - * - * @since 0.2 - */ - protected String comment; - - /** * Attachments (should never be null). * * @since 0.2 @@ -116,68 +96,80 @@ fromBean(aBatch); } - public Species getSpecies() { - return species; + @Override + protected PlanktonBatch newEntity() { + return TuttiBeanFactory.newPlanktonBatch(); } - public void setSpecies(Species species) { - Object oldValue = getSpecies(); - this.species = species; - firePropertyChange(PROPERTY_SPECIES, oldValue, species); - } - - public Boolean getSpeciesToConfirm() { + public boolean isSpeciesToConfirm() { return speciesToConfirm; } - public void setSpeciesToConfirm(Boolean speciesToConfirm) { - Object oldValue = getSpeciesToConfirm(); + public void setSpeciesToConfirm(boolean speciesToConfirm) { + Object oldValue = isSpeciesToConfirm(); this.speciesToConfirm = speciesToConfirm; firePropertyChange(PROPERTY_SPECIES_TO_CONFIRM, oldValue, speciesToConfirm); } + //------------------------------------------------------------------------// + //-- PlanktonBatch --// + //------------------------------------------------------------------------// + @Override + public Species getSpecies() { + return editObject.getSpecies(); + } + + @Override + public void setSpecies(Species species) { + Object oldValue = getSpecies(); + editObject.setSpecies(species); + firePropertyChange(PROPERTY_SPECIES, oldValue, species); + } + + @Override public FishingOperation getFishingOperation() { - return null; + return editObject.getFishingOperation(); } @Override public void setFishingOperation(FishingOperation fishingOperation) { + editObject.setFishingOperation(fishingOperation); } + @Override public Float getWeight() { - return weight; + return editObject.getWeight(); } + @Override public void setWeight(Float weight) { Object oldValue = getWeight(); - this.weight = weight; + editObject.setWeight(weight); firePropertyChange(PROPERTY_WEIGHT, oldValue, weight); } + @Override public Float getSampleWeight() { - return sampleWeight; + return editObject.getSampleWeight(); } + @Override public void setSampleWeight(Float sampleWeight) { Object oldValue = getSampleWeight(); - this.sampleWeight = sampleWeight; + editObject.setSampleWeight(sampleWeight); firePropertyChange(PROPERTY_SAMPLE_WEIGHT, oldValue, sampleWeight); } - //------------------------------------------------------------------------// - //-- CommentModelAware --// - //------------------------------------------------------------------------// - @Override public String getComment() { - return comment; + return editObject.getComment(); } @Override public void setComment(String comment) { Object oldValue = getComment(); - this.comment = comment; + editObject.setComment(comment); firePropertyChange(PROPERTY_COMMENT, oldValue, comment); } @@ -223,9 +215,4 @@ this.attachment.remove(attachment); firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment()); } - - @Override - protected PlanktonBatch newEntity() { - return TuttiBeanFactory.newPlanktonBatch(); - } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchTableModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchTableModel.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/plankton/PlanktonBatchTableModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -41,37 +41,37 @@ public static final ColumnIdentifier<PlanktonBatchRowModel> SPECIES_TO_CONFIRM = ColumnIdentifier.newId( PlanktonBatchRowModel.PROPERTY_SPECIES_TO_CONFIRM, n_("tutti.editPlanktonBatch.table.header.toConfirm"), - n_("tutti.editPlanktonBatch.table.header.toConfirm")); + n_("tutti.editPlanktonBatch.table.header.toConfirm.tip")); public static final ColumnIdentifier<PlanktonBatchRowModel> SPECIES_BY_CODE = ColumnIdentifier.newId( PlanktonBatchRowModel.PROPERTY_SPECIES, n_("tutti.editPlanktonBatch.table.header.speciesByCode"), - n_("tutti.editPlanktonBatch.table.header.speciesByCode")); + n_("tutti.editPlanktonBatch.table.header.speciesByCode.tip")); public static final ColumnIdentifier<PlanktonBatchRowModel> SPECIES_BY_GENUS_CODE = ColumnIdentifier.newId( PlanktonBatchRowModel.PROPERTY_SPECIES, n_("tutti.editPlanktonBatch.table.header.speciesByGenusCode"), - n_("tutti.editPlanktonBatch.table.header.speciesByGenusCode")); + n_("tutti.editPlanktonBatch.table.header.speciesByGenusCode.tip")); public static final ColumnIdentifier<PlanktonBatchRowModel> WEIGHT = ColumnIdentifier.newId( PlanktonBatchRowModel.PROPERTY_WEIGHT, n_("tutti.editPlanktonBatch.table.header.weight"), - n_("tutti.editPlanktonBatch.table.header.weight")); + n_("tutti.editPlanktonBatch.table.header.weight.tip")); public static final ColumnIdentifier<PlanktonBatchRowModel> SAMPLE_WEIGHT = ColumnIdentifier.newId( PlanktonBatchRowModel.PROPERTY_SAMPLE_WEIGHT, n_("tutti.editPlanktonBatch.table.header.sampleWeight"), - n_("tutti.editPlanktonBatch.table.header.sampleWeight")); + n_("tutti.editPlanktonBatch.table.header.sampleWeight.tip")); public static final ColumnIdentifier<PlanktonBatchRowModel> COMMENT = ColumnIdentifier.newId( PlanktonBatchRowModel.PROPERTY_COMMENT, n_("tutti.editPlanktonBatch.table.header.comment"), - n_("tutti.editPlanktonBatch.table.header.comment")); + n_("tutti.editPlanktonBatch.table.header.comment.tip")); - public static final ColumnIdentifier<PlanktonBatchRowModel> ATTACHMENT = ColumnIdentifier.newId( + public static final ColumnIdentifier<PlanktonBatchRowModel> ATTACHMENT = ColumnIdentifier.newReadOnlyId( PlanktonBatchRowModel.PROPERTY_ATTACHMENT, n_("tutti.editPlanktonBatch.table.header.file"), - n_("tutti.editPlanktonBatch.table.header.file")); + n_("tutti.editPlanktonBatch.table.header.file.tip")); public PlanktonBatchTableModel(TableColumnModelExt columnModel) { super(columnModel, true, true); 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-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -268,6 +268,11 @@ Collections.sort(frequency); } + @Override + protected SpeciesBatch newEntity() { + return TuttiBeanFactory.newSpeciesBatch(); + } + //------------------------------------------------------------------------// //-- Sample category --// //------------------------------------------------------------------------// @@ -562,6 +567,7 @@ //-- Navigation properties --// //------------------------------------------------------------------------// + @Override public SpeciesBatchRowModel getParentBatch() { return parentBatch; } @@ -597,7 +603,7 @@ } //------------------------------------------------------------------------// - //-- CommentModelAware --// + //-- CommentAware --// //------------------------------------------------------------------------// @Override @@ -659,12 +665,13 @@ //-- Other properties --// //------------------------------------------------------------------------// - public Boolean getSpeciesToConfirm() { + @Override + public boolean isSpeciesToConfirm() { return speciesToConfirm; } - public void setSpeciesToConfirm(Boolean speciesToConfirm) { - Object oldValue = getSpeciesToConfirm(); + public void setSpeciesToConfirm(boolean speciesToConfirm) { + Object oldValue = isSpeciesToConfirm(); this.speciesToConfirm = speciesToConfirm; firePropertyChange(PROPERTY_SPECIES_TO_CONFIRM, oldValue, speciesToConfirm); } @@ -678,10 +685,12 @@ public void setFishingOperation(FishingOperation fishingOperation) { } + @Override public Float getWeight() { return computedOrNotWeight.getData(); } + @Override public void setWeight(Float weight) { this.computedOrNotWeight.setData(weight); } @@ -713,24 +722,17 @@ public void setSampleCategoryWeight(Float sampleCategoryWeight) { } + @Override public Integer getNumber() { return computedOrNotNumber.getData(); } + @Override public void setNumber(Integer number) { computedOrNotNumber.setData(number); } @Override - public boolean isSpeciesToConfirm() { - return false; - } - - @Override - public void setSpeciesToConfirm(boolean speciesToConfirm) { - } - - @Override public Float getSampleCategoryComputedWeight() { return null; } @@ -801,18 +803,22 @@ firePropertyChange(PROPERTY_FREQUENCY, null, frequency); } + @Override public Integer getComputedNumber() { return computedOrNotNumber.getComputedData(); } + @Override public void setComputedNumber(Integer computedNumber) { computedOrNotNumber.setComputedData(computedNumber); } + @Override public Float getComputedWeight() { return computedOrNotWeight.getComputedData(); } + @Override public void setComputedWeight(Float computedWeight) { computedOrNotWeight.setComputedData(computedWeight); } @@ -833,8 +839,4 @@ this.computedOrNotWeight = computedOrNotWeight; } - @Override - protected SpeciesBatch newEntity() { - return TuttiBeanFactory.newSpeciesBatch(); - } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUI.jaxx 2013-04-03 18:25:40 UTC (rev 723) @@ -28,7 +28,6 @@ <import> fr.ifremer.tutti.ui.swing.TuttiHelpBroker fr.ifremer.tutti.ui.swing.content.operation.catches.TableViewMode - fr.ifremer.tutti.ui.swing.util.TuttiUI fr.ifremer.tutti.ui.swing.util.attachment.ButtonAttachment fr.ifremer.tutti.ui.swing.util.editor.TuttiComputedOrNotDataEditor @@ -83,6 +82,7 @@ <JMenuItem id='renameSpeciesBatchMenu'/> <JMenuItem id='createSpeciesMelagMenu'/> </JPopupMenu> + <Table id='form' fill='both' constraints='BorderLayout.NORTH'> <!-- Poids total / Poids total vrac --> 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-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-04-03 18:25:40 UTC (rev 723) @@ -591,7 +591,7 @@ public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { SpeciesBatchRowModel row = getTableModel().getEntry(adapter.row); - return row.getSpeciesToConfirm(); + return row.isSpeciesToConfirm(); } }, toConfirmColor); @@ -612,7 +612,7 @@ public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { SpeciesBatchRowModel row = getTableModel().getEntry(adapter.row); - return row.getSpeciesToConfirm() && !adapter.isEditable(); + return row.isSpeciesToConfirm() && !adapter.isEditable(); } }, toConfirmColor.darker()); @@ -1036,7 +1036,7 @@ // copy back parent data (mainly other sample categories) newRow.setSpecies(parentRow.getSpecies()); - newRow.setSpeciesToConfirm(parentRow.getSpeciesToConfirm()); + newRow.setSpeciesToConfirm(parentRow.isSpeciesToConfirm()); newRow.setParentBatch(parentRow); newRow.setSpecies(parentRow.getSpecies()); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIModel.java 2013-04-03 18:25:40 UTC (rev 723) @@ -346,6 +346,10 @@ return rootBatchId; } + //------------------------------------------------------------------------// + //-- AttachmentModelAware --// + //------------------------------------------------------------------------// + @Override public AttachementObjectTypeEnum getObjectType() { return AttachementObjectTypeEnum.CATCH_BATCH; @@ -385,6 +389,10 @@ firePropertyChange(PROPERTY_ATTACHMENT, null, getAttachment()); } + //------------------------------------------------------------------------// + //-- TabContentModel --// + //------------------------------------------------------------------------// + @Override public boolean isEmpty() { return CollectionUtils.isEmpty(getRows()) Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/ButtonComment.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/ButtonComment.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/ButtonComment.java 2013-04-03 18:25:40 UTC (rev 723) @@ -24,6 +24,7 @@ * #L% */ +import fr.ifremer.tutti.persistence.entities.CommentAware; import fr.ifremer.tutti.ui.swing.TuttiUIContext; import jaxx.runtime.SwingUtil; @@ -55,7 +56,7 @@ protected boolean popupMoving; public ButtonComment(TuttiUIContext context, - CommentModelAware model) { + CommentAware model) { setIcon(SwingUtil.createActionIcon("edit-comment")); setToolTipText(_("tutti.commentEditor.action.tip")); @@ -116,7 +117,7 @@ popup.getHandler().init(); } - public void init(CommentModelAware model) { + public void init(CommentAware model) { setBean(model); init(); } @@ -125,11 +126,11 @@ setSelected(false); } - public CommentModelAware getBean() { + public CommentAware getBean() { return popup.getBean(); } - protected void setBean(CommentModelAware model) { + protected void setBean(CommentAware model) { popup.setBean(model); init(); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellEditor.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellEditor.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentCellEditor.java 2013-04-03 18:25:40 UTC (rev 723) @@ -25,6 +25,7 @@ */ import com.google.common.base.Preconditions; +import fr.ifremer.tutti.persistence.entities.CommentAware; import fr.ifremer.tutti.ui.swing.TuttiUIContext; import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel; import fr.ifremer.tutti.ui.swing.util.TuttiUI; @@ -99,7 +100,7 @@ rowIndex = row; columnIndex = column; - CommentModelAware model = (CommentModelAware) tableModel.getEntry(row); + CommentAware model = (CommentAware) tableModel.getEntry(row); editorButton.init(model); @@ -114,7 +115,7 @@ @Override public Object getCellEditorValue() { - CommentModelAware model = editorButton.getBean(); + CommentAware model = editorButton.getBean(); Preconditions.checkNotNull(model, "No model found in editor."); Object result = model.getComment(); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.jaxx 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUI.jaxx 2013-04-03 18:25:40 UTC (rev 723) @@ -24,6 +24,7 @@ <JDialog id='commentDialog' layout='{new BorderLayout()}'> <import> + fr.ifremer.tutti.persistence.entities.CommentAware fr.ifremer.tutti.ui.swing.TuttiUIContext org.jdesktop.swingx.JXTitledPanel @@ -54,7 +55,7 @@ ]]></script> <!-- bean property --> - <CommentModelAware id='bean' javaBean='null'/> + <CommentAware id='bean' javaBean='null'/> <CommentEditorUIHandler id='handler' initializer='getContextValue(CommentEditorUIHandler.class)'/> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUIHandler.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentEditorUIHandler.java 2013-04-03 18:25:40 UTC (rev 723) @@ -24,6 +24,7 @@ * #L% */ +import fr.ifremer.tutti.persistence.entities.CommentAware; import fr.ifremer.tutti.ui.swing.TuttiUIContext; import jaxx.runtime.SwingUtil; import jaxx.runtime.swing.ComponentMover; @@ -154,7 +155,7 @@ public void init() { - CommentModelAware bean = ui.getBean(); + CommentAware bean = ui.getBean(); String content = bean == null ? null : bean.getComment(); ui.getTextContent().setText(content); } @@ -181,7 +182,7 @@ /** pushes the typed text in the property of the bean */ public void setText(String value) { - CommentModelAware bean = ui.getBean(); + CommentAware bean = ui.getBean(); bean.setComment(value); } Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentModelAware.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentModelAware.java 2013-04-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/comment/CommentModelAware.java 2013-04-03 18:25:40 UTC (rev 723) @@ -1,40 +0,0 @@ -package fr.ifremer.tutti.ui.swing.util.comment; - -/* - * #%L - * Tutti :: UI - * $Id$ - * $HeadURL$ - * %% - * 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% - */ - -/** - * To place on model wich supports comment. - * - * @author tchemit <chemit@codelutin.com> - * @since 1.1 - */ -public interface CommentModelAware { - - String PROPERTY_COMMENT = "comment"; - - String getComment(); - - void setComment(String comment); -} 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-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-04-03 18:25:40 UTC (rev 723) @@ -172,10 +172,15 @@ tutti.dbManager.title.choose.dbExportFile= tutti.dbManager.title.choose.dbImportFile= tutti.editAccidentalBatch.table.header.comment= +tutti.editAccidentalBatch.table.header.comment.tip= tutti.editAccidentalBatch.table.header.file= +tutti.editAccidentalBatch.table.header.file.tip= tutti.editAccidentalBatch.table.header.speciesByCode= +tutti.editAccidentalBatch.table.header.speciesByCode.tip= tutti.editAccidentalBatch.table.header.speciesByGenusCode= +tutti.editAccidentalBatch.table.header.speciesByGenusCode.tip= tutti.editAccidentalBatch.table.header.weight= +tutti.editAccidentalBatch.table.header.weight.tip= tutti.editBenthosBatch.action.createBatch= tutti.editBenthosBatch.action.createBatch.mnemonic= tutti.editBenthosBatch.action.createBatch.tip= @@ -212,20 +217,31 @@ tutti.editBenthosBatch.split.weightNotNull.message= tutti.editBenthosBatch.split.weightNotNull.title= tutti.editBenthosBatch.table.header.ageCategory= +tutti.editBenthosBatch.table.header.ageCategory.tip= tutti.editBenthosBatch.table.header.comment= +tutti.editBenthosBatch.table.header.comment.tip= tutti.editBenthosBatch.table.header.computedNumber= +tutti.editBenthosBatch.table.header.computedNumber.tip= tutti.editBenthosBatch.table.header.file= +tutti.editBenthosBatch.table.header.file.tip= tutti.editBenthosBatch.table.header.maturityCategory= +tutti.editBenthosBatch.table.header.maturityCategory.tip= tutti.editBenthosBatch.table.header.number= tutti.editBenthosBatch.table.header.sampleWeight= tutti.editBenthosBatch.table.header.sexCategory= +tutti.editBenthosBatch.table.header.sexCategory.tip= tutti.editBenthosBatch.table.header.sizeCategory= +tutti.editBenthosBatch.table.header.sizeCategory.tip= tutti.editBenthosBatch.table.header.sortedUnsortedCategory= +tutti.editBenthosBatch.table.header.sortedUnsortedCategory.tip= tutti.editBenthosBatch.table.header.species= +tutti.editBenthosBatch.table.header.species.tip= tutti.editBenthosBatch.table.header.speciesByCode= tutti.editBenthosBatch.table.header.speciesByGenusCode= tutti.editBenthosBatch.table.header.toConfirm= +tutti.editBenthosBatch.table.header.toConfirm.tip= tutti.editBenthosBatch.table.header.weight= +tutti.editBenthosBatch.table.header.weight.tip= tutti.editBenthosFrequencies.action.cancel= tutti.editBenthosFrequencies.action.cancel.mnemonic= tutti.editBenthosFrequencies.action.cancel.tip= @@ -461,19 +477,34 @@ tutti.editFishingOperation.label.traitReminder.inCreation= tutti.editFishingOperation.pane.other= tutti.editFishingOperation.tab.general= +tutti.editMarineLitterBatch.field.marineLitterTotalWeight= +tutti.editMarineLitterBatch.field.marineLitterTotalWeight.tip= tutti.editMarineLitterBatch.table.header.comment= +tutti.editMarineLitterBatch.table.header.comment.tip= tutti.editMarineLitterBatch.table.header.file= +tutti.editMarineLitterBatch.table.header.file.tip= tutti.editMarineLitterBatch.table.header.marineLitterCategory= +tutti.editMarineLitterBatch.table.header.marineLitterCategory.tip= tutti.editMarineLitterBatch.table.header.marineLitterSizeCategory= +tutti.editMarineLitterBatch.table.header.marineLitterSizeCategory.tip= tutti.editMarineLitterBatch.table.header.number= +tutti.editMarineLitterBatch.table.header.number.tip= tutti.editMarineLitterBatch.table.header.weight= +tutti.editMarineLitterBatch.table.header.weight.tip= tutti.editPlanktonBatch.table.header.comment= +tutti.editPlanktonBatch.table.header.comment.tip= tutti.editPlanktonBatch.table.header.file= +tutti.editPlanktonBatch.table.header.file.tip= tutti.editPlanktonBatch.table.header.sampleWeight= +tutti.editPlanktonBatch.table.header.sampleWeight.tip= tutti.editPlanktonBatch.table.header.speciesByCode= +tutti.editPlanktonBatch.table.header.speciesByCode.tip= tutti.editPlanktonBatch.table.header.speciesByGenusCode= +tutti.editPlanktonBatch.table.header.speciesByGenusCode.tip= tutti.editPlanktonBatch.table.header.toConfirm= +tutti.editPlanktonBatch.table.header.toConfirm.tip= tutti.editPlanktonBatch.table.header.weight= +tutti.editPlanktonBatch.table.header.weight.tip= tutti.editProgram.action.closeEditProgram= tutti.editProgram.action.closeEditProgram.mnemonic= tutti.editProgram.action.closeEditProgram.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-03 17:29:52 UTC (rev 722) +++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-04-03 18:25:40 UTC (rev 723) @@ -175,10 +175,15 @@ tutti.dbManager.title.choose.dbExportFile=Exporter la base de données tutti.dbManager.title.choose.dbImportFile=Importer la base de données tutti.editAccidentalBatch.table.header.comment=Commentaire +tutti.editAccidentalBatch.table.header.comment.tip= 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.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 @@ -221,16 +226,27 @@ tutti.editBenthosBatch.split.weightNotNull.message=Pour catégoriser un lot, il ne doit pas avoir de poids sous-échantillonné. tutti.editBenthosBatch.split.weightNotNull.title=Poids sous-échantillonné non nul tutti.editBenthosBatch.table.header.ageCategory=Age +tutti.editBenthosBatch.table.header.ageCategory.tip= tutti.editBenthosBatch.table.header.comment=Commentaire +tutti.editBenthosBatch.table.header.comment.tip= tutti.editBenthosBatch.table.header.computedNumber=Nombre +tutti.editBenthosBatch.table.header.computedNumber.tip= tutti.editBenthosBatch.table.header.file=Pièces jointes +tutti.editBenthosBatch.table.header.file.tip= tutti.editBenthosBatch.table.header.maturityCategory=Maturité +tutti.editBenthosBatch.table.header.maturityCategory.tip= tutti.editBenthosBatch.table.header.sexCategory=Sexe +tutti.editBenthosBatch.table.header.sexCategory.tip= tutti.editBenthosBatch.table.header.sizeCategory=Class. Tri +tutti.editBenthosBatch.table.header.sizeCategory.tip= tutti.editBenthosBatch.table.header.sortedUnsortedCategory=V/HV (kg) +tutti.editBenthosBatch.table.header.sortedUnsortedCategory.tip= tutti.editBenthosBatch.table.header.species=Espèce +tutti.editBenthosBatch.table.header.species.tip= tutti.editBenthosBatch.table.header.toConfirm=A Confirmer +tutti.editBenthosBatch.table.header.toConfirm.tip= tutti.editBenthosBatch.table.header.weight=Poids sous-échantillonné (kg) +tutti.editBenthosBatch.table.header.weight.tip= tutti.editBenthosBatch.title.batchActions=Actions tutti.editBenthosFrequencies.action.cancel=Annuler tutti.editBenthosFrequencies.action.cancel.mnemonic=A @@ -468,19 +484,34 @@ tutti.editFishingOperation.label.traitReminder.inCreation=en cours de création tutti.editFishingOperation.pane.other=Autres caractéristiques tutti.editFishingOperation.tab.general=Trait +tutti.editMarineLitterBatch.field.marineLitterTotalWeight=Poids total (Kg) +tutti.editMarineLitterBatch.field.marineLitterTotalWeight.tip=Poids total (Kg) tutti.editMarineLitterBatch.table.header.comment=Commentaire +tutti.editMarineLitterBatch.table.header.comment.tip=Commentaire tutti.editMarineLitterBatch.table.header.file=Pièces jointes +tutti.editMarineLitterBatch.table.header.file.tip=Pièces jointes tutti.editMarineLitterBatch.table.header.marineLitterCategory=Catégorie +tutti.editMarineLitterBatch.table.header.marineLitterCategory.tip=Catégorie de déchets tutti.editMarineLitterBatch.table.header.marineLitterSizeCategory=Catégorie de taille +tutti.editMarineLitterBatch.table.header.marineLitterSizeCategory.tip=Catégorie de taille tutti.editMarineLitterBatch.table.header.number=Nombre +tutti.editMarineLitterBatch.table.header.number.tip=Nombre d'objets tutti.editMarineLitterBatch.table.header.weight=Poids +tutti.editMarineLitterBatch.table.header.weight.tip=Poids (Kg) tutti.editPlanktonBatch.table.header.comment=Commentaire +tutti.editPlanktonBatch.table.header.comment.tip= tutti.editPlanktonBatch.table.header.file=Pièces jointes +tutti.editPlanktonBatch.table.header.file.tip=Pièces jointes tutti.editPlanktonBatch.table.header.sampleWeight=Poids échantillonné +tutti.editPlanktonBatch.table.header.sampleWeight.tip= tutti.editPlanktonBatch.table.header.speciesByCode=Espèce +tutti.editPlanktonBatch.table.header.speciesByCode.tip= tutti.editPlanktonBatch.table.header.speciesByGenusCode=Espèce +tutti.editPlanktonBatch.table.header.speciesByGenusCode.tip= tutti.editPlanktonBatch.table.header.toConfirm=A Confirmer +tutti.editPlanktonBatch.table.header.toConfirm.tip= tutti.editPlanktonBatch.table.header.weight=Poids +tutti.editPlanktonBatch.table.header.weight.tip= tutti.editProgram.action.closeEditProgram=Fermer tutti.editProgram.action.closeEditProgram.mnemonic=r tutti.editProgram.action.closeEditProgram.tip=Annuler l'édition (ou la création) de la série de campagne
participants (1)
-
tchemit@users.forge.codelutin.com