r891 - in trunk: . coser-business/src/main/java/fr/ifremer/coser coser-ui/src/main/java/fr/ifremer/coser coser-ui/src/main/java/fr/ifremer/coser/ui coser-ui/src/main/java/fr/ifremer/coser/ui/option coser-ui/src/main/resources/i18n
Author: echatellier Date: 2011-11-15 19:18:06 +0100 (Tue, 15 Nov 2011) New Revision: 891 Url: http://forge.codelutin.com/repositories/revision/coser/891 Log: Add new specific configuration dialog. Add support to change swing font size. Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationHandler.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.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 trunk/pom.xml Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java 2011-11-07 10:31:24 UTC (rev 890) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/CoserBusinessConfig.java 2011-11-15 18:18:06 UTC (rev 891) @@ -45,8 +45,6 @@ public class CoserBusinessConfig extends ApplicationConfig { public CoserBusinessConfig() { - super(); - // init configuration with default options for (CoserBusinessOption o : CoserBusinessOption.values()) { if (o.defaultValue != null) { @@ -55,6 +53,21 @@ } } + /** + * Overridden to not store value when equals to default value. + */ + @Override + public void setOption(String key, String value) { + String defaultValue = line.getProperty(key); + // replace ${xxx} + defaultValue = replaceRecursiveOptions(defaultValue); + if (defaultValue != null && defaultValue.equals(value)) { + options.remove(key); + } else { + super.setOption(key, value); + } + } + public void setDatabaseDirectory(String value) { setOption(CoserBusinessOption.DATABASE_DIRECTORY.key, value); } @@ -69,10 +82,18 @@ return result; } + public void setProjectsDirectory(String projectDirectory) { + setOption(CoserBusinessOption.PROJECTS_DIRECTORY.key, projectDirectory); + } + public File getValidatorsDirectory() { File result = getOptionAsFile(CoserBusinessOption.VALIDATOR_DIRECTORY.key); return result; } + + public void setValidatorsDirectory(String validatorDirectory) { + setOption(CoserBusinessOption.VALIDATOR_DIRECTORY.key, validatorDirectory); + } public void setSmtpHost(String smtpHost) { setOption(CoserBusinessOption.SMTP_HOST.key, smtpHost); @@ -96,42 +117,74 @@ String result = getOption(CoserBusinessOption.REFERENCE_SPECIES.key); return result; } + + public void setReferenceSpeciesPath(String referenceSpeciesPath) { + setOption(CoserBusinessOption.REFERENCE_SPECIES.key, referenceSpeciesPath); + } public String getReferenceTypeEspecesPath() { String result = getOption(CoserBusinessOption.REFERENCE_TYPE_ESPECES.key); return result; } + + public void setReferenceTypeEspecesPath(String referenceTypeEspecesPath) { + setOption(CoserBusinessOption.REFERENCE_TYPE_ESPECES.key, referenceTypeEspecesPath); + } public double getControlNobsmin() { double result = getOptionAsDouble(CoserBusinessOption.CONTROL_NOBSMIN.key); return result; } + + public void setControlNobsmin(double controlNobsmin) { + setOption(CoserBusinessOption.CONTROL_NOBSMIN.key, String.valueOf(controlNobsmin)); + } public double getControlDiffCatchLength() { double result = getOptionAsDouble(CoserBusinessOption.CONTROL_DIFF_CATCH_LENGTH.key); return result; } + + public void setControlDiffCatchLength(double controlDiffCatchLength) { + setOption(CoserBusinessOption.CONTROL_DIFF_CATCH_LENGTH.key, String.valueOf(controlDiffCatchLength)); + } public String getControlTypeFish() { String result = getOption(CoserBusinessOption.CONTROL_TYPE_FISH.key); return result; } + + public void setControlTypeFish(String controlTypeFish) { + setOption(CoserBusinessOption.CONTROL_TYPE_FISH.key, controlTypeFish); + } public double getSelectionOccurrenceFilter() { double result = getOptionAsDouble(CoserBusinessOption.SELECTION_FILTER_OCCURRENCE.key); return result; } + + public void setSelectionOccurrenceFilter(double selectionOccurrenceFilter) { + setOption(CoserBusinessOption.SELECTION_FILTER_OCCURRENCE.key, String.valueOf(selectionOccurrenceFilter)); + } public double getSelectionDensityFilter() { double result = getOptionAsDouble(CoserBusinessOption.SELECTION_FILTER_DENSITY.key); return result; } + + public void setSelectionDensityFilter(double selectionDensityFilter) { + setOption(CoserBusinessOption.SELECTION_FILTER_DENSITY.key, String.valueOf(selectionDensityFilter)); + } public String getWebFrontEnd() { String result = getOption(CoserBusinessOption.WEB_FRONT_END.key); return result; } + public void setWebFrontEnd(String webFrontEnd) { + setOption(CoserBusinessOption.WEB_FRONT_END.key, webFrontEnd); + } + public String getWebUploadURL() { String result = getOption(CoserBusinessOption.WEB_UPLOAD_URL.key); return result; Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java 2011-11-07 10:31:24 UTC (rev 890) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/Coser.java 2011-11-15 18:18:06 UTC (rev 891) @@ -24,6 +24,8 @@ */ package fr.ifremer.coser; +import java.awt.Frame; +import java.awt.Window; import java.io.File; import javax.swing.SwingUtilities; @@ -109,7 +111,7 @@ SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - + // ne to be done in Swing EDT (otherwize, don't work on javawebstart) // declare new classloader ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); @@ -117,7 +119,7 @@ Thread.currentThread().setContextClassLoader(coserClassLoader); // set coser xwork validation file directory in classloader coserClassLoader.setValidatorsDirectory(coserConfig.getValidatorsDirectory()); - + // init LAF (from configuration) try { String lafClassName = coserConfig.getLookAndFeel(); @@ -132,6 +134,9 @@ } } + // update font size (after laf) + coserConfig.updateSwingFont(); + File coserConfigDirectory = new File(coserConfig.getUserConfigDirectory(), "coser"); coserConfigDirectory.mkdirs(); File mainFrameFile = new File(coserConfigDirectory, "session.xml"); @@ -151,6 +156,7 @@ CoserFrame frame = new CoserFrame(context); frame.setLocationRelativeTo(null); session.add(frame); + frame.setVisible(true); } }); Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java 2011-11-07 10:31:24 UTC (rev 890) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java 2011-11-15 18:18:06 UTC (rev 891) @@ -27,6 +27,19 @@ import static org.nuiton.i18n.I18n._; +import java.awt.Font; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.Enumeration; +import java.util.List; + +import javax.swing.UIManager; +import javax.swing.plaf.FontUIResource; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + /** * Coser application configuration. * @@ -38,8 +51,9 @@ */ public class CoserConfig extends CoserBusinessConfig { + private static final Log log = LogFactory.getLog(CoserConfig.class); + public CoserConfig() { - // init configuration with default options for (CoserOption o : CoserOption.values()) { if (o.defaultValue != null) { @@ -76,13 +90,27 @@ return result; } + public int getSwingFontSize() { + int result = getOptionAsInt(CoserOption.SWING_FONT_SIZE.key); + return result; + } + + public void setSwingFontSize(int swingFontSize) { + int old = getSwingFontSize(); + if (old != swingFontSize) { + setOption(CoserOption.SWING_FONT_SIZE.key, String.valueOf(swingFontSize)); + updateSwingFont(swingFontSize); + } + } + public static enum CoserOption implements OptionDef { CONFIG_FILE(CONFIG_FILE_NAME, _("coser.config.config.file.description"), "coser.properties", String.class, true, true), LOOKANDFEEL("coser.lookandfeel", _("coser.config.lookandfeel.description"), null, String.class, false, false), APPLICATION_VERSION("coser.application.version", _("coser.config.application.version.description"), null, String.class, false, false), SUPPORT_EMAIL("coser.support.email", _("coser.config.support.email.description"), "support@codelutin.com", String.class, false, false), - WEBSITE_URL("coser.website", _("coser.config.website.description"), "http://maven-site.forge.codelutin.com/coser/", String.class, false, false); + WEBSITE_URL("coser.website", _("coser.config.website.description"), "http://maven-site.forge.codelutin.com/coser/", String.class, false, false), + SWING_FONT_SIZE("coser.swingfontsize", _("coser.config.swingfontsize.description"), "12", Integer.class, false, false); protected String key; protected String description; @@ -145,4 +173,32 @@ this.isFinal = isFinal; } } + + /** + * Update swing fonts properties. + */ + public void updateSwingFont() { + updateSwingFont(getSwingFontSize()); + } + + /** + * Update swing fonts properties. + * + * @param newIncrease increase gap to apply to font + */ + protected void updateSwingFont(int newIncrease) { + // update all font properties + Enumeration<Object> keys = UIManager.getDefaults().keys(); + while (keys.hasMoreElements()) { + Object key = keys.nextElement(); + if (key.toString().contains("Font") || key.toString().contains(".font")) { + Font font = (Font)UIManager.getFont(key); + font = font.deriveFont((float)newIncrease); + if (log.isDebugEnabled()) { + log.debug("Update " + key + " to size " + font.getSize()); + } + UIManager.put(key, new FontUIResource(font)); + } + } + } } 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 2011-11-07 10:31:24 UTC (rev 890) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2011-11-15 18:18:06 UTC (rev 891) @@ -36,7 +36,6 @@ import java.net.URI; import java.util.Locale; -import javax.swing.JDialog; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.JScrollPane; @@ -44,8 +43,6 @@ import javax.swing.filechooser.FileFilter; import jaxx.runtime.JAXXContext; -import jaxx.runtime.swing.editor.config.ConfigUI; -import jaxx.runtime.swing.editor.config.ConfigUIHelper; import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; @@ -54,7 +51,6 @@ import org.nuiton.widget.AboutFrame; import org.nuiton.widget.SwingSession; -import fr.ifremer.coser.CoserBusinessConfig; import fr.ifremer.coser.CoserBusinessException; import fr.ifremer.coser.CoserConfig; import fr.ifremer.coser.CoserException; @@ -64,6 +60,7 @@ import fr.ifremer.coser.ui.common.CommonHandler; import fr.ifremer.coser.ui.control.ControlHandler; import fr.ifremer.coser.ui.control.ControlView; +import fr.ifremer.coser.ui.option.ConfigurationView; import fr.ifremer.coser.ui.option.NoCopiedLayerUI; import fr.ifremer.coser.ui.option.OptionHandler; import fr.ifremer.coser.ui.option.ValidatorDialog; @@ -177,44 +174,9 @@ * Show coser configuration. */ public void showCoserConfiguration() { - CoserConfig config = view.getContextValue(CoserConfig.class); - ConfigUIHelper modelBuilder = new ConfigUIHelper(config); - - // category main - modelBuilder.addCategory(_("coser.config.category.path"), _("coser.config.category.path.description")); - // chatellier 20110126 option genante - //modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.DATABASE_DIRECTORY); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.PROJECTS_DIRECTORY); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.VALIDATOR_DIRECTORY); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.REFERENCE_SPECIES); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.REFERENCE_TYPE_ESPECES); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.WEB_ZONES); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.WEB_FRONT_END); - - // category control - modelBuilder.addCategory(_("coser.config.category.configuration"), _("coser.config.category.configuration.description")); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.CONTROL_NOBSMIN); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.CONTROL_DIFF_CATCH_LENGTH); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.CONTROL_TYPE_FISH); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.SELECTION_FILTER_OCCURRENCE); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.SELECTION_FILTER_DENSITY); - - // category misc - modelBuilder.addCategory(_("coser.config.category.misc"), _("coser.config.category.misc.description")); - modelBuilder.addOption(CoserBusinessConfig.CoserBusinessOption.SMTP_HOST); - modelBuilder.addOption(CoserConfig.CoserOption.SUPPORT_EMAIL); - - ConfigUI configUI = modelBuilder.buildUI(view, _("coser.config.category.path")); - JDialog dialogUI = new JDialog(view, _("coser.ui.config.title")); - dialogUI.add(configUI); - dialogUI.pack(); - dialogUI.setLocationRelativeTo(view); - - // restore session size - SwingSession session = (SwingSession)view.getContextValue(SwingSession.class); - session.add(dialogUI); - - dialogUI.setVisible(true); + ConfigurationView configView = new ConfigurationView((JAXXContext)view); + configView.setLocationRelativeTo(view); + configView.setVisible(true); } /** Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationHandler.java =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationHandler.java (rev 0) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationHandler.java 2011-11-15 18:18:06 UTC (rev 891) @@ -0,0 +1,163 @@ +/* + * #%L + * + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 Codelutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +package fr.ifremer.coser.ui.option; + +import java.awt.Frame; +import java.awt.Window; +import java.io.File; + +import javax.swing.JFileChooser; +import javax.swing.JTextField; +import javax.swing.SwingUtilities; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import fr.ifremer.coser.CoserConfig; +import fr.ifremer.coser.ui.common.CommonHandler; + +/** + * Handler for {@link ConfigurationView}. + * + * @author chatellier + * @version $Revision$ + * + * Last update : $Date$ + * By : $Author$ + */ +public class ConfigurationHandler extends CommonHandler { + + private static final Log log = LogFactory.getLog(ConfigurationHandler.class); + + /** + * Display user directory selection dialog and fill given text component + * with given file. + * + * @param configurationView config view + * @param textComponent text component to fill + */ + public void selectInputDirectory(ConfigurationView configurationView, JTextField textComponent) { + CoserConfig config = configurationView.getContextValue(CoserConfig.class); + JFileChooser selectFileChooser = getFileChooserInstance(config.getDatabaseDirectory()); + selectFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + + int result = selectFileChooser.showOpenDialog(configurationView); + if (result == JFileChooser.APPROVE_OPTION) { + File selectedFile = selectFileChooser.getSelectedFile(); + textComponent.setText(selectedFile.getAbsolutePath()); + } + } + + /** + * Display user file selection dialog and fill given text component + * with given file. + * + * @param configurationView config view + * @param textComponent text component to fill + */ + public void selectInputFile(ConfigurationView configurationView, JTextField textComponent) { + CoserConfig config = configurationView.getContextValue(CoserConfig.class); + JFileChooser selectFileChooser = getFileChooserInstance(config.getDatabaseDirectory()); + selectFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); + + int result = selectFileChooser.showOpenDialog(configurationView); + if (result == JFileChooser.APPROVE_OPTION) { + File selectedFile = selectFileChooser.getSelectedFile(); + textComponent.setText(selectedFile.getAbsolutePath()); + } + } + + /** + * Save configuration. + * + * @param configurationView + */ + public void saveConfiguration(ConfigurationView configurationView) { + CoserConfig config = configurationView.getContextValue(CoserConfig.class); + + // path + config.setProjectsDirectory(configurationView.getProjectDirectoryField().getText()); + config.setValidatorsDirectory(configurationView.getValidatorDirectoryField().getText()); + config.setReferenceSpeciesPath(configurationView.getReferenceSpeciesField().getText()); + config.setReferenceTypeEspecesPath(configurationView.getReferenceTypeEspecesField().getText()); + config.setWebZonesFile(configurationView.getWebZonesField().getText()); + config.setWebFrontEnd(configurationView.getWebFrontEndField().getText()); + + // control / selection + try { + config.setControlNobsmin(Double.parseDouble(configurationView.getControlNobsMinField().getText())); + } catch (NumberFormatException ex) { + if (log.isWarnEnabled()) { + log.warn("Can't parse number", ex); + } + } + try { + config.setControlDiffCatchLength(Double.parseDouble(configurationView.getControlDiffCatchLengthField().getText())); + } catch (NumberFormatException ex) { + if (log.isWarnEnabled()) { + log.warn("Can't parse number", ex); + } + } + config.setControlTypeFish(configurationView.getControlTypeFishField().getText()); + try { + config.setSelectionDensityFilter(Double.parseDouble(configurationView.getSelectionFilterDensityField().getText())); + } catch (NumberFormatException ex) { + if (log.isWarnEnabled()) { + log.warn("Can't parse number", ex); + } + } + try { + config.setSelectionOccurrenceFilter(Double.parseDouble(configurationView.getSelectionFilterOccurrenceField().getText())); + } catch (NumberFormatException ex) { + if (log.isWarnEnabled()) { + log.warn("Can't parse number", ex); + } + } + + // misc + config.setSmtpHost(configurationView.getSmtpHostField().getText()); + config.setSupportEmail(configurationView.getSupportEmailField().getText()); + try { + config.setSwingFontSize(Integer.parseInt((String)configurationView.getSwingFontSizeField().getSelectedItem())); + } catch (NumberFormatException ex) { + if (log.isWarnEnabled()) { + log.warn("Can't parse number", ex); + } + } + + // save + config.saveForUser(); + + // close + configurationView.dispose(); + + // update font size (font size) + Window windows[] = Frame.getWindows(); + for(Window window : windows) { + SwingUtilities.updateComponentTreeUI(window); + } + } +} Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationHandler.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx =================================================================== --- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx (rev 0) +++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/option/ConfigurationView.jaxx 2011-11-15 18:18:06 UTC (rev 891) @@ -0,0 +1,198 @@ +<!-- + #%L + Coser :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 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% + --> +<JDialog title="coser.ui.configuration.title"> + <import> + static fr.ifremer.coser.CoserBusinessConfig.CoserBusinessOption + static fr.ifremer.coser.CoserConfig.CoserOption + fr.ifremer.coser.CoserConfig + </import> + + <ConfigurationHandler id="handler" /> + <CoserConfig id="config" initializer="getContextValue(CoserConfig.class)" /> + + <Table> + <row> + <cell fill="both" columns="2"> + <Table border='{BorderFactory.createTitledBorder(_("coser.ui.configuration.category.path"))}'> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.PROJECTS_DIRECTORY.getDescription()}" /> + </cell> + <cell weightx="1" fill="horizontal"> + <JTextField id="projectDirectoryField" text="{config.getProjectsDirectory().getAbsolutePath()}"/> + </cell> + <cell fill="horizontal"> + <JButton text="coser.ui.common.selectFile" + onActionPerformed="getHandler().selectInputDirectory(this, projectDirectoryField)"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.VALIDATOR_DIRECTORY.getDescription()}" /> + </cell> + <cell fill="horizontal"> + <JTextField id="validatorDirectoryField" text="{config.getValidatorsDirectory().getAbsolutePath()}"/> + </cell> + <cell fill="horizontal"> + <JButton text="coser.ui.common.selectFile" + onActionPerformed="getHandler().selectInputDirectory(this, validatorDirectoryField)"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.REFERENCE_SPECIES.getDescription()}" /> + </cell> + <cell fill="horizontal"> + <JTextField id="referenceSpeciesField" text="{config.getReferenceSpeciesPath()}"/> + </cell> + <cell fill="horizontal"> + <JButton text="coser.ui.common.selectFile" + onActionPerformed="getHandler().selectInputFile(this, referenceSpeciesField)"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.REFERENCE_TYPE_ESPECES.getDescription()}" /> + </cell> + <cell fill="horizontal"> + <JTextField id="referenceTypeEspecesField" text="{config.getReferenceTypeEspecesPath()}"/> + </cell> + <cell fill="horizontal"> + <JButton text="coser.ui.common.selectFile" + onActionPerformed="getHandler().selectInputFile(this, referenceTypeEspecesField)"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.WEB_ZONES.getDescription()}" /> + </cell> + <cell fill="horizontal"> + <JTextField id="webZonesField" text="{config.getWebZonesFile().getAbsolutePath()}"/> + </cell> + <cell fill="horizontal"> + <JButton text="coser.ui.common.selectFile" + onActionPerformed="getHandler().selectInputFile(this, webZonesField)"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.WEB_FRONT_END.getDescription()}" /> + </cell> + <cell columns="2" fill="horizontal"> + <JTextField id="webFrontEndField" text="{config.getWebFrontEnd()}"/> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell fill="both" columns="2"> + <Table border='{BorderFactory.createTitledBorder(_("coser.ui.configuration.category.controlselection"))}'> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.CONTROL_NOBSMIN.getDescription()}" /> + </cell> + <cell weightx="1" fill="horizontal"> + <JTextField id="controlNobsMinField" text="{String.valueOf(config.getControlNobsmin())}"/> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.CONTROL_DIFF_CATCH_LENGTH.getDescription()}" /> + </cell> + <cell fill="horizontal"> + <JTextField id="controlDiffCatchLengthField" text="{String.valueOf(config.getControlDiffCatchLength())}" /> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.CONTROL_TYPE_FISH.getDescription()}" /> + </cell> + <cell fill="horizontal"> + <JTextField id="controlTypeFishField" text="{config.getControlTypeFish()}" /> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.SELECTION_FILTER_OCCURRENCE.getDescription()}" /> + </cell> + <cell fill="horizontal"> + <JTextField id="selectionFilterOccurrenceField" text="{String.valueOf(config.getSelectionOccurrenceFilter())}" /> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.SELECTION_FILTER_DENSITY.getDescription()}" /> + </cell> + <cell fill="horizontal"> + <JTextField id="selectionFilterDensityField" text="{String.valueOf(config.getSelectionDensityFilter())}" /> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell fill="both" columns="2"> + <Table border='{BorderFactory.createTitledBorder(_("coser.ui.configuration.category.misc"))}'> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserBusinessOption.SMTP_HOST.getDescription()}" /> + </cell> + <cell weightx="1" fill="horizontal"> + <JTextField id="smtpHostField" text="{config.getSmtpHost()}" /> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserOption.SUPPORT_EMAIL.getDescription()}" /> + </cell> + <cell fill="horizontal"> + <JTextField id="supportEmailField" text="{config.getSupportEmail()}" /> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="{CoserOption.SWING_FONT_SIZE.getDescription()}" /> + </cell> + <cell fill="horizontal"> + <JComboBox id="swingFontSizeField" constructorParams='new Object[]{"12", "14", "16", "18", "20"}' + selectedItem="{String.valueOf(config.getSwingFontSize())}" /> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell anchor="east" weightx="1"> + <JButton text="coser.ui.common.valid" + onActionPerformed="getHandler().saveConfiguration(this)"/> + </cell> + <cell anchor="west" weightx="1"> + <JButton text="coser.ui.common.cancel" + onActionPerformed="dispose()"/> + </cell> + </row> + </Table> +</JDialog> \ No newline at end of file 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 2011-11-07 10:31:24 UTC (rev 890) +++ trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2011-11-15 18:18:06 UTC (rev 891) @@ -1,13 +1,8 @@ coser.config.application.version.description=Application's version -coser.config.category.configuration=Configuration -coser.config.category.configuration.description=Configuration (numerics data) -coser.config.category.misc=Misc -coser.config.category.misc.description=Misc -coser.config.category.path=Path -coser.config.category.path.description=File and directory configuration coser.config.config.file.description=Coser configuration file coser.config.lookandfeel.description=Application's swing theme coser.config.support.email.description=Support email address +coser.config.swingfontsize.description=Application fonts size coser.config.website.description=Coser website coser.ui.about.about=<html><b>Coser</b><br /><br />Version %s<br /><br />Usefull links \:<ul><li><a href\="http\://maven-site.forge.codelutin.com/coser/">Documentation</a></li><li><a href\="http\://forge.codelutin.com/projects/coser/issues">Bug report</a></li></ul><br /><br />Copyright 2010 - 2011 <a href\="http\://www.ifremer.fr">Ifremer</a>, <a href\="http\://www.codelutin.com">Code Lutin</a><html> coser.ui.about.title=About Coser @@ -20,7 +15,10 @@ coser.ui.common.unselectAll.short=None coser.ui.common.valid=Valid coser.ui.common.yes=Yes -coser.ui.config.title=Configuration +coser.ui.configuration.category.controlselection=Control and selection +coser.ui.configuration.category.misc=Misc +coser.ui.configuration.category.path=Paths +coser.ui.configuration.title=Configuration coser.ui.control.categorylabel=Displayed data \: coser.ui.control.checkData=Check data coser.ui.control.comment=Comment \: 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 2011-11-07 10:31:24 UTC (rev 890) +++ trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2011-11-15 18:18:06 UTC (rev 891) @@ -1,13 +1,8 @@ coser.config.application.version.description=Version de l'application -coser.config.category.configuration=Configuration -coser.config.category.configuration.description=Configuration (données numériques) -coser.config.category.misc=Divers -coser.config.category.misc.description=Divers -coser.config.category.path=Chemins -coser.config.category.path.description=Configuration des fichiers et répertoires coser.config.config.file.description=Fichier de configuration de Coser coser.config.lookandfeel.description=Themes graphique Swing de l'application coser.config.support.email.description=Adresse de support pour l'envoi des erreurs +coser.config.swingfontsize.description=Taille de la police coser.config.website.description=Site internet de Coser coser.ui.about.about=<html><b>Coser</b><br /><br />Version %s<br /><br />Liens utiles \:<ul><li><a href\="http\://maven-site.forge.codelutin.com/coser/">Documentation</a></li><li><a href\="http\://forge.codelutin.com/projects/coser/issues">Rapport de bug</a></li></ul><br /><br />Copyright 2010 - 2011 <a href\="http\://www.ifremer.fr">Ifremer</a>, <a href\="http\://www.codelutin.com">Code Lutin</a><html> coser.ui.about.title=À propos de Coser @@ -20,7 +15,10 @@ coser.ui.common.unselectAll.short=Aucun coser.ui.common.valid=Valider coser.ui.common.yes=Oui -coser.ui.config.title=Configuration +coser.ui.configuration.category.controlselection=Contrôle et sélection +coser.ui.configuration.category.misc=Divers +coser.ui.configuration.category.path=Chemins +coser.ui.configuration.title=Configuration coser.ui.control.categorylabel=Données affichées \: coser.ui.control.checkData=Vérifier les données coser.ui.control.comment=Commentaire \: Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-11-07 10:31:24 UTC (rev 890) +++ trunk/pom.xml 2011-11-15 18:18:06 UTC (rev 891) @@ -20,7 +20,6 @@ <module>coser-web</module> </modules> - <distributionManagement> <site> <id>${platform}</id> @@ -34,7 +33,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.9</version> + <version>4.10</version> <scope>test</scope> </dependency> @@ -215,7 +214,7 @@ <dependency> <groupId>com.bbn</groupId> <artifactId>openmap</artifactId> - <version>4.6.5</version> + <version>5.0.0-20111028</version> <scope>compile</scope> </dependency>
participants (1)
-
echatellier@users.forge.codelutin.com