Tutti-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
October 2013
- 5 participants
- 76 discussions
r1305 - trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol
by tchemit@users.forge.codelutin.com 15 Oct '13
by tchemit@users.forge.codelutin.com 15 Oct '13
15 Oct '13
Author: tchemit
Date: 2013-10-15 11:23:49 +0200 (Tue, 15 Oct 2013)
New Revision: 1305
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1305
Log:
fix typo
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddBenthosProtocolAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddBenthosProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddBenthosProtocolAction.java 2013-10-15 08:44:24 UTC (rev 1304)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddBenthosProtocolAction.java 2013-10-15 09:23:49 UTC (rev 1305)
@@ -73,9 +73,6 @@
Collection<Species> allSynonyms = getModel().getAllSynonyms(taxonIdStr);
getModel().getAllSynonyms().removeAll(allSynonyms);
-// benthosComboBox.removeItem(species);
-// ui.getSpeciesComboBox().removeItem(species);
-
// add new row to model (do it after combo stuff for ui best display)
newRow = tableModel.createNewRow();
newRow.setSpecies(species);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java 2013-10-15 08:44:24 UTC (rev 1304)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java 2013-10-15 09:23:49 UTC (rev 1305)
@@ -71,11 +71,7 @@
Collection<Species> allSynonyms = getModel().getAllSynonyms(taxonIdStr);
getModel().getAllSynonyms().removeAll(allSynonyms);
-// speciesComboBox.getHandler().removeItem(species);
-// ui.getBenthosComboBox().removeItem(species);
-
// add new row to model (do it after combo stuff for ui best display)
-
newRow = tableModel.createNewRow();
newRow.setSpecies(species);
getModel().getSpeciesRow().add(newRow);
1
0
r1304 - trunk/tutti-ui-swing/src/main/resources/i18n
by tchemit@users.forge.codelutin.com 15 Oct '13
by tchemit@users.forge.codelutin.com 15 Oct '13
15 Oct '13
Author: tchemit
Date: 2013-10-15 10:44:24 +0200 (Tue, 15 Oct 2013)
New Revision: 1304
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1304
Log:
fix I18n
Modified:
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
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-10-15 08:42:30 UTC (rev 1303)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-10-15 08:44:24 UTC (rev 1304)
@@ -1442,7 +1442,7 @@
tutti.splitBenthosBatch.action.save=Enregistrer
tutti.splitBenthosBatch.action.save.mnemonic=E
tutti.splitBenthosBatch.action.save.tip=Sauver le sous-échantillonnage
-tutti.splitBenthosBatch.field.batchWeight=
+tutti.splitBenthosBatch.field.batchWeight=Poids du lot père
tutti.splitBenthosBatch.field.batchWeight.tip=Poids du lot père (si renseigné)
tutti.splitBenthosBatch.field.category=Catégorie
tutti.splitBenthosBatch.field.category.tip=Choisir le mode de catégorisation
1
0
r1303 - in trunk/tutti-service/src: main/java/fr/ifremer/tutti/service main/java/fr/ifremer/tutti/service/export test/java/fr/ifremer/tutti/service/export
by tchemit@users.forge.codelutin.com 15 Oct '13
by tchemit@users.forge.codelutin.com 15 Oct '13
15 Oct '13
Author: tchemit
Date: 2013-10-15 10:42:30 +0200 (Tue, 15 Oct 2013)
New Revision: 1303
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1303
Log:
fixes #3456: [EXPORT GENERIQUE] Int?\195?\169grer le fait d'avoir les navires associ?\195?\169s sur chaque trait
Modified:
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportModel.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportRow.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java
trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportService2Test.java
trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java 2013-10-15 06:27:40 UTC (rev 1302)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/TuttiCsvUtil.java 2013-10-15 08:42:30 UTC (rev 1303)
@@ -47,6 +47,7 @@
import org.nuiton.csv.ext.AbstractImportExportModel;
import org.nuiton.csv.ext.RepeatableExport;
import org.nuiton.decorator.Decorator;
+import org.nuiton.decorator.DecoratorUtil;
import java.io.Serializable;
import java.io.Writer;
@@ -409,6 +410,10 @@
public static final ValueFormatter<List<Person>> LIST_PERSON_FORMATTER =
new ListPersonValueFormatter();
+ public static ListVesselValueFormatter newListVesselFormatter(Decorator<Vessel> decorator) {
+ return new ListVesselValueFormatter(decorator);
+ }
+
public static final ValueParserFormatter<List<Integer>> LIST_INTEGER_PARSER_FORMATTER =
new ListIntegerValueFormatter();
@@ -578,6 +583,27 @@
}
}
+ protected static class ListVesselValueFormatter implements ValueFormatter<List<Vessel>> {
+
+ final Decorator<Vessel> decorator;
+
+ public ListVesselValueFormatter(Decorator<Vessel> decorator) {
+ this.decorator = decorator;
+ }
+
+ @Override
+ public String format(List<Vessel> value) {
+ List<String> decoratedValues =
+ Lists.transform(value, new Function<Vessel, String>() {
+ @Override
+ public String apply(Vessel input) {
+ return decorator.toString(input);
+ }
+ });
+ return Joiner.on('|').join(decoratedValues);
+ }
+ }
+
protected TuttiCsvUtil() {
// no instance
}
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportModel.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportModel.java 2013-10-15 06:27:40 UTC (rev 1302)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportModel.java 2013-10-15 08:42:30 UTC (rev 1303)
@@ -31,7 +31,9 @@
import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
import fr.ifremer.tutti.persistence.entities.referential.Gear;
import fr.ifremer.tutti.persistence.entities.referential.TuttiLocation;
+import fr.ifremer.tutti.persistence.entities.referential.Vessel;
import fr.ifremer.tutti.service.TuttiCsvUtil;
+import org.nuiton.decorator.Decorator;
import java.util.List;
@@ -53,7 +55,8 @@
public OperationExportModel(char separator,
Caracteristic verticalOpeningCaracteristic,
Caracteristic horizontalOpeningWingCaracteristic,
- Caracteristic horizontalOpeningDoorCaracteristic) {
+ Caracteristic horizontalOpeningDoorCaracteristic,
+ Decorator<Vessel> vesselDecorator) {
super(separator);
this.verticalOpeningCaracteristic = verticalOpeningCaracteristic;
this.horizontalOpeningWingCaracteristic = horizontalOpeningWingCaracteristic;
@@ -84,6 +87,7 @@
newColumnForExport("Ouv_Horizontale_Ailes", OperationExportRow.PROPERTY_HORIZONTAL_OPENING_WING_GEAR_USE_FEATURE, TuttiCsvUtil.CARACTERISTIC_VALUE_FORMATTER);
newColumnForExport("Ouv_Horizontale_Panneaux", OperationExportRow.PROPERTY_HORIZONTAL_OPENING_DOOR_GEAR_USE_FEATURE, TuttiCsvUtil.CARACTERISTIC_VALUE_FORMATTER);
newColumnForExport("Saisisseur", FishingOperation.PROPERTY_RECORDER_PERSON, TuttiCsvUtil.LIST_PERSON_FORMATTER);
+ newColumnForExport("NavireSecondaire", FishingOperation.PROPERTY_SECONDARY_VESSEL, TuttiCsvUtil.newListVesselFormatter(vesselDecorator));
newColumnForExport("Commentaire", FishingOperation.PROPERTY_COMMENT);
newNullableColumnForExport("Poids_Total", OperationExportRow.PROPERTY_CATCH_TOTAL_WEIGHT, TuttiCsvUtil.FLOAT);
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportRow.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportRow.java 2013-10-15 06:27:40 UTC (rev 1302)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/OperationExportRow.java 2013-10-15 08:42:30 UTC (rev 1303)
@@ -256,6 +256,10 @@
return fishingOperation.getRecorderPerson();
}
+ public List<Vessel> getSecondaryVessel() {
+ return fishingOperation.getSecondaryVessel();
+ }
+
public String getDuration() {
return TuttiEntities.getDuration(
getGearShootingStartDate(),
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java 2013-10-15 06:27:40 UTC (rev 1302)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/export/TuttiExportService.java 2013-10-15 08:42:30 UTC (rev 1303)
@@ -49,6 +49,7 @@
import fr.ifremer.tutti.persistence.entities.referential.Gears;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.persistence.entities.referential.TuttiLocation;
+import fr.ifremer.tutti.persistence.entities.referential.Vessel;
import fr.ifremer.tutti.service.AbstractTuttiService;
import fr.ifremer.tutti.service.DecoratorService;
import fr.ifremer.tutti.service.PersistenceService;
@@ -735,7 +736,8 @@
csvSeparator,
verticalOpeningCaracteristic,
horizontalOpeningWingCaracteristic,
- horizontalOpeningDoorCaracteristic);
+ horizontalOpeningDoorCaracteristic,
+ decoratorService.getDecoratorByType(Vessel.class));
parameterModel = new ParameterExportModel(
csvSeparator, decoratorService);
Modified: trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportService2Test.java
===================================================================
--- trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportService2Test.java 2013-10-15 06:27:40 UTC (rev 1302)
+++ trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportService2Test.java 2013-10-15 08:42:30 UTC (rev 1303)
@@ -157,20 +157,20 @@
URL url = new URL(urlPrefix + "operation.csv");
ServiceDbResource.assertFileContent("operation export:\n",
url,
- "Annee;Serie;Serie_Partielle;Code_Station;Numero_Trait;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" +
- "2013;test elevation;1;B;2;1;OTB 20/28.10;278970;01/07/2013 00:00:00;;;01/07/2013 00:00:00;;;00;NA;NA;NA;?;N;;NA;NA;NA;;\"Commentaire sur le trait B-2-1\n" +
+ "Annee;Serie;Serie_Partielle;Code_Station;Numero_Trait;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;NavireSecondaire;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" +
+ "2013;test elevation;1;B;2;1;OTB 20/28.10;278970;01/07/2013 00:00:00;;;01/07/2013 00:00:00;;;00;NA;NA;NA;?;N;;NA;NA;NA;;;\"Commentaire sur le trait B-2-1\n" +
"\n" +
"avec\n" +
"saut\n" +
"de \n" +
"ligne\";1000.0;Y;280.0;Y;20.0;Y;700.0;N;;?;;?;200.0;Y;180.0;Y;180.0;Y;20.0;Y;0.0;Y;0.0;Y;100.0;Y;100.0;N;50.0;Y;0.0;Y;2.0;N;0.0;Y;100.0;N;\n" +
- "2013;test elevation;1;A;1;1;OTB 20/28.10;278970;01/07/2013 00:00:00;;;01/07/2013 00:00:00;;;00;NA;NA;NA;?;N;;NA;NA;NA;;\"commentaire trait A-1-1\n" +
+ "2013;test elevation;1;A;1;1;OTB 20/28.10;278970;01/07/2013 00:00:00;;;01/07/2013 00:00:00;;;00;NA;NA;NA;?;N;;NA;NA;NA;;;\"commentaire trait A-1-1\n" +
"Avec \n" +
"saut\n" +
"de\n" +
"ligne\n" +
"...\";1000.0;Y;180.0;Y;20.0;Y;800.0;N;;?;;?;200.0;Y;180.0;Y;180.0;Y;20.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;\n" +
- "2013;test elevation;1;C;3;1;;278970;25/09/2013 00:00:00;;;25/09/2013 00:00:00;;;00;NA;NA;NA;?;N;;NA;NA;NA;;;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;");
+ "2013;test elevation;1;C;3;1;;278970;25/09/2013 00:00:00;;;25/09/2013 00:00:00;;;00;NA;NA;NA;?;N;;NA;NA;NA;;;;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;");
}
Modified: trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java
===================================================================
--- trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java 2013-10-15 06:27:40 UTC (rev 1302)
+++ trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/export/TuttiExportServiceTest.java 2013-10-15 08:42:30 UTC (rev 1303)
@@ -76,17 +76,17 @@
"2013;Campagne CGFS;;ScientificGear;287;Volet dépresseur (drague) - engin - totale - Déclaration d'un professionnel;Oui;";
public static final String OPERATION_WITH_NO_CATCH_CONTENT =
- "Annee;Serie;Serie_Partielle;Code_Station;Numero_Trait;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" +
- "2010;Campagne CGFS;;65;65;1;GOV 19.7/25.9;278970;13/10/2010 13:35:00;50.22833;0.31833;13/10/2010 14:05:00;50.22167;0.28333;30;Strate 4J;NA;Localité 4J2;N;Y;2512.0;NA;NA;NA;;avarie - chalut annulé completement à poil;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;";
+ "Annee;Serie;Serie_Partielle;Code_Station;Numero_Trait;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;NavireSecondaire;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" +
+ "2010;Campagne CGFS;;65;65;1;GOV 19.7/25.9;278970;13/10/2010 13:35:00;50.22833;0.31833;13/10/2010 14:05:00;50.22167;0.28333;30;Strate 4J;NA;Localité 4J2;N;Y;2512.0;NA;NA;NA;;;avarie - chalut annulé completement à poil;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;";
public static final String OPERATION_WITH_NO_CATCH_CONTENT_AND_NO_GEAR =
- "Annee;Serie;Serie_Partielle;Code_Station;Numero_Trait;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" +
- "2010;Campagne CGFS;;65;65;1;;278970;13/10/2010 13:35:00;50.22833;0.31833;13/10/2010 14:05:00;50.22167;0.28333;30;Strate 4J;NA;Localité 4J2;N;Y;2512.0;NA;NA;NA;;avarie - chalut annulé completement à poil;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;";
+ "Annee;Serie;Serie_Partielle;Code_Station;Numero_Trait;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;NavireSecondaire;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" +
+ "2010;Campagne CGFS;;65;65;1;;278970;13/10/2010 13:35:00;50.22833;0.31833;13/10/2010 14:05:00;50.22167;0.28333;30;Strate 4J;NA;Localité 4J2;N;Y;2512.0;NA;NA;NA;;;avarie - chalut annulé completement à poil;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;;?;";
public static final String OPERATION_CONTENT =
- "Annee;Serie;Serie_Partielle;Code_Station;Numero_Trait;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" +
- "2013;Campagne CGFS;;A;1;1;GOV 19.7/25.9;278970;01/05/2013 00:00:00;;;01/05/2013 00:23:00;;;23;Strate 1D;NA;Localité 1D2;?;N;;NA;NA;NA;Vincent AURECHE;op1;120.0;Y;100.0;Y;20.0;Y;0.0;Y;;?;;?;120.0;Y;100.0;Y;100.0;Y;20.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;6.0;Y;\n" +
- "2013;Campagne CGFS;;A;2;1;GOV 19.7/25.9;278970;11/05/2013 08:00:00;;;11/05/2013 08:23:00;;;23;Strate 1D;NA;Localité 1D2;?;N;;NA;NA;NA;Robert BELLAIL|Herve BARONE;OP2;0.0;Y;0.0;Y;0.0;Y;0.0;Y;;?;;?;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;";
+ "Annee;Serie;Serie_Partielle;Code_Station;Numero_Trait;Poche;Engin;Navire;DateDeb_Op;LatDeb;LongDeb;DateFin_Op;LatFin;LongFin;Duree;Strate;Sous-Strate;Localite;Validite_OP;Rectiligne;Distance;Ouv_Verticale;Ouv_Horizontale_Ailes;Ouv_Horizontale_Panneaux;Saisisseur;NavireSecondaire;Commentaire;Poids_Total;Poids_Total_Calcule;Poids_Total_Vrac;Poids_Total_Vrac_Calcule;Poids_Total_HorsVrac;Poids_Total_HorsVrac_Calcule;Poids_Total_Non_Trie;Poids_Total_Non_Trie_Calcule;Poids_Total_Tremis;Poids_Total_Tremis_Calcule;Poids_Total_Carroussel;Poids_Total_Carroussel_Calcule;Poids_Total_Espece;Poids_Total_Espece_Calcule;Poids_Total_Espece_Vrac;Poids_Total_Espece_Vrac_Calcule;Poids_Total_Espece_Vrac_Trie;Poids_Total_Espece_Vrac_Trie_Calcule;Poids_Total_Espece_HorsVrac;Poids_Total_Espece_HorsVrac_Calcule;Poids_Total_Espece_Inerte_Trie;Poids_Total_Espece_Inerte_Trie_Calcule;Poids_Total_Espece_Vivant_non_detaille_trie;Poids_Total_Espece_Vivant_non_detaille_trie_Calcule;Poids_Total_Benthos;Poids_Total_Benthos_Calcule;Poids_Total_Benthos_Vrac;Poids_Total_Benthos_Vrac_Calcule;Poids_Total_Benthos_Vrac_Trie;Poids_Total_Benthos_Vrac_Trie_Calcule;Poids_Total_Benthos_HorsVrac;Poids_Total_Benthos_HorsVrac_Calcule;Poids_Total_Benthos_Inerte_Trie;Poids_Total_Benthos_Inerte_Trie_Calcule;Poids_Total_Benthos_Vivant_non_detaille_trie;Poids_Total_Benthos_Vivant_non_detaille_trie_Calcule;Poids_Total_Macro_Dechet;Poids_Total_Macro_Dechet_Calcule\n" +
+ "2013;Campagne CGFS;;A;1;1;GOV 19.7/25.9;278970;01/05/2013 00:00:00;;;01/05/2013 00:23:00;;;23;Strate 1D;NA;Localité 1D2;?;N;;NA;NA;NA;Vincent AURECHE;;op1;120.0;Y;100.0;Y;20.0;Y;0.0;Y;;?;;?;120.0;Y;100.0;Y;100.0;Y;20.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;6.0;Y;\n" +
+ "2013;Campagne CGFS;;A;2;1;GOV 19.7/25.9;278970;11/05/2013 08:00:00;;;11/05/2013 08:23:00;;;23;Strate 1D;NA;Localité 1D2;?;N;;NA;NA;NA;Robert BELLAIL|Herve BARONE;;OP2;0.0;Y;0.0;Y;0.0;Y;0.0;Y;;?;;?;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;0.0;Y;";
public static final String PARAMETER_CONTENT =
"Annee;Serie;Serie_Partielle;Id_Operation;NumOrdre_Station;Poche;Code_PMFM;Libelle_PMFm;Valeur\n" +
1
0
r1302 - trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol
by tchemit@users.forge.codelutin.com 15 Oct '13
by tchemit@users.forge.codelutin.com 15 Oct '13
15 Oct '13
Author: tchemit
Date: 2013-10-15 08:27:40 +0200 (Tue, 15 Oct 2013)
New Revision: 1302
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1302
Log:
refs #3328: [ERGO] Tri du tableau des esp?\195?\168ces
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveBenthosProtocolAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java 2013-10-14 18:41:57 UTC (rev 1301)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/EditProtocolUIHandler.java 2013-10-15 06:27:40 UTC (rev 1302)
@@ -407,7 +407,8 @@
initTable(table,
columnModel,
- speciesColumn, speciesRows,
+ speciesColumn,
+ benthosRows,
new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveBenthosProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveBenthosProtocolAction.java 2013-10-14 18:41:57 UTC (rev 1301)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveBenthosProtocolAction.java 2013-10-15 06:27:40 UTC (rev 1302)
@@ -55,6 +55,14 @@
*/
protected Set<Species> removedSpecies;
+ /**
+ * Set of removed rows.
+ *
+ * @since 2.8
+ */
+ protected Set<EditProtocolSpeciesRowModel> removedRows;
+
+
public RemoveBenthosProtocolAction(EditProtocolUIHandler handler) {
super(handler, false);
}
@@ -67,21 +75,11 @@
// need to have a selection
Preconditions.checkState(!table.getSelectionModel().isSelectionEmpty());
-// // build the list of model row indexes from selected view row indexes
-// List<Integer> modelIndexes = Lists.newArrayList();
-//
-// for (int index : SwingUtil.getSelectedModelRows(table)) {
-// modelIndexes.add(index);
-// }
-//
-// // sort it and reverse it (must delete first max row index)
-// Collections.sort(modelIndexes);
-// Collections.reverse(modelIndexes);
-
EditProtocolSpeciesTableModel tableModel =
(EditProtocolSpeciesTableModel) table.getModel();
removedSpecies = Sets.newHashSet();
+ removedRows = Sets.newHashSet();
EditProtocolUIModel model = getModel();
@@ -101,42 +99,16 @@
allSynonyms.remove(species);
model.getAllSynonyms().addAll(allSynonyms);
- // remove the row from the model
- model.getBenthosRow().remove(selectedRow);
+ // mark row to be removed at the very last moment
+ removedRows.add(selectedRow);
}
// reorder the list by name, otherwise,
// all the species without a reftax code will be at the end
Collections.sort(model.getAllSynonyms(),
TuttiEntities.SPECIES_BY_NAME_COMPARATOR);
-
-// table.clearSelection();
}
-// protected void removeRow(EditProtocolSpeciesTableModel tableModel, int rowIndex) {
-//
-// EditProtocolSpeciesRowModel selectedRow = tableModel.getEntry(rowIndex);
-//
-// // re-add all synonym of this taxon to the species / benthos combobox
-// Species species = selectedRow.getSpecies();
-// getUI().getBenthosComboBox().addItem(species);
-// getUI().getSpeciesComboBox().addItem(species);
-//
-// EditProtocolUIModel model = getModel();
-// Integer taxonId = species.getReferenceTaxonId();
-// List<Species> allSynonyms = Lists.newArrayList(
-// model.getAllSynonyms(String.valueOf(taxonId)));
-// allSynonyms.remove(species);
-// model.getAllSynonyms().addAll(allSynonyms);
-//
-// // remove the row from the model
-// tableModel.removeRow(rowIndex);
-//
-// String speciesStr = decorate(selectedRow.getSpecies());
-// sendMessage(_("tutti.flash.info.benthos.remove.from.protocol",
-// speciesStr));
-// }
-
@Override
public void postSuccessAction() {
super.postSuccessAction();
@@ -145,6 +117,9 @@
getUI().getBenthosComboBox().addItems(removedSpecies);
getUI().getSpeciesComboBox().addItems(removedSpecies);
+ // remove all rows from model
+ getModel().getBenthosRow().removeAll(removedRows);
+
// fire table data changed
handler.getBenthosTableModel().fireTableDataChanged();
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java 2013-10-14 18:41:57 UTC (rev 1301)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java 2013-10-15 06:27:40 UTC (rev 1302)
@@ -54,6 +54,13 @@
*/
protected Set<Species> removedSpecies;
+ /**
+ * Set of removed rows.
+ *
+ * @since 2.8
+ */
+ protected Set<EditProtocolSpeciesRowModel> removedRows;
+
public RemoveSpeciesProtocolAction(EditProtocolUIHandler handler) {
super(handler, false);
}
@@ -66,28 +73,16 @@
// need to have a selection
Preconditions.checkState(!table.getSelectionModel().isSelectionEmpty());
-// // build the list of model row indexes from selected view row indexes
-// List<Integer> modelIndexes = Lists.newArrayList();
-//
-// for (int index : SwingUtil.getSelectedModelRows(table)) {
-// modelIndexes.add(index);
-// }
-//
-// // sort it and reverse it (must delete first max row index)
-// Collections.sort(modelIndexes);
-// Collections.reverse(modelIndexes);
-
EditProtocolSpeciesTableModel tableModel =
(EditProtocolSpeciesTableModel) table.getModel();
EditProtocolUIModel model = getModel();
removedSpecies = Sets.newHashSet();
+ removedRows = Sets.newHashSet();
for (Integer rowIndex : SwingUtil.getSelectedModelRows(table)) {
-// removeRow(tableModel, index);
-
// get row to remove
EditProtocolSpeciesRowModel selectedRow =
tableModel.getEntry(rowIndex);
@@ -102,41 +97,15 @@
allSynonyms.remove(species);
model.getAllSynonyms().addAll(allSynonyms);
- // remove the row from the model
- model.getSpeciesRow().remove(selectedRow);
+ // mark row to be removed at the very last moment
+ removedRows.add(selectedRow);
}
// reorder the list by name, otherwise,
// all the species without a reftax code will be at the end
Collections.sort(model.getAllSynonyms(), TuttiEntities.SPECIES_BY_NAME_COMPARATOR);
-
-// table.clearSelection();
}
- protected void removeRow(EditProtocolSpeciesTableModel tableModel, int rowIndex) {
-
- EditProtocolSpeciesRowModel selectedRow = tableModel.getEntry(rowIndex);
-
- // re-add all synonym of this taxon to the species / benthos combobox
- Species species = selectedRow.getSpecies();
- getUI().getBenthosComboBox().addItem(species);
- getUI().getSpeciesComboBox().addItem(species);
-
- EditProtocolUIModel model = getModel();
- Integer taxonId = species.getReferenceTaxonId();
- List<Species> allSynonyms = Lists.newArrayList(
- model.getAllSynonyms(String.valueOf(taxonId)));
- allSynonyms.remove(species);
- model.getAllSynonyms().addAll(allSynonyms);
-
- // remove the row from the model
- tableModel.removeRow(rowIndex);
-
- String speciesStr = decorate(selectedRow.getSpecies());
- sendMessage(_("tutti.flash.info.species.remove.from.protocol",
- speciesStr));
- }
-
@Override
public void postSuccessAction() {
super.postSuccessAction();
@@ -145,6 +114,9 @@
getUI().getBenthosComboBox().addItems(removedSpecies);
getUI().getSpeciesComboBox().addItems(removedSpecies);
+ // remove all rows from model
+ getModel().getBenthosRow().removeAll(removedRows);
+
// fire table data changed
handler.getBenthosTableModel().fireTableDataChanged();
1
0
See <http://ci.nuiton.org/jenkins/job/tutti/1080/changes>
Changes:
[Tony Chemit] fixes #3502: Row index out of range
fixes #3098: Une erreur s'est produite: Column index out of range
[Tony Chemit] add bluecove dependencies
[Tony Chemit] get the expression of a decorator
------------------------------------------
[...truncated 553 lines...]
[INFO]
[INFO] --- license-maven-plugin:1.5:add-third-party (attach-licenses) @ tutti-ui-swing ---
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/cartridges…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/cartr…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/andromda-c…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/andro…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/andromda-u…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/andro…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/metafacade…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/metaf…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/translatio…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/trans…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/translatio…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/trans…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/cartridges…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/cartr…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/cartridges…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/cartr…
[WARNING] No license name defined for org.hibernate.javax.persistence--hibernate-jpa-2.0-api--1.0.1.Final
[INFO] Load missing file <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/license/…>
[INFO] Missing file <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/license/…> is up-to-date.
[INFO] Writing third-party file to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/target/gener…>
[INFO] Writing bundled third-party file to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/target/gener…>
[INFO] Will attach third party file from <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/license/…>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ tutti-ui-swing ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 95 resources
[INFO] Copying 4 resources
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ tutti-ui-swing ---
[INFO] Compiling 334 source files to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/target/class…>
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] bootstrap class path not set in conjunction with -source 1.6
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[393,44] getSelectedValues() in javax.swing.JList has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>: Recompile with -Xlint:unchecked for details.
[INFO] 4 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[63,20] cannot find symbol
symbol: method doSelectCell(javax.swing.JTable,int,int)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[229,24] cannot find symbol
symbol: method doSelectCell(javax.swing.JTable,int,int)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[360,24] cannot find symbol
symbol: method selectFirstCellOnLastRow(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[412,24] cannot find symbol
symbol: method selectFirstCellOnLastRow(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[926,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[953,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[450,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[695,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[736,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[660,32] cannot find symbol
symbol: method selectFirstCellOnLastRow(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[677,28] cannot find symbol
symbol: method selectFirstCellOnLastRow(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[934,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[961,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[1211,42] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[267,42] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: javax.swing.JTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[287,42] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: javax.swing.JTable,java.lang.Integer,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[447,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[693,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[734,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[267,42] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: javax.swing.JTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[287,42] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: javax.swing.JTable,java.lang.Integer,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[130,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[157,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[174,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[121,20] cannot find symbol
symbol: method selectFirstCellOnFirstRowAndStopEditing(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[105,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[151,20] cannot find symbol
symbol: method selectFirstCellOnFirstRowAndStopEditing(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[105,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[110,20] cannot find symbol
symbol: method selectFirstCellOnFirstRowAndStopEditing(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[111,20] cannot find symbol
symbol: method selectFirstCellOnFirstRowAndStopEditing(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[124,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[124,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[INFO] 32 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Tutti ............................................. SUCCESS [2.326s]
[INFO] Tutti :: Persistence .............................. SUCCESS [7.924s]
[INFO] Tutti :: Service .................................. SUCCESS [4.562s]
[INFO] Tutti :: UI ....................................... FAILURE [17.976s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.432s
[INFO] Finished at: Mon Oct 14 19:42:09 CEST 2013
[INFO] Final Memory: 68M/232M
[INFO] ------------------------------------------------------------------------
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-service/builds/2013-10-14_19-41-34/archive/fr.ifremer.tutti/tutti-service/2.8-SNAPSHOT/tutti-service-2.8-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/tutti-…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-service/builds/2013-10-14_19-41-34/archive/fr.ifremer.tutti/tutti-service/2.8-SNAPSHOT/tutti-service-2.8-SNAPSHOT.jar
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-ui-swing/builds/2013-10-14_19-41-34/archive/fr.ifremer.tutti/tutti-ui-swing/2.8-SNAPSHOT/tutti-ui-swing-2.8-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/license/…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-ui-swing/builds/2013-10-14_19-41-34/archive/fr.ifremer.tutti/tutti-ui-swing/2.8-SNAPSHOT/tutti-ui-swing-2.8-SNAPSHOT-third-party.properties
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer$tutti/builds/2013-10-14_19-41-34/archive/fr.ifremer/tutti/2.8-SNAPSHOT/tutti-2.8-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/target/tutti-2.8-SNAPSHOT-s…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer$tutti/builds/2013-10-14_19-41-34/archive/fr.ifremer/tutti/2.8-SNAPSHOT/tutti-2.8-SNAPSHOT-site_fr.xml
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-persistence/builds/2013-10-14_19-41-34/archive/fr.ifremer.tutti/tutti-persistence/2.8-SNAPSHOT/tutti-persistence-2.8-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/target/tu…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-persistence/builds/2013-10-14_19-41-34/archive/fr.ifremer.tutti/tutti-persistence/2.8-SNAPSHOT/tutti-persistence-2.8-SNAPSHOT.jar
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project tutti-ui-swing: Compilation failure
cause : Compilation failure
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project tutti-ui-swing: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:174)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:100)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:66)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 26 more
Sending e-mails to: tutti-commits(a)list.forge.codelutin.com chemit(a)codelutin.com
channel stopped
1
3
14 Oct '13
See <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/1080…>
Changes:
[Tony Chemit] fixes #3502: Row index out of range
fixes #3098: Une erreur s'est produite: Column index out of range
------------------------------------------
[...truncated 15 lines...]
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ru… (2 KB at 8.5 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 40.0 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co… (2 KB at 8.9 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-wi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 42.5 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-wi… (2 KB at 8.8 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-va…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 47.4 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-va… (2 KB at 9.8 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tutti-ui-swing ---
[INFO] Deleting <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ tutti-ui-swing ---
[INFO]
[INFO] --- jaxx-maven-plugin:2.5.29-SNAPSHOT:generate (default) @ tutti-ui-swing ---
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 42.5 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co… (2 KB at 9.1 KB/sec)
[INFO] use project compile scope class-path
[INFO] Detects 41 modified jaxx file(s).
[WARNING] JAXX detects 2 warnings :
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
jaxx supports i18n, no need to add explicit call to I18n._ for attribute 'title' in component 'dialog' : [_("tutti.createSpeciesMelag.title", weightUnit.getShortLabel())]
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
jaxx supports i18n, no need to add explicit call to I18n._ for attribute 'text' in component 'message' : [_("tutti.createSpeciesMelag.message", weightUnit.getShortLabel())]
[INFO] Generated 41 file(s) in 9.478s
[INFO]
[INFO] --- jaxx-maven-plugin:2.5.29-SNAPSHOT:generate-help-ids (default) @ tutti-ui-swing ---
[INFO] Store detected help ids to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO] Merge help ids to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO] Use input file: <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
[INFO] No keys to add.
[INFO] Use input file: <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
[INFO] No keys to add.
[INFO]
[INFO] --- i18n-maven-plugin:2.5.2:parserJava (scan-sources) @ tutti-ui-swing ---
[INFO]
[INFO] --- i18n-maven-plugin:2.5.2:parserValidation (scan-sources) @ tutti-ui-swing ---
[INFO] Load rules file validation.rules
[INFO]
[INFO] --- i18n-maven-plugin:2.5.2:get (get) @ tutti-ui-swing ---
[INFO] Copying tutti-ui-swing.properties to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO] Copying tutti-ui-swing.properties to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO]
[INFO] --- i18n-maven-plugin:2.5.2:gen (scan-sources) @ tutti-ui-swing ---
[WARNING] bundle fr_FR contains 17/1536 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 1531/1537 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- i18n-maven-plugin:2.5.2:collect-i18n-artifacts (collect-i18n-artifacts) @ tutti-ui-swing ---
[INFO] collected 10 i18n artifacts for locale fr_FR stored in <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO] collected 10 i18n artifacts for locale en_GB stored in <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO]
[INFO] --- i18n-maven-plugin:2.5.2:bundle (make-bundle) @ tutti-ui-swing ---
[WARNING] bundle fr_FR contains 24/1997 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 1820/1995 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- license-maven-plugin:1.5:update-project-license (attach-licenses) @ tutti-ui-swing ---
[INFO]
[INFO] --- license-maven-plugin:1.5:add-third-party (attach-licenses) @ tutti-ui-swing ---
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/profiles/e…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/profi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/cartridges…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/cartr…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/andromda-c…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/andro…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/andromda-u…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/andro…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/metafacade…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/metaf…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/translatio…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/trans…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/translatio…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/trans…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/cartridges…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/cartr…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/andromda/cartridges…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/andromda/cartr…
[WARNING] No license name defined for org.hibernate.javax.persistence--hibernate-jpa-2.0-api--1.0.1.Final
[INFO] Load missing file <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
[INFO] Missing file <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…> is up-to-date.
[INFO] Writing third-party file to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO] Writing bundled third-party file to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO] Will attach third party file from <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ tutti-ui-swing ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 95 resources
[INFO] Copying 4 resources
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ tutti-ui-swing ---
[INFO] Compiling 334 source files to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] bootstrap class path not set in conjunction with -source 1.6
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[393,44] getSelectedValues() in javax.swing.JList has been deprecated
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>: Recompile with -Xlint:unchecked for details.
[INFO] 4 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[63,20] cannot find symbol
symbol: method doSelectCell(javax.swing.JTable,int,int)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[229,24] cannot find symbol
symbol: method doSelectCell(javax.swing.JTable,int,int)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[360,24] cannot find symbol
symbol: method selectFirstCellOnLastRow(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[412,24] cannot find symbol
symbol: method selectFirstCellOnLastRow(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[926,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[953,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[450,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[695,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[736,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[660,32] cannot find symbol
symbol: method selectFirstCellOnLastRow(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[677,28] cannot find symbol
symbol: method selectFirstCellOnLastRow(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[934,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[961,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[1211,42] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[267,42] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: javax.swing.JTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[287,42] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: javax.swing.JTable,java.lang.Integer,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[447,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[693,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[734,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[267,42] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: javax.swing.JTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[287,42] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: javax.swing.JTable,java.lang.Integer,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[130,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[157,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[174,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[121,20] cannot find symbol
symbol: method selectFirstCellOnFirstRowAndStopEditing(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[105,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[151,20] cannot find symbol
symbol: method selectFirstCellOnFirstRowAndStopEditing(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[105,34] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[110,20] cannot find symbol
symbol: method selectFirstCellOnFirstRowAndStopEditing(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[111,20] cannot find symbol
symbol: method selectFirstCellOnFirstRowAndStopEditing(org.jdesktop.swingx.JXTable)
location: class fr.ifremer.tutti.ui.swing.util.TuttiUIUtil
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[124,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[124,38] method doSelectCell in class fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction<M> cannot be applied to given types;
required: int,int
found: org.jdesktop.swingx.JXTable,int,int
reason: actual and formal argument lists differ in length
[INFO] 32 errors
[INFO] -------------------------------------------------------------
1
3
r1301 - in trunk/tutti-ui-swing/src/main: java/fr/ifremer/tutti/ui/swing/content/operation/catches java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos java/fr/ifremer/tutti/ui/swing/content/operation/catches/species java/fr/ifremer/tutti/ui/swing/util resources/i18n
by tchemit@users.forge.codelutin.com 14 Oct '13
by tchemit@users.forge.codelutin.com 14 Oct '13
14 Oct '13
Author: tchemit
Date: 2013-10-14 20:41:57 +0200 (Mon, 14 Oct 2013)
New Revision: 1301
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1301
Log:
refs #3328: [ERGO] Tri du tableau des esp?\195?\168ces (need more tests...)
Added:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesBatchDecorator.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesBatchDecoratorComparator.java
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/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/species/SpeciesBatchRowModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/AbstractTuttiUIHandler.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
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesBatchDecorator.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesBatchDecorator.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesBatchDecorator.java 2013-10-14 18:41:57 UTC (rev 1301)
@@ -0,0 +1,87 @@
+package fr.ifremer.tutti.ui.swing.content.operation.catches;
+
+/*
+ * #%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%
+ */
+
+import fr.ifremer.tutti.persistence.entities.data.SpeciesAbleBatch;
+import fr.ifremer.tutti.persistence.entities.referential.Species;
+import fr.ifremer.tutti.service.DecoratorService;
+import org.jdesktop.swingx.JXTable;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * To decorate some {@link SpeciesAbleBatch} as a {@link Species}.
+ * <p/>
+ * Used to be able to keep the hole speciesBatch in the cell.
+ *
+ * @since 2.8
+ */
+public class SpeciesBatchDecorator<R extends SpeciesAbleBatch> extends DecoratorService.SpeciesFromProtocolDecorator {
+
+ private static final long serialVersionUID = 1L;
+
+ public static <R extends SpeciesAbleBatch> SpeciesBatchDecorator<R> newDecorator(JXTable table) {
+ return new SpeciesBatchDecorator<R>(table);
+ }
+
+ public SpeciesBatchDecorator(JXTable table) throws IllegalArgumentException, NullPointerException {
+ super();
+
+ // use special comparator
+ for (Context context : contexts) {
+ TuttiDecoratorComparator comparator = (TuttiDecoratorComparator<?>) context.getComparator(0);
+ context.setComparator(new SpeciesBatchDecoratorComparator<R>(comparator.getExpression(), table));
+ }
+ }
+
+ @Override
+ public String toString(Object bean) {
+ if (bean instanceof SpeciesAbleBatch) {
+ bean = ((SpeciesAbleBatch) bean).getSpecies();
+ }
+ return super.toString(bean);
+ }
+
+ @Override
+ protected Object getValue(Species bean, String token) {
+ Object result = super.getValue(bean, token);
+ if (Species.PROPERTY_SURVEY_CODE.equals(token) && result == null) {
+ result = bean.getRefTaxCode();
+ }
+ return result;
+ }
+
+ @Override
+ protected Object onNullValue(Species bean, String token) {
+ Object result;
+ if (Species.PROPERTY_SURVEY_CODE.equals(token)) {
+ result = _("tutti.propety.no.species.speciesCode");
+
+ } else {
+ result = super.onNullValue(bean, token);
+ }
+ return result;
+ }
+}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesBatchDecorator.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesBatchDecoratorComparator.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesBatchDecoratorComparator.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesBatchDecoratorComparator.java 2013-10-14 18:41:57 UTC (rev 1301)
@@ -0,0 +1,110 @@
+package fr.ifremer.tutti.ui.swing.content.operation.catches;
+
+/*
+ * #%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%
+ */
+
+import fr.ifremer.tutti.persistence.entities.data.SpeciesAbleBatch;
+import fr.ifremer.tutti.service.TuttiDecorator;
+import org.jdesktop.swingx.JXTable;
+import org.nuiton.decorator.JXPathDecorator;
+
+import javax.swing.SortOrder;
+import java.util.List;
+
+/**
+ * To decorate a {@link SpeciesAbleBatch} as a species + keeping the logic of batchs childs.
+ * <p/>
+ * first sort on species, then always keep the row index order.
+ * <p/>
+ * Created on 10/11/13.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 2.8
+ */
+public class SpeciesBatchDecoratorComparator<R extends SpeciesAbleBatch> extends TuttiDecorator.TuttiDecoratorComparator<R> {
+
+ static class RowComparatorContext implements Comparable<RowComparatorContext> {
+
+ private final String speciesText;
+
+ private final int rowIndex;
+
+ private final JXTable table;
+
+ RowComparatorContext(JXTable table,
+ String speciesText,
+ int rowIndex) {
+ this.table = table;
+ this.speciesText = speciesText;
+ this.rowIndex = rowIndex;
+ }
+
+ @Override
+ public int compareTo(RowComparatorContext o) {
+ // first compare on speciesText
+ int result = speciesText.compareTo(o.speciesText);
+ if (result == 0) {
+
+ int sortedColumnIndex = table.getSortedColumnIndex();
+ SortOrder sortOrder = table.getSortOrder(sortedColumnIndex);
+
+ switch (sortOrder) {
+ case UNSORTED:
+ case ASCENDING:
+
+ // respect natural order
+ result = rowIndex - o.rowIndex;
+ break;
+ case DESCENDING:
+ result = o.rowIndex - rowIndex;
+ break;
+ }
+ }
+ return result;
+ }
+ }
+
+ private static final long serialVersionUID = 1L;
+
+ JXTable table;
+
+ public SpeciesBatchDecoratorComparator(String expression, JXTable table) {
+ super(expression);
+ this.table = table;
+ }
+
+ @Override
+ public void init(JXPathDecorator<R> decorator, List<R> datas) {
+ clear();
+
+ int index = 0;
+ for (R data : datas) {
+
+ String speciesText = decorator.toString(data);
+ Comparable value = new RowComparatorContext(table, speciesText, index++);
+ valueCache.put(data, value);
+
+ }
+ }
+}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/SpeciesBatchDecoratorComparator.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
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-10-14 18:36:22 UTC (rev 1300)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchRowModel.java 2013-10-14 18:41:57 UTC (rev 1301)
@@ -36,12 +36,12 @@
import fr.ifremer.tutti.persistence.entities.data.SampleCategoryModel;
import fr.ifremer.tutti.persistence.entities.data.SampleCategoryModelEntry;
import fr.ifremer.tutti.persistence.entities.referential.Species;
+import fr.ifremer.tutti.service.WeightUnit;
import fr.ifremer.tutti.ui.swing.content.operation.catches.SampleCategoryAble;
import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.frequency.BenthosFrequencyRowModel;
import fr.ifremer.tutti.ui.swing.util.AbstractTuttiBeanUIModel;
import fr.ifremer.tutti.ui.swing.util.TuttiComputedOrNotData;
import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
-import fr.ifremer.tutti.service.WeightUnit;
import fr.ifremer.tutti.ui.swing.util.attachment.AttachmentModelAware;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
@@ -66,6 +66,8 @@
private static final long serialVersionUID = 1L;
+ public static final String PROPERTY_SPECIES_ROW = "speciesRow";
+
public static final String PROPERTY_SPECIES_TO_CONFIRM = "speciesToConfirm";
public static final String PROPERTY_SPECIES = "species";
@@ -228,6 +230,10 @@
Collections.sort(frequency);
}
+ public BenthosBatchRowModel getSpeciesRow() {
+ return this;
+ }
+
//------------------------------------------------------------------------//
//-- AbstractTuttiBeanUIModel --//
//------------------------------------------------------------------------//
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-10-14 18:36:22 UTC (rev 1300)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchTableModel.java 2013-10-14 18:41:57 UTC (rev 1301)
@@ -59,7 +59,7 @@
LogFactory.getLog(BenthosBatchTableModel.class);
public static final ColumnIdentifier<BenthosBatchRowModel> SPECIES = ColumnIdentifier.newId(
- BenthosBatchRowModel.PROPERTY_SPECIES,
+ BenthosBatchRowModel.PROPERTY_SPECIES_ROW,
n_("tutti.editBenthosBatch.table.header.species"),
n_("tutti.editBenthosBatch.table.header.species.tip"));
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-10-14 18:36:22 UTC (rev 1300)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/BenthosBatchUIHandler.java 2013-10-14 18:41:57 UTC (rev 1301)
@@ -57,6 +57,7 @@
import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.frequency.BenthosFrequencyRowModel;
import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.split.SplitBenthosBatchRowModel;
import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.split.SplitBenthosBatchUI;
+import fr.ifremer.tutti.ui.swing.content.operation.catches.SpeciesBatchDecorator;
import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchRowModel;
import fr.ifremer.tutti.ui.swing.util.TuttiBeanMonitor;
import fr.ifremer.tutti.ui.swing.util.TuttiUI;
@@ -68,7 +69,6 @@
import fr.ifremer.tutti.ui.swing.util.editor.TuttiComputedOrNotDataTableCell;
import fr.ifremer.tutti.ui.swing.util.species.SelectSpeciesUI;
import fr.ifremer.tutti.ui.swing.util.species.SelectSpeciesUIModel;
-import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction;
import fr.ifremer.tutti.ui.swing.util.table.ColumnIdentifier;
import jaxx.runtime.SwingUtil;
import jaxx.runtime.swing.editor.NumberEditor;
@@ -422,7 +422,7 @@
Highlighter evenHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
new HighlightPredicate.AndHighlightPredicate(
HighlightPredicate.EVEN,
- new HighlightPredicate.NotHighlightPredicate(HighlightPredicate.READ_ONLY)),
+ HighlightPredicate.EDITABLE),
Color.WHITE);
table.addHighlighter(evenHighlighter);
@@ -434,10 +434,11 @@
Highlighter confirmHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
new HighlightPredicate.AndHighlightPredicate(
new HighlightPredicate.NotHighlightPredicate(HighlightPredicate.IS_SELECTED),
+ HighlightPredicate.EDITABLE,
new HighlightPredicate() {
public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
- BenthosBatchRowModel row = getTableModel().getEntry(adapter.row);
+ BenthosBatchRowModel row = getTableModel().getEntry(adapter.convertRowIndexToModel(adapter.row));
return row.isSpeciesToConfirm();
}
@@ -446,14 +447,17 @@
// paint the cell in dark orange if the row is to confirm and the cell is not editable
Highlighter confirmNotEditableHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
- new HighlightPredicate() {
+ new HighlightPredicate.AndHighlightPredicate(
+ new HighlightPredicate.NotHighlightPredicate(HighlightPredicate.IS_SELECTED),
+ HighlightPredicate.READ_ONLY,
+ new HighlightPredicate() {
- public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
- BenthosBatchRowModel row = getTableModel().getEntry(adapter.row);
- return row.isSpeciesToConfirm() && !adapter.isEditable();
- }
+ public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
+ BenthosBatchRowModel row = getTableModel().getEntry(adapter.convertRowIndexToModel(adapter.row));
+ return row.isSpeciesToConfirm();
+ }
- }, toConfirmColor.darker());
+ }), toConfirmColor.darker());
table.addHighlighter(confirmNotEditableHighlighter);
}
@@ -620,7 +624,7 @@
JXTable table = getTable();
// can add species to a melag if several root are selected
- int[] selectedRows = table.getSelectedRows();
+ int[] selectedRows = SwingUtil.getSelectedModelRows(table);
for (int selectedRowIndex : selectedRows) {
BenthosBatchRowModel selectedRow =
tableModel.getEntry(selectedRowIndex);
@@ -719,8 +723,9 @@
null,
null,
BenthosBatchTableModel.SPECIES);
-// speciesColumn.setSortable(true);
- DecoratorService.SpeciesFromProtocolDecorator speciesDecorator = new DecoratorService.SpeciesFromProtocolDecorator();
+ speciesColumn.setSortable(true);
+ SpeciesBatchDecorator<BenthosBatchRowModel> speciesDecorator =
+ SpeciesBatchDecorator.newDecorator(table);
speciesColumn.putClientProperty(TuttiUIUtil.SPECIES_DECORATOR, speciesDecorator);
speciesColumn.setCellRenderer(newTableCellRender(speciesDecorator));
}
@@ -841,12 +846,12 @@
e.getLastRow() == Integer.MAX_VALUE) {
// get column comparator
- TuttiDecorator.TuttiDecoratorComparator<Species> comparator =
- (TuttiDecorator.TuttiDecoratorComparator<Species>)
+ TuttiDecorator.TuttiDecoratorComparator<BenthosBatchRowModel> comparator =
+ (TuttiDecorator.TuttiDecoratorComparator<BenthosBatchRowModel>)
speciesColumn.getComparator();
// get column comparator
- TuttiDecorator<Species> decorator =
+ TuttiDecorator<BenthosBatchRowModel> decorator =
TuttiUIUtil.getSpeciesColumnDecorator(speciesColumn);
boolean comparatorNull = comparator == null;
@@ -857,7 +862,7 @@
}
// init comparator with model species list
- comparator.init(decorator, tableModel.getSpeciesList());
+ comparator.init(decorator, tableModel.getRows());
if (comparatorNull) {
@@ -923,7 +928,7 @@
saveRow(newRow);
tableModel.addNewRow(newRow);
- AbstractSelectTableAction.doSelectCell(getTable(), tableModel.getRowCount() - 1, 0);
+ TuttiUIUtil.selectFirstCellOnLastRow(getTable());
// update speciesUsed
addToSpeciesUsed(newRow);
@@ -944,13 +949,13 @@
JXTable table = getTable();
- int rowIndex = table.getSelectedRow();
+ int rowIndex = SwingUtil.getSelectedModelRow(table);
TableColumnModelExt columnModel = (TableColumnModelExt) getTable().getColumnModel();
int columnIndex = columnModel.getColumnIndex(BenthosBatchTableModel.COMPUTED_NUMBER);
- AbstractSelectTableAction.doSelectCell(getTable(), rowIndex, columnIndex);
+ TuttiUIUtil.doSelectCell(getTable(), rowIndex, columnIndex);
BenthosFrequencyCellComponent.FrequencyCellEditor cellEditor =
(BenthosFrequencyCellComponent.FrequencyCellEditor)
@@ -963,7 +968,7 @@
JXTable table = getTable();
// get selected row
- int rowIndex = table.getSelectedRow();
+ int rowIndex = SwingUtil.getSelectedModelRow(table);
Preconditions.checkState(rowIndex != -1,
"Cant split batch if no batch selected");
@@ -1010,12 +1015,12 @@
BenthosBatchTableModel tableModel = getTableModel();
// get selected row
- int rowIndex = getTable().getSelectedRow();
+ int rowIndex = SwingUtil.getSelectedModelRow(getTable());
Preconditions.checkState(rowIndex != -1,
"Cant split batch if no batch selected");
// get selected column
- int columnIndex = getTable().getSelectedColumn();
+ int columnIndex = SwingUtil.getSelectedModelColumn(getTable());
Preconditions.checkState(columnIndex != -1,
"Cant split batch if no batch selected");
@@ -1053,10 +1058,10 @@
BenthosBatchTableModel tableModel = getTableModel();
// get selected row
- int rowIndex = getTable().getSelectedRow();
+ int rowIndex = SwingUtil.getSelectedModelRow(getTable());
// get selected column
- int columnIndex = getTable().getSelectedColumn();
+ int columnIndex = SwingUtil.getSelectedModelColumn(getTable());
// get selected row
BenthosBatchRowModel selectedRow = tableModel.getEntry(rowIndex);
@@ -1171,7 +1176,7 @@
JXTable table = getTable();
// get selected row
- int insertRow = table.getSelectedRow();
+ int insertRow = SwingUtil.getSelectedModelRow(table);
BenthosBatchTableModel tableModel = getTableModel();
BenthosBatchRowModel parentBatch = tableModel.getEntry(insertRow);
@@ -1274,7 +1279,7 @@
model.setLeafNumber(model.getLeafNumber() + newBatches.size() - 1);
// update columns for the parent shell
- tableModel.updateShell(shell, getTable().getSelectedColumn());
+ tableModel.updateShell(shell, SwingUtil.getSelectedModelColumn(getTable()));
}
public void updateTotalFromFrequencies(BenthosBatchRowModel row) {
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-10-14 18:36:22 UTC (rev 1300)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java 2013-10-14 18:41:57 UTC (rev 1301)
@@ -66,6 +66,8 @@
private static final long serialVersionUID = 1L;
+ public static final String PROPERTY_SPECIES_ROW = "speciesRow";
+
public static final String PROPERTY_SAMPLE_CATEGORY = "sampleCategory";
public static final String PROPERTY_SAMPLE_CATEGORY_VALUE = "sampleCategoryValue";
@@ -179,6 +181,10 @@
computedOrNotNumber.addPropagateListener(PROPERTY_COMPUTED_NUMBER, this);
}
+ public SpeciesBatchRowModel getSpeciesRow() {
+ return this;
+ }
+
public SpeciesBatchRowModel(WeightUnit weightUnit,
SampleCategoryModel sampleCategoryModel,
SpeciesBatch aBatch,
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java 2013-10-14 18:36:22 UTC (rev 1300)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchTableModel.java 2013-10-14 18:41:57 UTC (rev 1301)
@@ -59,7 +59,7 @@
LogFactory.getLog(SpeciesBatchTableModel.class);
public static final ColumnIdentifier<SpeciesBatchRowModel> SPECIES = ColumnIdentifier.newId(
- SpeciesBatchRowModel.PROPERTY_SPECIES,
+ SpeciesBatchRowModel.PROPERTY_SPECIES_ROW,
n_("tutti.editSpeciesBatch.table.header.species"),
n_("tutti.editSpeciesBatch.table.header.species"));
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-10-14 18:36:22 UTC (rev 1300)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java 2013-10-14 18:41:57 UTC (rev 1301)
@@ -50,6 +50,7 @@
import fr.ifremer.tutti.ui.swing.content.operation.catches.EditCatchesUIModel;
import fr.ifremer.tutti.ui.swing.content.operation.catches.SampleCategoryColumnIdentifier;
import fr.ifremer.tutti.ui.swing.content.operation.catches.SampleCategoryComponent;
+import fr.ifremer.tutti.ui.swing.content.operation.catches.SpeciesBatchDecorator;
import fr.ifremer.tutti.ui.swing.content.operation.catches.TableViewMode;
import fr.ifremer.tutti.ui.swing.content.operation.catches.species.create.CreateSpeciesBatchUI;
import fr.ifremer.tutti.ui.swing.content.operation.catches.species.create.CreateSpeciesBatchUIModel;
@@ -67,7 +68,6 @@
import fr.ifremer.tutti.ui.swing.util.editor.TuttiComputedOrNotDataTableCell;
import fr.ifremer.tutti.ui.swing.util.species.SelectSpeciesUI;
import fr.ifremer.tutti.ui.swing.util.species.SelectSpeciesUIModel;
-import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction;
import fr.ifremer.tutti.ui.swing.util.table.ColumnIdentifier;
import jaxx.runtime.SwingUtil;
import jaxx.runtime.swing.editor.NumberEditor;
@@ -430,7 +430,7 @@
Highlighter evenHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
new HighlightPredicate.AndHighlightPredicate(
HighlightPredicate.EVEN,
- new HighlightPredicate.NotHighlightPredicate(HighlightPredicate.READ_ONLY)),
+ HighlightPredicate.EDITABLE),
Color.WHITE);
table.addHighlighter(evenHighlighter);
@@ -442,10 +442,11 @@
Highlighter confirmHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
new HighlightPredicate.AndHighlightPredicate(
new HighlightPredicate.NotHighlightPredicate(HighlightPredicate.IS_SELECTED),
+ HighlightPredicate.EDITABLE,
new HighlightPredicate() {
public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
- SpeciesBatchRowModel row = getTableModel().getEntry(adapter.row);
+ SpeciesBatchRowModel row = getTableModel().getEntry(adapter.convertRowIndexToModel(adapter.row));
return row.isSpeciesToConfirm();
}
@@ -454,14 +455,17 @@
// paint the cell in dark orange if the row is to confirm and the cell is not editable
Highlighter confirmNotEditableHighlighter = TuttiUIUtil.newBackgroundColorHighlighter(
- new HighlightPredicate() {
+ new HighlightPredicate.AndHighlightPredicate(
+ new HighlightPredicate.NotHighlightPredicate(HighlightPredicate.IS_SELECTED),
+ HighlightPredicate.READ_ONLY,
+ new HighlightPredicate() {
- public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
- SpeciesBatchRowModel row = getTableModel().getEntry(adapter.row);
- return row.isSpeciesToConfirm() && !adapter.isEditable();
- }
+ public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
+ SpeciesBatchRowModel row = getTableModel().getEntry(adapter.convertRowIndexToModel(adapter.row));
+ return row.isSpeciesToConfirm() && !adapter.isEditable();
+ }
- }, toConfirmColor.darker());
+ }), toConfirmColor.darker());
table.addHighlighter(confirmNotEditableHighlighter);
}
@@ -628,7 +632,7 @@
JXTable table = getTable();
// can add species to a melag if several root are selected
- int[] selectedRows = table.getSelectedRows();
+ int[] selectedRows = SwingUtil.getSelectedModelRows(table);
for (int selectedRowIndex : selectedRows) {
SpeciesBatchRowModel selectedRow =
tableModel.getEntry(selectedRowIndex);
@@ -727,8 +731,9 @@
null,
null,
SpeciesBatchTableModel.SPECIES);
-// speciesColumn.setSortable(true);
- DecoratorService.SpeciesFromProtocolDecorator speciesDecorator = new DecoratorService.SpeciesFromProtocolDecorator();
+ speciesColumn.setSortable(true);
+ SpeciesBatchDecorator<SpeciesBatchRowModel> speciesDecorator =
+ SpeciesBatchDecorator.newDecorator(table);
speciesColumn.putClientProperty(TuttiUIUtil.SPECIES_DECORATOR, speciesDecorator);
speciesColumn.setCellRenderer(newTableCellRender(speciesDecorator));
}
@@ -850,12 +855,12 @@
e.getLastRow() == Integer.MAX_VALUE) {
// get column comparator
- TuttiDecorator.TuttiDecoratorComparator<Species> comparator =
- (TuttiDecorator.TuttiDecoratorComparator<Species>)
+ TuttiDecorator.TuttiDecoratorComparator<SpeciesBatchRowModel> comparator =
+ (TuttiDecorator.TuttiDecoratorComparator<SpeciesBatchRowModel>)
speciesColumn.getComparator();
// get column comparator
- TuttiDecorator<Species> decorator =
+ TuttiDecorator<SpeciesBatchRowModel> decorator =
TuttiUIUtil.getSpeciesColumnDecorator(speciesColumn);
boolean comparatorNull = comparator == null;
@@ -866,7 +871,7 @@
}
// init comparator with model species list
- comparator.init(decorator, tableModel.getSpeciesList());
+ comparator.init(decorator, tableModel.getRows());
if (comparatorNull) {
@@ -931,7 +936,7 @@
saveRow(newRow);
tableModel.addNewRow(newRow);
- AbstractSelectTableAction.doSelectCell(getTable(), tableModel.getRowCount() - 1, 0);
+ TuttiUIUtil.selectFirstCellOnLastRow(getTable());
// update speciesUsed
addToSpeciesUsed(newRow);
@@ -952,13 +957,13 @@
JXTable table = getTable();
- int rowIndex = table.getSelectedRow();
+ int rowIndex = SwingUtil.getSelectedModelRow(table);
TableColumnModelExt columnModel = (TableColumnModelExt) getTable().getColumnModel();
int columnIndex = columnModel.getColumnIndex(SpeciesBatchTableModel.COMPUTED_NUMBER);
- AbstractSelectTableAction.doSelectCell(getTable(), rowIndex, columnIndex);
+ TuttiUIUtil.doSelectCell(getTable(), rowIndex, columnIndex);
SpeciesFrequencyCellComponent.FrequencyCellEditor cellEditor =
(SpeciesFrequencyCellComponent.FrequencyCellEditor)
@@ -971,7 +976,7 @@
JXTable table = getTable();
// get selected row
- int rowIndex = table.getSelectedRow();
+ int rowIndex = SwingUtil.getSelectedModelRow(table);
Preconditions.checkState(rowIndex != -1,
"Cant split batch if no batch selected");
@@ -1018,12 +1023,12 @@
SpeciesBatchTableModel tableModel = getTableModel();
// get selected row
- int rowIndex = getTable().getSelectedRow();
+ int rowIndex = SwingUtil.getSelectedModelRow(getTable());
Preconditions.checkState(rowIndex != -1,
"Cant split batch if no batch selected");
// get selected column
- int columnIndex = getTable().getSelectedColumn();
+ int columnIndex = SwingUtil.getSelectedModelColumn(getTable());
Preconditions.checkState(columnIndex != -1,
"Cant split batch if no batch selected");
@@ -1061,10 +1066,10 @@
SpeciesBatchTableModel tableModel = getTableModel();
// get selected row
- int rowIndex = getTable().getSelectedRow();
+ int rowIndex = SwingUtil.getSelectedModelRow(getTable());
// get selected column
- int columnIndex = getTable().getSelectedColumn();
+ int columnIndex = SwingUtil.getSelectedModelColumn(getTable());
// get selected row
SpeciesBatchRowModel selectedRow = tableModel.getEntry(rowIndex);
@@ -1178,7 +1183,7 @@
JXTable table = getTable();
// get selected row
- int insertRow = table.getSelectedRow();
+ int insertRow = SwingUtil.getSelectedModelRow(table);
SpeciesBatchTableModel tableModel = getTableModel();
SpeciesBatchRowModel parentBatch = tableModel.getEntry(insertRow);
@@ -1208,7 +1213,7 @@
newBatches.add(newBatch);
tableModel.addNewRow(++insertRow, newBatch);
- AbstractSelectTableAction.doSelectCell(getTable(), insertRow, 0);
+ TuttiUIUtil.selectFirstCellOnRow(getTable(), insertRow, false);
}
}
@@ -1282,7 +1287,7 @@
model.setLeafNumber(model.getLeafNumber() + newBatches.size() - 1);
// update columns for the parent shell
- tableModel.updateShell(shell, getTable().getSelectedColumn());
+ tableModel.updateShell(shell, SwingUtil.getSelectedModelColumn(getTable()));
}
public void updateTotalFromFrequencies(SpeciesBatchRowModel row) {
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/AbstractTuttiUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/AbstractTuttiUIHandler.java 2013-10-14 18:36:22 UTC (rev 1300)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/AbstractTuttiUIHandler.java 2013-10-14 18:41:57 UTC (rev 1301)
@@ -441,7 +441,13 @@
if (rowIndex == -1) {
source.clearSelection();
} else if (!ArrayUtils.contains(selectedRows, rowIndex)) {
- source.setRowSelectionInterval(rowIndex, rowIndex);
+ if (ListSelectionModel.MULTIPLE_INTERVAL_SELECTION == source.getSelectionMode()) {
+ // add to selection
+ source.addRowSelectionInterval(rowIndex, rowIndex);
+ } else {
+ // set selection
+ source.setRowSelectionInterval(rowIndex, rowIndex);
+ }
}
// select column (could empty selection)
@@ -453,8 +459,12 @@
if (rightClick) {
- beforeOpenPopup(rowIndex, columnIndex);
+ // use now model coordinate
+ int modelRowIndex = source.convertRowIndexToModel(rowIndex);
+ int modelColumnIndex = source.convertColumnIndexToModel(columnIndex);
+ beforeOpenPopup(modelRowIndex, modelColumnIndex);
+
// on right click show popup
popup.show(source, e.getX(), e.getY());
}
@@ -472,7 +482,9 @@
boolean result = false;
if (adapter.isEditable()) {
AbstractTuttiTableModel model = (AbstractTuttiTableModel) table.getModel();
- AbstractTuttiBeanUIModel row = (AbstractTuttiBeanUIModel) model.getEntry(adapter.row);
+ int viewRow = adapter.row;
+ int modelRow = adapter.convertRowIndexToModel(viewRow);
+ AbstractTuttiBeanUIModel row = (AbstractTuttiBeanUIModel) model.getEntry(modelRow);
result = !row.isValid();
}
return result;
@@ -534,7 +546,7 @@
HighlightPredicate.ODD,
notSelectedPredicate,
rowIsValidPredicate,
- new HighlightPredicate.NotHighlightPredicate(HighlightPredicate.READ_ONLY)),
+ HighlightPredicate.EDITABLE),
getConfig().getColorAlternateRow());
table.addHighlighter(evenNotReadOnlyHighlighter);
@@ -544,7 +556,7 @@
HighlightPredicate.ODD,
HighlightPredicate.IS_SELECTED,
rowIsValidPredicate,
- new HighlightPredicate.NotHighlightPredicate(HighlightPredicate.READ_ONLY)),
+ HighlightPredicate.EDITABLE),
getConfig().getColorSelectedRow());
table.addHighlighter(evenSelectedHighlighter);
@@ -606,7 +618,10 @@
if (canContinue) {
- beforeOpenPopup(lowestRow, selectedColumn);
+ // use now model coordinate
+ int rowIndex = source.convertRowIndexToModel(lowestRow);
+ int columnIndex = source.convertColumnIndexToModel(selectedColumn);
+ beforeOpenPopup(rowIndex, columnIndex);
popup.show(source, p.x, p.y);
}
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-10-14 18:36:22 UTC (rev 1300)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_en_GB.properties 2013-10-14 18:41:57 UTC (rev 1301)
@@ -1363,6 +1363,7 @@
tutti.property.refTaxCode=
tutti.property.set.error=
tutti.property.surveycode=
+tutti.propety.no.species.speciesCode=
tutti.reimport.step.backupDb=
tutti.reimport.step.closeDb=
tutti.reimport.step.reloadApplication=
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-10-14 18:36:22 UTC (rev 1300)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-10-14 18:41:57 UTC (rev 1301)
@@ -1140,7 +1140,7 @@
tutti.flash.info.benthos.imported.in.protocol=Benthos importés dans le protocole depuis le fichier <strong>%s</strong>.
tutti.flash.info.benthos.imported.in.protocol.oneReplaced=Benthos importés dans le protocole depuis le fichier <strong>%s</strong>. 1 remplacée par son référent.
tutti.flash.info.benthos.imported.in.protocol.severalReplaced=Benthos importés dans le protocole depuis le fichier <strong>%s</strong>. %s remplacées par leur référent.
-tutti.flash.info.benthos.remove.from.protocol=Le benthos <strong>%s</strong> a été retiré du protocole.
+tutti.flash.info.benthos.remove.from.protocol=Les benthos ont été retirés du protocole.
tutti.flash.info.benthos.replaced=Le benthos <strong>%s</strong> a été remplacé par son référent <strong>%s</strong>.
tutti.flash.info.caracteristic.imported.in.protocol=Caractéristiques importées dans le protocole depuis le fichier <strong>%s</strong>.
tutti.flash.info.caractristic.exported.from.protocol=Caractéristiques du protocole exportées dans le fichier <strong>%s</strong>.
@@ -1163,7 +1163,7 @@
tutti.flash.info.species.imported.in.protocol=Espèces importées dans le protocole depuis le fichier <strong>%s</strong>.
tutti.flash.info.species.imported.in.protocol.oneReplaced=Espèces importées dans le protocole depuis le fichier <strong>%s</strong>. 1 remplacée par son référent.
tutti.flash.info.species.imported.in.protocol.severalReplaced=Espèces importées dans le protocole depuis le fichier <strong>%s</strong>. %s remplacées par leur référent.
-tutti.flash.info.species.remove.from.protocol=L'espèce <strong>%s</strong> a été retirée du protocole.
+tutti.flash.info.species.remove.from.protocol=Les espèces ont été retirées du protocole.
tutti.flash.info.species.replaced=L'espèce <strong>%s</strong> a été remplacée par son référent <strong>%s</strong>.
tutti.gear.noCaracteristics=Pas de caractéristiques.
tutti.gear.withCaracteristics=Caractéristiques de l'engin %s
@@ -1361,6 +1361,7 @@
tutti.property.refTaxCode=
tutti.property.set.error=Propriété %1s non trouvée sur l'objet de type %2s
tutti.property.surveycode=
+tutti.propety.no.species.speciesCode=
tutti.reimport.step.backupDb=Sauvegarde de la base dans l'archive %s
tutti.reimport.step.closeDb=Fermeture de la base
tutti.reimport.step.reloadApplication=Redémarrage de l'application...
1
0
r1300 - trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches
by tchemit@users.forge.codelutin.com 14 Oct '13
by tchemit@users.forge.codelutin.com 14 Oct '13
14 Oct '13
Author: tchemit
Date: 2013-10-14 20:36:22 +0200 (Mon, 14 Oct 2013)
New Revision: 1300
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1300
Log:
api changes
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeBatchWeightsAction.java
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeBatchWeightsAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeBatchWeightsAction.java 2013-10-14 18:33:56 UTC (rev 1299)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/ComputeBatchWeightsAction.java 2013-10-14 18:36:22 UTC (rev 1300)
@@ -42,8 +42,8 @@
import fr.ifremer.tutti.ui.swing.content.operation.catches.benthos.BenthosBatchRowModel;
import fr.ifremer.tutti.ui.swing.content.operation.catches.species.SpeciesBatchRowModel;
import fr.ifremer.tutti.ui.swing.util.AbstractTuttiUIHandler;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
-import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction;
import javax.swing.JOptionPane;
import java.util.List;
@@ -127,7 +127,7 @@
} else {
column = 6;
}
- AbstractSelectTableAction.doSelectCell(getUI().getSpeciesTabContent().getTable(), index, column);
+ TuttiUIUtil.doSelectCell(getUI().getSpeciesTabContent().getTable(), index, column);
throw e;
}
@@ -154,7 +154,7 @@
} else {
column = 6;
}
- AbstractSelectTableAction.doSelectCell(getUI().getBenthosTabContent().getTable(), index, column);
+ TuttiUIUtil.doSelectCell(getUI().getBenthosTabContent().getTable(), index, column);
throw e;
}
@@ -171,7 +171,7 @@
} catch (TuttiWeightComputingException e) {
getUI().getTabPane().setSelectedIndex(3);
- AbstractSelectTableAction.doSelectCell(getUI().getMarineLitterTabContent().getTable(), e.getIndex(), 3);
+ TuttiUIUtil.doSelectCell(getUI().getMarineLitterTabContent().getTable(), e.getIndex(), 3);
throw e;
}
1
0
r1299 - in trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing: content/operation/catches/benthos/frequency content/operation/catches/species/frequency util/table
by tchemit@users.forge.codelutin.com 14 Oct '13
by tchemit@users.forge.codelutin.com 14 Oct '13
14 Oct '13
Author: tchemit
Date: 2013-10-14 20:33:56 +0200 (Mon, 14 Oct 2013)
New Revision: 1299
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1299
Log:
api changes...
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/frequency/BenthosFrequencyUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/frequency/BenthosFrequencyUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/frequency/BenthosFrequencyUIHandler.java 2013-10-14 18:30:59 UTC (rev 1298)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/frequency/BenthosFrequencyUIHandler.java 2013-10-14 18:33:56 UTC (rev 1299)
@@ -691,7 +691,7 @@
message);
// focus to first error row
- TuttiUIUtil.selectFirstCellOnRow(getTable(), index);
+ TuttiUIUtil.selectFirstCellOnRow(getTable(), index, false);
return;
}
@@ -732,7 +732,7 @@
message);
// focus to first error row
- TuttiUIUtil.selectFirstCellOnRow(getTable(), index);
+ TuttiUIUtil.selectFirstCellOnRow(getTable(), index, false);
return;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java 2013-10-14 18:30:59 UTC (rev 1298)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/SpeciesFrequencyUIHandler.java 2013-10-14 18:33:56 UTC (rev 1299)
@@ -689,7 +689,7 @@
message);
// focus to first error row
- TuttiUIUtil.selectFirstCellOnRow(getTable(), index);
+ TuttiUIUtil.selectFirstCellOnRow(getTable(), index, false);
return;
}
@@ -730,7 +730,7 @@
message);
// focus to first error row
- TuttiUIUtil.selectFirstCellOnRow(getTable(), index);
+ TuttiUIUtil.selectFirstCellOnRow(getTable(), index, false);
return;
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java 2013-10-14 18:30:59 UTC (rev 1298)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/AbstractTuttiTableModel.java 2013-10-14 18:33:56 UTC (rev 1299)
@@ -156,6 +156,14 @@
fireTableRowsInserted(rowIndex, rowIndex);
}
+ public final void fireTableRowsInserted(R newValue) {
+
+ Preconditions.checkNotNull(newValue, "Row can not be null.");
+
+ int rowIndex = getRowIndex(newValue);
+ fireTableRowsInserted(rowIndex, rowIndex);
+ }
+
public final int updateRow(R row) {
Preconditions.checkNotNull(row, "Row can not be null.");
1
0
r1298 - in trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing: content/operation/catches/benthos content/operation/catches/species content/protocol util
by tchemit@users.forge.codelutin.com 14 Oct '13
by tchemit@users.forge.codelutin.com 14 Oct '13
14 Oct '13
Author: tchemit
Date: 2013-10-14 20:30:59 +0200 (Mon, 14 Oct 2013)
New Revision: 1298
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1298
Log:
refs #3328: [ERGO] Tri du tableau des esp?\195?\168ces (must always translate model and view model coordinate since using sorting on table)
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/CreateBenthosMelagAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RemoveBenthosBatchAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RemoveBenthosSubBatchAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RenameBenthosBatchAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/CreateSpeciesMelagAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RemoveSpeciesBatchAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RemoveSpeciesSubBatchAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RenameSpeciesBatchAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddBenthosProtocolAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveBenthosProtocolAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/CreateBenthosMelagAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/CreateBenthosMelagAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/CreateBenthosMelagAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -68,7 +68,7 @@
public boolean prepareAction() throws Exception {
boolean result = super.prepareAction();
- int[] selectedRowIndexes = handler.getTable().getSelectedRows();
+ int[] selectedRowIndexes = SwingUtil.getSelectedModelRows(handler.getTable());
BenthosBatchTableModel tableModel = handler.getTableModel();
@@ -108,7 +108,7 @@
_("tutti.createBenthosMelag.error.title"),
JOptionPane.ERROR_MESSAGE);
- handler.getTable().getSelectionModel().setSelectionInterval(selectedRowIndex, selectedRowIndex);
+ SwingUtil.setSelectionInterval(handler.getTable(), selectedRowIndex);
result = false;
break;
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RemoveBenthosBatchAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RemoveBenthosBatchAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RemoveBenthosBatchAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -28,8 +28,9 @@
import com.google.common.collect.Sets;
import fr.ifremer.tutti.persistence.TuttiPersistence;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
-import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction;
+import jaxx.runtime.SwingUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jdesktop.swingx.JXTable;
@@ -51,6 +52,13 @@
private static final Log log =
LogFactory.getLog(RemoveBenthosBatchAction.class);
+ /**
+ * Selected row to treat.
+ *
+ * @since 2.8
+ */
+ protected int rowIndex;
+
public RemoveBenthosBatchAction(BenthosBatchUIHandler handler) {
super(handler, false);
}
@@ -59,6 +67,8 @@
public boolean prepareAction() throws Exception {
boolean result = super.prepareAction();
+ rowIndex = -1;
+
if (result) {
int answer = JOptionPane.showConfirmDialog(getContext().getActionUI(),
_("tutti.editBenthosBatch.action.removeBatch.confirm.message"),
@@ -78,7 +88,7 @@
JXTable table = handler.getTable();
- int rowIndex = table.getSelectedRow();
+ rowIndex = SwingUtil.getSelectedModelRow(table);
Preconditions.checkState(rowIndex != -1,
"Cant remove batch if no batch selected");
@@ -110,26 +120,29 @@
handler.collectChildren(selectedBatch, rowToRemove);
- table.clearSelection();
+//FIXME TC-2013-10-14 Comment this line, don't see the point
+// table.clearSelection();
// remove all rows from the model
getModel().getRows().removeAll(rowToRemove);
- // refresh table from parent batch row index to the end
- tableModel.fireTableDataChanged();
+// // refresh table from parent batch row index to the end
+// tableModel.fireTableDataChanged();
+//
+// TuttiUIUtil.selectFirstCellOnFirstRowAndStopEditing(table);
+ }
- if (!getModel().getRows().isEmpty()) {
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
- // select first row
- AbstractSelectTableAction.doSelectCell(table, 0, 0);
+ JXTable table = handler.getTable();
- }
+ // refresh table from parent batch row index to the end
+ handler.getTableModel().fireTableDataChanged();
- if (table.isEditing()) {
-
- // but no edit it
- table.getCellEditor().stopCellEditing();
- }
+ // select parent batch row
+ TuttiUIUtil.selectFirstCellOnFirstRowAndStopEditing(table);
}
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RemoveBenthosSubBatchAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RemoveBenthosSubBatchAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RemoveBenthosSubBatchAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -28,8 +28,9 @@
import com.google.common.collect.Sets;
import fr.ifremer.tutti.persistence.TuttiPersistence;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
-import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction;
+import jaxx.runtime.SwingUtil;
import org.jdesktop.swingx.JXTable;
import javax.swing.JOptionPane;
@@ -45,6 +46,13 @@
*/
public class RemoveBenthosSubBatchAction extends AbstractTuttiAction<BenthosBatchUIModel, BenthosBatchUI, BenthosBatchUIHandler> {
+ /**
+ * Selected row to treat.
+ *
+ * @since 2.8
+ */
+ protected int rowIndex;
+
public RemoveBenthosSubBatchAction(BenthosBatchUIHandler handler) {
super(handler, false);
}
@@ -53,6 +61,8 @@
public boolean prepareAction() throws Exception {
boolean result = super.prepareAction();
+ rowIndex = -1;
+
if (result) {
int answer = JOptionPane.showConfirmDialog(getContext().getActionUI(),
_("tutti.editBenthosBatch.action.removeSubBatch.confirm.message"),
@@ -72,7 +82,7 @@
JXTable table = handler.getTable();
- int rowIndex = table.getSelectedRow();
+ rowIndex = SwingUtil.getSelectedModelRow(table);
Preconditions.checkState(rowIndex != -1,
"Cant remove sub batch if no batch selected");
@@ -90,7 +100,8 @@
handler.collectChildren(parentBatch, rowToRemove);
- table.clearSelection();
+//FIXME TC-2013-10-14 Comment this line, don't see the point
+// table.clearSelection();
// remove all rows from the model
getModel().getRows().removeAll(rowToRemove);
@@ -98,17 +109,29 @@
// remove childs from parent batch
parentBatch.setChildBatch(null);
+// // refresh table from parent batch row index to the end
+// handler.getTableModel().fireTableDataChanged();
+//
+// // select parent batch row
+// AbstractSelectTableAction.doSelectCell(table, rowIndex, 0);
+//
+// if (table.isEditing()) {
+//
+// // but no edit it
+// table.getCellEditor().stopCellEditing();
+// }
+ }
+
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
+
+ JXTable table = handler.getTable();
+
// refresh table from parent batch row index to the end
handler.getTableModel().fireTableDataChanged();
// select parent batch row
- AbstractSelectTableAction.doSelectCell(table, rowIndex, 0);
-
- if (table.isEditing()) {
-
- // but no edit it
- table.getCellEditor().stopCellEditing();
- }
+ TuttiUIUtil.selectFirstCellOnRow(table, rowIndex, true);
}
-
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RenameBenthosBatchAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RenameBenthosBatchAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/benthos/RenameBenthosBatchAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -30,6 +30,7 @@
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
+import jaxx.runtime.SwingUtil;
import org.jdesktop.swingx.JXTable;
import java.io.Serializable;
@@ -59,7 +60,8 @@
BenthosBatchTableModel tableModel = handler.getTableModel();
JXTable table = handler.getTable();
- BenthosBatchRowModel row = tableModel.getEntry(table.getSelectedRow());
+ int selectedRowIndex = SwingUtil.getSelectedModelRow(table);
+ BenthosBatchRowModel row = tableModel.getEntry(selectedRowIndex);
BenthosBatchUIModel model = handler.getModel();
List<Species> speciesList = Lists.newArrayList(
@@ -90,7 +92,8 @@
BenthosBatchTableModel tableModel = handler.getTableModel();
JXTable table = handler.getTable();
- BenthosBatchRowModel row = tableModel.getEntry(table.getSelectedRow());
+ int selectedRowIndex = SwingUtil.getSelectedModelRow(table);
+ BenthosBatchRowModel row = tableModel.getEntry(selectedRowIndex);
PersistenceService persistenceService = getContext().getPersistenceService();
persistenceService.changeBenthosBatchSpecies(row.getId(), selectedSpecies);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/CreateSpeciesMelagAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/CreateSpeciesMelagAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/CreateSpeciesMelagAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -68,7 +68,7 @@
public boolean prepareAction() throws Exception {
boolean result = super.prepareAction();
- int[] selectedRowIndexes = handler.getTable().getSelectedRows();
+ int[] selectedRowIndexes = SwingUtil.getSelectedModelRows(handler.getTable());
SpeciesBatchTableModel tableModel = handler.getTableModel();
@@ -108,7 +108,7 @@
_("tutti.createSpeciesMelag.error.title"),
JOptionPane.ERROR_MESSAGE);
- handler.getTable().getSelectionModel().setSelectionInterval(selectedRowIndex, selectedRowIndex);
+ SwingUtil.setSelectionInterval(handler.getTable(), selectedRowIndex);
result = false;
break;
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RemoveSpeciesBatchAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RemoveSpeciesBatchAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RemoveSpeciesBatchAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -28,8 +28,9 @@
import com.google.common.collect.Sets;
import fr.ifremer.tutti.persistence.TuttiPersistence;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
-import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction;
+import jaxx.runtime.SwingUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jdesktop.swingx.JXTable;
@@ -78,7 +79,7 @@
JXTable table = handler.getTable();
- int rowIndex = table.getSelectedRow();
+ int rowIndex = SwingUtil.getSelectedModelRow(table);
Preconditions.checkState(rowIndex != -1,
"Cant remove batch if no batch selected");
@@ -110,27 +111,39 @@
handler.collectChildren(selectedBatch, rowToRemove);
- table.clearSelection();
+//FIXME TC-2013-10-14 Comment this line, don't see the point
+// table.clearSelection();
// remove all rows from the model
getModel().getRows().removeAll(rowToRemove);
- // refresh table from parent batch row index to the end
- tableModel.fireTableDataChanged();
+// // refresh table from parent batch row index to the end
+// tableModel.fireTableDataChanged();
+//
+// if (!getModel().getRows().isEmpty()) {
+//
+// // select first row
+// AbstractSelectTableAction.doSelectCell(table, 0, 0);
+//
+// }
+//
+// if (table.isEditing()) {
+//
+// // but no edit it
+// table.getCellEditor().stopCellEditing();
+// }
+ }
- if (!getModel().getRows().isEmpty()) {
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
- // select first row
- AbstractSelectTableAction.doSelectCell(table, 0, 0);
+ JXTable table = handler.getTable();
- }
+ // refresh table from parent batch row index to the end
+ handler.getTableModel().fireTableDataChanged();
- if (table.isEditing()) {
-
- // but no edit it
- table.getCellEditor().stopCellEditing();
- }
-
+ // select parent batch row
+ TuttiUIUtil.selectFirstCellOnFirstRowAndStopEditing(table);
}
-
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RemoveSpeciesSubBatchAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RemoveSpeciesSubBatchAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RemoveSpeciesSubBatchAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -28,8 +28,9 @@
import com.google.common.collect.Sets;
import fr.ifremer.tutti.persistence.TuttiPersistence;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
+import fr.ifremer.tutti.ui.swing.util.TuttiUIUtil;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
-import fr.ifremer.tutti.ui.swing.util.table.AbstractSelectTableAction;
+import jaxx.runtime.SwingUtil;
import org.jdesktop.swingx.JXTable;
import javax.swing.JOptionPane;
@@ -45,6 +46,13 @@
*/
public class RemoveSpeciesSubBatchAction extends AbstractTuttiAction<SpeciesBatchUIModel, SpeciesBatchUI, SpeciesBatchUIHandler> {
+ /**
+ * Selected row to treat.
+ *
+ * @since 2.8
+ */
+ protected int rowIndex;
+
public RemoveSpeciesSubBatchAction(SpeciesBatchUIHandler handler) {
super(handler, false);
}
@@ -53,6 +61,8 @@
public boolean prepareAction() throws Exception {
boolean result = super.prepareAction();
+ rowIndex = -1;
+
if (result) {
int answer = JOptionPane.showConfirmDialog(getContext().getActionUI(),
_("tutti.editSpeciesBatch.action.removeSubBatch.confirm.message"),
@@ -72,7 +82,7 @@
JXTable table = handler.getTable();
- int rowIndex = table.getSelectedRow();
+ rowIndex = SwingUtil.getSelectedModelRow(table);
Preconditions.checkState(rowIndex != -1,
"Cant remove sub batch if no batch selected");
@@ -90,7 +100,8 @@
handler.collectChildren(parentBatch, rowToRemove);
- table.clearSelection();
+//FIXME TC-2013-10-14 Comment this line, don't see the point
+// table.clearSelection();
// remove all rows from the model
getModel().getRows().removeAll(rowToRemove);
@@ -98,17 +109,29 @@
// remove childs from parent batch
parentBatch.setChildBatch(null);
+// // refresh table from parent batch row index to the end
+// handler.getTableModel().fireTableDataChanged();
+//
+// // select parent batch row
+// TuttiUIUtil.selectFirstCellOnRow(table, rowIndex);
+//
+// if (table.isEditing()) {
+//
+// // but no edit it
+// table.getCellEditor().stopCellEditing();
+// }
+ }
+
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
+
+ JXTable table = handler.getTable();
+
// refresh table from parent batch row index to the end
handler.getTableModel().fireTableDataChanged();
// select parent batch row
- AbstractSelectTableAction.doSelectCell(table, rowIndex, 0);
-
- if (table.isEditing()) {
-
- // but no edit it
- table.getCellEditor().stopCellEditing();
- }
+ TuttiUIUtil.selectFirstCellOnRow(table, rowIndex, true);
}
-
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RenameSpeciesBatchAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RenameSpeciesBatchAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/RenameSpeciesBatchAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -30,6 +30,7 @@
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
+import jaxx.runtime.SwingUtil;
import org.jdesktop.swingx.JXTable;
import java.io.Serializable;
@@ -59,7 +60,8 @@
SpeciesBatchTableModel tableModel = handler.getTableModel();
JXTable table = handler.getTable();
- SpeciesBatchRowModel row = tableModel.getEntry(table.getSelectedRow());
+ int selectedRowIndex = SwingUtil.getSelectedModelRow(table);
+ SpeciesBatchRowModel row = tableModel.getEntry(selectedRowIndex);
SpeciesBatchUIModel model = handler.getModel();
List<Species> speciesList = Lists.newArrayList(
@@ -89,7 +91,8 @@
SpeciesBatchTableModel tableModel = handler.getTableModel();
JXTable table = handler.getTable();
- SpeciesBatchRowModel row = tableModel.getEntry(table.getSelectedRow());
+ int selectedRowIndex = SwingUtil.getSelectedModelRow(table);
+ SpeciesBatchRowModel row = tableModel.getEntry(selectedRowIndex);
PersistenceService persistenceService = getContext().getPersistenceService();
persistenceService.changeSpeciesBatchSpecies(row.getId(), selectedSpecies);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddBenthosProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddBenthosProtocolAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddBenthosProtocolAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -27,6 +27,7 @@
import com.google.common.base.Preconditions;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
+import jaxx.runtime.SwingUtil;
import jaxx.runtime.swing.editor.bean.BeanFilterableComboBox;
import java.util.Collection;
@@ -47,6 +48,8 @@
protected Species species;
+ protected EditProtocolSpeciesRowModel newRow;
+
@Override
public void doAction() throws Exception {
@@ -70,22 +73,32 @@
Collection<Species> allSynonyms = getModel().getAllSynonyms(taxonIdStr);
getModel().getAllSynonyms().removeAll(allSynonyms);
- benthosComboBox.removeItem(species);
- ui.getSpeciesComboBox().removeItem(species);
+// benthosComboBox.removeItem(species);
+// ui.getSpeciesComboBox().removeItem(species);
// add new row to model (do it after combo stuff for ui best display)
- EditProtocolSpeciesRowModel protocol = tableModel.createNewRow();
- protocol.setSpecies(species);
- tableModel.addNewRow(protocol);
-
- int rowIndex = tableModel.getRowIndex(protocol);
- int selectedRowIndex = handler.getBenthosTable().convertRowIndexToView(rowIndex);
- handler.getBenthosTable().getSelectionModel().setSelectionInterval(selectedRowIndex, selectedRowIndex);
+ newRow = tableModel.createNewRow();
+ newRow.setSpecies(species);
+ getModel().getBenthosRow().add(newRow);
}
@Override
public void postSuccessAction() {
super.postSuccessAction();
+
+ // update comboboxes
+ getUI().getBenthosComboBox().removeItem(species);
+ getUI().getSpeciesComboBox().removeItem(species);
+
+ // fire row was inserted in table model
+ EditProtocolSpeciesTableModel tableModel = getHandler().getBenthosTableModel();
+ tableModel.fireTableRowsInserted(newRow);
+
+ // select this new row
+ int rowIndex = tableModel.getRowIndex(newRow);
+ SwingUtil.setSelectionInterval(handler.getBenthosTable(), rowIndex);
+
+ // add notification
String speciesStr = decorate(species);
sendMessage(_("tutti.flash.info.benthos.add.to.protocol",
speciesStr));
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/AddSpeciesProtocolAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -27,6 +27,7 @@
import com.google.common.base.Preconditions;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
+import jaxx.runtime.SwingUtil;
import jaxx.runtime.swing.editor.bean.BeanFilterableComboBox;
import java.util.Collection;
@@ -47,6 +48,8 @@
protected Species species;
+ protected EditProtocolSpeciesRowModel newRow;
+
@Override
public void doAction() throws Exception {
@@ -68,21 +71,33 @@
Collection<Species> allSynonyms = getModel().getAllSynonyms(taxonIdStr);
getModel().getAllSynonyms().removeAll(allSynonyms);
- speciesComboBox.getHandler().removeItem(species);
- ui.getBenthosComboBox().removeItem(species);
+// speciesComboBox.getHandler().removeItem(species);
+// ui.getBenthosComboBox().removeItem(species);
// add new row to model (do it after combo stuff for ui best display)
- EditProtocolSpeciesRowModel protocol = tableModel.createNewRow();
- protocol.setSpecies(species);
- tableModel.addNewRow(protocol);
- int rowIndex = tableModel.getRowIndex(protocol);
- int selectedRowIndex = handler.getSpeciesTable().convertRowIndexToView(rowIndex);
- handler.getSpeciesTable().getSelectionModel().setSelectionInterval(selectedRowIndex, selectedRowIndex);
+
+ newRow = tableModel.createNewRow();
+ newRow.setSpecies(species);
+ getModel().getSpeciesRow().add(newRow);
}
@Override
public void postSuccessAction() {
super.postSuccessAction();
+
+ // update comboboxes
+ getUI().getBenthosComboBox().removeItem(species);
+ getUI().getSpeciesComboBox().removeItem(species);
+
+ // fire row was inserted in table model
+ EditProtocolSpeciesTableModel tableModel = getHandler().getSpeciesTableModel();
+ tableModel.fireTableRowsInserted(newRow);
+
+ // select this new row
+ int rowIndex = tableModel.getRowIndex(newRow);
+ SwingUtil.setSelectionInterval(handler.getBenthosTable(), rowIndex);
+
+ // add notification
String speciesStr = decorate(species);
sendMessage(_("tutti.flash.info.species.add.to.protocol",
speciesStr));
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveBenthosProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveBenthosProtocolAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveBenthosProtocolAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -26,13 +26,16 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
+import jaxx.runtime.SwingUtil;
import javax.swing.JTable;
import java.util.Collections;
import java.util.List;
+import java.util.Set;
import static org.nuiton.i18n.I18n._;
@@ -44,6 +47,14 @@
*/
public class RemoveBenthosProtocolAction extends AbstractTuttiAction<EditProtocolUIModel, EditProtocolUI, EditProtocolUIHandler> {
+
+ /**
+ * Set of removed species.
+ *
+ * @since 2.8
+ */
+ protected Set<Species> removedSpecies;
+
public RemoveBenthosProtocolAction(EditProtocolUIHandler handler) {
super(handler, false);
}
@@ -56,57 +67,91 @@
// need to have a selection
Preconditions.checkState(!table.getSelectionModel().isSelectionEmpty());
- // build the list of model row indexes from selected view row indexes
- List<Integer> modelIndexes = Lists.newArrayList();
+// // build the list of model row indexes from selected view row indexes
+// List<Integer> modelIndexes = Lists.newArrayList();
+//
+// for (int index : SwingUtil.getSelectedModelRows(table)) {
+// modelIndexes.add(index);
+// }
+//
+// // sort it and reverse it (must delete first max row index)
+// Collections.sort(modelIndexes);
+// Collections.reverse(modelIndexes);
- for (int index : table.getSelectedRows()) {
- int modelRowIndex = table.convertRowIndexToModel(index);
- modelIndexes.add(modelRowIndex);
- }
-
- // sort it and reverse it (must delete first max row index)
- Collections.sort(modelIndexes);
- Collections.reverse(modelIndexes);
-
EditProtocolSpeciesTableModel tableModel =
(EditProtocolSpeciesTableModel) table.getModel();
- for (Integer index : modelIndexes) {
+ removedSpecies = Sets.newHashSet();
- removeRow(tableModel, index);
+ EditProtocolUIModel model = getModel();
+
+ for (Integer rowIndex : SwingUtil.getSelectedModelRows(table)) {
+
+ // get row to remove
+ EditProtocolSpeciesRowModel selectedRow =
+ tableModel.getEntry(rowIndex);
+
+ // re-add all synonym of this taxon to the species / benthos combobox
+ Species species = selectedRow.getSpecies();
+ removedSpecies.add(species);
+
+ Integer taxonId = species.getReferenceTaxonId();
+ List<Species> allSynonyms = Lists.newArrayList(
+ model.getAllSynonyms(String.valueOf(taxonId)));
+ allSynonyms.remove(species);
+ model.getAllSynonyms().addAll(allSynonyms);
+
+ // remove the row from the model
+ model.getBenthosRow().remove(selectedRow);
}
- EditProtocolUIModel model = getModel();
-
// reorder the list by name, otherwise,
// all the species without a reftax code will be at the end
- Collections.sort(model.getAllSynonyms(), TuttiEntities.SPECIES_BY_NAME_COMPARATOR);
+ Collections.sort(model.getAllSynonyms(),
+ TuttiEntities.SPECIES_BY_NAME_COMPARATOR);
- table.clearSelection();
+// table.clearSelection();
}
- protected void removeRow(EditProtocolSpeciesTableModel tableModel, int rowIndex) {
+// protected void removeRow(EditProtocolSpeciesTableModel tableModel, int rowIndex) {
+//
+// EditProtocolSpeciesRowModel selectedRow = tableModel.getEntry(rowIndex);
+//
+// // re-add all synonym of this taxon to the species / benthos combobox
+// Species species = selectedRow.getSpecies();
+// getUI().getBenthosComboBox().addItem(species);
+// getUI().getSpeciesComboBox().addItem(species);
+//
+// EditProtocolUIModel model = getModel();
+// Integer taxonId = species.getReferenceTaxonId();
+// List<Species> allSynonyms = Lists.newArrayList(
+// model.getAllSynonyms(String.valueOf(taxonId)));
+// allSynonyms.remove(species);
+// model.getAllSynonyms().addAll(allSynonyms);
+//
+// // remove the row from the model
+// tableModel.removeRow(rowIndex);
+//
+// String speciesStr = decorate(selectedRow.getSpecies());
+// sendMessage(_("tutti.flash.info.benthos.remove.from.protocol",
+// speciesStr));
+// }
- EditProtocolSpeciesRowModel selectedRow = tableModel.getEntry(rowIndex);
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
- // re-add all synonym of this taxon to the species / benthos combobox
- Species species = selectedRow.getSpecies();
- getUI().getBenthosComboBox().addItem(species);
- getUI().getSpeciesComboBox().addItem(species);
+ // update comboboxes
+ getUI().getBenthosComboBox().addItems(removedSpecies);
+ getUI().getSpeciesComboBox().addItems(removedSpecies);
- EditProtocolUIModel model = getModel();
- Integer taxonId = species.getReferenceTaxonId();
- List<Species> allSynonyms = Lists.newArrayList(
- model.getAllSynonyms(String.valueOf(taxonId)));
- allSynonyms.remove(species);
- model.getAllSynonyms().addAll(allSynonyms);
+ // fire table data changed
+ handler.getBenthosTableModel().fireTableDataChanged();
- // remove the row from the model
- tableModel.removeRow(rowIndex);
+ // clear table selection
+ handler.getBenthosTable().clearSelection();
- String speciesStr = decorate(selectedRow.getSpecies());
- sendMessage(_("tutti.flash.info.benthos.remove.from.protocol",
- speciesStr));
+ // notify user
+ sendMessage(_("tutti.flash.info.benthos.remove.from.protocol"));
}
-
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/protocol/RemoveSpeciesProtocolAction.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -26,13 +26,16 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
import fr.ifremer.tutti.persistence.entities.TuttiEntities;
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.ui.swing.util.action.AbstractTuttiAction;
+import jaxx.runtime.SwingUtil;
import javax.swing.JTable;
import java.util.Collections;
import java.util.List;
+import java.util.Set;
import static org.nuiton.i18n.I18n._;
@@ -44,6 +47,13 @@
*/
public class RemoveSpeciesProtocolAction extends AbstractTuttiAction<EditProtocolUIModel, EditProtocolUI, EditProtocolUIHandler> {
+ /**
+ * Set of removed species.
+ *
+ * @since 2.8
+ */
+ protected Set<Species> removedSpecies;
+
public RemoveSpeciesProtocolAction(EditProtocolUIHandler handler) {
super(handler, false);
}
@@ -56,33 +66,51 @@
// need to have a selection
Preconditions.checkState(!table.getSelectionModel().isSelectionEmpty());
- // build the list of model row indexes from selected view row indexes
- List<Integer> modelIndexes = Lists.newArrayList();
+// // build the list of model row indexes from selected view row indexes
+// List<Integer> modelIndexes = Lists.newArrayList();
+//
+// for (int index : SwingUtil.getSelectedModelRows(table)) {
+// modelIndexes.add(index);
+// }
+//
+// // sort it and reverse it (must delete first max row index)
+// Collections.sort(modelIndexes);
+// Collections.reverse(modelIndexes);
- for (int index : table.getSelectedRows()) {
- int modelRowIndex = table.convertRowIndexToModel(index);
- modelIndexes.add(modelRowIndex);
- }
-
- // sort it and reverse it (must delete first max row index)
- Collections.sort(modelIndexes);
- Collections.reverse(modelIndexes);
-
EditProtocolSpeciesTableModel tableModel =
(EditProtocolSpeciesTableModel) table.getModel();
- for (Integer index : modelIndexes) {
+ EditProtocolUIModel model = getModel();
- removeRow(tableModel, index);
+ removedSpecies = Sets.newHashSet();
+
+ for (Integer rowIndex : SwingUtil.getSelectedModelRows(table)) {
+
+// removeRow(tableModel, index);
+
+ // get row to remove
+ EditProtocolSpeciesRowModel selectedRow =
+ tableModel.getEntry(rowIndex);
+
+ // re-add all synonym of this taxon to the species / benthos combobox
+ Species species = selectedRow.getSpecies();
+ removedSpecies.add(species);
+
+ Integer taxonId = species.getReferenceTaxonId();
+ List<Species> allSynonyms = Lists.newArrayList(
+ model.getAllSynonyms(String.valueOf(taxonId)));
+ allSynonyms.remove(species);
+ model.getAllSynonyms().addAll(allSynonyms);
+
+ // remove the row from the model
+ model.getSpeciesRow().remove(selectedRow);
}
- EditProtocolUIModel model = getModel();
-
// reorder the list by name, otherwise,
// all the species without a reftax code will be at the end
Collections.sort(model.getAllSynonyms(), TuttiEntities.SPECIES_BY_NAME_COMPARATOR);
- table.clearSelection();
+// table.clearSelection();
}
protected void removeRow(EditProtocolSpeciesTableModel tableModel, int rowIndex) {
@@ -109,4 +137,22 @@
speciesStr));
}
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
+
+ // update comboboxes
+ getUI().getBenthosComboBox().addItems(removedSpecies);
+ getUI().getSpeciesComboBox().addItems(removedSpecies);
+
+ // fire table data changed
+ handler.getBenthosTableModel().fireTableDataChanged();
+
+ // clear table selection
+ handler.getSpeciesTable().clearSelection();
+
+ // notify user
+ sendMessage(_("tutti.flash.info.species.remove.from.protocol"));
+ }
+
}
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java 2013-10-14 17:42:10 UTC (rev 1297)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/TuttiUIUtil.java 2013-10-14 18:30:59 UTC (rev 1298)
@@ -32,6 +32,7 @@
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.service.TuttiDecorator;
import fr.ifremer.tutti.ui.swing.util.table.AbstractTuttiTableModel;
+import jaxx.runtime.SwingUtil;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
@@ -46,6 +47,7 @@
import javax.swing.JPopupMenu;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JSeparator;
+import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.table.JTableHeader;
import java.awt.Color;
@@ -305,8 +307,8 @@
return result;
}
- public static TuttiDecorator<Species> getSpeciesColumnDecorator(TableColumnExt tableColumn) {
- TuttiDecorator<Species> decorator = (TuttiDecorator<Species>)
+ public static <E> TuttiDecorator<E> getSpeciesColumnDecorator(TableColumnExt tableColumn) {
+ TuttiDecorator<E> decorator = (TuttiDecorator<E>)
tableColumn.getClientProperty(SPECIES_DECORATOR);
return decorator;
}
@@ -352,6 +354,81 @@
}
+ public static void selectFirstCellOnFirstRowAndStopEditing(JXTable table) {
+
+ // select first cell
+ doSelectCell(table, 0, 0);
+
+ if (table.isEditing()) {
+
+ // but no edit it
+ table.getCellEditor().stopCellEditing();
+ }
+ }
+
+ public static void selectFirstCellOnLastRow(JXTable table) {
+
+ // select first cell
+ doSelectCell(table, table.getRowCount() - 1, 0);
+ }
+
+ public static void selectFirstCellOnRow(JXTable table, int row, boolean stopEdit) {
+
+ // select first cell
+ doSelectCell(table, row, 0);
+
+ if (stopEdit && table.isEditing()) {
+
+ table.getCellEditor().stopCellEditing();
+ }
+ }
+
+ public static void doSelectCell(JTable table,
+ int rowIndex,
+ int columnIndex) {
+
+ int rowCount = table.getRowCount();
+ if (rowCount == 0) {
+
+ // no row, can not selected any cell
+ if (log.isWarnEnabled()) {
+ log.warn("No row in table, can not select any cell");
+ }
+ return;
+ }
+ int columnCount = table.getColumnCount();
+ if (columnCount == 0) {
+
+ // no column, can not selected any cell
+ if (log.isWarnEnabled()) {
+ log.warn("No column in table, can not select any cell");
+ }
+ return;
+ }
+ if (columnIndex > columnCount) {
+ if (log.isWarnEnabled()) {
+ log.warn(String.format("ColumnIndex: %s is more than columnCount %s", columnIndex, columnCount));
+ }
+ columnIndex = columnCount - 1;
+ }
+ if (columnIndex < 0) {
+ columnIndex = 0;
+ }
+ if (rowIndex >= rowCount) {
+ if (log.isWarnEnabled()) {
+ log.warn(String.format("RowIndex: %s is more than rowCount %s", rowIndex, rowCount));
+ }
+ rowIndex = rowCount - 1;
+ }
+ if (rowIndex < 0) {
+ rowIndex = 0;
+ }
+
+ table.setColumnSelectionInterval(columnIndex, columnIndex);
+ table.setRowSelectionInterval(rowIndex, rowIndex);
+ table.editCellAt(rowIndex, columnIndex);
+ }
+
protected static class SpeciesDecoratorListener<R extends Serializable, T extends AbstractTuttiTableModel<R>> implements ActionListener {
protected final JXTable table;
@@ -393,11 +470,9 @@
T tableModel = (T) table.getModel();
// keep selected rows
- int[] rowIndexes = table.getSelectedRows();
List<R> rowsToReSelect = Lists.newArrayList();
- for (int viewRowIndex : rowIndexes) {
- int modelRowIndex = table.convertRowIndexToModel(viewRowIndex);
- R row = tableModel.getEntry(modelRowIndex);
+ for (int rowIndex : SwingUtil.getSelectedModelRows(table)) {
+ R row = tableModel.getEntry(rowIndex);
rowsToReSelect.add(row);
}
@@ -407,8 +482,7 @@
// reselect rows
for (R row : rowsToReSelect) {
int modelRowIndex = tableModel.getRowIndex(row);
- int viewRowIndex = table.convertRowIndexToView(modelRowIndex);
- table.addRowSelectionInterval(viewRowIndex, viewRowIndex);
+ SwingUtil.addRowSelectionInterval(table, modelRowIndex);
}
}
1
0