branch develop updated (2290105 -> 7cd954c)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git from 2290105 [LL] le champ devenir capture doit être obligatoire (fixes #7888) new 1b0d03c Suppression de classes qui sont désormais générées new 5ac26ae Ajout de l'option ui.coordinate.format (CoordinateFormat) new eb2bd47 Utilisation de la valeur de la configuration pour initialiser le format d'un éditeur de positions new 7cd954c [UI][PS][LL] Widget des positions DMD par défaut (fixes #8394) Merge branch 'feature/8394' into develop The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 7cd954cda4868563f02e0a0665c26cfadc1d047e Merge: 2290105 eb2bd47 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Oct 25 20:14:21 2016 +0200 [UI][PS][LL] Widget des positions DMD par défaut (fixes #8394) Merge branch 'feature/8394' into develop commit eb2bd475a2aeb56f8b94810be8c3ddff9e015803 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Oct 25 20:14:15 2016 +0200 Utilisation de la valeur de la configuration pour initialiser le format d'un éditeur de positions commit 5ac26aed47643e9d5177494e353c97131a9fa580 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Oct 25 20:14:09 2016 +0200 Ajout de l'option ui.coordinate.format (CoordinateFormat) commit 1b0d03c3a9e5b71f9e3aa8df9fe7d0782d155503 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Oct 25 20:14:04 2016 +0200 Suppression de classes qui sont désormais générées Summary of changes: application-swing-configuration/pom.xml | 4 + .../src/main/config/ObserveSwingApplication.ini | 6 + .../ObserveSwingApplicationConfig.java | 8 +- .../ObserveSwingApplicationConfigAction.java | 142 ---- .../ObserveSwingApplicationConfigOption.java | 780 --------------------- ...pplication-swing-configuration_en_GB.properties | 1 + ...pplication-swing-configuration_es_ES.properties | 1 + ...pplication-swing-configuration_fr_FR.properties | 1 + .../observe/application/swing/ObserveCLAction.java | 6 +- .../swing/ui/actions/ShowConfigAction.java | 3 +- .../swing/ui/content/ContentUIInitializer.java | 1 + 11 files changed, 26 insertions(+), 927 deletions(-) delete mode 100644 application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigAction.java delete mode 100644 application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigOption.java -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 1b0d03c3a9e5b71f9e3aa8df9fe7d0782d155503 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Oct 25 20:14:04 2016 +0200 Suppression de classes qui sont désormais générées --- .../ObserveSwingApplicationConfig.java | 8 +- .../ObserveSwingApplicationConfigAction.java | 142 ---- .../ObserveSwingApplicationConfigOption.java | 780 --------------------- .../observe/application/swing/ObserveCLAction.java | 6 +- 4 files changed, 10 insertions(+), 926 deletions(-) diff --git a/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfig.java b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfig.java index d3d8f64..755ae35 100644 --- a/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfig.java +++ b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfig.java @@ -31,6 +31,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.config.ApplicationConfig; import org.nuiton.config.ArgumentsParserException; +import org.nuiton.jaxx.widgets.gis.CoordinateFormat; import org.nuiton.version.Version; import org.nuiton.version.Versions; @@ -200,6 +201,11 @@ public class ObserveSwingApplicationConfig extends GeneratedObserveSwingApplicat return CreationMode.valueOf(get().getOption(ObserveSwingApplicationConfigOption.DEFAULT_CREATION_MODE.getKey())); } + @Override + public CoordinateFormat getCoordinateFormat() { + return CoordinateFormat.valueOf(get().getOption(ObserveSwingApplicationConfigOption.COORDINATE_FORMAT.getKey())); + } + public String getCopyrightText() { if (copyrightText == null) { Date date = new Date(); @@ -287,7 +293,7 @@ public class ObserveSwingApplicationConfig extends GeneratedObserveSwingApplicat } } - private static final List<ObserveSwingApplicationConfigOption> MAP_LAYERS = ImmutableList.of( + public static final List<ObserveSwingApplicationConfigOption> MAP_LAYERS = ImmutableList.of( ObserveSwingApplicationConfigOption.MAP_LAYER1, ObserveSwingApplicationConfigOption.MAP_LAYER2, ObserveSwingApplicationConfigOption.MAP_LAYER3, diff --git a/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigAction.java b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigAction.java deleted file mode 100644 index 38eb231..0000000 --- a/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigAction.java +++ /dev/null @@ -1,142 +0,0 @@ -package fr.ird.observe.application.swing.configuration; - -/*- - * #%L - * ObServe :: Application Swing Configuration - * %% - * Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit - * %% - * 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 org.nuiton.config.ConfigActionDef; - -import static org.nuiton.i18n.I18n.n; -import static org.nuiton.i18n.I18n.t; - -/** - * Les actions appellables en ligne de commande. - * - * @author Tony Chemit - chemit@codelutin.com - * @since 1.4 - */ -public enum ObserveSwingApplicationConfigAction implements ConfigActionDef { - /** - * Afficher l'aide dans la console. - * - * @since 1.0 - */ - HELP( - n("observe.action.commandline.help"), - "fr.ird.observe.application.swing.ObserveCLAction#help", "-h", "--help"), - /** - * Afficher l'aide embarqué de l'application (dans une interface - * graphique). - * - * @since 1.0 - */ - HELP_UI( - n("observe.action.commandline.help.ui"), - "fr.ird.observe.application.swing.ObserveCLAction#helpUI", "--help-ui"), - /** - * Pour désactiver le lancement de l'application graphique. - * - * @since 1.0 - */ - NO_MAIN_UI( - n("observe.action.commandline.disable.main.ui"), - "fr.ird.observe.application.swing.ObserveCLAction#disableMainUI", "-n", - "--no-main"), - /** - * Pour lancer l'interface graphique du configuration de l'application. - * - * @since 1.0 - */ - CONFIGURE_UI( - n("observe.action.commandline.configure.ui"), - "fr.ird.observe.application.swing.ObserveCLAction#configure", - "--configure"), - /** - * Pour lancer une opération d'administration via un assistant - * graphique. - * - * @since 1.4 - */ - ADMIN_UI( - n("observe.action.commandline.launch.admin.ui"), - "fr.ird.observe.application.swing.ObserveCLAction#launchAdminUI", "-a", - "--admin"), - /** - * Pour lancer une opération d'administration via un assistant - * graphique. - * - * @since 1.4 - */ - OBSTUNA_ADMIN_UI( - n("observe.action.commandline.launch.obstuna.admin.ui"), - "fr.ird.observe.application.swing.ObserveCLAction#launchObstunaAdminUI", - "--obstuna-admin"), - - /** - * Pour lancer la base locale en mode serveur. - * - * @since 2.1 - */ - H2_SERVER_MODE( - n("observe.action.commandline.launch.h2.server.mode"), - "fr.ird.observe.application.swing.ObserveCLAction#launchH2ServerMode", - "--h2-server"), - /** - * Pour activer le support JMX pour les source de données. - * - * @since 1.4 - */ - USE_JMX( - n("observe.action.commandline.use.jmx"), - "fr.ird.observe.application.swing.ObserveCLAction#useJMX", - "--jmx"), - - CREATE_ID( - n("observe.action.commandline.create.id"), - "fr.ird.observe.application.swing.ObserveCLAction#createId", - "--create-id"); - - - public final String description; - - public final String action; - - public final String[] aliases; - - ObserveSwingApplicationConfigAction(String description, String action, String... aliases) { - this.description = description; - this.action = action; - this.aliases = aliases; - } - - public String getDescription() { - return t(description); - } - - public String getAction() { - return action; - } - - public String[] getAliases() { - return aliases; - } - -} diff --git a/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigOption.java b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigOption.java deleted file mode 100644 index 5102b47..0000000 --- a/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigOption.java +++ /dev/null @@ -1,780 +0,0 @@ -/* - * #%L - * ObServe :: Application Swing - * %% - * Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit - * %% - * 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.ird.observe.application.swing.configuration; - -import com.google.common.collect.ImmutableList; -import fr.ird.observe.services.dto.ObserveSpeciesListConfiguration; -import org.nuiton.config.ApplicationConfig; -import org.nuiton.config.ConfigOptionDef; -import org.nuiton.version.Version; - -import java.awt.Color; -import java.io.File; -import java.net.URL; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Locale; - -import static org.nuiton.i18n.I18n.n; -import static org.nuiton.i18n.I18n.t; - -/** - * Les options disponibles dans l'application, modifiables via la ligne de - * commande, ou le fichier utilisateur. - * - * @author Tony Chemit - chemit@codelutin.com - * @since 1.2 - */ -public enum ObserveSwingApplicationConfigOption implements ConfigOptionDef { - - /** le lastName du fichier de configuration (sans le prefix .) */ - CONFIG_FILE( - String.class, - ApplicationConfig.CONFIG_FILE_NAME, - n("observe.config.configFileName.description"), - ObserveSwingApplicationConfig.DEFAULT_OBSERVE_SWING_CONFIGURATION_FILENAME, - true, - true - ), - - /** flag pour afficher automatiquement la popup du clavier numerique */ - DEV_MODE( - Boolean.class, - "observe.devMode", - n("observe.config.devMode"), - "true", - true, - true - ), - - /** version du modèle de données */ - MODEL_VERSION( - Version.class, - "observe.model.version", - n("observe.model.version"), - null, - true, - true - ), - - // directories - - /** le repertoire ou est stoquee la base locale */ - DATA_DIRECTORY( - File.class, - "data.directory", - n("observe.config.defaultDataDirectory.description"), - "${user.home}/.observe", - true, - true - ), - - /** le repertoire ou est stoquee la base locale */ - DB_DIRECTORY( - File.class, - "db.directory", - n("observe.config.defaultLocalDbDirectory.description"), - "${data.directory}/db", - true, - true - ), - - /** - * le lastName de la base initiale recuperee lors de la premiere connexion - * a Obstuna. - */ - INITIAL_DB_DUMP( - File.class, - "initial.db.dump", - n("observe.config.defaultInitialDbDump.description"), - "${data.directory}/initial-database.sql.gz" - ), - - /** le repertoire ou effectuer les sauvegarde */ - BACKUP_DIRECTORY( - File.class, - "backup.directory", - n("observe.config.defaultBackupDirectory.description"), - "${data.directory}/backup", - true, - true - ), - - /** le repertoire ou sont stockees toutes les ressources de l'utilisateur */ - RESOURCES_DIRECTORY( - File.class, - "resources.directory", - n("observe.config.defaultResourcesDirectory.description"), - "${data.directory}/resources-${version}", - true, - true - ), - - /** le repertoire ou sont stockees les traduction i18n de l'utilisateur */ - I18N_DIRECTORY( - File.class, - "i18n.directory", - n("observe.config.defaultI18nDirectory.description"), - "${resources.directory}/i18n", - true, - true - ), - - /** le repertoire ou sont stockees les reports de l'utilisateur */ - REPORT_DIRECTORY( - File.class, - "report.directory", - n("observe.config.defaultReportDirectory.description"), - "${resources.directory}/report", - true, - true - ), - - /** le repertoire ou sont stockees les cartes de l'utilisateur */ - MAP_DIRECTORY( - File.class, - "map.directory", - n("observe.config.defaultMapDirectory.description"), - "${resources.directory}/map", - true, - true - ), - - /** le repertoire ou sont stockees les reports de validation de l'utilisateur */ - VALIDATION_REPORT_DIRECTORY( - File.class, - "validation.report.directory", - n("observe.config.defaultValidationReportDirectory.description"), - "${data.directory}/validation-report", - true, - true - ), - - /** le repertoire temporaire (utilise pour les base de synchro) */ - TMP_DIRECTORY( - File.class, - "tmp.directory", - n("observe.config.defaultTmpDirectory.description"), - "${data.directory}/tmp", - true, - true - ), - - /** Le chemin du fichier de configuration des logs. */ - LOG_CONFIGURATION_FILE( - File.class, - "logConfigurationFile", - n("observe.config.logConfigurationFile.description"), - "${resources.directory}/observe-log4j.properties", - true, - false), - - // local db config - - /** login sur toutes les bases h2 (non sauvegarde) */ - H2_LOGIN( - String.class, - "h2.username", - n("observe.config.h2.login.description"), - "sa", - true, - true - ), - - /** mot de passe sur toutes les bases h2 (non sauvegarde) */ - H2_PASSWORD( - String.class, - "h2.password", - n("observe.config.h2.password.description"), - "sa", - true, - true - ), - - /** flag pour effectuer la mise a jour des bases locales */ - H2_CAN_MIGRATE( - Boolean.class, - "h2.canMigrate", - n("observe.config.h2.can.migrate.description"), - "true" - ), - - - /** port à utiliser pour lancer ObServe en mode serveur */ - H2_SERVER_PORT( - Integer.class, - "h2.serverPort", - n("observe.config.h2.serverPort.description"), - "9093" - ), - - // obstuna db config - - /** url de la base obstuna */ - OBSTUNA_URL( - String.class, - "obstuna.url", - n("observe.config.obstuna.url.description"), - "jdbc:postgresql:///obstuna" - ), - - /** login de la base obstuna */ - OBSTUNA_LOGIN( - String.class, - "obstuna.username", - n("observe.config.obstuna.login.description"), - "utilisateur" - ), - - /** mot de passe de la base obstuna (non sauvegarde) */ - OBSTUNA_PASSWORD( - String.class, - "obstuna.password", - n("observe.config.obstuna.password.description"), - "", - true, - false - ), - - /** flag pour activer l'utilisation ssl pour la connexion a obstuna */ - OBSTUNA_USE_SSL_CERT( - Boolean.class, - "obstuna.useSsl", - n("observe.config.obstuna.useSsl.description"), - "false" - ), - - /** flag pour mettre a jour obstuna */ - OBSTUNA_CAN_MIGRATE( - Boolean.class, - "pg.canMigrate", - n("observe.config.pg.can.migrate.description"), - "false" - ), - - // Rest server config - - /** url du serveur restflag pour mettre a jour obstuna */ - SERVER_URL( - URL.class, - "server.url", - n("observe.config.server.url.description"), - null - ), - - /** url du serveur restflag pour mettre a jour obstuna */ - SERVER_LOGIN( - String.class, - "server.login", - n("observe.config.server.login.description"), - "" - ), - - /** url du serveur restflag pour mettre a jour obstuna */ - SERVER_PASSWORD( - String.class, - "server.password", - n("observe.config.server.password.description"), - "" - ), - - /** url du serveur restflag pour mettre a jour obstuna */ - SERVER_DATABASE_NAME( - String.class, - "server.dataBaseName", - n("observe.config.server.dataBaseName.description"), - null - ), - - // change storage options - - /** le mode de connexion par defaut */ - DEFAULT_DB_MODE( - fr.ird.observe.application.swing.configuration.constants.DbMode.class, - "defaultDbMode", - n("observe.config.defaultDbMode"), - fr.ird.observe.application.swing.configuration.constants.DbMode.USE_LOCAL.name() - ), - - /** le mode de creation par defaut de base locale */ - DEFAULT_CREATION_MODE( - fr.ird.observe.application.swing.configuration.constants.CreationMode.class, - "defaultCreationMode", - n("observe.config.defaultCreationMode"), - fr.ird.observe.application.swing.configuration.constants.CreationMode.IMPORT_EXTERNAL_DUMP.name() - ), - - /** flag pour sauvegarder le paramétrage de la connexion a obstuna */ - STORE_REMOTE_STORAGE( - Boolean.class, - "ui.storeRemoteStorage", - n("observe.config.ui.storeRemoteStorage"), - "true" - ), - - /** flag pour charge ou non la base locale au démarrage */ - LOAD_LOCAL_STORAGE( - Boolean.class, - "ui.loadLocalStorage", - n("observe.config.ui.loadLocalStorage"), - "true" - ), - - /** pour afficher la progression de la migration dans les logs */ - SHOW_MIGRATION_PROGRESSION( - Boolean.class, - "showMigrationProgression", - n("observe.config.showMigrationProgression"), - "true" - ), - - /** pour affichier les requetes sql lors de la migration dans les logs */ - SHOW_MIGRATION_SQL( - Boolean.class, - "showMigrationSql", - n("observe.config.showMigrationSql"), - "true" - ), - /** pour affichier toutes les requetes sql dans les logs */ - SHOW_SQL( - Boolean.class, - "showSql", - n("observe.config.showSql"), - "false" - ), - // gps default values - - // synchro actions options - - /** flag pour autoriser le choix de la base source */ - CHANGE_SYNCHRO_SRC( - Boolean.class, - "ui.changeSynchroSrc", - n("observe.config.ui.changeSynchroSrc"), - "false" - ), - - // ui config - - /** flag pour voir le boutton d'affichage de la popup de clavier numerique) */ - SHOW_NUMBER_EDITOR_BUTTON( - Boolean.class, - "ui.showNumberEditorButton", - n("observe.config.ui.showNumberEditorButton"), - "true" - ), - - /** flag pour afficher automatiquement la popup du clavier numerique */ - AUTO_POPUP_NUMBER_EDITOR( - Boolean.class, "ui.autoPopupNumberEditor", - n("observe.config.ui.autoPopupNumberEditor"), - "false" - ), - - /** flag pour voir la réglette d'affichage des heures dans l'éditeur des temps */ - SHOW_DATE_TIME_EDITOR_SLIDER( - Boolean.class, - "ui.showTimeEditorSlider", - n("observe.config.ui.showTimeEditorSlider"), - "true" - ), - - /** flag pour lancer l'application en mode plein ecran */ - FULL_SCREEN( - Boolean.class, - "ui.fullscreen", - n("observe.config.ui.fullscreen"), - "false" - ), - - /** locale a utiliser dans l'application */ - LOCALE( - Locale.class, - "ui.locale", - n("observe.config.ui.locale"), - Locale.FRANCE.toString() - ), - - /** locale du referentiel */ - DB_LOCALE( - Locale.class, - "db.locale", - n("observe.config.db.locale"), - Locale.FRANCE.toString() - ), - - // program observation max - - /** la valeur maximale de qualification des observations faune associe */ - NON_TARGET_OBSERVATION( - Integer.class, - "observation.fauneAssociee", - n("observe.config.observation.fauneAssociee"), - "1" - ), - - /** la valeur maximale de qualification des observations rejet thons */ - TARGET_DISCARDS_OBSERVATION( - Integer.class, - "observation.rejetsThons", - n("observe.config.observation.rejetsThons"), - "1" - ), - - /** la valeur maximale de qualification des observations mensuration */ - SAMPLES_OBSERVATION( - Integer.class, - "observation.mensurations", - n("observe.config.observation.mensurations"), - "1" - ), - - /** la valeur maximale de qualification des observations objet flottant */ - OBJECTS_OBSERVATION( - Integer.class, - "observation.floatingObject", - n("observe.config.observation.floatingObject"), - "1" - ), - - /** la valeur maximale de qualification des observations activitys detaillees */ - DETAILLED_ACTIVITIES_OBSERVATION( - Integer.class, - "observation.activitysDetaillees", - n("observe.config.observation.activitysDetaillees"), - "1" - ), - - /** la valeur maximale de qualification des observations mammiferes */ - MAMMALS_OBSERVATION( - Integer.class, - "observation.mammiferes", - n("observe.config.observation.mammiferes"), - "1" - ), - - /** la valeur maximale de qualification des observations oiseaux */ - BIRDS_OBSERVATION( - Integer.class, "observation.oiseaux", - n("observe.config.observation.oiseaux"), - "1" - ), - - /** la valeur maximale de qualification des observations gleure */ - BAIT_OBSERVATION( - Integer.class, - "observation.gleure", - n("observe.config.observation.gleure"), - "1" - ), - - /** le type de liste d'espèces pour les captures cibles (seine) */ - SPECIES_LIST_SEINE_TARGET_CATCH_ID( - String.class, - "speciesList.seine.targetCatch", - n("observe.config.speciesList.seine.targetCatch"), - ObserveSpeciesListConfiguration.DEFAULT_SPECIES_LIST_SEINE_TARGET_CATCH_ID - ), - - /** le type de liste d'espèce pour les Estimation banc (seine) */ - SPECIES_LIST_SEINE_SCHOOL_ESTIMATE_ID( - String.class, "speciesList.seine.schoolEstimate", - n("observe.config.speciesList.seine.schoolEstimate"), - ObserveSpeciesListConfiguration.DEFAULT_SPECIES_LIST_SEINE_SCHOOL_ESTIMATE_ID - ), - - /** le type de liste d'espèces pour les Estimation banc objet (seine) */ - SPECIES_LIST_SEINE_OBJECT_SCHOOL_ESTIMATE_ID( - String.class, - "speciesList.seine.objectSchoolEstimate", - n("observe.config.speciesList.seine.objectSchoolEstimate"), - ObserveSpeciesListConfiguration.DEFAULT_SPECIES_LIST_SEINE_OBJECT_SCHOOL_ESTIMATE_ID - ), - - /** le type de liste d'espèces pour les captures non cibles (seine) */ - SPECIES_LIST_SEINE_NON_TARGET_CATCH_ID( - String.class, - "speciesList.seine.nonTargetCatch", - n("observe.config.speciesList.seine.nonTargetCatch"), - ObserveSpeciesListConfiguration.DEFAULT_SPECIES_LIST_SEINE_NON_TARGET_CATCH_ID - ), - - /** le type de liste d'espèces pour les Faune observée (seine) */ - SPECIES_LIST_SEINE_OBJECT_OBSERVED_SPECIES_ID( - String.class, - "speciesList.seine.objectObservedSpecies", - n("observe.config.speciesList.seine.objectObservedSpecies"), - ObserveSpeciesListConfiguration.DEFAULT_SPECIES_LIST_SEINE_OBJECT_OBSERVED_SPECIES_ID - ), - - /** le type de liste d'espèces pour les captures (longline) */ - SPECIES_LIST_LONGLINE_CATCH_ID( - String.class, - "speciesList.longline.catch", - n("observe.config.speciesList.longline.catch"), - ObserveSpeciesListConfiguration.DEFAULT_SPECIES_LIST_LONGLINE_CATCH_ID - ), - - /** le type de liste d'espèces pour les rencontres (longline) */ - SPECIES_LIST_LONGLINE_ENCOUNTER_ID( - String.class, - "speciesList.longline.encounter", - n("observe.config.speciesList.longline.encounter"), - ObserveSpeciesListConfiguration.DEFAULT_SPECIES_LIST_LONGLINE_ENCOUNTER_ID - ), - /** le type de liste d'espèces pour les deprédations (longline) */ - SPECIES_LIST_LONGLINE_DEPREDATOR_ID( - String.class, - "speciesList.longline.depredator", - n("observe.config.speciesList.longline.encounter"), - ObserveSpeciesListConfiguration.DEFAULT_SPECIES_LIST_LONGLINE_DEPREDATOR_ID - ), - - /** le chemin vers le fond de carte */ - MAP_BACKGROUND_COLOR( - Color.class, - "map.background.color", - n("observe.config.map.background.description"), - new Color(87, 200, 255).toString() - ), - /** shape file 1 */ - MAP_LAYER1( - File.class, - "map.layer1.path", - n("observe.config.map.layer1.description"), - "${resources.directory}/map/shapeFiles/continents/GSHHS_l_L1.shp" - ), - /** shape file 2 */ - MAP_LAYER2( - File.class, - "map.layer2.path", - n("observe.config.map.layer2.description"), - "${resources.directory}/map/shapeFiles/continents/GSHHS_l_L6.shp" - ), - /** shape file 3 */ - MAP_LAYER3( - File.class, - "map.layer3.path", - n("observe.config.map.layer3.description"), - "${resources.directory}/map/shapeFiles/lakesAndSeas/GSHHS_l_L2.shp" - ), - /** shape file 4 */ - MAP_LAYER4( - File.class, - "map.layer4.path", - n("observe.config.map.layer4.description"), - "${resources.directory}/map/shapeFiles/borders/WDBII_border_l_L1.shp" - ), - /** shape file 5 */ - MAP_LAYER5( - File.class, - "map.layer5.path", - n("observe.config.map.layer5.description"), - "${resources.directory}/map/shapeFiles/zee/World_EEZ_v8_2014.shp" - ), - /** shape file 6 */ - MAP_LAYER6( - File.class, - "map.layer6.path", - n("observe.config.map.layer6.description"), - null - ), - /** shape file 7 */ - MAP_LAYER7( - File.class, - "map.layer7.path", - n("observe.config.map.layer7.description"), - null - ), - /** shape file 8 */ - MAP_LAYER8( - File.class, - "map.layer8.path", - n("observe.config.map.layer8.description"), - null - ), - /** shape file 9 */ - MAP_LAYER9( - File.class, - "map.layer9.path", - n("observe.config.map.layer9.description"), - null - ), - /** shape file 10 */ - MAP_LAYER10( - File.class, - "map.layer10.path", - n("observe.config.map.layer10.description"), - null - ), - /** style Maps */ - MAP_STYLE_FILE( - File.class, - "map.style.path", - n("observe.config.map.style.description"), - "${resources.directory}/map/style.xml" - ), - - - /** Ids des noeuds ouverts dans l'arbre */ - TREE_OPEN_NODES( - String.class, - "ui.treeOpenNodes", - n("observe.config.ui.treeOpenNodes"), - null - ), - /** Pour activer la validation des vitesses d'activités) */ - VALIDATION_SPEED_ENABLE( - Boolean.class, - "validation.speedEnable", - n("observe.config.validation.speedEnable"), - "true" - ), - /** La vitesse maximale à consider dans la validation des vitesses d'activités) */ - VALIDATION_SPEED_MAX_VALUE( - Float.class, - "validation.speedMaxValue", - n("observe.config.validation.speedMaxValue"), - "30.0" - ), - /** Pour activer les sauvegardes automatiques. */ - BACKUP_USE( - Boolean.class, - "backup.use", - n("observe.config.backup.use"), - "true" - ), - /** Pour effectuer une sauvegarde à la fermeture de l'application. */ - BACKUP_AT_CLOSE( - Boolean.class, - "backup.atClose", - n("observe.config.backup.atClose"), - "true" - ), - /** Le nombre de minutes avant de lancer une sauvegarde de la base locale. */ - BACKUP_DELAY( - Integer.class, - "backup.delay", - n("observe.config.backup.delay"), - "30" - ); - - public static final List<ObserveSwingApplicationConfigOption> MAP_LAYERS = - ImmutableList.of(MAP_LAYER1, MAP_LAYER2, MAP_LAYER3, MAP_LAYER4, MAP_LAYER5, MAP_LAYER6, MAP_LAYER7, MAP_LAYER8, MAP_LAYER9, MAP_LAYER10); - - /** - * Clef qui represente l'option (c'est celle enregistrée dans le fichier de - * configuration). - */ - protected final String key; - - /** Clef i18n de description de l'option */ - protected final String description; - - /** Type de l'option */ - protected final Class<?> type; - - /** Valeur par défaut de l'option */ - protected String defaultValue; - - /** Drapeau pour savoir si on ne doit pas sauvegarder cette option */ - protected boolean _transient; - - /** Drapeau pour savoir si l'option est modifiable */ - protected boolean _final; - - ObserveSwingApplicationConfigOption(Class<?> type, - String key, - String description, - String defaultValue - ) { - this(type, key, description, defaultValue, false, false); - } - - ObserveSwingApplicationConfigOption(Class<?> type, - String key, - String description, - String defaultValue, - boolean _transient, - boolean _final) { - this.key = key; - this.description = description; - this.defaultValue = defaultValue; - this.type = type; - this._final = _final; - this._transient = _transient; - } - - @Override - public boolean isFinal() { - return _final; - } - - @Override - public boolean isTransient() { - return _transient; - } - - @Override - public String getDefaultValue() { - return defaultValue; - } - - @Override - public String getDescription() { - return t(description); - } - - @Override - public String getKey() { - return key; - } - - @Override - public Class<?> getType() { - return type; - } - - @Override - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; - } - - @Override - public void setTransient(boolean _transient) { - this._transient = _transient; - } - - @Override - public void setFinal(boolean _final) { - this._final = _final; - } - - public static ImmutableList<ObserveSwingApplicationConfigOption> orderedByKey() { - - List<ObserveSwingApplicationConfigOption> values = Arrays.asList(values()); - Collections.sort(values, (o1, o2) -> o1.getKey().compareTo(o2.getKey())); - return ImmutableList.copyOf(values); - - } -} diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveCLAction.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveCLAction.java index f3d1514..d7870c5 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveCLAction.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveCLAction.java @@ -92,11 +92,11 @@ public class ObserveCLAction { out.append('\n'); for (ObserveSwingApplicationConfigAction a : ObserveSwingApplicationConfigAction.values()) { out.append("\t"); - out.append(Arrays.toString(a.aliases)); + out.append(Arrays.toString(a.getAliases())); out.append("("); - out.append(a.action); + out.append(a.getAction()); out.append("):"); - out.append(t(a.description)); + out.append(t(a.getDescription())); out.append('\n'); } Console cons; -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 5ac26aed47643e9d5177494e353c97131a9fa580 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Oct 25 20:14:09 2016 +0200 Ajout de l'option ui.coordinate.format (CoordinateFormat) --- application-swing-configuration/pom.xml | 4 ++++ .../src/main/config/ObserveSwingApplication.ini | 6 ++++++ .../resources/i18n/application-swing-configuration_en_GB.properties | 1 + .../resources/i18n/application-swing-configuration_es_ES.properties | 1 + .../resources/i18n/application-swing-configuration_fr_FR.properties | 1 + .../ird/observe/application/swing/ui/actions/ShowConfigAction.java | 3 ++- 6 files changed, 15 insertions(+), 1 deletion(-) diff --git a/application-swing-configuration/pom.xml b/application-swing-configuration/pom.xml index 2140dac..bc087d1 100644 --- a/application-swing-configuration/pom.xml +++ b/application-swing-configuration/pom.xml @@ -74,6 +74,10 @@ <groupId>org.nuiton</groupId> <artifactId>nuiton-config</artifactId> </dependency> + <dependency> + <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-widgets-gis</artifactId> + </dependency> </dependencies> diff --git a/application-swing-configuration/src/main/config/ObserveSwingApplication.ini b/application-swing-configuration/src/main/config/ObserveSwingApplication.ini index b1d0db5..34e1816 100644 --- a/application-swing-configuration/src/main/config/ObserveSwingApplication.ini +++ b/application-swing-configuration/src/main/config/ObserveSwingApplication.ini @@ -471,6 +471,12 @@ key = backup.delay type = Integer defaultValue = 30 +[option coordinateFormat] +description = observe.config.coordinate.format +key = ui.coordinate.format +type = org.nuiton.jaxx.widgets.gis.CoordinateFormat +defaultValue = "dmd" + [action help] description = observe.action.commandline.help action = "fr.ird.observe.application.swing.ObserveCLAction#help" diff --git a/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_en_GB.properties b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_en_GB.properties index a027ae7..11ed12d 100644 --- a/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_en_GB.properties +++ b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_en_GB.properties @@ -12,6 +12,7 @@ observe.config.backup.atClose=Perform a backup of local source when closing appl observe.config.backup.delay=Delay in minutes between local data source backup observe.config.backup.use=To activate auto backup of local source observe.config.configFileName.description=Configuration filename +observe.config.coordinate.format=Position format (DMD, DD, DMS) observe.config.db.locale=Language of data source observe.config.defaultBackupDirectory.description=Default directory where are stored backup of data sources observe.config.defaultCreationMode=Default creation mode of new local data source diff --git a/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_es_ES.properties b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_es_ES.properties index e44536f..98e5260 100644 --- a/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_es_ES.properties +++ b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_es_ES.properties @@ -12,6 +12,7 @@ observe.config.backup.atClose=Effectuer une sauvegarde de la base locale à la f observe.config.backup.delay=Delay in minutes between local data source backup \#TODO observe.config.backup.use=To activate auto backup of local source \#TODO observe.config.configFileName.description=Nombre del archivo de configuración +observe.config.coordinate.format=Position format (DMD, DD, DMS) \#TODO observe.config.db.locale=Idioma del referencial observe.config.defaultBackupDirectory.description=Carpeta por defecto para copia de seguridad de bases locales observe.config.defaultCreationMode=Modo de creación de la base local por defecto diff --git a/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_fr_FR.properties b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_fr_FR.properties index 13d83c7..9ab7026 100644 --- a/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_fr_FR.properties +++ b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_fr_FR.properties @@ -12,6 +12,7 @@ observe.config.backup.atClose=Effectuer une sauvegarde de la base locale à la f observe.config.backup.delay=Temps en minutes entre chaque sauvegarde de la base locale observe.config.backup.use=Pour activer la sauvegarde automatique observe.config.configFileName.description=Le nom du fichier de configuration +observe.config.coordinate.format=Format des positions (DMD, DD, DMS) observe.config.db.locale=La langue du référentiel observe.config.defaultBackupDirectory.description=Répertoire par défaut où sauvegarder les bases locales observe.config.defaultCreationMode=Le mode de création de base locale par défaut diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ShowConfigAction.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ShowConfigAction.java index b9f0530..dba3337 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ShowConfigAction.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ShowConfigAction.java @@ -177,13 +177,14 @@ public class ShowConfigAction extends AbstractAction { helper.addOption(ObserveSwingApplicationConfigOption.SHOW_NUMBER_EDITOR_BUTTON); helper.addOption(ObserveSwingApplicationConfigOption.AUTO_POPUP_NUMBER_EDITOR); helper.addOption(ObserveSwingApplicationConfigOption.SHOW_DATE_TIME_EDITOR_SLIDER); + helper.addOption(ObserveSwingApplicationConfigOption.COORDINATE_FORMAT); helper.addOption(ObserveSwingApplicationConfigOption.DEFAULT_DB_MODE); helper.addOption(ObserveSwingApplicationConfigOption.DEFAULT_CREATION_MODE); helper.addOption(ObserveSwingApplicationConfigOption.STORE_REMOTE_STORAGE); helper.addOption(ObserveSwingApplicationConfigOption.MAP_BACKGROUND_COLOR); - ObserveSwingApplicationConfigOption.MAP_LAYERS.forEach(helper::addOption); + ObserveSwingApplicationConfig.MAP_LAYERS.forEach(helper::addOption); helper.addOption(ObserveSwingApplicationConfigOption.MAP_STYLE_FILE); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit eb2bd475a2aeb56f8b94810be8c3ddff9e015803 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Oct 25 20:14:15 2016 +0200 Utilisation de la valeur de la configuration pour initialiser le format d'un éditeur de positions --- .../ird/observe/application/swing/ui/content/ContentUIInitializer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java index 37a9e82..d673053 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIInitializer.java @@ -440,6 +440,7 @@ public class ContentUIInitializer<E extends IdDto, UI extends ObserveContentUI<E if (log.isDebugEnabled()) { log.debug("init coordinates editor " + editor.getName()); } + editor.setFormat(ObserveSwingApplicationContext.get().getConfig().getCoordinateFormat()); editor.init(); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 7cd954cda4868563f02e0a0665c26cfadc1d047e Merge: 2290105 eb2bd47 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Oct 25 20:14:21 2016 +0200 [UI][PS][LL] Widget des positions DMD par défaut (fixes #8394) Merge branch 'feature/8394' into develop application-swing-configuration/pom.xml | 4 + .../src/main/config/ObserveSwingApplication.ini | 6 + .../ObserveSwingApplicationConfig.java | 8 +- .../ObserveSwingApplicationConfigAction.java | 142 ---- .../ObserveSwingApplicationConfigOption.java | 780 --------------------- ...pplication-swing-configuration_en_GB.properties | 1 + ...pplication-swing-configuration_es_ES.properties | 1 + ...pplication-swing-configuration_fr_FR.properties | 1 + .../observe/application/swing/ObserveCLAction.java | 6 +- .../swing/ui/actions/ShowConfigAction.java | 3 +- .../swing/ui/content/ContentUIInitializer.java | 1 + 11 files changed, 26 insertions(+), 927 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm