Jmexico-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
January 2012
- 3 participants
- 28 discussions
18 Jan '12
Author: tchemit
Date: 2012-01-18 10:32:11 +0100 (Wed, 18 Jan 2012)
New Revision: 23
Url: http://forge.codelutin.com/repositories/revision/jmexico/23
Log:
add svn properties
Modified:
trunk/LICENSE.txt
trunk/README.txt
trunk/changelog.txt
trunk/jmexico-model/LICENSE.txt
trunk/jmexico-model/README.txt
trunk/jmexico-model/changelog.txt
trunk/jmexico-model/pom.xml
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/DateFormatFactory.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoTechnicalException.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoXmlConstant.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignFactorEvent.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignScenarioEvent.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/ScenarioFactorValueEvent.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/InputDesignParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/MexicoXmlParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/XmlParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/ExperimentDesignXmlWriter.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/InputDesignXmlWriter.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/MexicoXmlWriter.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/XmlNode.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/XmlWriter.java
trunk/jmexico-swing-editor/LICENSE.txt
trunk/jmexico-swing-editor/README.txt
trunk/jmexico-swing-editor/changelog.txt
trunk/jmexico-swing-editor/pom.xml
trunk/jmexico-swing-editor/src/license/THIRD-PARTY.properties
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/RunMexico.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUI.css
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUI.jaxx
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUIHandler.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/decorator/MexicoDecoratorProvider.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditor.jaxx
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellRenderer.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditor.jaxx
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditorFactory.java
trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties
trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties
trunk/jmexico-swing-editor/src/main/resources/log4j.properties
trunk/pom.xml
trunk/src/site/site_fr.xml
Property changes on: trunk/LICENSE.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/README.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/changelog.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/LICENSE.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/README.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/changelog.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/pom.xml
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/DateFormatFactory.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoTechnicalException.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoXmlConstant.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignFactorEvent.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignScenarioEvent.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/ScenarioFactorValueEvent.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/InputDesignParser.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/MexicoXmlParser.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/XmlParser.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/ExperimentDesignXmlWriter.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/InputDesignXmlWriter.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/MexicoXmlWriter.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/XmlNode.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/XmlWriter.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/LICENSE.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/README.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/changelog.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/pom.xml
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/RunMexico.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUI.css
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUI.jaxx
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUIHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/decorator/MexicoDecoratorProvider.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditor.jaxx
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellRenderer.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditor.jaxx
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditorFactory.java
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/jmexico-swing-editor/src/main/resources/log4j.properties
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/pom.xml
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: trunk/src/site/site_fr.xml
___________________________________________________________________
Added: svn:eol-style
+ native
1
0
Author: sletellier
Date: 2012-01-16 12:13:30 +0100 (Mon, 16 Jan 2012)
New Revision: 22
Url: http://forge.codelutin.com/repositories/revision/jmexico/22
Log:
Remove unused file
Removed:
trunk/jmexico-model/src/license/THIRD-PARTY.properties
Deleted: trunk/jmexico-model/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/jmexico-model/src/license/THIRD-PARTY.properties 2012-01-16 11:11:18 UTC (rev 21)
+++ trunk/jmexico-model/src/license/THIRD-PARTY.properties 2012-01-16 11:13:30 UTC (rev 22)
@@ -1,21 +0,0 @@
-# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
-#-------------------------------------------------------------------------------
-# Already used licenses in project :
-# - Apache Software License, version 1.1
-# - BSD License
-# - BSD style
-# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-# - Common Public License Version 1.0
-# - Indiana University Extreme! Lab Software License, vesion 1.1.1
-# - Lesser General Public License (LGPL) v 3.0
-# - Lesser General Public License (LPGL)
-# - Lesser General Public License (LPGL) v 2.1
-# - MIT License
-# - Public Domain
-# - The Apache Software License, Version 2.0
-#-------------------------------------------------------------------------------
-# Please fill the missing licenses for dependencies :
-#
-#
-#Fri Dec 16 10:22:54 CET 2011
-commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
1
0
16 Jan '12
Author: sletellier
Date: 2012-01-16 12:11:18 +0100 (Mon, 16 Jan 2012)
New Revision: 21
Url: http://forge.codelutin.com/repositories/revision/jmexico/21
Log:
- Fix dependencies versions
- Fix svn:keywords
Modified:
trunk/LICENSE.txt
trunk/README.txt
trunk/changelog.txt
trunk/jmexico-model/LICENSE.txt
trunk/jmexico-model/README.txt
trunk/jmexico-model/changelog.txt
trunk/jmexico-model/pom.xml
trunk/jmexico-model/src/license/THIRD-PARTY.properties
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/DateFormatFactory.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoTechnicalException.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoXmlConstant.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignFactorEvent.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignScenarioEvent.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/ScenarioFactorValueEvent.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/InputDesignParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/MexicoXmlParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/XmlParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/ExperimentDesignXmlWriter.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/InputDesignXmlWriter.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/MexicoXmlWriter.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/XmlNode.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/XmlWriter.java
trunk/jmexico-model/src/main/xmi/mexico.zargo
trunk/jmexico-swing-editor/LICENSE.txt
trunk/jmexico-swing-editor/README.txt
trunk/jmexico-swing-editor/changelog.txt
trunk/jmexico-swing-editor/pom.xml
trunk/jmexico-swing-editor/src/license/THIRD-PARTY.properties
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/RunMexico.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUI.css
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUI.jaxx
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUIHandler.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/decorator/MexicoDecoratorProvider.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditor.jaxx
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellRenderer.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditor.jaxx
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditorFactory.java
trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties
trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties
trunk/jmexico-swing-editor/src/main/resources/log4j.properties
trunk/pom.xml
trunk/src/site/site_fr.xml
Property changes on: trunk/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/jmexico-model/pom.xml
===================================================================
--- trunk/jmexico-model/pom.xml 2012-01-09 15:19:24 UTC (rev 20)
+++ trunk/jmexico-model/pom.xml 2012-01-16 11:11:18 UTC (rev 21)
@@ -25,18 +25,13 @@
<dependencies>
- <!-- nuiton dependencies -->
+ <!-- commons dependencies -->
<dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-utils</artifactId>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
-
- <dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
Property changes on: trunk/jmexico-model/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/DateFormatFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoTechnicalException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoXmlConstant.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignFactorEvent.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignScenarioEvent.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/ScenarioFactorValueEvent.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/InputDesignParser.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/MexicoXmlParser.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/XmlParser.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/ExperimentDesignXmlWriter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/InputDesignXmlWriter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/MexicoXmlWriter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/XmlNode.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/XmlWriter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-model/src/main/xmi/mexico.zargo
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/jmexico-swing-editor/pom.xml
===================================================================
--- trunk/jmexico-swing-editor/pom.xml 2012-01-09 15:19:24 UTC (rev 20)
+++ trunk/jmexico-swing-editor/pom.xml 2012-01-16 11:11:18 UTC (rev 21)
@@ -24,15 +24,26 @@
<version>${project.version}</version>
</dependency>
- <!-- jaxx dependencies -->
+ <!-- commons dependencies-->
<dependency>
- <groupId>org.nuiton.jaxx</groupId>
- <artifactId>jaxx-runtime</artifactId>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>nuiton-i18n</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
+
+ <!-- jaxx dependencies -->
+ <dependency>
<groupId>org.nuiton.jaxx</groupId>
- <artifactId>jaxx-validator</artifactId>
+ <artifactId>jaxx-runtime</artifactId>
</dependency>
<dependency>
Property changes on: trunk/jmexico-swing-editor/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/jmexico-swing-editor/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/jmexico-swing-editor/src/license/THIRD-PARTY.properties 2012-01-09 15:19:24 UTC (rev 20)
+++ trunk/jmexico-swing-editor/src/license/THIRD-PARTY.properties 2012-01-16 11:11:18 UTC (rev 21)
@@ -10,18 +10,12 @@
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
# - Lesser General Public License (LPGL) v 2.1
-# - Lesser General Public License v2.1,Mozilla Public License 1.1 (MPL)
# - MIT License
# - Public Domain
# - The Apache Software License, Version 2.0
-# - http://asm.ow2.org/license.html
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Fri Dec 16 10:23:03 CET 2011
-asm--asm--3.1=http\://asm.ow2.org/license.html
-asm--asm-commons--3.1=http\://asm.ow2.org/license.html
-asm--asm-tree--3.1=http\://asm.ow2.org/license.html
+#Mon Jan 16 12:09:15 CET 2012
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
-javassist--javassist--3.8.0.GA=Lesser General Public License v2.1,Mozilla Public License 1.1 (MPL)
Property changes on: trunk/jmexico-swing-editor/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/RunMexico.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUI.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUI.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/MexicoMainUIHandler.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/decorator/MexicoDecoratorProvider.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditor.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellRenderer.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditor.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditorFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/jmexico-swing-editor/src/main/resources/log4j.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-01-09 15:19:24 UTC (rev 20)
+++ trunk/pom.xml 2012-01-16 11:11:18 UTC (rev 21)
@@ -13,7 +13,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmineAndCentral</artifactId>
- <version>3.0.6</version>
+ <version>3.0.7</version>
</parent>
<groupId>fr.reseaumexico</groupId>
@@ -77,8 +77,8 @@
<!-- libraries version -->
<nuitonI18nVersion>2.4.1</nuitonI18nVersion>
- <nuitonUtilsVersion>2.4.1</nuitonUtilsVersion>
- <eugenePluginVersion>2.4.1</eugenePluginVersion>
+ <!--<nuitonUtilsVersion>2.4.2</nuitonUtilsVersion>-->
+ <eugenePluginVersion>2.4.2</eugenePluginVersion>
<jaxxVersion>2.4.2</jaxxVersion>
<license.organizationName>Réseau Mexico, Codelutin</license.organizationName>
@@ -88,19 +88,13 @@
<dependencies>
<!-- nuiton dependencies -->
- <dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-validator</artifactId>
- <version>${nuitonUtilsVersion}</version>
- </dependency>
+ <!--<dependency>-->
+ <!--<groupId>org.nuiton</groupId>-->
+ <!--<artifactId>nuiton-validator</artifactId>-->
+ <!--<version>${nuitonUtilsVersion}</version>-->
+ <!--</dependency>-->
<dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-utils</artifactId>
- <version>${nuitonUtilsVersion}</version>
- </dependency>
-
- <dependency>
<groupId>org.nuiton.i18n</groupId>
<artifactId>nuiton-i18n</artifactId>
<version>${nuitonI18nVersion}</version>
@@ -115,12 +109,6 @@
<dependency>
<groupId>org.nuiton.jaxx</groupId>
- <artifactId>jaxx-validator</artifactId>
- <version>${jaxxVersion}</version>
- </dependency>
-
- <dependency>
- <groupId>org.nuiton.jaxx</groupId>
<artifactId>jaxx-widgets</artifactId>
<version>${jaxxVersion}</version>
</dependency>
@@ -128,7 +116,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>10.0.1</version>
+ <version>11.0.1</version>
</dependency>
<!-- xml parser -->
@@ -145,6 +133,18 @@
<version>1.3</version>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
</dependencies>
</dependencyManagement>
Property changes on: trunk/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Property changes on: trunk/src/site/site_fr.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
r20 - in trunk: jmexico-model/src/main/java/fr/reseaumexico/model jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue
by sletellier@users.forge.codelutin.com 09 Jan '12
by sletellier@users.forge.codelutin.com 09 Jan '12
09 Jan '12
Author: sletellier
Date: 2012-01-09 16:19:24 +0100 (Mon, 09 Jan 2012)
New Revision: 20
Url: http://forge.codelutin.com/repositories/revision/jmexico/20
Log:
- Clean code
- For option value editing, fire stop editing on combo selection
Modified:
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java 2012-01-06 14:39:48 UTC (rev 19)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java 2012-01-09 15:19:24 UTC (rev 20)
@@ -101,6 +101,7 @@
}
}
+ @Override
public void setScenario(Collection<Scenario> scenarios) {
addAllScenario(scenarios);
}
Modified: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java 2012-01-06 14:39:48 UTC (rev 19)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java 2012-01-09 15:19:24 UTC (rev 20)
@@ -192,13 +192,11 @@
}
int scenarioIndex = columnIndex - 1;
Scenario scenario = getScenario(scenarioIndex);
- Map<Factor,Object> factorValues = scenario.getFactorValues();
// get key if rowIndex
Factor factor = getFactor(rowIndex);
- factorValues.put(factor, o);
- scenario.setFactorValues(factorValues);
+ scenario.setFactorValue(factor, o);
fireTableCellUpdated(rowIndex, columnIndex);
}
Modified: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java 2012-01-06 14:39:48 UTC (rev 19)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java 2012-01-09 15:19:24 UTC (rev 20)
@@ -26,9 +26,12 @@
import fr.reseaumexico.model.Factor;
import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.AbstractCellEditor;
+import javax.swing.JComboBox;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.table.TableCellEditor;
@@ -90,7 +93,20 @@
specificEditor = factory.getCellEditor(factor, currentValue);
if (specificEditor != null) {
- return specificEditor.getComponent();
+ Component component = specificEditor.getComponent();
+
+ // stop editing on select for combos
+ if (component instanceof JComboBox) {
+ ((JComboBox)component).addActionListener(new ActionListener() {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ fireEditingStopped();
+ }
+ });
+ }
+
+ return component;
}
defaultInlineEditor.setText(currentValue == null ? "" : String.valueOf(currentValue));
return defaultInlineEditor;
1
0
r19 - in trunk: jmexico-model/src/main/java/fr/reseaumexico/model/parser jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue
by sletellier@users.forge.codelutin.com 06 Jan '12
by sletellier@users.forge.codelutin.com 06 Jan '12
06 Jan '12
Author: sletellier
Date: 2012-01-06 15:39:48 +0100 (Fri, 06 Jan 2012)
New Revision: 19
Url: http://forge.codelutin.com/repositories/revision/jmexico/19
Log:
- Refacoring of editor package
- Use specific editor and renderer for factor values edition
- Allow to use specific FactorValueEditorFactory in InputDesignEditor
Added:
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellRenderer.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditor.jaxx
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditorFactory.java
Removed:
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueCellEditor.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueEditorFactory.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/model/
Modified:
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditor.jaxx
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java 2012-01-04 13:58:53 UTC (rev 18)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java 2012-01-06 14:39:48 UTC (rev 19)
@@ -188,7 +188,7 @@
if (parser.getEventType() == XmlPullParser.START_TAG &&
parserEqual(parser, FEATURE)) {
- List<Feature> features = Lists.newArrayList();
+ List<Feature> features = Lists.newLinkedList();
while (parserEqual(parser, FEATURE)) {
Deleted: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueCellEditor.java
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueCellEditor.java 2012-01-04 13:58:53 UTC (rev 18)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueCellEditor.java 2012-01-06 14:39:48 UTC (rev 19)
@@ -1,92 +0,0 @@
-/*
- * #%L
- * JMexico :: Swing Editor
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 Réseau Mexico, Codelutin
- * %%
- * 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.reseaumexico.editor.ui.editor;
-
-import fr.reseaumexico.model.Factor;
-import java.awt.Component;
-import java.awt.Insets;
-import java.awt.TextField;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import javax.swing.AbstractCellEditor;
-import javax.swing.JButton;
-import javax.swing.JTable;
-import javax.swing.SwingConstants;
-import javax.swing.table.TableCellEditor;
-
-/**
- * @author sletellier <letellier(a)codelutin.com>
- * @since 0.1
- */
-public class FactorValueCellEditor extends AbstractCellEditor
- implements TableCellEditor, ActionListener {
-
- private static final long serialVersionUID = 1L;
-
- protected JTable table;
- protected Factor factor;
- protected Object currentValue;
- protected JButton button;
-
- public FactorValueCellEditor() {
- //Set up the editor (from the table's point of view),
- //which is a button.
- //This button brings up the color chooser dialog,
- //which is the editor from the user's point of view.
- button = new JButton();
- button.addActionListener(this);
- button.setBorderPainted(false);
- button.setHorizontalAlignment(SwingConstants.LEFT);
- button.setMargin(new Insets(0,0,0,0));
- }
-
- @Override
- public Object getCellEditorValue() {
- return currentValue;
- }
-
- @Override
- public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
- // get factor
- // TODO sletellier 20111221 : Take care of type
- factor = (Factor) table.getValueAt(row, 0);
-
- currentValue = value;
- button.setText(String.valueOf(currentValue));
- return button;
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- // get factor
- // TODO sletellier 20111221 : Take care of type
- Object editedValue = FactorValueEditorFactory.getInstance().edit(table, factor, currentValue);
- if (editedValue != null) {
- currentValue = editedValue;
- button.setText(String.valueOf(currentValue));
- }
- fireEditingStopped();
- }
-}
Deleted: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueEditorFactory.java
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueEditorFactory.java 2012-01-04 13:58:53 UTC (rev 18)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueEditorFactory.java 2012-01-06 14:39:48 UTC (rev 19)
@@ -1,58 +0,0 @@
-/*
- * #%L
- * JMexico :: Swing Editor
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 Réseau Mexico, Codelutin
- * %%
- * 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.reseaumexico.editor.ui.editor;
-
-import fr.reseaumexico.model.Factor;
-import java.awt.Component;
-import javax.swing.JOptionPane;
-
-import static org.nuiton.i18n.I18n._;
-
-/**
- * Factory used to open specific editor to input factor value
- *
- * @author sletellier <letellier(a)codelutin.com>
- * @since 0.1
- */
-public class FactorValueEditorFactory {
-
- private static FactorValueEditorFactory instance;
-
- // use singleton
- public static FactorValueEditorFactory getInstance() {
- if (instance == null) {
- instance = new FactorValueEditorFactory();
- }
- return instance;
- }
-
- public Object edit(Component parent, Factor factor, Object oldValue) {
-
- // TODO sletellier 20121221 : open specific editor
- String inputValue = JOptionPane.showInputDialog(parent, _("jmexico.input.msg"), oldValue);
-
- return inputValue;
- }
-}
Modified: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditor.jaxx
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditor.jaxx 2012-01-04 13:58:53 UTC (rev 18)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditor.jaxx 2012-01-06 14:39:48 UTC (rev 19)
@@ -25,22 +25,25 @@
<JPanel id='inputDesignEditor' layout='{new BorderLayout()}'>
<import>
-javax.swing.table.TableModel
-javax.swing.table.DefaultTableModel
-fr.reseaumexico.model.InputDesign
-fr.reseaumexico.model.Factor
-fr.reseaumexico.editor.ui.model.InputDesignTableModel
-fr.reseaumexico.editor.ui.editor.FactorValueCellEditor
-fr.reseaumexico.editor.ui.decorator.MexicoDecoratorProvider
-jaxx.runtime.swing.renderer.DecoratorProviderTableCellRenderer
+ javax.swing.table.TableModel
+ javax.swing.table.DefaultTableModel
+ fr.reseaumexico.model.InputDesign
+ fr.reseaumexico.model.Factor
+ fr.reseaumexico.editor.ui.editor.InputDesignTableModel
+ fr.reseaumexico.editor.ui.editor.factorValue.FactorValueCellEditor
+ fr.reseaumexico.editor.ui.editor.factorValue.FactorValueCellRenderer
+ fr.reseaumexico.editor.ui.decorator.MexicoDecoratorProvider
+ jaxx.runtime.swing.renderer.DecoratorProviderTableCellRenderer
</import>
<InputDesignEditorHandler id='handler'/>
<InputDesignTableModel id='model' javaBean="new InputDesignTableModel()"/>
- <FactorValueCellEditor id='cellEditor'/>
+ <FactorValueCellEditor id='cellEditor' constructorParams='this'/>
+ <FactorValueCellRenderer id='cellRenderer' constructorParams='this'/>
+
<script>
<![CDATA[
@@ -50,6 +53,7 @@
// TODO sletellier 20111221 : do on time for all, put in context ?
MexicoDecoratorProvider mexicoDecoratorProvider = new MexicoDecoratorProvider();
inputDesignTable.setDefaultRenderer(Factor.class, new DecoratorProviderTableCellRenderer(mexicoDecoratorProvider));
+ inputDesignTable.setDefaultRenderer(Object.class, getCellRenderer());
// cell editor
inputDesignTable.setDefaultEditor(Object.class, getCellEditor());
Modified: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java 2012-01-04 13:58:53 UTC (rev 18)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java 2012-01-06 14:39:48 UTC (rev 19)
@@ -32,6 +32,7 @@
import java.util.Collection;
import java.util.Map;
import javax.swing.JOptionPane;
+import org.apache.commons.lang3.StringUtils;
import static org.nuiton.i18n.I18n._;
@@ -49,45 +50,49 @@
_("jmexico.scenario.inputName.title"),
JOptionPane.QUESTION_MESSAGE);
- // check that name is never used
- Collection<Scenario> scenarios = inputDesign.getScenario();
+ // if user enter name
+ if (StringUtils.isNotBlank(selectedName)) {
- int maxOrder = 0;
- for (Scenario scenario : scenarios) {
- if (selectedName.equalsIgnoreCase(scenario.getName())) {
+ // check that name is never used
+ Collection<Scenario> scenarios = inputDesign.getScenario();
- JOptionPane.showMessageDialog(editor,
- _("jmexico.error.title"),
- _("jmexico.error.scenario.name.used"),
- JOptionPane.ERROR_MESSAGE);
+ int maxOrder = 0;
+ for (Scenario scenario : scenarios) {
+ if (selectedName.equalsIgnoreCase(scenario.getName())) {
- return;
+ JOptionPane.showMessageDialog(editor,
+ _("jmexico.error.title"),
+ _("jmexico.error.scenario.name.used"),
+ JOptionPane.ERROR_MESSAGE);
+
+ return;
+ }
+ int orderNumber = scenario.getOrderNumber();
+ if (maxOrder < orderNumber) {
+ maxOrder = orderNumber;
+ }
}
- int orderNumber = scenario.getOrderNumber();
- if (maxOrder < orderNumber) {
- maxOrder = orderNumber;
- }
- }
- // create new scenario
- Scenario scenarioToAdd = new ScenarioImpl();
+ // create new scenario
+ Scenario scenarioToAdd = new ScenarioImpl();
- // set last order
- // TODO sletellier 20111219 : ask user order number
- scenarioToAdd.setOrderNumber(maxOrder + 1);
+ // set last order
+ // TODO sletellier 20111219 : ask user order number
+ scenarioToAdd.setOrderNumber(maxOrder + 1);
- // set name
- scenarioToAdd.setName(selectedName);
+ // set name
+ scenarioToAdd.setName(selectedName);
- // create all empty factor values
- Collection<Factor> factors = inputDesign.getExperimentDesign().getFactor();
- Map<Factor, Object> factorValues = Maps.newHashMap();
- for (Factor factor : factors) {
- factorValues.put(factor, null);
+ // create all empty factor values
+ Collection<Factor> factors = inputDesign.getExperimentDesign().getFactor();
+ Map<Factor, Object> factorValues = Maps.newHashMap();
+ for (Factor factor : factors) {
+ factorValues.put(factor, null);
+ }
+ scenarioToAdd.setFactorValues(factorValues);
+
+ inputDesign.addScenario(scenarioToAdd);
}
- scenarioToAdd.setFactorValues(factorValues);
-
- inputDesign.addScenario(scenarioToAdd);
}
public void removeScenario(InputDesignEditor editor) {
Copied: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java (from rev 16, trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/model/InputDesignTableModel.java)
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java (rev 0)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignTableModel.java 2012-01-06 14:39:48 UTC (rev 19)
@@ -0,0 +1,205 @@
+/*
+ * #%L
+ * JMexico :: Swing Editor
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 Réseau Mexico, Codelutin
+ * %%
+ * 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.reseaumexico.editor.ui.editor;
+
+import fr.reseaumexico.model.Factor;
+import fr.reseaumexico.model.InputDesign;
+import fr.reseaumexico.model.Scenario;
+import fr.reseaumexico.model.event.InputDesignScenarioEvent;
+import fr.reseaumexico.model.event.InputDesignScenarioListener;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import javax.swing.table.AbstractTableModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableModel;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * @author sletellier <letellier(a)codelutin.com>
+ * @since 0.1
+ */
+public class InputDesignTableModel extends AbstractTableModel implements InputDesignScenarioListener {
+
+ private static final long serialVersionUID = 1L;
+
+ protected TableModel delegate;
+ protected InputDesign inputDesign;
+ protected List<Factor> factors;
+
+ public InputDesignTableModel() {
+ delegate = new DefaultTableModel();
+ }
+
+ public void setInputDesign(InputDesign inputDesign) {
+ this.inputDesign = inputDesign;
+ inputDesign.addInputDesignScenarioListener(this);
+
+ // extract factors
+ factors = new LinkedList<Factor>(inputDesign.getExperimentDesign().getFactor());
+
+ // sort on id
+ Collections.sort(factors, new Comparator<Factor>() {
+
+ @Override
+ public int compare(Factor o1, Factor o2) {
+ return o1.getId().compareTo(o2.getId());
+ }
+ });
+
+ fireTableStructureChanged();
+ }
+
+ @Override
+ public void onScenarioAdded(InputDesignScenarioEvent event) {
+ fireTableStructureChanged();
+ }
+
+ @Override
+ public void onScenarioRemoved(InputDesignScenarioEvent event) {
+ fireTableStructureChanged();
+ }
+
+ public InputDesign getInputDesign() {
+ return inputDesign;
+ }
+
+ public Collection<Scenario> getScenarios() {
+ return inputDesign.getScenario();
+ }
+
+ public Scenario getScenario(int i) {
+ return inputDesign.getScenario(i);
+ }
+
+ public Factor getFactor(int i) {
+ return factors.get(i);
+ }
+
+ @Override
+ public int getRowCount() {
+ if (inputDesign == null) {
+ return delegate.getRowCount();
+ }
+ return factors == null ? 0 : factors.size();
+ }
+
+ @Override
+ public int getColumnCount() {
+ if (inputDesign == null) {
+ return delegate.getColumnCount();
+ }
+ Collection<Scenario> scenarios = getScenarios();
+ if (scenarios == null) {
+ return 1;
+ }
+ return scenarios.size() + 1;
+ }
+
+ @Override
+ public String getColumnName(int rowIndex) {
+ if (inputDesign == null) {
+ return delegate.getColumnName(rowIndex);
+ }
+ if (rowIndex == 0) {
+ return _("jmexico.factor.name");
+ }
+ Scenario scenario = getScenario(rowIndex - 1);
+ return scenario == null ? "" : scenario.getName();
+ }
+
+ @Override
+ public Class<?> getColumnClass(int rowIndex) {
+ if (inputDesign == null) {
+ return delegate.getColumnClass(rowIndex);
+ }
+ if (rowIndex == 0) {
+ return Factor.class;
+ }
+ return Object.class;
+ }
+
+ @Override
+ public boolean isCellEditable(int rowIndex, int columnIndex) {
+ if (inputDesign == null) {
+ return delegate.isCellEditable(rowIndex, columnIndex);
+ }
+ return columnIndex > 0;
+ }
+
+ @Override
+ public Object getValueAt(int rowIndex, int columnIndex) {
+ if (inputDesign == null) {
+ return delegate.getValueAt(rowIndex, columnIndex);
+ }
+
+ // get key on rowIndex
+ Factor factor = getFactor(rowIndex);
+
+ // first column is factors
+ if (columnIndex == 0) {
+ return factor;
+ }
+
+ // others are scenarios
+ columnIndex = columnIndex - 1;
+ Scenario scenario = getScenario(columnIndex);
+ if (scenario == null) {
+ return null;
+ }
+ Map<Factor,Object> factorValues = scenario.getFactorValues();
+
+ Object result = factorValues.get(factor);
+ return result;
+ }
+
+ @Override
+ public void setValueAt(Object o, int rowIndex, int columnIndex) {
+ if (inputDesign == null) {
+ delegate.setValueAt(o, rowIndex, columnIndex);
+ return;
+ }
+ if (columnIndex == 0) {
+
+ // must never append
+ return;
+ }
+ int scenarioIndex = columnIndex - 1;
+ Scenario scenario = getScenario(scenarioIndex);
+ Map<Factor,Object> factorValues = scenario.getFactorValues();
+
+ // get key if rowIndex
+ Factor factor = getFactor(rowIndex);
+
+ factorValues.put(factor, o);
+ scenario.setFactorValues(factorValues);
+
+ fireTableCellUpdated(rowIndex, columnIndex);
+ }
+}
Copied: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java (from rev 16, trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueCellEditor.java)
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java (rev 0)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellEditor.java 2012-01-06 14:39:48 UTC (rev 19)
@@ -0,0 +1,119 @@
+/*
+ * #%L
+ * JMexico :: Swing Editor
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 Réseau Mexico, Codelutin
+ * %%
+ * 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.reseaumexico.editor.ui.editor.factorValue;
+
+import fr.reseaumexico.model.Factor;
+import java.awt.Component;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
+import javax.swing.AbstractCellEditor;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.table.TableCellEditor;
+import jaxx.runtime.JAXXContext;
+
+/**
+ * Cell editor for factor values
+ *
+ * @author sletellier <letellier(a)codelutin.com>
+ * @since 0.1
+ * @see TableCellEditor
+ */
+public class FactorValueCellEditor extends AbstractCellEditor
+ implements TableCellEditor, FocusListener {
+
+ private static final long serialVersionUID = 1L;
+
+ protected JTable table;
+ protected Factor factor;
+ protected Object currentValue;
+ protected JTextField defaultInlineEditor;
+ protected FactorValueEditorFactory.FactorValueCellEditor specificEditor;
+ protected boolean isEditing = false;
+ protected FactorValueEditorFactory factory;
+
+ public FactorValueCellEditor(JAXXContext context) {
+ defaultInlineEditor = new JTextField();
+ defaultInlineEditor.addFocusListener(this);
+
+ // search specific factory in context
+ factory = context.getContextValue(FactorValueEditorFactory.class);
+
+ // if not found, use mexico one
+ if (factory == null) {
+ factory = new FactorValueEditorFactory();
+ }
+ }
+
+ @Override
+ public Object getCellEditorValue() {
+ if (isEditing) {
+ currentValue = defaultInlineEditor.getText();
+ isEditing = false;
+ }
+ if (specificEditor != null) {
+ currentValue = specificEditor.getValue();
+ }
+ return currentValue;
+ }
+
+ @Override
+ public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
+ // get factor
+ // TODO sletellier 20111221 : Take care of type
+ factor = (Factor) table.getValueAt(row, 0);
+
+ currentValue = value;
+
+ specificEditor = factory.getCellEditor(factor, currentValue);
+
+ if (specificEditor != null) {
+ return specificEditor.getComponent();
+ }
+ defaultInlineEditor.setText(currentValue == null ? "" : String.valueOf(currentValue));
+ return defaultInlineEditor;
+ }
+
+ @Override
+ public void focusGained(FocusEvent e) {
+
+ // get factor
+ // TODO sletellier 20111221 : Take care of type
+ FactorValueEditor editor = factory.getDialogEditor(factor, currentValue);
+ if (editor == null) {
+ isEditing = true;
+ } else {
+ // display ui
+ editor.setVisible(true);
+ currentValue = editor.getValue();
+ defaultInlineEditor.setText(currentValue == null ? "" : String.valueOf(currentValue));
+ fireEditingStopped();
+ }
+ }
+
+ @Override
+ public void focusLost(FocusEvent e) {
+ }
+}
Added: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellRenderer.java
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellRenderer.java (rev 0)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueCellRenderer.java 2012-01-06 14:39:48 UTC (rev 19)
@@ -0,0 +1,69 @@
+/*
+ * #%L
+ * JMexico :: Swing Editor
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin
+ * %%
+ * 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.reseaumexico.editor.ui.editor.factorValue;
+
+import fr.reseaumexico.model.Factor;
+import java.awt.Component;
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableCellRenderer;
+import javax.swing.table.TableCellRenderer;
+import jaxx.runtime.JAXXContext;
+
+/**
+ * @author sletellier <letellier(a)codelutin.com>
+ */
+public class FactorValueCellRenderer implements TableCellRenderer {
+
+ protected FactorValueEditorFactory factory;
+ protected TableCellRenderer delegate;
+
+ public FactorValueCellRenderer(JAXXContext context) {
+ // search specific factory in context
+ factory = context.getContextValue(FactorValueEditorFactory.class);
+
+ // if not found, use mexico one
+ if (factory == null) {
+ factory = new FactorValueEditorFactory();
+ }
+
+ this.delegate = new DefaultTableCellRenderer();
+
+ }
+
+ @Override
+ public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
+ Factor factor = (Factor) table.getValueAt(row, 0);
+
+ FactorValueEditorFactory.FactorValueCellRenderer specificEditor = factory.getRenderedComponent(factor, value);
+
+ Component result;
+ if (specificEditor == null) {
+ result = delegate.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
+ } else {
+ result = specificEditor.getComponent();
+ }
+ return result;
+ }
+}
Added: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditor.jaxx
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditor.jaxx (rev 0)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditor.jaxx 2012-01-06 14:39:48 UTC (rev 19)
@@ -0,0 +1,45 @@
+<!--
+ #%L
+ JMexico :: Swing Editor
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin
+ %%
+ 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%
+ -->
+<JDialog abstract='true'
+ genericType='B'
+ modal='true'
+ layout='{new BorderLayout()}'>
+
+ <import>
+java.awt.BorderLayout
+fr.reseaumexico.model.Factor
+ </import>
+
+ <Factor id='factor' initializer='getContextValue(Factor.class)'/>
+
+ <script><![CDATA[
+
+public abstract B getValue();
+
+public abstract void setValue(B data);
+ ]]>
+ </script>
+
+</JDialog>
\ No newline at end of file
Copied: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditorFactory.java (from rev 15, trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueEditorFactory.java)
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditorFactory.java (rev 0)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/factorValue/FactorValueEditorFactory.java 2012-01-06 14:39:48 UTC (rev 19)
@@ -0,0 +1,200 @@
+/*
+ * #%L
+ * JMexico :: Swing Editor
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 Réseau Mexico, Codelutin
+ * %%
+ * 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.reseaumexico.editor.ui.editor.factorValue;
+
+import fr.reseaumexico.model.Domain;
+import fr.reseaumexico.model.Factor;
+import fr.reseaumexico.model.ValueType;
+import java.awt.Component;
+import javax.swing.JCheckBox;
+import javax.swing.JTextField;
+import jaxx.runtime.swing.editor.NumberEditor;
+
+/**
+ * Factory used to open specific editor to input factor value
+ *
+ * @author sletellier <letellier(a)codelutin.com>
+ * @since 0.1
+ */
+public class FactorValueEditorFactory {
+
+ /**
+ * Provide specific {@link javax.swing.JDialog} editor for factor value
+ *
+ * @param factor concerned
+ * @param value value to edit
+ * @return {@link FactorValueEditor} contain editor to open as {@link javax.swing.JDialog},
+ * null if cell editor must be used
+ */
+ public FactorValueEditor getDialogEditor(Factor factor, Object value) {
+
+ // TODO sletellier 20121221 : open specific editor
+
+// if (oldValue == null) {
+//
+// JAXXInitialContext context = new JAXXInitialContext();
+// context.add(factor);
+// FactorValueEditor<B> editor = (FactorValueEditor<B>) new FactorValueEditorImpl(context);
+// editor.setValue(oldValue);
+// return editor;
+// }
+
+ return null;
+ }
+
+ /**
+ * Provide specific cell editor for factor value
+ *
+ * @param factor concerned
+ * @param value value to edit
+ * @return {@link FactorValueCellEditor} contain editor to display
+ */
+ public FactorValueCellEditor getCellEditor(Factor factor, Object value) {
+
+ // get type
+ Domain domain = factor.getDomain();
+ if (domain != null) {
+ ValueType valueType = domain.getValueType();
+ switch (valueType) {
+ case INTEGER: return new IntegerFactorValueInlineEditor((Integer)value);
+ case DECIMAL: return new DecimalFactorValueInlineEditor((Double)value);
+ case BOOLEAN: return new BooleanFactorValueInlineEditor((Boolean)value);
+ }
+ }
+ return new DefaultFactorValueInlineEditor(value);
+ }
+
+ /**
+ * Provide a specific cell renderer for factor value
+ *
+ * @param factor concerned
+ * @param value value to edit
+ * @return {@link FactorValueCellRenderer} contain renderer to display
+ */
+ public FactorValueCellRenderer getRenderedComponent(Factor factor, Object value) {
+ return getCellEditor(factor, value);
+ }
+
+ protected static interface FactorValueCellRenderer {
+
+ public abstract Component getComponent();
+ }
+
+ protected static interface FactorValueCellEditor<B> extends FactorValueCellRenderer {
+
+ public abstract B getValue();
+ public abstract Component getComponent();
+ }
+
+ protected static class DefaultFactorValueInlineEditor implements FactorValueCellEditor<String> {
+
+ protected JTextField component;
+
+ public DefaultFactorValueInlineEditor(Object value) {
+ this.component = new JTextField(String.valueOf(value));
+ }
+
+ @Override
+ public String getValue() {
+ return component.getText();
+ }
+
+ @Override
+ public Component getComponent() {
+ return component;
+ }
+ }
+
+ protected static class BooleanFactorValueInlineEditor implements FactorValueCellEditor<Boolean> {
+
+ protected JCheckBox checkBox;
+
+ public BooleanFactorValueInlineEditor(Boolean value) {
+ this.checkBox = new JCheckBox();
+ checkBox.setSelected(value);
+ }
+
+ @Override
+ public Boolean getValue() {
+ return checkBox.isSelected();
+ }
+
+ @Override
+ public Component getComponent() {
+ return checkBox;
+ }
+ }
+
+ protected static class IntegerFactorValueInlineEditor implements FactorValueCellEditor<Integer> {
+
+ protected NumberEditor numberEditor;
+
+ public IntegerFactorValueInlineEditor(Integer value) {
+ this.numberEditor = new NumberEditor();
+ numberEditor.setModel(value);
+
+ // FIXME sletellier 20120105 : we dont need to set modelText
+ numberEditor.setModelText(String.valueOf(value));
+ numberEditor.setUseFloat(false);
+ numberEditor.setUseSign(true);
+ }
+
+ @Override
+ public Integer getValue() {
+ return (Integer) numberEditor.getModel();
+ }
+
+ @Override
+ public Component getComponent() {
+ return numberEditor;
+ }
+ }
+
+ protected static class DecimalFactorValueInlineEditor implements FactorValueCellEditor<Double> {
+
+ protected NumberEditor numberEditor;
+
+ public DecimalFactorValueInlineEditor(Double value) {
+ this.numberEditor = new NumberEditor();
+ numberEditor.setModel(value);
+
+ // FIXME sletellier 20120105 : we dont need to set modelText
+ numberEditor.setModelText(String.valueOf(value));
+ numberEditor.setModelType(Double.class);
+ numberEditor.setUseFloat(true);
+ numberEditor.setUseSign(true);
+ }
+
+ @Override
+ public Double getValue() {
+ return (Double) numberEditor.getModel();
+ }
+
+ @Override
+ public Component getComponent() {
+ return numberEditor;
+ }
+ }
+}
1
0
r18 - in trunk: jmexico-model/src/main/java/fr/reseaumexico/model jmexico-model/src/main/java/fr/reseaumexico/model/event jmexico-model/src/main/java/fr/reseaumexico/model/parser jmexico-model/src/main/java/fr/reseaumexico/model/writer jmexico-swing-editor/src/main/resources/i18n
by sletellier@users.forge.codelutin.com 04 Jan '12
by sletellier@users.forge.codelutin.com 04 Jan '12
04 Jan '12
Author: sletellier
Date: 2012-01-04 14:58:53 +0100 (Wed, 04 Jan 2012)
New Revision: 18
Url: http://forge.codelutin.com/repositories/revision/jmexico/18
Log:
Improve javadoc
Modified:
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/DateFormatFactory.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoTechnicalException.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignFactorEvent.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignScenarioEvent.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/ScenarioFactorValueEvent.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/InputDesignParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/MexicoXmlParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/XmlParser.java
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/InputDesignXmlWriter.java
trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties
trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/DateFormatFactory.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/DateFormatFactory.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/DateFormatFactory.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -28,8 +28,11 @@
import java.text.SimpleDateFormat;
/**
+ * Factory for format all jmexico dates using {@link SimpleDateFormat}
+ *
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
+ * @see SimpleDateFormat
*/
public class DateFormatFactory {
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/InputDesignImpl.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -39,6 +39,8 @@
import javax.swing.event.EventListenerList;
/**
+ * Implementation of {@link InputDesign} to provide listener API
+ *
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
*/
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoTechnicalException.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoTechnicalException.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/MexicoTechnicalException.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -25,6 +25,8 @@
package fr.reseaumexico.model;
/**
+ * Mexico technical exception
+ *
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
*/
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -31,6 +31,8 @@
import javax.swing.event.EventListenerList;
/**
+ * Implementation of {@link Scenario} to provide listener API
+ *
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
*/
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignFactorEvent.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignFactorEvent.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignFactorEvent.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -28,6 +28,8 @@
import fr.reseaumexico.model.Scenario;
/**
+ * Event fired when {@link fr.reseaumexico.model.Factor} change on {@link InputDesign}
+ *
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
*/
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignScenarioEvent.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignScenarioEvent.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/InputDesignScenarioEvent.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -29,6 +29,8 @@
import java.util.EventObject;
/**
+ * Event fired when {@link Scenario} change on {@link InputDesign}
+ *
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
*/
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/ScenarioFactorValueEvent.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/ScenarioFactorValueEvent.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/event/ScenarioFactorValueEvent.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -28,6 +28,8 @@
import java.util.EventObject;
/**
+ * Event fired when {@link fr.reseaumexico.model.Factor} change on {@link Scenario}
+ *
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
*/
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/ExperimentDesignParser.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -77,6 +77,8 @@
import static fr.reseaumexico.model.MexicoXmlConstant.LEVEL_WEIGHT;
/**
+ * Parser for experiment design xml files, build a {@link ExperimentDesign} model
+ *
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
*/
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/InputDesignParser.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/InputDesignParser.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/InputDesignParser.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -51,6 +51,8 @@
import static fr.reseaumexico.model.MexicoXmlConstant.SCENARIO_ORDER_NUMBER;
/**
+ * Parser for input design xml files, build a {@link InputDesign} model
+ *
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
*/
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/MexicoXmlParser.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/MexicoXmlParser.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/MexicoXmlParser.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -31,6 +31,8 @@
import java.util.Date;
/**
+ * Abstract parser to get model from xml file using XPP3 for mexico
+ *
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
*/
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/XmlParser.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/XmlParser.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/parser/XmlParser.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -38,6 +38,7 @@
*
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
+ * @see XmlPullParser
*/
public abstract class XmlParser<M> extends FileReader {
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/InputDesignXmlWriter.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/InputDesignXmlWriter.java 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/writer/InputDesignXmlWriter.java 2012-01-04 13:58:53 UTC (rev 18)
@@ -41,7 +41,7 @@
import static fr.reseaumexico.model.MexicoXmlConstant.SCENARIO_ORDER_NUMBER;
/**
- * Writer to create input design file with {@link fr.reseaumexico.model.InputDesign} model
+ * Writer to create input design file with {@link InputDesign} model
*
* @author sletellier <letellier(a)codelutin.com>
* @since 0.1
Modified: trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties
===================================================================
--- trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties 2012-01-04 13:58:53 UTC (rev 18)
@@ -1,14 +1,14 @@
-jmexico.add.scenario=Ajout d'un scenario
+jmexico.add.scenario=Add a scenario
jmexico.error.scenario.name.used=Error \: scenario name '%1$s' is already used.
jmexico.error.title=Error
jmexico.factor.name=Factor
jmexico.file.open.dialog=Open an InputDesign file.
-jmexico.input.msg=
+jmexico.input.msg=New value
jmexico.menu.file=File
jmexico.menu.file.open=Open
jmexico.menu.file.save=Save
-jmexico.remove.scenario=Suppression d'un scenario
+jmexico.remove.scenario=Delete a scenario
jmexico.scenario.inputName=Name of scenario to add \:
-jmexico.scenario.inputName.title=
-jmexico.scenario.selectRemove=
-jmexico.scenario.selectRemove.title=
+jmexico.scenario.inputName.title=Input a name for scenario to add
+jmexico.scenario.selectRemove=Select scenario to delete
+jmexico.scenario.selectRemove.title=Select scenario to remove
Modified: trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties
===================================================================
--- trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties 2012-01-04 10:55:47 UTC (rev 17)
+++ trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties 2012-01-04 13:58:53 UTC (rev 18)
@@ -3,12 +3,12 @@
jmexico.error.title=Erreur
jmexico.factor.name=Facteur
jmexico.file.open.dialog=Ouvrir un fichier InputDesign
-jmexico.input.msg=
+jmexico.input.msg=Nouvelle valeur
jmexico.menu.file=Fichier
jmexico.menu.file.open=Ouvrir
jmexico.menu.file.save=Sauvegarder
jmexico.remove.scenario=Suppression d'un scenario
jmexico.scenario.inputName=Nom du scénario à ajouter \:
-jmexico.scenario.inputName.title=
-jmexico.scenario.selectRemove=
-jmexico.scenario.selectRemove.title=
+jmexico.scenario.inputName.title=Enter un nom pour le scenario à ajouter
+jmexico.scenario.selectRemove=Selection du scénario à supprimer
+jmexico.scenario.selectRemove.title=Select scenario to remove
1
0
r17 - in trunk: jmexico-model jmexico-swing-editor jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/decorator
by sletellier@users.forge.codelutin.com 04 Jan '12
by sletellier@users.forge.codelutin.com 04 Jan '12
04 Jan '12
Author: sletellier
Date: 2012-01-04 11:55:47 +0100 (Wed, 04 Jan 2012)
New Revision: 17
Url: http://forge.codelutin.com/repositories/revision/jmexico/17
Log:
Update files headers
Modified:
trunk/jmexico-model/LICENSE.txt
trunk/jmexico-swing-editor/LICENSE.txt
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/decorator/MexicoDecoratorProvider.java
Modified: trunk/jmexico-model/LICENSE.txt
===================================================================
--- trunk/jmexico-model/LICENSE.txt 2012-01-03 17:28:12 UTC (rev 16)
+++ trunk/jmexico-model/LICENSE.txt 2012-01-04 10:55:47 UTC (rev 17)
@@ -163,3 +163,4 @@
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
+
Modified: trunk/jmexico-swing-editor/LICENSE.txt
===================================================================
--- trunk/jmexico-swing-editor/LICENSE.txt 2012-01-03 17:28:12 UTC (rev 16)
+++ trunk/jmexico-swing-editor/LICENSE.txt 2012-01-04 10:55:47 UTC (rev 17)
@@ -163,3 +163,4 @@
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
+
Modified: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/decorator/MexicoDecoratorProvider.java
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/decorator/MexicoDecoratorProvider.java 2012-01-03 17:28:12 UTC (rev 16)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/decorator/MexicoDecoratorProvider.java 2012-01-04 10:55:47 UTC (rev 17)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * JMexico :: Swing Editor
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2011 - 2012 Réseau Mexico, Codelutin
+ * %%
+ * 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.reseaumexico.editor.ui.decorator;
import fr.reseaumexico.model.Factor;
1
0
r16 - in trunk: jmexico-model/src/main/java/fr/reseaumexico/model jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/model jmexico-swing-editor/src/main/resources/i18n
by sletellier@users.forge.codelutin.com 03 Jan '12
by sletellier@users.forge.codelutin.com 03 Jan '12
03 Jan '12
Author: sletellier
Date: 2012-01-03 18:28:12 +0100 (Tue, 03 Jan 2012)
New Revision: 16
Url: http://forge.codelutin.com/repositories/revision/jmexico/16
Log:
- Debug table model
- Debug specific editor
- Add missing traductions
Modified:
trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueCellEditor.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java
trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/model/InputDesignTableModel.java
trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties
trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties
Modified: trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java
===================================================================
--- trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java 2011-12-29 14:16:05 UTC (rev 15)
+++ trunk/jmexico-model/src/main/java/fr/reseaumexico/model/ScenarioImpl.java 2012-01-03 17:28:12 UTC (rev 16)
@@ -83,4 +83,9 @@
listener.onFactorValueChange(event);
}
}
+
+ @Override
+ public String toString() {
+ return getName();
+ }
}
Modified: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueCellEditor.java
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueCellEditor.java 2011-12-29 14:16:05 UTC (rev 15)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/FactorValueCellEditor.java 2012-01-03 17:28:12 UTC (rev 16)
@@ -26,9 +26,14 @@
import fr.reseaumexico.model.Factor;
import java.awt.Component;
+import java.awt.Insets;
import java.awt.TextField;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
import javax.swing.AbstractCellEditor;
+import javax.swing.JButton;
import javax.swing.JTable;
+import javax.swing.SwingConstants;
import javax.swing.table.TableCellEditor;
/**
@@ -36,13 +41,25 @@
* @since 0.1
*/
public class FactorValueCellEditor extends AbstractCellEditor
- implements TableCellEditor {
+ implements TableCellEditor, ActionListener {
private static final long serialVersionUID = 1L;
- protected String currentValue;
+ protected JTable table;
+ protected Factor factor;
+ protected Object currentValue;
+ protected JButton button;
public FactorValueCellEditor() {
+ //Set up the editor (from the table's point of view),
+ //which is a button.
+ //This button brings up the color chooser dialog,
+ //which is the editor from the user's point of view.
+ button = new JButton();
+ button.addActionListener(this);
+ button.setBorderPainted(false);
+ button.setHorizontalAlignment(SwingConstants.LEFT);
+ button.setMargin(new Insets(0,0,0,0));
}
@Override
@@ -51,13 +68,25 @@
}
@Override
- public Component getTableCellEditorComponent(JTable table, Object oldValue, boolean isSelected, int row, int column) {
-
+ public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
// get factor
// TODO sletellier 20111221 : Take care of type
- Factor factor = (Factor) table.getValueAt(row, 0);
- currentValue = (String)FactorValueEditorFactory.getInstance().edit(table, factor, oldValue);
+ factor = (Factor) table.getValueAt(row, 0);
- return new TextField(currentValue);
+ currentValue = value;
+ button.setText(String.valueOf(currentValue));
+ return button;
}
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ // get factor
+ // TODO sletellier 20111221 : Take care of type
+ Object editedValue = FactorValueEditorFactory.getInstance().edit(table, factor, currentValue);
+ if (editedValue != null) {
+ currentValue = editedValue;
+ button.setText(String.valueOf(currentValue));
+ }
+ fireEditingStopped();
+ }
}
Modified: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java 2011-12-29 14:16:05 UTC (rev 15)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/editor/InputDesignEditorHandler.java 2012-01-03 17:28:12 UTC (rev 16)
@@ -44,7 +44,10 @@
public void addScenario(InputDesignEditor editor) {
InputDesign inputDesign = editor.getInputDesign();
- String selectedName = JOptionPane.showInputDialog(editor, _("jmexico.scenario.inputName"));
+ String selectedName = JOptionPane.showInputDialog(editor,
+ _("jmexico.scenario.inputName"),
+ _("jmexico.scenario.inputName.title"),
+ JOptionPane.QUESTION_MESSAGE);
// check that name is never used
Collection<Scenario> scenarios = inputDesign.getScenario();
@@ -88,6 +91,22 @@
}
public void removeScenario(InputDesignEditor editor) {
+ InputDesign inputDesign = editor.getInputDesign();
+ // show scenario select dialog
+ Collection<Scenario> scenarios = inputDesign.getScenario();
+ Scenario scenario = (Scenario)JOptionPane.showInputDialog(
+ editor,
+ _("jmexico.scenario.selectRemove"),
+ _("jmexico.scenario.selectRemove.title"),
+ JOptionPane.PLAIN_MESSAGE,
+ null,
+ scenarios.toArray(),
+ null);
+
+ // if scenario is selected
+ if (scenario != null) {
+ inputDesign.removeScenario(scenario);
+ }
}
}
Modified: trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/model/InputDesignTableModel.java
===================================================================
--- trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/model/InputDesignTableModel.java 2011-12-29 14:16:05 UTC (rev 15)
+++ trunk/jmexico-swing-editor/src/main/java/fr/reseaumexico/editor/ui/model/InputDesignTableModel.java 2012-01-03 17:28:12 UTC (rev 16)
@@ -29,11 +29,12 @@
import fr.reseaumexico.model.Scenario;
import fr.reseaumexico.model.event.InputDesignScenarioEvent;
import fr.reseaumexico.model.event.InputDesignScenarioListener;
-import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
@@ -50,6 +51,7 @@
protected TableModel delegate;
protected InputDesign inputDesign;
+ protected List<Factor> factors;
public InputDesignTableModel() {
delegate = new DefaultTableModel();
@@ -59,6 +61,18 @@
this.inputDesign = inputDesign;
inputDesign.addInputDesignScenarioListener(this);
+ // extract factors
+ factors = new LinkedList<Factor>(inputDesign.getExperimentDesign().getFactor());
+
+ // sort on id
+ Collections.sort(factors, new Comparator<Factor>() {
+
+ @Override
+ public int compare(Factor o1, Factor o2) {
+ return o1.getId().compareTo(o2.getId());
+ }
+ });
+
fireTableStructureChanged();
}
@@ -85,7 +99,7 @@
}
public Factor getFactor(int i) {
- return inputDesign.getExperimentDesign().getFactor(i);
+ return factors.get(i);
}
@Override
@@ -93,7 +107,6 @@
if (inputDesign == null) {
return delegate.getRowCount();
}
- Collection<Factor> factors = inputDesign.getExperimentDesign().getFactor();
return factors == null ? 0 : factors.size();
}
@@ -162,7 +175,8 @@
}
Map<Factor,Object> factorValues = scenario.getFactorValues();
- return factorValues.get(factor);
+ Object result = factorValues.get(factor);
+ return result;
}
@Override
@@ -181,9 +195,7 @@
Map<Factor,Object> factorValues = scenario.getFactorValues();
// get key if rowIndex
- Set<Factor> factors = factorValues.keySet();
- List<Factor> factorsList = new ArrayList<Factor>(factors);
- Factor factor = factorsList.get(rowIndex);
+ Factor factor = getFactor(rowIndex);
factorValues.put(factor, o);
scenario.setFactorValues(factorValues);
Modified: trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties
===================================================================
--- trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties 2011-12-29 14:16:05 UTC (rev 15)
+++ trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_en_GB.properties 2012-01-03 17:28:12 UTC (rev 16)
@@ -9,3 +9,6 @@
jmexico.menu.file.save=Save
jmexico.remove.scenario=Suppression d'un scenario
jmexico.scenario.inputName=Name of scenario to add \:
+jmexico.scenario.inputName.title=
+jmexico.scenario.selectRemove=
+jmexico.scenario.selectRemove.title=
Modified: trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties
===================================================================
--- trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties 2011-12-29 14:16:05 UTC (rev 15)
+++ trunk/jmexico-swing-editor/src/main/resources/i18n/jmexico-swing-editor_fr_FR.properties 2012-01-03 17:28:12 UTC (rev 16)
@@ -9,3 +9,6 @@
jmexico.menu.file.save=Sauvegarder
jmexico.remove.scenario=Suppression d'un scenario
jmexico.scenario.inputName=Nom du scénario à ajouter \:
+jmexico.scenario.inputName.title=
+jmexico.scenario.selectRemove=
+jmexico.scenario.selectRemove.title=
1
0