Author: kmorin Date: 2013-03-26 18:14:14 +0100 (Tue, 26 Mar 2013) New Revision: 684 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/684 Log: refs #1868 [CAPTURE] - Import/Export PUPITRI Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchRowModel.java Removed: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SplitSpeciesBatchRowModel.java Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ImportPupitriAction.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchTableModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ImportPupitriAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ImportPupitriAction.java 2013-03-26 17:02:29 UTC (rev 683) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ImportPupitriAction.java 2013-03-26 17:14:14 UTC (rev 684) @@ -42,7 +42,7 @@ import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchRowModel; import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchUIHandler; import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchUIModel; -import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SplitSpeciesBatchRowModel; +import fr.ifremer.tutti.ui.swing.content.operation.catches.species.split.SplitSpeciesBatchRowModel; import fr.ifremer.tutti.ui.swing.util.AbstractTuttiUIHandler; import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction; import org.apache.commons.logging.Log; 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-03-26 17:02:29 UTC (rev 683) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-03-26 17:14:14 UTC (rev 684) @@ -48,8 +48,8 @@ import fr.ifremer.tutti.ui.swing.content.operation.catches.species.create.CreateSpeciesBatchUI; import fr.ifremer.tutti.ui.swing.content.operation.catches.species.frequency.SpeciesFrequencyCellComponent; import fr.ifremer.tutti.ui.swing.content.operation.catches.species.frequency.SpeciesFrequencyRowModel; +import fr.ifremer.tutti.ui.swing.content.operation.catches.species.split.SplitSpeciesBatchRowModel; import fr.ifremer.tutti.ui.swing.content.operation.catches.species.split.SplitSpeciesBatchUI; -import fr.ifremer.tutti.ui.swing.content.operation.catches.species.split.SplitSpeciesBatchUIModel; import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor; import fr.ifremer.tutti.ui.swing.util.TuttiUI; import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil; Deleted: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SplitSpeciesBatchRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SplitSpeciesBatchRowModel.java 2013-03-26 17:02:29 UTC (rev 683) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SplitSpeciesBatchRowModel.java 2013-03-26 17:14:14 UTC (rev 684) @@ -1,102 +0,0 @@ -package fr.ifremer.tutti.ui.swing.content.operation.catches.species; - -/* - * #%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.persistence.entities.data.SampleCategoryEnum; -import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue; -import fr.ifremer.tutti.ui.swing.content.operation.catches.SampleCategory; -import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel; -import org.nuiton.util.beans.Binder; -import org.nuiton.util.beans.BinderFactory; - -import java.io.Serializable; - -/** - * A row in the {@link SplitSpeciesBatchUIModel}. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.3 - */ -public class SplitSpeciesBatchRowModel - extends AbstractTuttiBeanUIModel<SplitSpeciesBatchRowModel, SplitSpeciesBatchRowModel> { - - private static final long serialVersionUID = 1L; - - public static final String PROPERTY_CATEGORY_VALUE = "categoryValue"; - - public static final String PROPERTY_WEIGHT = "weight"; - - /** - * Delegate sample category which contains category value + weight. - * - * @since 0.3 - */ - protected final SampleCategory<Serializable> category = SampleCategory.newSample(null); - - public SplitSpeciesBatchRowModel() { - super(SplitSpeciesBatchRowModel.class, null, null); - } - - public SampleCategoryEnum getCategoryType() { - return category.getCategoryType(); - } - - public void setCategoryType(SampleCategoryEnum categoryType) { - category.setCategoryType(categoryType); - } - - public Serializable getCategoryValue() { - return category.getCategoryValue(); - } - - public void setCategoryValue(Serializable categoryValue) { - Object oldValue = getCategoryValue(); - category.setCategoryValue(categoryValue); - firePropertyChange(PROPERTY_CATEGORY_VALUE, oldValue, categoryValue); - } - - public void setCategoryValue(CaracteristicQualitativeValue categoryValue) { - Object oldValue = getCategoryValue(); - category.setCategoryValue(categoryValue); - firePropertyChange(PROPERTY_CATEGORY_VALUE, oldValue, categoryValue); - } - - public void setCategoryValue(Float categoryValue) { - Object oldValue = getCategoryValue(); - category.setCategoryValue(categoryValue); - firePropertyChange(PROPERTY_CATEGORY_VALUE, oldValue, categoryValue); - } - - public Float getWeight() { - return category.getCategoryWeight(); - } - - public void setWeight(Float weight) { - Object oldValue = getWeight(); - category.setCategoryWeight(weight); - firePropertyChange(PROPERTY_WEIGHT, oldValue, weight); - } - -} \ No newline at end of file Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchRowModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchRowModel.java (rev 0) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchRowModel.java 2013-03-26 17:14:14 UTC (rev 684) @@ -0,0 +1,102 @@ +package fr.ifremer.tutti.ui.swing.content.operation.catches.species.split; + +/* + * #%L + * Tutti :: UI + * $Id: SplitSpeciesBatchRowModel.java 682 2013-03-26 16:47:05Z kmorin $ + * $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/java/... $ + * %% + * 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.persistence.entities.data.SampleCategoryEnum; +import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue; +import fr.ifremer.tutti.ui.swing.content.operation.catches.SampleCategory; +import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel; +import org.nuiton.util.beans.Binder; +import org.nuiton.util.beans.BinderFactory; + +import java.io.Serializable; + +/** + * A row in the {@link SplitSpeciesBatchUIModel}. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.3 + */ +public class SplitSpeciesBatchRowModel + extends AbstractTuttiBeanUIModel<SplitSpeciesBatchRowModel, SplitSpeciesBatchRowModel> { + + private static final long serialVersionUID = 1L; + + public static final String PROPERTY_CATEGORY_VALUE = "categoryValue"; + + public static final String PROPERTY_WEIGHT = "weight"; + + /** + * Delegate sample category which contains category value + weight. + * + * @since 0.3 + */ + protected final SampleCategory<Serializable> category = SampleCategory.newSample(null); + + public SplitSpeciesBatchRowModel() { + super(SplitSpeciesBatchRowModel.class, null, null); + } + + public SampleCategoryEnum getCategoryType() { + return category.getCategoryType(); + } + + public void setCategoryType(SampleCategoryEnum categoryType) { + category.setCategoryType(categoryType); + } + + public Serializable getCategoryValue() { + return category.getCategoryValue(); + } + + public void setCategoryValue(Serializable categoryValue) { + Object oldValue = getCategoryValue(); + category.setCategoryValue(categoryValue); + firePropertyChange(PROPERTY_CATEGORY_VALUE, oldValue, categoryValue); + } + + public void setCategoryValue(CaracteristicQualitativeValue categoryValue) { + Object oldValue = getCategoryValue(); + category.setCategoryValue(categoryValue); + firePropertyChange(PROPERTY_CATEGORY_VALUE, oldValue, categoryValue); + } + + public void setCategoryValue(Float categoryValue) { + Object oldValue = getCategoryValue(); + category.setCategoryValue(categoryValue); + firePropertyChange(PROPERTY_CATEGORY_VALUE, oldValue, categoryValue); + } + + public Float getWeight() { + return category.getCategoryWeight(); + } + + public void setWeight(Float weight) { + Object oldValue = getWeight(); + category.setCategoryWeight(weight); + firePropertyChange(PROPERTY_WEIGHT, oldValue, weight); + } + +} \ No newline at end of file Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchTableModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchTableModel.java 2013-03-26 17:02:29 UTC (rev 683) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchTableModel.java 2013-03-26 17:14:14 UTC (rev 684) @@ -24,7 +24,6 @@ * #L% */ -import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SplitSpeciesBatchRowModel; import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableModel; import fr.ifremer.tutti.ui.swing.util.table.ColumnIdentifier; import org.jdesktop.swingx.table.TableColumnModelExt; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIHandler.java 2013-03-26 17:02:29 UTC (rev 683) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIHandler.java 2013-03-26 17:14:14 UTC (rev 684) @@ -24,7 +24,6 @@ * #L% */ -import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SplitSpeciesBatchRowModel; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import fr.ifremer.tutti.persistence.entities.data.SampleCategoryEnum; @@ -33,7 +32,6 @@ import fr.ifremer.tutti.persistence.entities.referential.Species; import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUI; import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIHandler; -import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIModel; import fr.ifremer.tutti.ui.swing.content.operation.catches.SampleCategory; import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchRowModel; import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchUI; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java 2013-03-26 17:02:29 UTC (rev 683) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/split/SplitSpeciesBatchUIModel.java 2013-03-26 17:14:14 UTC (rev 684) @@ -24,7 +24,6 @@ * #L% */ -import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SplitSpeciesBatchRowModel; import fr.ifremer.tutti.persistence.entities.data.SampleCategoryEnum; import fr.ifremer.tutti.persistence.entities.referential.Species; import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchRowModel;