r98 - in trunk: . tutti-persistence/src/main/xmi tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species tutti-ui-swing/src/main/res
Author: tchemit Date: 2012-12-20 17:08:26 +0100 (Thu, 20 Dec 2012) New Revision: 98 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/98 Log: back to compilerPlugin 2.5.1 + rename sorted and unsorted field in fishingOperation Modified: trunk/pom.xml trunk/tutti-persistence/src/main/xmi/tutti-persistence.zargo trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/AbstractTuttiBatchTableUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIHandler.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/EditCatchesUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyRowModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUIModel.java trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/pom.xml 2012-12-20 16:08:26 UTC (rev 98) @@ -81,6 +81,9 @@ <platform>forge.codelutin.com</platform> <projectId>tutti</projectId> + <!-- Remove this when using mavenpom 3.4.7 --> + <compilerPluginVersion>2.5.1</compilerPluginVersion> + <!-- libraries version --> <nuitonUtilsVersion>2.6.5</nuitonUtilsVersion> Modified: trunk/tutti-persistence/src/main/xmi/tutti-persistence.zargo =================================================================== (Binary files differ) Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/AbstractTuttiBatchTableUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/AbstractTuttiBatchTableUIHandler.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/AbstractTuttiBatchTableUIHandler.java 2012-12-20 16:08:26 UTC (rev 98) @@ -36,7 +36,6 @@ import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil; import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableModel; import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableUIHandler; -import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableUIModel; import fr.ifremer.tutti.ui.swing.util.table.TableRowModificationListener; import jaxx.runtime.SwingUtil; import org.apache.commons.logging.Log; @@ -61,9 +60,8 @@ * @author tchemit <chemit@codelutin.com> * @since 0.2 */ -public abstract class AbstractTuttiBatchTableUIHandler<R extends AbstractTuttiBeanUIModel, M extends AbstractTuttiTableUIModel<?, R, M>> extends AbstractTuttiTableUIHandler<R, M> { +public abstract class AbstractTuttiBatchTableUIHandler<R extends AbstractTuttiBeanUIModel, M extends AbstractTuttiBatchUIModel<R, M>> extends AbstractTuttiTableUIHandler<R, M> { - /** Logger. */ private static final Log log = LogFactory.getLog(AbstractTuttiBatchTableUIHandler.class); @@ -85,7 +83,7 @@ */ protected final PersistenceService persistenceService; - protected AbstractTuttiBatchTableUIHandler(TuttiUI<?,?> parentUi, + protected AbstractTuttiBatchTableUIHandler(TuttiUI<?, ?> parentUi, String... properties) { super(parentUi.getHandler().getContext(), properties); this.persistenceService = context.getService(PersistenceService.class); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.css 2012-12-20 16:08:26 UTC (rev 98) @@ -248,23 +248,22 @@ horizontalAlignment: {JLabel.CENTER}; } +#createFishingOperationActions { + visible: {model.isEmpty()}; +} + #saveButton { actionIcon: "save"; text: "tutti.action.save"; - enabled: {model.isModify() && model.isValid()}; + enabled: {model.isValid()}; } #cancelButton { actionIcon: "cancel"; text: "tutti.action.cancel"; - enabled: {model.isModify()}; + /*enabled: {model.isModify()};*/ } -#importPupitriButton { - actionIcon: "pupitri-import"; - text: "tutti.action.pupitri-import"; -} - #importCasinoButton { actionIcon: "casino-import"; text: "tutti.action.casino-import"; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUI.jaxx 2012-12-20 16:08:26 UTC (rev 98) @@ -295,7 +295,8 @@ <tab id='traitGearShootingTab' title='tutti.label.tab.fishingOperation.gearShooting'> - <GearShootingTabUI id='gearShootingTabContent' constructorParams='this'/> + <GearShootingTabUI id='gearShootingTabContent' + constructorParams='this'/> </tab> <tab id='environmentTab' @@ -314,7 +315,8 @@ <!-- Actions --> <JPanel layout='{new BorderLayout()}' constraints='BorderLayout.SOUTH'> - <JPanel layout='{new GridLayout(1,0)}' constraints='BorderLayout.CENTER'> + <JPanel id='createFishingOperationActions' layout='{new GridLayout(1,0)}' + constraints='BorderLayout.CENTER'> <JButton id='cancelButton' onActionPerformed='handler.cancel()'/> <JButton id='saveButton' onActionPerformed='handler.save()'/> </JPanel> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java 2012-12-20 16:08:26 UTC (rev 98) @@ -24,7 +24,6 @@ * #L% */ -import fr.ifremer.tutti.ui.swing.content.operation.fishing.gearshooting.GearShootingTabUI; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import fr.ifremer.tutti.persistence.entities.data.FishingOperation; @@ -36,9 +35,11 @@ import fr.ifremer.tutti.ui.swing.AbstractTuttiUIHandler; import fr.ifremer.tutti.ui.swing.content.operation.fishing.environment.EnvironmentTabUI; import fr.ifremer.tutti.ui.swing.content.operation.fishing.environment.EnvironmentTabUIModel; +import fr.ifremer.tutti.ui.swing.content.operation.fishing.gearshooting.GearShootingTabUI; import fr.ifremer.tutti.ui.swing.content.operation.fishing.gearshooting.GearShootingTabUIModel; import fr.ifremer.tutti.ui.swing.content.operation.fishing.hydrology.HydrologyTabUI; import fr.ifremer.tutti.ui.swing.content.operation.fishing.hydrology.HydrologyTabUIModel; +import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; @@ -72,11 +73,38 @@ private final PersistenceService persistenceService; - public EditFishingOperationUIHandler(FishingOperationsUI parentUi, EditFishingOperationUI ui) { + /** + * To monitor changes on the incoming fishing operation. + * + * @since 0.3 + */ + private final TuttiBeanMonitor<EditFishingOperationUIModel> fishingOperationMonitor; + + public EditFishingOperationUIHandler(FishingOperationsUI parentUi, + EditFishingOperationUI ui) { super(parentUi.getHandler().getContext()); this.ui = ui; this.parentUi = parentUi; this.persistenceService = context.getService(PersistenceService.class); + this.fishingOperationMonitor = new TuttiBeanMonitor<EditFishingOperationUIModel>( + EditFishingOperationUIModel.PROPERTY_STATION_NUMBER, + EditFishingOperationUIModel.PROPERTY_FISHING_OPERATION_NUMBER, + EditFishingOperationUIModel.PROPERTY_DATE, + EditFishingOperationUIModel.PROPERTY_STRATA, + EditFishingOperationUIModel.PROPERTY_SUB_STRATA, + EditFishingOperationUIModel.PROPERTY_GEAR_SHOOTING_START_LATITUDE, + EditFishingOperationUIModel.PROPERTY_GEAR_SHOOTING_START_LONGITUDE, + EditFishingOperationUIModel.PROPERTY_GEAR_SHOOTING_START_DATE, + EditFishingOperationUIModel.PROPERTY_GEAR_SHOOTING_END_LATITUDE, + EditFishingOperationUIModel.PROPERTY_GEAR_SHOOTING_END_LONGITUDE, + EditFishingOperationUIModel.PROPERTY_GEAR_SHOOTING_END_DATE, + EditFishingOperationUIModel.PROPERTY_FISHING_OPERATION_RECTILIGNE, + EditFishingOperationUIModel.PROPERTY_DISTANCE_CHALUTEE, + EditFishingOperationUIModel.PROPERTY_DUREE, + EditFishingOperationUIModel.PROPERTY_FISHING_OPERATION_VALID, + EditFishingOperationUIModel.PROPERTY_LOCATION, + EditFishingOperationUIModel.PROPERTY_COMMENT, + EditFishingOperationUIModel.PROPERTY_SAISISSEUR); } @Override @@ -119,9 +147,11 @@ } }); - listModelIsModify(model); +// listModelIsModify(model); ui.setContextValue(model); + + fishingOperationMonitor.setBean(model); } @Override @@ -184,9 +214,9 @@ model.setEmpty(true); listenValidatorValid(ui.getValidator(), getModel()); - + //init gear shooting - GearShootingTabUIModel gearShootingModel = + GearShootingTabUIModel gearShootingModel = ui.getGearShootingTabContent().getModel(); gearShootingModel.addPropertyChangeListener( EditFishingOperationUIModel.PROPERTY_GEAR_SHOOTING_PARAMETERS, @@ -194,16 +224,16 @@ public void propertyChange(PropertyChangeEvent evt) { model.setModify(true); - model.setGearShootingParameters((Map<Object, Object>)evt.getNewValue()); + model.setGearShootingParameters((Map<Object, Object>) evt.getNewValue()); } } - ); + ); Map<Object, Object> gearShootingParams = getDefaultGearShootingParams(); ui.getModel().setGearShootingParameters(gearShootingParams); gearShootingModel.setGearShootingParameters(gearShootingParams); - + //init environment - EnvironmentTabUIModel environmentModel = + EnvironmentTabUIModel environmentModel = ui.getEnvironmentTabContent().getModel(); environmentModel.addPropertyChangeListener( EditFishingOperationUIModel.PROPERTY_ENVIRONMENT_PARAMETERS, @@ -211,16 +241,16 @@ public void propertyChange(PropertyChangeEvent evt) { model.setModify(true); - model.setEnvironmentParameters((Map<Object, Object>)evt.getNewValue()); + model.setEnvironmentParameters((Map<Object, Object>) evt.getNewValue()); } } - ); + ); Map<Object, Object> environmentParams = getDefaultEnvironmentParams(); ui.getModel().setEnvironmentParameters(environmentParams); environmentModel.setEnvironmentParameters(environmentParams); - + //init hydrology - HydrologyTabUIModel hydrologyModel = + HydrologyTabUIModel hydrologyModel = ui.getHydrologyTabContent().getModel(); hydrologyModel.addPropertyChangeListener( EditFishingOperationUIModel.PROPERTY_HYDROLOGY_PARAMETERS, @@ -270,10 +300,10 @@ _(new String("tutti.table.fishing.gearShooting.keys." + GearShootingTabUIModel.KEY_MEASURED_GEOMETRY)), null ); - + return gearShootingParams; } - + protected Map<Object, Object> getDefaultEnvironmentParams() { Map<Object, Object> environmentParams = Maps.newLinkedHashMap(); environmentParams.put( @@ -296,19 +326,19 @@ hydrologyParams.put( _(new String("tutti.table.fishing.hydrology.keys." + HydrologyTabUIModel.TEMPERATURE + "." + HydrologyTabUIModel.SURFACE)), null - ); + ); hydrologyParams.put( - _(new String("tutti.table.fishing.hydrology.keys." + HydrologyTabUIModel.TEMPERATURE + "." + HydrologyTabUIModel.BOTTOM)), + _(new String("tutti.table.fishing.hydrology.keys." + HydrologyTabUIModel.TEMPERATURE + "." + HydrologyTabUIModel.BOTTOM)), null - ); + ); hydrologyParams.put( _(new String("tutti.table.fishing.hydrology.keys." + HydrologyTabUIModel.SALINITY + "." + HydrologyTabUIModel.SURFACE)), null - ); + ); hydrologyParams.put( - _(new String("tutti.table.fishing.hydrology.keys." + HydrologyTabUIModel.SALINITY + "." + HydrologyTabUIModel.BOTTOM)), + _(new String("tutti.table.fishing.hydrology.keys." + HydrologyTabUIModel.SALINITY + "." + HydrologyTabUIModel.BOTTOM)), null - ); + ); return hydrologyParams; } @@ -323,6 +353,31 @@ public void selectFishingOperation(FishingOperation bean) { + if (fishingOperationMonitor.wasModified()) { + + // previous fishingOperation was modified, let's save it + EditFishingOperationUIModel beanToSave = fishingOperationMonitor.getBean(); + + if (beanToSave.isEmpty()) { + + // user must use save button + if (log.isWarnEnabled()) { + log.warn("Won't save new fishing operation, use explicit save button instead..."); + } + } else { + + // save modified fishing operation + FishingOperation toSave = beanToSave.toBean(); + + if (log.isInfoEnabled()) { + log.info("FishingOperation " + toSave.getId() + + " was modified, will save it."); + } + + parentUi.getHandler().saveFishingOperation(toSave); + } + } + boolean empty = bean == null; EditFishingOperationUIModel model = getModel(); @@ -338,6 +393,11 @@ model.fromBean(bean); + // to be sure combo list will be reloaded + model.setStrata(null); + model.setSubStrata(null); + model.setLocation(null); + if (strata != null) { ui.getStrataComboBox().setSelectedItem(strata); } @@ -366,16 +426,18 @@ GearShootingTabUI gearShootingTab = ui.getGearShootingTabContent(); gearShootingTab.getModel().setGearShootingParameters(getDefaultGearShootingParams()); gearShootingTab.getHandler().reset(); - + //reset environment EnvironmentTabUI environmentTab = ui.getEnvironmentTabContent(); environmentTab.getModel().setEnvironmentParameters(getDefaultEnvironmentParams()); environmentTab.getHandler().reset(); - + //reset hydrology HydrologyTabUI hydrologyTab = ui.getHydrologyTabContent(); hydrologyTab.getModel().setHydrologyParameters(getDefaultHydrologyParams()); hydrologyTab.getHandler().reset(); + + fishingOperationMonitor.clearModified(); } public void cancel() { @@ -419,21 +481,17 @@ // reselect current tab ui.getFishingOperationTabPane().setSelectedIndex(selectedIndex); - getModel().setModify(false); - +// getModel().setModify(false); + for (Object key : ui.getModel().getEnvironmentParameters().keySet()) { log.info(key + " : " + ui.getModel().getEnvironmentParameters().get(key)); } - + for (Object key : ui.getModel().getHydrologyParameters().keySet()) { log.info(key + " : " + ui.getModel().getHydrologyParameters().get(key)); } } - public void importPupitri() { - //TODO - } - public void importCasino() { //TODO } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIHandler.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/FishingOperationsUIHandler.java 2012-12-20 16:08:26 UTC (rev 98) @@ -198,16 +198,13 @@ } // propagate fishingOperation to his tabs - ui.getFishingOperationTabContent().getHandler().selectFishingOperation(fishingOperation - ); + ui.getFishingOperationTabContent().getHandler().selectFishingOperation(fishingOperation); ui.getCatchesTabContent().getHandler().selectFishingOperation(fishingOperation, fishingOperationText); - // repaint tabs ui.getTabPane().repaint(); -// ui.getObservationIndividuelTabContent().selectFishingOperation(selectedFishingOperation); } public void saveFishingOperation(FishingOperation toSave) { @@ -229,7 +226,8 @@ List<FishingOperation> data = model.getFishingOperation(); - FishingOperation existingFishingOperation = TuttiEntities.findById(data, savedFishingOperation.getId()); + FishingOperation existingFishingOperation = + TuttiEntities.findById(data, savedFishingOperation.getId()); if (existingFishingOperation != null) { data.remove(existingFishingOperation); } 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 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.css 2012-12-20 16:08:26 UTC (rev 98) @@ -61,37 +61,37 @@ numberPattern: {INT_6_DIGITS_PATTERN}; } -#speciesTotalVracWeightLabel { - text: "tutti.label.catches.speciesTotalVracWeight"; - labelFor: {speciesTotalVracWeightField}; +#speciesTotalSortedWeightLabel { + text: "tutti.label.catches.speciesTotalSortedWeight"; + labelFor: {speciesTotalSortedWeightField}; } -#speciesTotalVracWeightField { - property: "speciesTotalVracWeight"; - model: {model.getSpeciesTotalVracWeight()}; +#speciesTotalSortedWeightField { + property: "speciesTotalSortedWeight"; + model: {model.getSpeciesTotalSortedWeight()}; useFloat: false; numberPattern: {INT_6_DIGITS_PATTERN}; } -#speciesSampleVracWeightLabel { - text: "tutti.label.catches.speciesSampleVracWeight"; - labelFor: {speciesSampleVracWeightField}; +#speciesSampleSortedWeightLabel { + text: "tutti.label.catches.speciesSampleSortedWeight"; + labelFor: {speciesSampleSortedWeightField}; } -#speciesSampleVracWeightField { - property: "speciesSampleVracWeight"; - model: {model.getSpeciesSampleVracWeight()}; +#speciesSampleSortedWeightField { + property: "speciesSampleSortedWeight"; + model: {model.getSpeciesSampleSortedWeight()}; useFloat: false; numberPattern: {INT_6_DIGITS_PATTERN}; } -#speciesTotalHorsVracWeightLabel { - text: "tutti.label.catches.speciesTotalHorsVracWeight"; - labelFor: {speciesTotalHorsVracWeightField}; +#speciesTotalUnsortedWeightLabel { + text: "tutti.label.catches.speciesTotalUnsortedWeight"; + labelFor: {speciesTotalUnsortedWeightField}; } -#speciesTotalHorsVracWeightField { - text: {getStringValue(model.getSpeciesTotalHorsVracWeight())}; +#speciesTotalUnsortedWeightField { + text: {getStringValue(model.getSpeciesTotalUnsortedWeight())}; editable: 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 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUI.jaxx 2012-12-20 16:08:26 UTC (rev 98) @@ -25,8 +25,6 @@ implements='fr.ifremer.tutti.ui.swing.TuttiUI<EditCatchesUIModel, EditCatchesUIHandler>'> <import> - fr.ifremer.tutti.ui.swing.TuttiUIContext - fr.ifremer.tutti.ui.swing.content.operation.FishingOperationsUI fr.ifremer.tutti.ui.swing.content.operation.accidental.AccidentalBatchUI fr.ifremer.tutti.ui.swing.content.operation.benthos.BenthosBatchUI @@ -34,10 +32,7 @@ fr.ifremer.tutti.ui.swing.content.operation.plankton.PlanktonBatchUI fr.ifremer.tutti.ui.swing.content.operation.species.SpeciesBatchUI fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUI - fr.ifremer.tutti.ui.swing.util.editor.LongTextEditorUI - fr.ifremer.tutti.ui.swing.util.editor.AttachmentEditorUI - org.jdesktop.swingx.JXTable org.jdesktop.swingx.JXTitledPanel jaxx.runtime.swing.editor.NumberEditor @@ -45,10 +40,6 @@ jaxx.runtime.validator.swing.SwingValidatorUtil jaxx.runtime.validator.swing.SwingValidatorMessageTableModel - javax.swing.ListSelectionModel - - java.awt.Color - static org.nuiton.i18n.I18n._ static jaxx.runtime.SwingUtil.getStringValue </import> @@ -77,12 +68,12 @@ uiClass='jaxx.runtime.validator.swing.ui.ImageValidationUI'> <field name='speciesTotalWeight' component='speciesTotalWeightField'/> - <field name='speciesTotalVracWeight' - component='speciesTotalVracWeightField'/> - <field name='speciesSampleVracWeight' - component='speciesSampleVracWeightField'/> - <field name='speciesTotalHorsVracWeight' - component='speciesTotalHorsVracWeightField'/> + <field name='speciesTotalSortedWeight' + component='speciesTotalSortedWeightField'/> + <field name='speciesSampleSortedWeight' + component='speciesSampleSortedWeightField'/> + <field name='speciesTotalUnsortedWeight' + component='speciesTotalUnsortedWeightField'/> <field name='benthosTotalWeight' component='benthosTotalWeightField'/> <field name='benthosSampleTotalWeight' @@ -114,10 +105,10 @@ constructorParams='this'/> </cell> <cell anchor='west'> - <JLabel id='speciesTotalVracWeightLabel'/> + <JLabel id='speciesTotalSortedWeightLabel'/> </cell> <cell weightx='1.0'> - <NumberEditor id='speciesTotalVracWeightField' + <NumberEditor id='speciesTotalSortedWeightField' constructorParams='this'/> </cell> </row> @@ -125,17 +116,17 @@ <!-- Poids échantillonné vrac / Poids total hors vrac --> <row> <cell> - <JLabel id='speciesSampleVracWeightLabel'/> + <JLabel id='speciesSampleSortedWeightLabel'/> </cell> <cell> - <NumberEditor id='speciesSampleVracWeightField' + <NumberEditor id='speciesSampleSortedWeightField' constructorParams='this'/> </cell> <cell> - <JLabel id='speciesTotalHorsVracWeightLabel'/> + <JLabel id='speciesTotalUnsortedWeightLabel'/> </cell> <cell> - <JTextField id='speciesTotalHorsVracWeightField'/> + <JTextField id='speciesTotalUnsortedWeightField'/> </cell> </row> </Table> 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 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIHandler.java 2012-12-20 16:08:26 UTC (rev 98) @@ -69,9 +69,9 @@ this.persistenceService = context.getService(PersistenceService.class); this.fishingOperationMonitor = new TuttiBeanMonitor<EditCatchesUIModel>( EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_WEIGHT, - EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_HORS_VRAC_WEIGHT, - EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_VRAC_WEIGHT, - EditCatchesUIModel.PROPERTY_SPECIES_SAMPLE_VRAC_WEIGHT, + EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_UNSORTED_WEIGHT, + EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, + EditCatchesUIModel.PROPERTY_SPECIES_SAMPLE_SORTED_WEIGHT, EditCatchesUIModel.PROPERTY_BENTHOS_TOTAL_WEIGHT, EditCatchesUIModel.PROPERTY_BENTHOS_SAMPLE_TOTAL_WEIGHT, EditCatchesUIModel.PROPERTY_PLANKTON_TOTAL_WEIGHT, @@ -97,6 +97,12 @@ @Override public void onCloseUI() { + + if (log.isInfoEnabled()) { + log.info("closing: " + ui); + } + + // close batches tabs, then general tab } @Override @@ -150,16 +156,11 @@ ui.getMacroWasteTabFishingOperationReminderLabel().setTitle(fishingOperationText); ui.getAccidentalTabFishingOperationReminderLabel().setTitle(fishingOperationText); - ui.getSpeciesTabContent().getHandler().selectFishingOperation(bean - ); - ui.getBenthosTabContent().getHandler().selectFishingOperation(bean - ); - ui.getPlanktonTabContent().getHandler().selectFishingOperation(bean - ); - ui.getMacroWasteTabContent().getHandler().selectFishingOperation(bean - ); - ui.getAccidentalTabContent().getHandler().selectFishingOperation(bean - ); + ui.getSpeciesTabContent().getHandler().selectFishingOperation(bean); + ui.getBenthosTabContent().getHandler().selectFishingOperation(bean); + ui.getPlanktonTabContent().getHandler().selectFishingOperation(bean); + ui.getMacroWasteTabContent().getHandler().selectFishingOperation(bean); + ui.getAccidentalTabContent().getHandler().selectFishingOperation(bean); ui.getTabPane().repaint(); } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIModel.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/EditCatchesUIModel.java 2012-12-20 16:08:26 UTC (rev 98) @@ -39,11 +39,11 @@ public static final String PROPERTY_SPECIES_TOTAL_WEIGHT = "speciesTotalWeight"; - public static final String PROPERTY_SPECIES_TOTAL_VRAC_WEIGHT = "speciesTotalVracWeight"; + public static final String PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT = "speciesTotalSortedWeight"; - public static final String PROPERTY_SPECIES_SAMPLE_VRAC_WEIGHT = "speciesSampleVracWeight"; + public static final String PROPERTY_SPECIES_SAMPLE_SORTED_WEIGHT = "speciesSampleSortedWeight"; - public static final String PROPERTY_SPECIES_TOTAL_HORS_VRAC_WEIGHT = "speciesTotalHorsVracWeight"; + public static final String PROPERTY_SPECIES_TOTAL_UNSORTED_WEIGHT = "speciesTotalUnsortedWeight"; public static final String PROPERTY_BENTHOS_TOTAL_WEIGHT = "benthosTotalWeight"; @@ -60,9 +60,9 @@ protected static final Binder<FishingOperation, EditCatchesUIModel> fromBeanBinder = BinderModelBuilder.newEmptyBuilder(FishingOperation.class, EditCatchesUIModel.class) .addSimpleProperties( PROPERTY_SPECIES_TOTAL_WEIGHT, - PROPERTY_SPECIES_TOTAL_VRAC_WEIGHT, - PROPERTY_SPECIES_TOTAL_HORS_VRAC_WEIGHT, - PROPERTY_SPECIES_SAMPLE_VRAC_WEIGHT, + PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, + PROPERTY_SPECIES_TOTAL_UNSORTED_WEIGHT, + PROPERTY_SPECIES_SAMPLE_SORTED_WEIGHT, PROPERTY_BENTHOS_TOTAL_WEIGHT, PROPERTY_BENTHOS_SAMPLE_TOTAL_WEIGHT, PROPERTY_PLANKTON_TOTAL_WEIGHT, @@ -73,9 +73,9 @@ protected static final Binder<EditCatchesUIModel, FishingOperation> toBeanBinder = BinderModelBuilder.newEmptyBuilder(EditCatchesUIModel.class, FishingOperation.class) .addSimpleProperties( PROPERTY_SPECIES_TOTAL_WEIGHT, - PROPERTY_SPECIES_TOTAL_VRAC_WEIGHT, - PROPERTY_SPECIES_TOTAL_HORS_VRAC_WEIGHT, - PROPERTY_SPECIES_SAMPLE_VRAC_WEIGHT, + PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, + PROPERTY_SPECIES_TOTAL_UNSORTED_WEIGHT, + PROPERTY_SPECIES_SAMPLE_SORTED_WEIGHT, PROPERTY_BENTHOS_TOTAL_WEIGHT, PROPERTY_BENTHOS_SAMPLE_TOTAL_WEIGHT, PROPERTY_PLANKTON_TOTAL_WEIGHT, @@ -85,11 +85,11 @@ protected Float speciesTotalWeight; - protected Float speciesTotalVracWeight; + protected Float speciesTotalSortedWeight; - protected Float speciesSampleVracWeight; + protected Float speciesSampleSortedWeight; - protected Float speciesTotalHorsVracWeight; + protected Float speciesTotalUnsortedWeight; protected Float benthosTotalWeight; @@ -127,34 +127,34 @@ firePropertyChange(PROPERTY_SPECIES_TOTAL_WEIGHT, oldValue, speciesTotalWeight); } - public Float getSpeciesTotalVracWeight() { - return speciesTotalVracWeight; + public Float getSpeciesTotalSortedWeight() { + return speciesTotalSortedWeight; } - public void setSpeciesTotalVracWeight(Float speciesTotalVracWeight) { - Object oldValue = getSpeciesTotalVracWeight(); - this.speciesTotalVracWeight = speciesTotalVracWeight; - firePropertyChange(PROPERTY_SPECIES_TOTAL_VRAC_WEIGHT, oldValue, speciesTotalVracWeight); + public void setSpeciesTotalSortedWeight(Float speciesTotalSortedWeight) { + Object oldValue = getSpeciesTotalSortedWeight(); + this.speciesTotalSortedWeight = speciesTotalSortedWeight; + firePropertyChange(PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, oldValue, speciesTotalSortedWeight); } - public Float getSpeciesSampleVracWeight() { - return speciesSampleVracWeight; + public Float getSpeciesSampleSortedWeight() { + return speciesSampleSortedWeight; } - public void setSpeciesSampleVracWeight(Float speciesSampleVracWeight) { - Object oldValue = getSpeciesSampleVracWeight(); - this.speciesSampleVracWeight = speciesSampleVracWeight; - firePropertyChange(PROPERTY_SPECIES_SAMPLE_VRAC_WEIGHT, oldValue, speciesSampleVracWeight); + public void setSpeciesSampleSortedWeight(Float speciesSampleSortedWeight) { + Object oldValue = getSpeciesSampleSortedWeight(); + this.speciesSampleSortedWeight = speciesSampleSortedWeight; + firePropertyChange(PROPERTY_SPECIES_SAMPLE_SORTED_WEIGHT, oldValue, speciesSampleSortedWeight); } - public Float getSpeciesTotalHorsVracWeight() { - return speciesTotalHorsVracWeight; + public Float getSpeciesTotalUnsortedWeight() { + return speciesTotalUnsortedWeight; } - public void setSpeciesTotalHorsVracWeight(Float speciesTotalHorsVracWeight) { - Object oldValue = getSpeciesTotalHorsVracWeight(); - this.speciesTotalHorsVracWeight = speciesTotalHorsVracWeight; - firePropertyChange(PROPERTY_SPECIES_TOTAL_HORS_VRAC_WEIGHT, oldValue, speciesTotalHorsVracWeight); + public void setSpeciesTotalUnsortedWeight(Float speciesTotalUnsortedWeight) { + Object oldValue = getSpeciesTotalUnsortedWeight(); + this.speciesTotalUnsortedWeight = speciesTotalUnsortedWeight; + firePropertyChange(PROPERTY_SPECIES_TOTAL_UNSORTED_WEIGHT, oldValue, speciesTotalUnsortedWeight); } public Float getBenthosTotalWeight() { Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingRowModel.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingRowModel.java 2012-12-20 16:08:26 UTC (rev 98) @@ -1,5 +1,29 @@ package fr.ifremer.tutti.ui.swing.content.operation.fishing.gearshooting; +/* + * #%L + * Tutti :: UI + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ifremer.tutti.ui.swing.AbstractTuttiBeanUIModel; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUI.jaxx 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUI.jaxx 2012-12-20 16:08:26 UTC (rev 98) @@ -1,3 +1,26 @@ +<!-- + #%L + Tutti :: UI + $Id$ + $HeadURL$ + %% + Copyright (C) 2012 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> <Table implements='fr.ifremer.tutti.ui.swing.TuttiUI<GearShootingTabUIModel, GearShootingTabUIHandler>'> <import> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUIHandler.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/gearshooting/GearShootingTabUIHandler.java 2012-12-20 16:08:26 UTC (rev 98) @@ -1,5 +1,29 @@ package fr.ifremer.tutti.ui.swing.content.operation.fishing.gearshooting; +/* + * #%L + * Tutti :: UI + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.collect.Lists; import fr.ifremer.tutti.ui.swing.content.operation.EditFishingOperationUI; import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyRowModel.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyRowModel.java 2012-12-20 16:08:26 UTC (rev 98) @@ -1,5 +1,29 @@ package fr.ifremer.tutti.ui.swing.content.operation.fishing.hydrology; +/* + * #%L + * Tutti :: UI + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ifremer.tutti.ui.swing.AbstractTuttiBeanUIModel; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.css 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.css 2012-12-20 16:08:26 UTC (rev 98) @@ -1,3 +1,26 @@ +/* + * #%L + * Tutti :: UI + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 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% + */ #hydrologyTable { selectionMode: {ListSelectionModel.SINGLE_SELECTION}; selectionBackground: {null}; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.jaxx 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUI.jaxx 2012-12-20 16:08:26 UTC (rev 98) @@ -1,3 +1,26 @@ +<!-- + #%L + Tutti :: UI + $Id$ + $HeadURL$ + %% + Copyright (C) 2012 Ifremer + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> <Table implements='fr.ifremer.tutti.ui.swing.TuttiUI<HydrologyTabUIModel, HydrologyTabUIHandler>'> <import> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIHandler.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIHandler.java 2012-12-20 16:08:26 UTC (rev 98) @@ -1,5 +1,29 @@ package fr.ifremer.tutti.ui.swing.content.operation.fishing.hydrology; +/* + * #%L + * Tutti :: UI + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.collect.Lists; import fr.ifremer.tutti.ui.swing.content.operation.EditFishingOperationUI; import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIModel.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/fishing/hydrology/HydrologyTabUIModel.java 2012-12-20 16:08:26 UTC (rev 98) @@ -1,5 +1,29 @@ package fr.ifremer.tutti.ui.swing.content.operation.fishing.hydrology; +/* + * #%L + * Tutti :: UI + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2012 Ifremer + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.collect.Maps; import java.util.Map; import fr.ifremer.tutti.persistence.entities.data.FishingOperation; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUI.css 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUI.css 2012-12-20 16:08:26 UTC (rev 98) @@ -41,37 +41,37 @@ numberPattern: {INT_6_DIGITS_PATTERN}; } -#speciesTotalVracWeightLabel { - text: "tutti.label.catches.speciesTotalVracWeight"; - labelFor: {speciesTotalVracWeightField}; +#speciesTotalSortedWeightLabel { + text: "tutti.label.catches.speciesTotalSortedWeight"; + labelFor: {speciesTotalSortedWeightField}; } -#speciesTotalVracWeightField { - property: "speciesTotalVracWeight"; - model: {model.getSpeciesTotalVracWeight()}; +#speciesTotalSortedWeightField { + property: "speciesTotalSortedWeight"; + model: {model.getSpeciesTotalSortedWeight()}; useFloat: false; numberPattern: {INT_6_DIGITS_PATTERN}; } -#speciesSampleVracWeightLabel { - text: "tutti.label.catches.speciesSampleVracWeight"; - labelFor: {speciesSampleVracWeightField}; +#speciesSampleSortedWeightLabel { + text: "tutti.label.catches.speciesSampleSortedWeight"; + labelFor: {speciesSampleSortedWeightField}; } -#speciesSampleVracWeightField { - property: "speciesSampleVracWeight"; - model: {model.getSpeciesSampleVracWeight()}; +#speciesSampleSortedWeightField { + property: "speciesSampleSortedWeight"; + model: {model.getSpeciesSampleSortedWeight()}; useFloat: false; numberPattern: {INT_6_DIGITS_PATTERN}; } -#speciesTotalHorsVracWeightLabel { - text: "tutti.label.catches.speciesTotalHorsVracWeight"; - labelFor: {speciesTotalHorsVracWeightField}; +#speciesTotalUnsortedWeightLabel { + text: "tutti.label.catches.speciesTotalUnsortedWeight"; + labelFor: {speciesTotalUnsortedWeightField}; } -#speciesTotalHorsVracWeightField { - text: {getStringValue(model.getSpeciesTotalHorsVracWeight())}; +#speciesTotalUnsortedWeightField { + text: {getStringValue(model.getSpeciesTotalUnsortedWeight())}; editable: false; } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUI.jaxx 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUI.jaxx 2012-12-20 16:08:26 UTC (rev 98) @@ -69,12 +69,12 @@ <BeanValidator id='validator' bean='model' errorTableModel='errorTableModel' uiClass='jaxx.runtime.validator.swing.ui.ImageValidationUI'> <field name='speciesTotalWeight' component='speciesTotalWeightField'/> - <field name='speciesTotalVracWeight' - component='speciesTotalVracWeightField'/> - <field name='speciesSampleVracWeight' - component='speciesSampleVracWeightField'/> - <field name='speciesTotalHorsVracWeight' - component='speciesTotalHorsVracWeightField'/> + <field name='speciesTotalSortedWeight' + component='speciesTotalSortedWeightField'/> + <field name='speciesSampleSortedWeight' + component='speciesSampleSortedWeightField'/> + <field name='speciesTotalUnsortedWeight' + component='speciesTotalUnsortedWeightField'/> </BeanValidator> <SpeciesFrequencyUI id='frequencyEditor' @@ -94,10 +94,10 @@ <NumberEditor id='speciesTotalWeightField' constructorParams='this'/> </cell> <cell anchor='west'> - <JLabel id='speciesTotalVracWeightLabel'/> + <JLabel id='speciesTotalSortedWeightLabel'/> </cell> <cell weightx='1.0'> - <NumberEditor id='speciesTotalVracWeightField' + <NumberEditor id='speciesTotalSortedWeightField' constructorParams='this'/> </cell> </row> @@ -105,17 +105,17 @@ <!-- Poids échantillonné vrac / Poids total hors vrac --> <row> <cell> - <JLabel id='speciesSampleVracWeightLabel'/> + <JLabel id='speciesSampleSortedWeightLabel'/> </cell> <cell> - <NumberEditor id='speciesSampleVracWeightField' + <NumberEditor id='speciesSampleSortedWeightField' constructorParams='this'/> </cell> <cell> - <JLabel id='speciesTotalHorsVracWeightLabel'/> + <JLabel id='speciesTotalUnsortedWeightLabel'/> </cell> <cell> - <JTextField id='speciesTotalHorsVracWeightField'/> + <JTextField id='speciesTotalUnsortedWeightField'/> </cell> </row> </Table> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUIHandler.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUIHandler.java 2012-12-20 16:08:26 UTC (rev 98) @@ -528,7 +528,6 @@ } } } - model.setRows(rows); } @@ -652,7 +651,8 @@ Float totalVrac = 0f; for (SpeciesBatchRowModel batch : getModel().getRows()) { - CaracteristicQualitativeValue vracHorsVrac = batch.getSortedUnsortedCategory(); + CaracteristicQualitativeValue vracHorsVrac = + batch.getSortedUnsortedCategory(); if (vracHorsVrac == null) { @@ -676,7 +676,7 @@ log.info("New total vrac / hors vrac: " + totalVrac + " / " + totalHorsVrac); } - getModel().setSpeciesTotalHorsVracWeight(totalHorsVrac); + getModel().setSpeciesTotalUnsortedWeight(totalHorsVrac); //TODO Should we also set the total vrac weight ? // getModel().setTotalVracWeight(totalVrac); } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUIModel.java 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/species/SpeciesBatchUIModel.java 2012-12-20 16:08:26 UTC (rev 98) @@ -24,7 +24,6 @@ * #L% */ -import fr.ifremer.tutti.persistence.entities.data.FishingOperation; import fr.ifremer.tutti.ui.swing.content.operation.AbstractTuttiBatchUIModel; import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIModel; @@ -55,9 +54,9 @@ public SpeciesBatchUIModel(EditCatchesUIModel catchesUIModel) { super(catchesUIModel, EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_WEIGHT, - EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_VRAC_WEIGHT, - EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_HORS_VRAC_WEIGHT, - EditCatchesUIModel.PROPERTY_SPECIES_SAMPLE_VRAC_WEIGHT); + EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_SORTED_WEIGHT, + EditCatchesUIModel.PROPERTY_SPECIES_TOTAL_UNSORTED_WEIGHT, + EditCatchesUIModel.PROPERTY_SPECIES_SAMPLE_SORTED_WEIGHT); this.samplingTreeModel = new SpeciesBatchTreeModel(); } @@ -69,28 +68,28 @@ catchesUIModel.setSpeciesTotalWeight(speciesTotalWeight); } - public Float getSpeciesTotalVracWeight() { - return catchesUIModel.getSpeciesTotalVracWeight(); + public Float getSpeciesTotalSortedWeight() { + return catchesUIModel.getSpeciesTotalSortedWeight(); } - public void setSpeciesTotalVracWeight(Float speciesTotalVracWeight) { - catchesUIModel.setSpeciesTotalVracWeight(speciesTotalVracWeight); + public void setSpeciesTotalSortedWeight(Float speciesTotalSortedWeight) { + catchesUIModel.setSpeciesTotalSortedWeight(speciesTotalSortedWeight); } - public Float getSpeciesSampleVracWeight() { - return catchesUIModel.getSpeciesSampleVracWeight(); + public Float getSpeciesSampleSortedWeight() { + return catchesUIModel.getSpeciesSampleSortedWeight(); } - public void setSpeciesSampleVracWeight(Float speciesSampleVracWeight) { - catchesUIModel.setSpeciesSampleVracWeight(speciesSampleVracWeight); + public void setSpeciesSampleSortedWeight(Float speciesSampleSortedWeight) { + catchesUIModel.setSpeciesSampleSortedWeight(speciesSampleSortedWeight); } - public Float getSpeciesTotalHorsVracWeight() { - return catchesUIModel.getSpeciesTotalHorsVracWeight(); + public Float getSpeciesTotalUnsortedWeight() { + return catchesUIModel.getSpeciesTotalUnsortedWeight(); } - public void setSpeciesTotalHorsVracWeight(Float speciesTotalHorsVracWeight) { - catchesUIModel.setSpeciesTotalHorsVracWeight(speciesTotalHorsVracWeight); + public void setSpeciesTotalUnsortedWeight(Float speciesTotalUnsortedWeight) { + catchesUIModel.setSpeciesTotalUnsortedWeight(speciesTotalUnsortedWeight); } public SpeciesBatchTreeModel getSamplingTreeModel() { 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 2012-12-20 15:31:40 UTC (rev 97) +++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2012-12-20 16:08:26 UTC (rev 98) @@ -50,9 +50,9 @@ tutti.label.catches.macroWasteTotalWeight=Poids total tutti.label.catches.planktonSampleTotalWeight=Poids total échantillonné tutti.label.catches.planktonTotalWeight=Poids total -tutti.label.catches.speciesSampleVracWeight=Poids total vrac échantillon -tutti.label.catches.speciesTotalHorsVracWeight=Poids total hors vrac -tutti.label.catches.speciesTotalVracWeight=Poids total vrac +tutti.label.catches.speciesSampleSortedWeight=Poids total vrac échantillon +tutti.label.catches.speciesTotalSortedWeight=Poids total vrac +tutti.label.catches.speciesTotalUnsortedWeight=Poids total hors vrac tutti.label.catches.speciesTotalWeight=Poids total tutti.label.comment=Commentaire tutti.label.cruise=Campagne @@ -123,7 +123,7 @@ tutti.label.program.name=Nom tutti.label.program.zone=Zone tutti.label.protocol=Protocol de saisie -tutti.label.species.speciesTotalHorsVracWeight= +tutti.label.species.speciesTotalUnsortedWeight= tutti.label.tab.accidentel=Captures accidentelles tutti.label.tab.benthos=Benthos tutti.label.tab.catches=Captures
participants (1)
-
tchemit@users.forge.codelutin.com