Author: chatellier Date: 2010-10-21 16:21:40 +0000 (Thu, 21 Oct 2010) New Revision: 86 Log: Improve selection ui, year selection, zone and species reloading. Add reftax reloading Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenuItem.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/YearComboBoxModel.java Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java trunk/coser-business/src/main/java/fr/ifremer/coser/services/ImportService.java trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrame.jaxx trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectCreationView.jaxx trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListModel.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionZoneListModel.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionZoneListRenderer.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesFusionDialog.jaxx trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpecyListSelectionModel.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpecyListTestModel.java trunk/coser-ui/src/main/resources/i18n/coser-ui-en_GB.properties trunk/coser-ui/src/main/resources/i18n/coser-ui-fr_FR.properties Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/CoserConstants.java 2010-10-21 16:21:40 UTC (rev 86) @@ -41,13 +41,25 @@ /** CSV Separator. */ public static final char CSV_SEPARATOR_CHAR = ';'; + /** CSV File encoding. */ + public static final String CSV_FILE_ENCODING = "ISO-8859-1"; + /** Valeur NA valide si pas de valeur. */ public static final String VALIDATION_NA = "NA"; + /** Nom du dossier de sauvegarde des fichiers originaux. */ public static final String STORAGE_ORIGINAL_DIRECTORY = "original"; + + /** Nom du dossier de sauvegarde des fichiers apres control. */ public static final String STORAGE_CONTROL_DIRECTORY = "control"; + + /** Suffix des nom de fichiers data apres control. */ public static final String STORAGE_CONTROL_SUFFIX = "_co"; + + /** Suffix des nom de fichiers data apres selection. */ public static final String STORAGE_SELECTION_SUFFIX = "_se"; + + /** Extension des fichiers CSV. */ public static final String STORAGE_CSV_EXTENSION = ".csv"; /** Categories des données manipulées. */ @@ -55,16 +67,23 @@ CATCH(n_("coser.business.category.catch"), "catch"), STRATA(n_("coser.business.category.strata"), "strata"), HAUL(n_("coser.business.category.haul"), "haul"), - LENGTH(n_("coser.business.category.length"), "length"); + LENGTH(n_("coser.business.category.length"), "length"), + REFTAX_SPECIES(n_("coser.business.category.reftax.species"), "reftaxSpecies", false); protected String translationKey; protected String storageFileName; + protected boolean dataCategory; - private Category(String translationKey, String storageFileName) { + private Category(String translationKey, String storageFileName, boolean dataCategory) { this.translationKey = translationKey; this.storageFileName = storageFileName; + this.dataCategory = dataCategory; } + private Category(String translationKey, String storageFileName) { + this(translationKey, storageFileName, true); + } + public String getTranslationKey() { return translationKey; } @@ -72,6 +91,10 @@ public String getStorageFileName() { return storageFileName; } + + public boolean isDataCategory() { + return dataCategory; + } } /** Différent niveau de message de validation. */ Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java 2010-10-21 16:21:40 UTC (rev 86) @@ -30,8 +30,11 @@ /** * Project. * - * For now, just composed of four simple String lists. + * For now, just composed of four simple String lists for data list. * + * Also composed of loaded reftax (with header {@link #REFTAX_SPECIES_HEADER}). + * "C_Perm";"NumSys";"NivSys";"C_VALIDE";"L_VALIDE";"AA_VALIDE";"C_TxPère";"Taxa" + * * @author chatellier * @version $Revision$ * @@ -43,6 +46,10 @@ /** serialVersionUID. */ private static final long serialVersionUID = 8372568232663922521L; + public static final String[] REFTAX_SPECIES_HEADER = { + "C_Perm","NumSys","NivSys","C_VALIDE","L_VALIDE","AA_VALIDE","C_TxP\u00E8re","Taxa" + }; + protected String name; protected List<String[]> dataCatch; @@ -52,6 +59,9 @@ protected List<String[]> dataHaul; protected List<String[]> dataLength; + + /** Reftax SIH. */ + protected List<String[]> refTaxSpecies; public List<String[]> getCatch() { return dataCatch; @@ -94,4 +104,12 @@ public void setLength(List<String[]> dataLength) { this.dataLength = dataLength; } + + public List<String[]> getRefTaxSpecies() { + return refTaxSpecies; + } + + public void setRefTaxSpecies(List<String[]> refTaxSpecies) { + this.refTaxSpecies = refTaxSpecies; + } } Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/ImportService.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/services/ImportService.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/ImportService.java 2010-10-21 16:21:40 UTC (rev 86) @@ -30,10 +30,12 @@ import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; +import java.io.FileInputStream; import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.FileWriter; +import java.io.FileOutputStream; import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; import java.util.ArrayList; @@ -90,7 +92,7 @@ CSVReader csvReader = null; try { - reader = new BufferedReader(new FileReader(file)); + reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), CoserConstants.CSV_FILE_ENCODING)); csvReader = new CSVReader(reader, CoserConstants.CSV_SEPARATOR_CHAR); // check header @@ -109,7 +111,7 @@ content.add(line); } } - + addProjectContent(project, category, content); } catch (FileNotFoundException ex) { throw new CoserBusinessException("Can't read file", ex); @@ -127,6 +129,7 @@ IOUtils.closeQuietly(reader); } + System.out.println(Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); return project; } @@ -153,6 +156,9 @@ case STRATA: project.setStrata(content); break; + case REFTAX_SPECIES: + project.setRefTaxSpecies(content); + break; } } @@ -185,14 +191,26 @@ enHeaders = Strata.EN_HEADERS; frHeaders = Strata.FR_HEADERS; break; + case REFTAX_SPECIES: + enHeaders = Project.REFTAX_SPECIES_HEADER; + break; } - if (!Arrays.equals(line, enHeaders) && !Arrays.equals(line, frHeaders)) { - throw new CoserBusinessException(_("Wrong header detected in file. Find : %s, expected %s or %s", - StringUtils.join(line, ", "), - StringUtils.join(enHeaders, ", "), - StringUtils.join(frHeaders, ", "))); + if (frHeaders != null) { + if (!Arrays.equals(line, enHeaders) && !Arrays.equals(line, frHeaders)) { + throw new CoserBusinessException(_("Wrong header detected in file. Find : %s, expected %s or %s", + StringUtils.join(line, ", "), + StringUtils.join(enHeaders, ", "), + StringUtils.join(frHeaders, ", "))); + } } + else { + if (!Arrays.equals(line, enHeaders)) { + throw new CoserBusinessException(_("Wrong header detected in file. Find : %s, expected %s", + StringUtils.join(line, ", "), + StringUtils.join(enHeaders, ", "))); + } + } } /** @@ -200,10 +218,10 @@ * * @param project project containing data * @param category category to save - * @param controlFile file to save to + * @param file file to save to * @throws CoserBusinessException */ - public void storeData(Project project, Category category, File controlFile) throws CoserBusinessException { + public void storeData(Project project, Category category, File file) throws CoserBusinessException { // get project category content List<String[]> content = null; @@ -226,7 +244,7 @@ Writer writer = null; CSVWriter csvWriter = null; try { - writer = new BufferedWriter(new FileWriter(controlFile)); + writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), CoserConstants.CSV_FILE_ENCODING)); csvWriter = new CSVWriter(writer, CoserConstants.CSV_SEPARATOR_CHAR); Iterator<String[]> itContent = content.iterator(); Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2010-10-21 16:21:40 UTC (rev 86) @@ -30,10 +30,13 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; +import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.SortedMap; +import java.util.SortedSet; +import java.util.TreeMap; +import java.util.TreeSet; import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; @@ -44,6 +47,7 @@ import fr.ifremer.coser.CoserConstants; import fr.ifremer.coser.CoserConstants.Category; import fr.ifremer.coser.bean.Project; +import fr.ifremer.coser.bean.Specy; /** * Service business method relative to project. @@ -86,7 +90,7 @@ /** * Load project. * - * @param projectName project name to laod + * @param projectName project name to load * @return loaded project with data * @throws CoserBusinessException */ @@ -100,43 +104,66 @@ } Project project = new Project(); project.setName(projectName); - + // try to load validated data first File controlDirectory = new File(projectDirectory, CoserConstants.STORAGE_CONTROL_DIRECTORY); int fileLoaded = 0; for (Category category : Category.values()) { - File controlFile = new File(controlDirectory, - category.getStorageFileName() + - CoserConstants.STORAGE_CONTROL_SUFFIX + - CoserConstants.STORAGE_CSV_EXTENSION); - if (controlFile.isFile()) { - project = importService.loadCSVFile(project, category, controlFile); - fileLoaded++; - } - else { - if (log.isDebugEnabled()) { - log.debug("Can't find file " + controlFile); + + // les fichiers de data sont dans le dossier "original" + if (category.isDataCategory()) { + File inputFile = new File(controlDirectory, + category.getStorageFileName() + + CoserConstants.STORAGE_CONTROL_SUFFIX + + CoserConstants.STORAGE_CSV_EXTENSION); + + if (inputFile.isFile()) { + project = importService.loadCSVFile(project, category, inputFile); + fileLoaded++; } + else { + if (log.isDebugEnabled()) { + log.debug("Can't find file " + inputFile); + } + } } } - + // if not loaded reload original data if (fileLoaded == 0) { File originalDirectory = new File(projectDirectory, CoserConstants.STORAGE_ORIGINAL_DIRECTORY); for (Category category : Category.values()) { - File storageDataFile = new File(originalDirectory, + + if (category.isDataCategory()) { + File storageDataFile = new File(originalDirectory, category.getStorageFileName() + CoserConstants.STORAGE_CSV_EXTENSION); - if (storageDataFile.isFile()) { - project = importService.loadCSVFile(project, category, storageDataFile); + + if (storageDataFile.isFile()) { + project = importService.loadCSVFile(project, category, storageDataFile); + } + else { + // si on arrive ici et qu'un fichier original + // n'existe pas, c'est grave + throw new CoserBusinessException(_("Missing file %s", storageDataFile)); + } } - else { - // si on arrive ici et qu'un fichier original - // n'existe pas, c'est grave - throw new CoserBusinessException(_("Missing file %s", storageDataFile)); - } } } + // load additional files + File inputFile = new File(projectDirectory, + Category.REFTAX_SPECIES.getStorageFileName() + + CoserConstants.STORAGE_CSV_EXTENSION); + + if (inputFile.isFile()) { + project = importService.loadCSVFile(project, Category.REFTAX_SPECIES, inputFile); + } + else { + // si on arrive ici et qu'un fichier original + // n'existe pas, c'est grave + throw new CoserBusinessException(_("Missing file %s", inputFile)); + } + return project; } @@ -187,9 +214,21 @@ Category category = categoryAndFile.getKey(); File dataFile = categoryAndFile.getValue(); try { - File storageDataFile = new File(originalDirectory, + + // les fichiers de donnees sont stockes dans un repertoire + // "original" + if (category.isDataCategory()) { + File storageDataFile = new File(originalDirectory, category.getStorageFileName() + CoserConstants.STORAGE_CSV_EXTENSION); - FileUtils.copyFile(dataFile, storageDataFile); + FileUtils.copyFile(dataFile, storageDataFile); + } + + // les fichiers autres (refatx) sont stockes a la base + else { + File storageDataFile = new File(projectDirectory, + category.getStorageFileName() + CoserConstants.STORAGE_CSV_EXTENSION); + FileUtils.copyFile(dataFile, storageDataFile); + } } catch (IOException ex) { // clean creates directories try { @@ -212,7 +251,7 @@ */ public void saveProjectControl(Project project) throws CoserBusinessException { - // tout ce qui suit doit existe à ce stade + // tout ce qui suit doit exister à ce stade File projectsDirectory = config.getProjectsDirectory(); String projectName = project.getName(); File projectDirectory = new File(projectsDirectory, projectName); @@ -221,47 +260,41 @@ File controlDirectory = new File(projectDirectory, CoserConstants.STORAGE_CONTROL_DIRECTORY); controlDirectory.mkdirs(); for (Category category : Category.values()) { - File controlFile = new File(controlDirectory, - category.getStorageFileName() + - CoserConstants.STORAGE_CONTROL_SUFFIX + - CoserConstants.STORAGE_CSV_EXTENSION); - if (log.isDebugEnabled()) { - log.debug("Saving control file : " + controlFile); + if (category.isDataCategory()) { + File controlFile = new File(controlDirectory, + category.getStorageFileName() + + CoserConstants.STORAGE_CONTROL_SUFFIX + + CoserConstants.STORAGE_CSV_EXTENSION); + if (log.isDebugEnabled()) { + log.debug("Saving control file : " + controlFile); + } + importService.storeData(project, category, controlFile); } - importService.storeData(project, category, controlFile); } } /** - * Get zones name in project with data in [{@code beginDate}-{@code endDate}]. + * Get zones name in project with data in [{@code beginYear}-{@code endYear}]. * * @param project project - * @param beginDate begin date - * @param endDate end date + * @param beginYear begin year + * @param endYear end year * @return zones */ - public List<String> getProjectZone(Project project, Date beginDate, Date endDate) { + public List<String> getProjectZone(Project project, Integer beginYear, Integer endYear) { List<String> result = new ArrayList<String>(); - - Calendar beginCalendar = Calendar.getInstance(); - beginCalendar.setTime(beginDate); - int beginYear = beginCalendar.get(Calendar.YEAR); - Calendar endCalendar = Calendar.getInstance(); - endCalendar.setTime(endDate); - int endYear = endCalendar.get(Calendar.YEAR); - - List<String[]> traits = project.getHaul(); - // skip header - for (int i = 1 ; i < traits.size() ; i++) { - + Iterator<String[]> itTuple = project.getHaul().iterator(); + itTuple.next(); // skip header + while (itTuple.hasNext()) { + String[] trait = itTuple.next(); // Campagne;Annee;Trait;Mois;Strate;SurfaceBalayee;Lat;Long;ProfMoy - String annee = traits.get(i)[1]; + String annee = trait[1]; int intAnnee = Integer.parseInt(annee); if (intAnnee >= beginYear && intAnnee <= endYear) { - String strates = traits.get(i)[4]; + String strates = trait[4]; if (!result.contains(strates)) { result.add(strates); } @@ -270,4 +303,94 @@ return result; } + + /** + * Find all defined year in model. + * + * Le parcours est fait sur le fichier "haul", c'est potentiellement + * le plus petit. + * + * @param project project to search into + * @return year list + */ + public List<Integer> getProjectYears(Project project) { + + SortedSet<Integer> years = new TreeSet<Integer>(); + + Iterator<String[]> itTuple = project.getHaul().iterator(); + itTuple.next(); // header + while (itTuple.hasNext()) { + String[] tuple = itTuple.next(); + String year = tuple[1]; + try { + Integer integerYear = Integer.valueOf(year); + years.add(integerYear); + } + catch (NumberFormatException ex) { + // can't happen after control + // data must be all ok + if (log.isWarnEnabled()) { + log.warn("Can't convert year to integer, but data must be correct after control :("); + } + } + } + + List<Integer> result = new ArrayList<Integer>(years); + return result; + } + + /** + * Get species name in project with data in [{@code beginYear}-{@code endYear}]. + * + * @param project project + * @param beginYear begin year + * @param endYear end year + * @return zones + */ + public List<Specy> getProjectSpecies(Project project, Integer beginYear, Integer endYear) { + + SortedMap<String, Specy> result = new TreeMap<String, Specy>(); + + Iterator<String[]> itTuple = project.getCatch().iterator(); + itTuple.next(); // skip header + while (itTuple.hasNext()) { + String[] trait = itTuple.next(); + // "Campagne","Annee","Trait","Espece","Nombre","Poids" + String annee = trait[1]; + try { + int intAnnee = Integer.parseInt(annee); + + if (intAnnee >= beginYear && intAnnee <= endYear) { + String species = trait[3]; + if (!result.containsKey(species)) { + Specy specy = new Specy(); + specy.setName(species); + result.put(species, specy); + } + } + } + catch (NumberFormatException ex) { + if (log.isWarnEnabled()) { + log.warn("Can't parse year " + annee + " as int, can't happen with controled data"); + } + } + } + + List<Specy> resultList = new ArrayList<Specy>(result.values()); + return resultList; + } + + /** + * Test que le nom de la nouvelle espece existe dans le Reftax actuellement + * utilisé par le projet. + * + * @param project project (avec reftax) + * @param newSpecyName specy code to test + * @return {@code true} if specy name exist + */ + public boolean isSpecyNameExist(Project project, String newSpecyName) { + + + return false; + } } Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrame.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrame.jaxx 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrame.jaxx 2010-10-21 16:21:40 UTC (rev 86) @@ -41,13 +41,7 @@ <JMenu id='menuWindow' text="coser.ui.mainframe.menu.window"> <JMenuItem text="coser.ui.mainframe.menu.window.validation" onActionPerformed="getHandler().showValidationView()"/> - <JMenu text="coser.ui.mainframe.menu.window.selection"> - <JMenuItem text="Selection 1" onActionPerformed="getHandler().showSelectionView()"/> - <JMenuItem text="Selection 2" onActionPerformed="getHandler().showSelectionView()"/> - <JMenuItem text="Selection 3" onActionPerformed="getHandler().showSelectionView()"/> - <JSeparator/> - <JMenuItem text="coser.ui.mainframe.menu.window.newSelection" onActionPerformed="getHandler().showSelectionView()"/> - </JMenu> + <SelectionsListMenuItem text="coser.ui.mainframe.menu.window.selection" constructorParams="this" /> </JMenu> <JMenu id='menuOptions' text="coser.ui.mainframe.menu.options"> Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-10-21 16:21:40 UTC (rev 86) @@ -134,10 +134,9 @@ public void showCoserConfiguration() { CoserConfig config = view.getContextValue(CoserConfig.class); ConfigUIHelper modelBuilder = new ConfigUIHelper(config); - + // category main - modelBuilder.addCategory(_("coser.config.category.main"), - _("coser.config.category.main.description")); + modelBuilder.addCategory(_("coser.config.category.main"), _("coser.config.category.main.description")); modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.REFERENCE_SPECIES); modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.REFERENCE_ZONES); @@ -194,18 +193,29 @@ * @param projectView project view */ public void createProject(final ProjectCreationView projectView) { + CoserConfig config = projectView.getContextValue(CoserConfig.class); final String projectName = projectView.getProjectProjectName().getText().trim(); String capturesPath = projectView.getProjectCapturesFileField().getText(); String stratesPath = projectView.getProjectStratesFileField().getText(); String traitsPath = projectView.getProjectTraitsFileField().getText(); String taillesPath = projectView.getProjectLengthFileField().getText(); + + // get correct reftax to use depending on project configuration + String reftaxSpeciesPath = null; + if (projectView.getCustomReferenceCheckBox().isSelected()) { + reftaxSpeciesPath = projectView.getCustomReferenceSpeciesFileTextField().getText().trim(); + } + else { + reftaxSpeciesPath = config.getReferenceSpeciesPath(); + } // convert to file File capturesFile = new File(capturesPath); File stratesFile = new File(stratesPath); File traitsFile = new File(traitsPath); File taillesFile = new File(taillesPath); + File reftaxSpeciesFile = new File(reftaxSpeciesPath); // package in map final Map<Category, File> fileToLoad = new HashMap<Category, File>(); @@ -213,6 +223,7 @@ fileToLoad.put(Category.HAUL, traitsFile); fileToLoad.put(Category.LENGTH, taillesFile); fileToLoad.put(Category.STRATA, stratesFile); + fileToLoad.put(Category.REFTAX_SPECIES, reftaxSpeciesFile); // disable create button projectView.getCreateProjectButton().setEnabled(false); @@ -317,6 +328,9 @@ setMainComponent(controlView); } + /** + * Show selection view to create new selection. + */ public void showSelectionView() { SelectionView selectionView = new SelectionView(view); SelectionHandler selectionHandler = new SelectionHandler(); @@ -334,7 +348,16 @@ } /** + * Show selection view to open selection. * + * @param selectionName selection name to open + */ + public void showSelectionView(String selectionName) { + + } + + /** + * * @param event */ public void saveLookAndFeelConfiguration(PropertyChangeEvent event) { Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectCreationView.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectCreationView.jaxx 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/ProjectCreationView.jaxx 2010-10-21 16:21:40 UTC (rev 86) @@ -41,6 +41,9 @@ new fr.ifremer.coser.ui.widgets.ComponentTitledBorder(customReferenceCheckBox, useCustomReferenceFilePanel, BorderFactory.createEtchedBorder()); useCustomReferenceFilePanel.setBorder(componentBorder); } + public JCheckBox getCustomReferenceCheckBox() { + return customReferenceCheckBox; + } ]]></script> <row> Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenuItem.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenuItem.java (rev 0) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenuItem.java 2010-10-21 16:21:40 UTC (rev 86) @@ -0,0 +1,88 @@ +/* + * #%L + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric + * %% + * 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% + */ + +package fr.ifremer.coser.ui; + +import static org.nuiton.i18n.I18n._; + +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.HashMap; +import java.util.Map; + +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import javax.swing.JSeparator; + +import org.apache.commons.lang.StringUtils; + +/** + * Selection list menu item. Display dynamic entries for project selection. + * + * @author chatellier + * @version $Revision$ + * + * Last update : $Date$ + * By : $Author$ + */ +public class SelectionsListMenuItem extends JMenu implements ActionListener { + + /** serialVersionUID. */ + private static final long serialVersionUID = -3528302058982208907L; + + protected CoserFrame view; + + protected Map<Object, Component> components; + + public SelectionsListMenuItem(CoserFrame view) { + super(); + this.view = view; + components = new HashMap<Object, Component>(); + + // seperator + add(new JSeparator()); + + // new selection + JMenuItem menuItem = new JMenuItem(_("coser.ui.mainframe.menu.window.newSelection")); + menuItem.setActionCommand(""); // peut pas etre null, c'est nul ! + menuItem.addActionListener(this); + add(menuItem); + } + + /* + * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) + */ + @Override + public void actionPerformed(ActionEvent event) { + String actionCommand = event.getActionCommand(); + + // new selection case + if (StringUtils.isEmpty(actionCommand)) { + view.getHandler().showSelectionView(); + } + else { + view.getHandler().showSelectionView(actionCommand); + } + } +} Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/SelectionsListMenuItem.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListModel.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListModel.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlCategoryListModel.java 2010-10-21 16:21:40 UTC (rev 86) @@ -25,13 +25,16 @@ package fr.ifremer.coser.ui.control; +import java.util.ArrayList; +import java.util.List; + import javax.swing.AbstractListModel; import javax.swing.ComboBoxModel; import fr.ifremer.coser.CoserConstants.Category; /** - * Validation categories list model. + * Control data categories list model. * * @author chatellier * @version $Revision$ @@ -44,13 +47,18 @@ /** serialVersionUID. */ private static final long serialVersionUID = 6700971928409164642L; - protected Category[] categories; + protected List<Category> categories; protected Object selectedItem; public ControlCategoryListModel() { - categories = Category.values(); - selectedItem = categories[0]; + categories = new ArrayList<Category>(); + for (Category category : Category.values()) { + if (category.isDataCategory()) { + categories.add(category); + } + } + selectedItem = categories.get(0); } /* @@ -58,7 +66,7 @@ */ @Override public int getSize() { - return categories.length; + return categories.size(); } /* @@ -66,7 +74,7 @@ */ @Override public Object getElementAt(int index) { - return categories[index]; + return categories.get(index); } /* Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlDataTableModel.java 2010-10-21 16:21:40 UTC (rev 86) @@ -59,7 +59,7 @@ public void updateData(ControlView controlView) { Project project = controlView.getContextValue(Project.class); Category category = (Category)controlView.getCategoryComboBox().getSelectedItem(); - + switch (category) { case CATCH: data = project.getCatch(); break; Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2010-10-21 16:21:40 UTC (rev 86) @@ -31,7 +31,7 @@ <cell anchor="west"> <JLabel text="coser.ui.selection.details.name" /> </cell> - <cell weightx="1" fill="horizontal"> + <cell weightx="1" fill="horizontal" columns="3"> <JTextField id="selectionDetailsSelecionNameField" /> </cell> </row> @@ -40,35 +40,39 @@ <JLabel text="coser.ui.selection.details.beginDate" /> </cell> <cell weightx="1" fill="horizontal"> - <JXDatePicker id="selectionDetailsBeginDateField" onActionPerformed="getHandler().updateSelectionZones(this, event)" /> + <YearComboBoxModel id="beginYearComboBoxModel" constructorParams="this" /> + <JComboBox id="selectionDetailsBeginYearField" + model="{beginYearComboBoxModel}" + onActionPerformed="getHandler().updateSelectionDateData(this, event)" /> </cell> - </row> - <row> <cell anchor="west"> <JLabel text="coser.ui.selection.details.endDate" /> </cell> <cell weightx="1" fill="horizontal"> - <JXDatePicker id="selectionDetailsEndDateField" onActionPerformed="getHandler().updateSelectionZones(this, event)" /> + <YearComboBoxModel id="endYearComboBoxModel" constructorParams="this" /> + <JComboBox id="selectionDetailsEndYearField" + model="{endYearComboBoxModel}" + onActionPerformed="getHandler().updateSelectionDateData(this, event)" /> </cell> </row> <row> - <cell fill="horizontal" columns="2"> + <cell fill="horizontal" columns="4"> <JLabel text="coser.ui.selection.details.zone" /> </cell> </row> <row> - <cell weighty="2" fill="both" columns="2"> + <cell weighty="2" fill="both" columns="4"> <JScrollPane> <SelectionZoneListModel id="selectionZoneModel" /> <JList id="zoneList" model="{selectionZoneModel}" cellRenderer="{new SelectionZoneListRenderer()}" - enabled="{selectionDetailsBeginDateField.getDate() != null && selectionDetailsEndDateField.getDate() != null}" + enabled="{selectionDetailsBeginYearField.getSelectedItem() != null && selectionDetailsEndYearField.getSelectedItem() != null}" selectionModel="{new OneClicListSelectionModel(zoneList.getSelectionModel(), selectionZoneModel)}" /> </JScrollPane> </cell> </row> <row> - <cell weightx="1" fill="horizontal" columns="2"> + <cell weightx="1" fill="horizontal" columns="4"> <Table border='{BorderFactory.createTitledBorder(_("coser.ui.selection.details.species"))}'> <row> <cell fill="horizontal"> @@ -96,7 +100,7 @@ <SpecyListTestModel id="specyListModel" /> <JList id="specyList" model="{specyListModel}" cellRenderer="{new SpecyListRenderer()}" - onMouseClicked="getHandler().showFusionDialog(this, event)" + onMouseClicked="getHandler().showSpeciesContextMenu(this, event)" selectionModel="{new OneClicListSelectionModel(specyList.getSelectionModel(), specyListModel)}"/> <ListSelectionModel id="specyListSelectionModel" javaBean="specyList.getSelectionModel()" /> </JScrollPane> @@ -106,22 +110,22 @@ </cell> </row> <row> - <cell weighty="1" fill="both" columns="5"> + <cell weighty="1" fill="both" columns="4"> <JScrollPane> <JXTextArea constructorParams='_("coser.ui.selection.details.technicalComment")' rows="3" /> </JScrollPane> </cell> </row> <row> - <cell weighty="1" fill="both" columns="5"> + <cell weighty="1" fill="both" columns="4"> <JScrollPane> <JXTextArea constructorParams='_("coser.ui.selection.details.otherComment")' rows="3" /> </JScrollPane> </cell> </row> <row> - <cell fill="horizontal" columns="5"> - <JButton text="coser.ui.selection.details.createSelection" onActionPerformed="getHandler().createSelection(this)" /> + <cell fill="horizontal" columns="4"> + <JButton text="coser.ui.selection.details.saveSelection" onActionPerformed="getHandler().saveSelection(this)" /> </cell> </row> </Table> Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2010-10-21 16:21:40 UTC (rev 86) @@ -23,18 +23,23 @@ package fr.ifremer.coser.ui.selection; +import static org.nuiton.i18n.I18n._; + import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.awt.event.MouseEvent; -import java.util.Date; import java.util.List; import javax.swing.JList; +import javax.swing.JMenuItem; +import javax.swing.JPopupMenu; import javax.swing.event.ListSelectionEvent; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import fr.ifremer.coser.bean.Project; +import fr.ifremer.coser.bean.Specy; import fr.ifremer.coser.services.ProjectService; /** @@ -53,19 +58,23 @@ /** * Rafraichit la liste des zones suite à la selection des dates. * - * @param view + * @param view view + * @param event event de la selection (combo) */ - public void updateSelectionZones(SelectionDetailsView view, ActionEvent event) { + public void updateSelectionDateData(SelectionDetailsView view, ActionEvent event) { Project project = view.getContextValue(Project.class); ProjectService projectService = view.getContextValue(ProjectService.class); - Date beginDate = view.getSelectionDetailsBeginDateField().getDate(); - Date endDate = view.getSelectionDetailsEndDateField().getDate(); + Integer beginYear = (Integer)view.getSelectionDetailsBeginYearField().getSelectedItem(); + Integer endYear = (Integer)view.getSelectionDetailsEndYearField().getSelectedItem(); // il est possible que l'evenement fasse suite a une seule des selections - if (beginDate != null && endDate != null) { - List<String> zone = projectService.getProjectZone(project, beginDate, endDate); + if (beginYear != null && endYear != null) { + List<String> zone = projectService.getProjectZone(project, beginYear, endYear); view.getSelectionZoneModel().setZones(zone); + + List<Specy> species = projectService.getProjectSpecies(project, beginYear, endYear); + view.getSpecyListModel().setSpecy(species); } } @@ -79,20 +88,67 @@ JList source = (JList)event.getSource(); } - - public void showFusionDialog(SelectionDetailsView view, MouseEvent event) { + + /** + * Affiche un menu contextuel lors du clic (droit) sur la liste des especes. + * + * @param view view + * @param event mouse event + */ + public void showSpeciesContextMenu(final SelectionDetailsView view, MouseEvent event) { + + // clic droit if (event.getButton() == MouseEvent.BUTTON3) { - SpeciesFusionDialog speciesFusionDialog = new SpeciesFusionDialog(view); - speciesFusionDialog.setLocationRelativeTo(view); - speciesFusionDialog.setVisible(true); + + // affiche le menu contextuel si au moins 2 especes selectionnées + int[] selectedRows = view.getSpecyList().getSelectedIndices(); + if (selectedRows.length > 1) { + JPopupMenu popupMenu = new JPopupMenu(_("coser.ui.selection.speciesMenuLabel")); + JMenuItem fusionMenu = new JMenuItem(_("coser.ui.selection.speciesMenuFusion")); + fusionMenu.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + SpeciesFusionDialog speciesFusionDialog = new SpeciesFusionDialog(view); + speciesFusionDialog.setHandler(SelectionHandler.this); + + // pre fill new speci name with first selected specy name + Specy firstSelected = (Specy)view.getSpecyList().getSelectedValue(); + speciesFusionDialog.getNewSpeciesNameField().setText(firstSelected.getName()); + + speciesFusionDialog.setLocationRelativeTo(view); + speciesFusionDialog.setVisible(true); + } + }); + popupMenu.add(fusionMenu); + popupMenu.show(view.getSpecyList(), event.getX(), event.getY()); + } } } - - public void createSelection(SelectionDetailsView view) { + + public void saveSelection(SelectionDetailsView view) { } public void saveSelectionLists(SelectionListsView view) { } + + /** + * Check que les paramêtres sont correct (nouveau nom existant) + * et applique la fusion d'espece. Rafraichit la view + * parente ensuite. + * + * @param view + */ + public void performMergeSpecies(SpeciesFusionDialog view) { + + // TODO echatellier 20101021 attention a ce que la selection + // ne change pas (la fenetre est modales pourr l'instant) + + String newSpecyName = view.getNewSpeciesNameField().getText(); + Project project = view.getContextValue(Project.class); + ProjectService projectService = view.getContextValue(ProjectService.class); + + boolean newSpecyExist = projectService.isSpecyNameExist(project, newSpecyName); + } } Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx 2010-10-21 16:21:40 UTC (rev 86) @@ -50,7 +50,7 @@ <cell fill="horizontal" columns="2"> <JXTitledSeparator title="coser.ui.selection.sizeAllYearSpecies" /> </cell> - <cell fill="horizontal" columns="2"> + <cell fill="horizontal" columns="2"> <JXTitledSeparator title="coser.ui.selection.maturitySpecies" /> </cell> </row> Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionZoneListModel.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionZoneListModel.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionZoneListModel.java 2010-10-21 16:21:40 UTC (rev 86) @@ -28,7 +28,7 @@ import javax.swing.AbstractListModel; /** - * Zones list model. + * Model contenant la liste des noms de zone (utilsé dans le detail de selection). * * @author chatellier * @version $Revision$ Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionZoneListRenderer.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionZoneListRenderer.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionZoneListRenderer.java 2010-10-21 16:21:40 UTC (rev 86) @@ -31,7 +31,8 @@ import javax.swing.JList; /** - * Basic list renderer. + * Renderer de la liste des nom de zone. + * (pas forcement utile avec des String). * * @author chatellier * @version $Revision$ Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesFusionDialog.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesFusionDialog.jaxx 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpeciesFusionDialog.jaxx 2010-10-21 16:21:40 UTC (rev 86) @@ -22,7 +22,8 @@ <http://www.gnu.org/licenses/gpl-3.0.html>. #L% --> -<JDialog title="coser.ui.selection.fusion.title"> +<JDialog title="coser.ui.selection.fusion.title" modal="true"> + <SelectionHandler id="handler" javaBean="null" /> <Table> <row> <cell columns="2" fill="horizontal"> @@ -34,11 +35,11 @@ <JLabel text="coser.ui.selection.fusion.name" /> </cell> <cell weightx="1" fill="horizontal"> - <JTextField /> + <JTextField id="newSpeciesNameField" /> </cell> </row> <row> - <cell fill="both" weightx="1" weighty="1"> + <cell fill="horizontal"> <JLabel text="coser.ui.selection.fusion.comment" /> </cell> <cell weightx="2" weighty="1" fill="both" columns="3"> @@ -51,7 +52,7 @@ <cell columns="4" anchor="east" insets="0"> <JPanel> <JButton text="coser.ui.common.cancel" onActionPerformed="dispose()"/> - <JButton text="coser.ui.common.valid" onActionPerformed="dispose()" enabled="false" /> + <JButton text="coser.ui.common.valid" onActionPerformed="getHandler().performMergeSpecies(this)" /> </JPanel> </cell> </row> Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpecyListSelectionModel.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpecyListSelectionModel.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpecyListSelectionModel.java 2010-10-21 16:21:40 UTC (rev 86) @@ -3,7 +3,7 @@ * $Id$ * $HeadURL$ * %% - * Copyright (C) 2010 Codelutin, Chatellier Eric + * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -40,7 +40,8 @@ import fr.ifremer.coser.bean.Specy; /** - * TODO add comment here. + * Model de selection de la liste des especes. + * (ecoute un autre Model de list, et ecoute sa propre selection). * * @author chatellier * @version $Revision$ Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpecyListTestModel.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpecyListTestModel.java 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SpecyListTestModel.java 2010-10-21 16:21:40 UTC (rev 86) @@ -54,18 +54,11 @@ private final static Log log = LogFactory.getLog(SpecyListTestModel.class); - protected List<Specy> species; + protected List<Specy> species = new ArrayList<Specy>(); - public SpecyListTestModel() { - species = new ArrayList<Specy>(); - species.add(new Specy("Anchois", 3, 4)); - species.add(new Specy("Sardine", 15, 30)); - species.add(new Specy("Bar", 22, 44)); - species.add(new Specy("Saumon", 44, 11)); - species.add(new Specy("Crevette", 12, 34)); - species.add(new Specy("Requin", 33, 00)); - species.add(new Specy("Baleine", 3, 23)); - species.add(new Specy("Cachelot", 13, 29)); + public void setSpecy(List<Specy> species) { + this.species = species; + fireContentsChanged(this, 0, species.size()); } /* @@ -73,7 +66,11 @@ */ @Override public int getSize() { - return species.size(); + int result = 0; + if (species != null) { + result = species.size(); + } + return result; } /* Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/YearComboBoxModel.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/YearComboBoxModel.java (rev 0) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/YearComboBoxModel.java 2010-10-21 16:21:40 UTC (rev 86) @@ -0,0 +1,104 @@ +/* + * #%L + * Coser :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric + * %% + * 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% + */ + +package fr.ifremer.coser.ui.selection; + +import java.util.List; + +import javax.swing.AbstractListModel; +import javax.swing.ComboBoxModel; +import javax.swing.JList; +import javax.swing.event.ListSelectionEvent; + +import fr.ifremer.coser.bean.Project; +import fr.ifremer.coser.bean.Specy; +import fr.ifremer.coser.services.ProjectService; + +/** + * Model pour combo box contenant la liste des années définies dans le projet. + * + * @author chatellier + * @version $Revision$ + * + * Last update : $Date$ + * By : $Author$ + */ +public class YearComboBoxModel extends AbstractListModel implements ComboBoxModel { + + /** serialVersionUID. */ + private static final long serialVersionUID = 9172638630862188715L; + + protected SelectionDetailsView view; + + protected List<Integer> years; + + protected Object selectedItem; + + public YearComboBoxModel(SelectionDetailsView view) { + super(); + this.view = view; + } + + protected List<Integer> getYear() { + if (years == null) { + Project project = view.getContextValue(Project.class); + ProjectService service = view.getContextValue(ProjectService.class); + years = service.getProjectYears(project); + } + return years; + } + + /* + * @see javax.swing.ListModel#getSize() + */ + @Override + public int getSize() { + return getYear().size(); + } + + /* + * @see javax.swing.ListModel#getElementAt(int) + */ + @Override + public Object getElementAt(int index) { + return getYear().get(index); + } + + /* + * @see javax.swing.ComboBoxModel#setSelectedItem(java.lang.Object) + */ + @Override + public void setSelectedItem(Object anItem) { + selectedItem = anItem; + } + + /* + * @see javax.swing.ComboBoxModel#getSelectedItem() + */ + @Override + public Object getSelectedItem() { + return selectedItem; + } +} Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/YearComboBoxModel.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui-en_GB.properties =================================================================== --- trunk/coser-ui/src/main/resources/i18n/coser-ui-en_GB.properties 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/resources/i18n/coser-ui-en_GB.properties 2010-10-21 16:21:40 UTC (rev 86) @@ -70,6 +70,7 @@ coser.ui.selection.details.gender= coser.ui.selection.details.name= coser.ui.selection.details.otherComment= +coser.ui.selection.details.saveSelection= coser.ui.selection.details.species= coser.ui.selection.details.technicalComment= coser.ui.selection.details.zone= @@ -83,6 +84,8 @@ coser.ui.selection.maturitySpecies=Species with maturity coser.ui.selection.occurenceDensitySpecies=Filtered species coser.ui.selection.sizeAllYearSpecies=Species with size all year +coser.ui.selection.speciesMenuFusion= +coser.ui.selection.speciesMenuLabel= coser.ui.selection.tab.details= coser.ui.selection.tab.lists= coser.ui.selection.tab.result= Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui-fr_FR.properties =================================================================== --- trunk/coser-ui/src/main/resources/i18n/coser-ui-fr_FR.properties 2010-10-21 12:06:13 UTC (rev 85) +++ trunk/coser-ui/src/main/resources/i18n/coser-ui-fr_FR.properties 2010-10-21 16:21:40 UTC (rev 86) @@ -48,7 +48,7 @@ coser.ui.project.customReferenceSpeciesFile=Nouveau fichier de r\u00E9f\u00E9rence\u2009\: coser.ui.project.lengthFile=Fichiers des tailles\u2009\: coser.ui.project.newProject=Nouveau projet -coser.ui.project.openError= +coser.ui.project.openError=Erreur d'ouverture coser.ui.project.openProject=Ouvrir coser.ui.project.openProjectTitle=Ouvrir un projet existant coser.ui.project.project=Projet\u2009\: @@ -59,12 +59,12 @@ coser.ui.project.usedReferenceSpeciesFile=Fichier de r\u00E9f\u00E9rence utilis\u00E9\u2009\: coser.ui.selection.allSpecies=Toutes les esp\u00E8ces coser.ui.selection.details.beginDate=Date de d\u00E9but\u2009\: -coser.ui.selection.details.createSelection=Cr\u00E9er la s\u00E9lection coser.ui.selection.details.endDate=Date de fin\u2009\: coser.ui.selection.details.family=Filtrer par famille\u2009\: coser.ui.selection.details.gender=Filtrer par genre\u2009\: coser.ui.selection.details.name=Nom de la s\u00E9lection\u2009\: coser.ui.selection.details.otherComment=Autre commentaire +coser.ui.selection.details.saveSelection=Sauvegarder la s\u00E9lection coser.ui.selection.details.species=Esp\u00E8ces\u2009\: coser.ui.selection.details.technicalComment=Commentaire technique coser.ui.selection.details.zone=Zone\u2009\: @@ -78,6 +78,8 @@ coser.ui.selection.maturitySpecies=Esp\u00E8ces avec maturit\u00E9 coser.ui.selection.occurenceDensitySpecies=Esp\u00E8ces filtr\u00E9es coser.ui.selection.sizeAllYearSpecies=Esp\u00E8ces avec taille pour toutes les ann\u00E9es +coser.ui.selection.speciesMenuFusion=Fusion +coser.ui.selection.speciesMenuLabel=Menu esp\u00E8ces coser.ui.selection.tab.details=D\u00E9tails de la s\u00E9lection coser.ui.selection.tab.lists=Listes des esp\u00E8ces coser.ui.selection.tab.result=Resultats RSufi