Buix-commits
Threads by month
- ----- 2026 -----
- August
- July
- 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
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- 1440 discussions
r933 - lutinjaxx/trunk/jaxx-example/Calculator
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 20:43:58 +0000 (Wed, 15 Oct 2008)
New Revision: 933
Added:
lutinjaxx/trunk/jaxx-example/Calculator/pom.xml
Log:
each example is a module
Added: lutinjaxx/trunk/jaxx-example/Calculator/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Calculator/pom.xml (rev 0)
+++ lutinjaxx/trunk/jaxx-example/Calculator/pom.xml 2008-10-15 20:43:58 UTC (rev 933)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-example</artifactId>
+ <version>0.5-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.codelutin.jaxx-example</groupId>
+ <artifactId>Calculator</artifactId>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>Calculator example</name>
+ <version>0.5-SNAPSHOT</version>
+ <inceptionYear>2008</inceptionYear>
+ <description>Jaxx Calculator example</description>
+ <!--url>${example.home.url}</url-->
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>jar</packaging>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ </plugin>
+
+
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+ <scm>
+ <connection>${scm.connection.example}</connection>
+ <developerConnection>${scm.developerConnection.example}</developerConnection>
+ <url>${scm.url.example}</url>
+ </scm>
+</project>
\ No newline at end of file
1
0
r932 - lutinjaxx/trunk/jaxx-example/Calculator
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 20:43:42 +0000 (Wed, 15 Oct 2008)
New Revision: 932
Removed:
lutinjaxx/trunk/jaxx-example/Calculator/pom.xml
Log:
each example is a module
Deleted: lutinjaxx/trunk/jaxx-example/Calculator/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Calculator/pom.xml 2008-10-15 20:39:50 UTC (rev 931)
+++ lutinjaxx/trunk/jaxx-example/Calculator/pom.xml 2008-10-15 20:43:42 UTC (rev 932)
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <!-- ************************************************************* -->
- <!-- *** POM Relationships *************************************** -->
- <!-- ************************************************************* -->
-
- <parent>
- <groupId>org.codelutin</groupId>
- <artifactId>jaxx-example-pom</artifactId>
- <version>0.5-SNAPSHOT</version>
- </parent>
-
- <artifactId>Calculator</artifactId>
-
- <!-- ************************************************************* -->
- <!-- *** Project Information ************************************* -->
- <!-- ************************************************************* -->
- <name>Calculator example</name>
- <version>0.5-SNAPSHOT</version>
- <inceptionYear>2008</inceptionYear>
- <description>Jaxx Calculator example</description>
- <url>${example.home.url}</url>
-
- <!-- ************************************************************* -->
- <!-- *** Build Settings ****************************************** -->
- <!-- ************************************************************* -->
-
- <packaging>jar</packaging>
-
- <build>
- <finalName>${project.artifactId}</finalName>
- <plugins>
-
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- </plugin>
-
- <plugin>
-
- <artifactId>maven-antrun-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
- </plugin>
-
- </plugins>
- </build>
-</project>
\ No newline at end of file
1
0
r931 - lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/images
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 20:39:50 +0000 (Wed, 15 Oct 2008)
New Revision: 931
Added:
lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/images/webstart.gif
Log:
each example is a module
Copied: lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/images/webstart.gif (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/webstart.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/images/webstart.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:mergeinfo
+
1
0
r930 - in lutinjaxx/trunk/jaxx-example: Components Components/src/site/fr/rst/images Counter/src/site/fr/rst/images LabelStyle LabelStyle/src/site/fr/rst/images
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 20:39:38 +0000 (Wed, 15 Oct 2008)
New Revision: 930
Added:
lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/images/webstart.gif
lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/images/webstart.gif
lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/images/webstart.gif
Modified:
lutinjaxx/trunk/jaxx-example/Components/pom.xml
lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml
Log:
each example is a module
Modified: lutinjaxx/trunk/jaxx-example/Components/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Components/pom.xml 2008-10-15 20:39:05 UTC (rev 929)
+++ lutinjaxx/trunk/jaxx-example/Components/pom.xml 2008-10-15 20:39:38 UTC (rev 930)
@@ -11,12 +11,23 @@
<parent>
<groupId>org.codelutin</groupId>
- <artifactId>jaxx-example-pom</artifactId>
+ <artifactId>jaxx-example</artifactId>
<version>0.5-SNAPSHOT</version>
</parent>
+ <groupId>org.codelutin.jaxx-example</groupId>
<artifactId>Components</artifactId>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
Copied: lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/images/webstart.gif (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/webstart.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/images/webstart.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:mergeinfo
+
Copied: lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/images/webstart.gif (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/webstart.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/images/webstart.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:mergeinfo
+
Modified: lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml 2008-10-15 20:39:05 UTC (rev 929)
+++ lutinjaxx/trunk/jaxx-example/LabelStyle/pom.xml 2008-10-15 20:39:38 UTC (rev 930)
@@ -11,12 +11,22 @@
<parent>
<groupId>org.codelutin</groupId>
- <artifactId>jaxx-example-pom</artifactId>
+ <artifactId>jaxx-example</artifactId>
<version>0.5-SNAPSHOT</version>
</parent>
+ <groupId>org.codelutin.jaxx-example</groupId>
<artifactId>LabelStyle</artifactId>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
@@ -51,16 +61,24 @@
<artifactId>maven-jar-plugin</artifactId>
</plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- </plugin>
-
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
</plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
</plugins>
</build>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+ <scm>
+ <connection>${scm.connection.example}</connection>
+ <developerConnection>${scm.developerConnection.example}</developerConnection>
+ <url>${scm.url.example}</url>
+ </scm>
</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/images/webstart.gif (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/webstart.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/images/webstart.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:mergeinfo
+
1
0
r929 - in lutinjaxx/trunk/jaxx-example/Validation: . src/site/fr/rst/images
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 20:39:05 +0000 (Wed, 15 Oct 2008)
New Revision: 929
Added:
lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/images/webstart.gif
Modified:
lutinjaxx/trunk/jaxx-example/Validation/pom.xml
Log:
each example is a module
Modified: lutinjaxx/trunk/jaxx-example/Validation/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/Validation/pom.xml 2008-10-15 20:38:51 UTC (rev 928)
+++ lutinjaxx/trunk/jaxx-example/Validation/pom.xml 2008-10-15 20:39:05 UTC (rev 929)
@@ -11,10 +11,11 @@
<parent>
<groupId>org.codelutin</groupId>
- <artifactId>lutinjaxx</artifactId>
+ <artifactId>jaxx-example</artifactId>
<version>0.5-SNAPSHOT</version>
</parent>
+ <groupId>org.codelutin.jaxx-example</groupId>
<artifactId>Validation</artifactId>
<dependencies>
@@ -34,7 +35,7 @@
<version>0.5-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
<description>Jaxx Validattion (with xwork validation) example</description>
- <url>${example.home.url}</url>
+ <!--url>${example.home.url}</url-->
<!-- ************************************************************* -->
<!-- *** Build Settings ****************************************** -->
@@ -64,13 +65,13 @@
<version>3.0.1</version>
</dependency>
</dependencies>
- <executions>
+ <!--executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
- </executions>
+ </executions-->
</plugin>
<plugin>
@@ -115,22 +116,31 @@
</plugin>
<plugin>
- <artifactId>maven-antrun-plugin</artifactId>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
+ <artifactId>maven-antrun-plugin</artifactId>
</plugin>
-
+
</plugins>
</build>
- <repositories>
+ <!--repositories>
<repository>
<id>dowload-javanet-repository</id>
<name>JavaNetRepository</name>
<url>http://download.java.net/maven/2</url>
</repository>
- </repositories>
+ </repositories-->
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+ <scm>
+ <connection>${scm.connection.example}</connection>
+ <developerConnection>${scm.developerConnection.example}</developerConnection>
+ <url>${scm.url.example}</url>
+ </scm>
</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/images/webstart.gif (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/webstart.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/images/webstart.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:mergeinfo
+
1
0
r928 - in lutinjaxx/trunk: jaxx-core/src/site/fr/rst/examples jaxx-core/src/site/fr/rst/examples/images jaxx-example jaxx-example/src jaxx-example/src/site jaxx-example/src/site/fr jaxx-example/src/site/fr/rst maven-jaxx-plugin/src/examples
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 20:38:51 +0000 (Wed, 15 Oct 2008)
New Revision: 928
Added:
lutinjaxx/trunk/jaxx-example/src/site/
lutinjaxx/trunk/jaxx-example/src/site/fr/
lutinjaxx/trunk/jaxx-example/src/site/fr/rst/
lutinjaxx/trunk/jaxx-example/src/site/fr/rst/index.rst
Removed:
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Validation.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Calculator-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Components-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Counter-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/LabelStyle-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Validation-screenshot.jaxx.png
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/
Modified:
lutinjaxx/trunk/jaxx-example/
lutinjaxx/trunk/jaxx-example/pom.xml
Log:
each example is a module
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator.jaxx.rst 2008-10-15 20:36:29 UTC (rev 927)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator.jaxx.rst 2008-10-15 20:38:51 UTC (rev 928)
@@ -1,30 +0,0 @@
-===================
-Examples/Calculator
-===================
-
-This is an implementation of Challenge #2 from the `XUL Grand Coding Challenge 2004`_ . Because this example program
-has been implemented in so many different languages, you can easily compare JAXX's
-syntax against the competition and decide for yourself which you prefer.
-
-Screen shot
------------
-
-.. image:: images/Calculator-screenshot.gif
-
-Set it in action
-----------------
-
-|webstart|
-
-To run this example in `Java Web Start`_, click the `following link`_.
-
-Source code
------------
-
-.. _XUL Grand Coding Challenge 2004: http://xul.sourceforge.net/challenge.html
-
-.. _Java Web Start: http://java.sun.com/products/javawebstart/
-
-.. |webstart| image:: images/webstart.gif
-
-.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst 2008-10-15 20:36:29 UTC (rev 927)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst 2008-10-15 20:38:51 UTC (rev 928)
@@ -1,33 +0,0 @@
-===================
-Examples/Components
-===================
-
-The Components demo displays many different Swing components being used in a variety of ways; it is JAXX's equivalent
-of the SwingSet demo. Various pages use advanced features such as data binding, scripting, event handling, and
-CSS stylesheets.
-
-Screen shot
------------
-
-.. image:: images/Components-screenshot.gif
-
-Set it in action
-----------------
-
-|webstart|
-
-To run this example in `Java Web Start`_, click the `following link`_.
-
-
-Source code
------------
-
-Unlike the other examples, the source code for Components is too big to display here. You can view it yourself by
-downloading JAXX, and you can also view the source code for the individual demos by clicking the "Source" tabs.
-
-
-.. _Java Web Start: http://java.sun.com/products/javawebstart/
-
-.. |webstart| image:: images/webstart.gif
-
-.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter.jaxx.rst 2008-10-15 20:36:29 UTC (rev 927)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter.jaxx.rst 2008-10-15 20:38:51 UTC (rev 928)
@@ -1,28 +0,0 @@
-================
-Examples/Counter
-================
-
-
-Screen shot
------------
-
-.. image:: images/Counter-screenshot.gif
-
-Set it in action
-----------------
-
-
-|webstart|
-
-To run this example in `Java Web Start`_, click the `following link`_.
-
-
-Source code
------------
-
-
-.. _Java Web Start: http://java.sun.com/products/javawebstart/
-
-.. |webstart| image:: images/webstart.gif
-
-.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
\ No newline at end of file
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst 2008-10-15 20:36:29 UTC (rev 927)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst 2008-10-15 20:38:51 UTC (rev 928)
@@ -1,28 +0,0 @@
-====================
-Examples/LabelStyles
-====================
-
-This example program creates a number of components which are used to control the appearance of a JLabel.
-Everything is performed through data binding; there are no script tags or explicit event handlers anywhere.
-
-Screen shot
------------
-
-.. image:: images/LabelStyle-screenshot.gif
-
-Set it in action
-----------------
-
-|webstart|
-
-To run this example in `Java Web Start`_, click the `following link`_.
-
-
-Source code
------------
-
-.. _Java Web Start: http://java.sun.com/products/javawebstart/
-
-.. |webstart| image:: images/webstart.gif
-
-.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Validation.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Validation.jaxx.rst 2008-10-15 20:36:29 UTC (rev 927)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Validation.jaxx.rst 2008-10-15 20:38:51 UTC (rev 928)
@@ -1,28 +0,0 @@
-=====================
-Examples/LabelStyles2
-=====================
-
-This example program creates a number of components which are used to control the appearance of a JLabel.
-Everything is performed through data binding; there are no script tags or explicit event handlers anywhere.
-
-Screen shot
------------
-
-.. image:: images/Validation-screenshot.gif
-
-Set it in action
-----------------
-
-|webstart|
-
-To run this example in `Java Web Start`_, click the `following link`_.
-
-
-Source code
------------
-
-.. _Java Web Start: http://java.sun.com/products/javawebstart/
-
-.. |webstart| image:: images/webstart.png
-
-.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Calculator-screenshot.gif
===================================================================
(Binary files differ)
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Components-screenshot.gif
===================================================================
(Binary files differ)
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Counter-screenshot.gif
===================================================================
(Binary files differ)
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/LabelStyle-screenshot.gif
===================================================================
(Binary files differ)
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Validation-screenshot.jaxx.png
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example
___________________________________________________________________
Name: svn:ignore
+ target
Modified: lutinjaxx/trunk/jaxx-example/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-example/pom.xml 2008-10-15 20:36:29 UTC (rev 927)
+++ lutinjaxx/trunk/jaxx-example/pom.xml 2008-10-15 20:38:51 UTC (rev 928)
@@ -15,7 +15,7 @@
<version>0.5-SNAPSHOT</version>
</parent>
- <artifactId>jaxx-example-pom</artifactId>
+ <artifactId>jaxx-example</artifactId>
<dependencies>
@@ -27,10 +27,17 @@
</dependencies>
+ <modules>
+ <module>Calculator</module>
+ <!--module>Components</module-->
+ <module>Counter</module>
+ <module>LabelStyle</module>
+ <module>Validation</module>
+ </modules>
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
- <name>jaxx example pom</name>
+ <name>jaxx-example</name>
<version>0.5-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
<description>Jaxx Example super pom</description>
@@ -53,6 +60,21 @@
<keystorealias>CodeLutin</keystorealias>
<keystorepass>codelutin</keystorepass>
+ <!-- override this property to define scm url property -->
+ <scm.url.example>
+ http://${labs.host}/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk/jaxx-example/${pom.artifactId}/?root=${labs.project}
+ </scm.url.example>
+
+ <!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance -->
+ <scm.developerConnection.example>
+ scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/lutinjaxx/trunk/jaxx-example/${pom.artifactId}
+ </scm.developerConnection.example>
+
+ <!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance -->
+ <scm.connection.example>
+ scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/lutinjaxx/trunk/jaxx-example/${pom.artifactId}
+ </scm.connection.example>
+
</properties>
<build>
@@ -106,10 +128,10 @@
<!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
<execution>
<id>JnlpSun</id>
- <phase>package</phase>
+ <phase>pre-site</phase>
<configuration>
<tasks>
- <copy file="${project.basedir}/src/main/jnlp/sun.jnlp"
+ <copy file="${project.basedir}/../src/main/jnlp/sun.jnlp"
todir="${project.basedir}/target/jnlp" failonerror="false">
<filterset>
<filter token="help" value="javahelp-2.0.02.jar"/>
@@ -119,6 +141,25 @@
<copy file="${project.build.directory}/lib/javahelp-2.0.02.jar"
todir="${project.basedir}/target/jnlp/lib" failonerror="false"/>
</tasks>
+ <!--/configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>JnlpToSite</id>
+ <phase>pre-site</phase>
+ <configuration-->
+ <tasks>
+ <mkdir dir="${maven.site.gen.dir}/resources/bin"/>
+ <copy todir="${maven.site.gen.dir}/resources/bin" verbose="${maven.verbose}"
+ failonerror="false" overwrite="false">
+ <fileset dir="${project.build.directory}/jnlp">
+ <include name="**"/>
+ </fileset>
+ </copy>
+ </tasks>
</configuration>
<goals>
<goal>run</goal>
@@ -133,7 +174,7 @@
<version>1.0-alpha-2</version>
<executions>
<execution>
- <phase>package</phase>
+ <phase>pre-site</phase>
<goals>
<goal>jnlp</goal>
</goals>
@@ -146,6 +187,7 @@
</excludes>
</dependencies>
<libPath>lib</libPath>
+ <templateDirectory>${project.basedir}/../src/main/jnlp</templateDirectory>
<jnlp>
<outputFile>launch-${project.artifactId}.jnlp</outputFile>
<mainClass>${maven.jar.main.class}</mainClass>
@@ -182,4 +224,13 @@
</pluginManagement>
</build>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+ <scm>
+ <connection>${scm.connection.son}</connection>
+ <developerConnection>${scm.developerConnection.son}</developerConnection>
+ <url>${scm.url.son}</url>
+ </scm>
</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/jaxx-example/src/site/fr/rst/index.rst (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/exemples.rst)
===================================================================
--- lutinjaxx/trunk/jaxx-example/src/site/fr/rst/index.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-example/src/site/fr/rst/index.rst 2008-10-15 20:38:51 UTC (rev 928)
@@ -0,0 +1,28 @@
+========
+Exemples
+========
+
+Here are some simple example programs to give you an idea of what JAXX is all about:
+
+ * JAXXEdit - A complete application written using JAXX for the GUI.
+
+ * Components_
+ Comprehensive demo which displays most of the Swing components. Demonstrates every major feature of JAXX, including data binding, scripting, and CSS stylesheets.
+
+ * LabelStyles_ - Uses data binding to edit the appearance of a JLabel. Shows off the power and usefulness of data binding well.
+
+ * Calculator_ - Four-function calculator. Based on the XUL Grand Coding Challenge.
+
+ * Counter_ - simple data binding and scripting example. Based on the XUL Grand Coding Challenge.
+
+ * Validation_ - simple data validation with xworks and jxlayer.
+
+.. _Components: Components/index.html
+
+.. _LabelStyles: LabelStyle/index.html
+
+.. _Calculator: Calculator/index.html
+
+.. _Counter: Counter/index.html
+
+.. _Validation: Validation/index.html
\ No newline at end of file
Property changes on: lutinjaxx/trunk/jaxx-example/src/site/fr/rst/index.rst
___________________________________________________________________
Name: svn:mergeinfo
+
1
0
r927 - in lutinjaxx/trunk: jaxx-example jaxx-example/Calculator/src jaxx-example/Calculator/src/main/jnlp jaxx-example/Calculator/src/site jaxx-example/Calculator/src/site/fr jaxx-example/Calculator/src/site/fr/rst jaxx-example/Calculator/src/site/fr/rst/images jaxx-example/Components/src jaxx-example/Components/src/site jaxx-example/Components/src/site/fr jaxx-example/Components/src/site/fr/rst jaxx-example/Components/src/site/fr/rst/images jaxx-example/Counter jaxx-example/Counter/src jaxx-
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 20:36:29 +0000 (Wed, 15 Oct 2008)
New Revision: 927
Added:
lutinjaxx/trunk/jaxx-example/Calculator/
lutinjaxx/trunk/jaxx-example/Calculator/src/site/
lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/
lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/
lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/images/
lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/images/Calculator-screenshot.gif
lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/index.rst
lutinjaxx/trunk/jaxx-example/Components/
lutinjaxx/trunk/jaxx-example/Components/src/site/
lutinjaxx/trunk/jaxx-example/Components/src/site/fr/
lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/
lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/images/
lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/images/Components-screenshot.gif
lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/index.rst
lutinjaxx/trunk/jaxx-example/Counter/
lutinjaxx/trunk/jaxx-example/Counter/src/site/
lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/
lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/
lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/images/
lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/images/Counter-screenshot.gif
lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/index.rst
lutinjaxx/trunk/jaxx-example/LabelStyle/
lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/
lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/
lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/
lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/images/
lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/images/LabelStyle-screenshot.gif
lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/index.rst
lutinjaxx/trunk/jaxx-example/Validation/
lutinjaxx/trunk/jaxx-example/Validation/src/main/resources/examples/Validation/Model-validation.xml
lutinjaxx/trunk/jaxx-example/Validation/src/site/
lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/
lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/
lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/Validation.jaxx.rst
lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/images/
lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/images/Validation-screenshot.jaxx.png
Removed:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/sun.jnlp
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/template.vm
Modified:
lutinjaxx/trunk/jaxx-example/Calculator/src/main/jnlp/template.vm
lutinjaxx/trunk/jaxx-example/Counter/pom.xml
Log:
each example is a module (common jnlp resources)
Copied: lutinjaxx/trunk/jaxx-example/Calculator (from rev 920, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator)
Modified: lutinjaxx/trunk/jaxx-example/Calculator/src/main/jnlp/template.vm
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/template.vm 2008-10-15 18:38:36 UTC (rev 920)
+++ lutinjaxx/trunk/jaxx-example/Calculator/src/main/jnlp/template.vm 2008-10-15 20:36:29 UTC (rev 927)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<jnlp
spec="1.0+"
- codebase="$project.Url" href="$outputFile">
+ codebase="$project.Url/bin" href="$outputFile">
<information>
<title>$informationTitle</title>
<vendor>$informationVendor</vendor>
Copied: lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/images/Calculator-screenshot.gif (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Calculator-screenshot.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/images/Calculator-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/index.rst (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator.jaxx.rst)
===================================================================
--- lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/index.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/index.rst 2008-10-15 20:36:29 UTC (rev 927)
@@ -0,0 +1,30 @@
+===================
+Examples/Calculator
+===================
+
+This is an implementation of Challenge #2 from the `XUL Grand Coding Challenge 2004`_ . Because this example program
+has been implemented in so many different languages, you can easily compare JAXX's
+syntax against the competition and decide for yourself which you prefer.
+
+Screen shot
+-----------
+
+.. image:: images/Calculator-screenshot.gif
+
+Set it in action
+----------------
+
+|webstart|
+
+To run this example in `Java Web Start`_, click the `following link`_.
+
+Source code
+-----------
+
+.. _XUL Grand Coding Challenge 2004: http://xul.sourceforge.net/challenge.html
+
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+
+.. |webstart| image:: images/webstart.gif
+
+.. _following link: bin/launch-Calculator.jnlp
Property changes on: lutinjaxx/trunk/jaxx-example/Calculator/src/site/fr/rst/index.rst
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: lutinjaxx/trunk/jaxx-example/Components (from rev 920, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components)
Copied: lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/images/Components-screenshot.gif (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Components-screenshot.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/images/Components-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/index.rst (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst)
===================================================================
--- lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/index.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-example/Components/src/site/fr/rst/index.rst 2008-10-15 20:36:29 UTC (rev 927)
@@ -0,0 +1,33 @@
+===================
+Examples/Components
+===================
+
+The Components demo displays many different Swing components being used in a variety of ways; it is JAXX's equivalent
+of the SwingSet demo. Various pages use advanced features such as data binding, scripting, event handling, and
+CSS stylesheets.
+
+Screen shot
+-----------
+
+.. image:: images/Components-screenshot.gif
+
+Set it in action
+----------------
+
+|webstart|
+
+To run this example in `Java Web Start`_, click the `following link`_.
+
+
+Source code
+-----------
+
+Unlike the other examples, the source code for Components is too big to display here. You can view it yourself by
+downloading JAXX, and you can also view the source code for the individual demos by clicking the "Source" tabs.
+
+
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+
+.. |webstart| image:: images/webstart.gif
+
+.. _following link: bin/launch-Components.jnlp
Copied: lutinjaxx/trunk/jaxx-example/Counter (from rev 920, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter)
Modified: lutinjaxx/trunk/jaxx-example/Counter/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/pom.xml 2008-10-15 18:38:36 UTC (rev 920)
+++ lutinjaxx/trunk/jaxx-example/Counter/pom.xml 2008-10-15 20:36:29 UTC (rev 927)
@@ -11,12 +11,22 @@
<parent>
<groupId>org.codelutin</groupId>
- <artifactId>jaxx-example-pom</artifactId>
+ <artifactId>jaxx-example</artifactId>
<version>0.5-SNAPSHOT</version>
</parent>
+ <groupId>org.codelutin.jaxx-example</groupId>
<artifactId>Counter</artifactId>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
@@ -24,7 +34,7 @@
<version>0.5-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
<description>Jaxx Counter example</description>
- <url>${example.home.url}</url>
+ <!--url>${example.home.url}</url-->
<!-- ************************************************************* -->
<!-- *** Build Settings ****************************************** -->
@@ -51,16 +61,25 @@
<artifactId>maven-jar-plugin</artifactId>
</plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- </plugin>
-
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
</plugin>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
</plugins>
</build>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+ <scm>
+ <connection>${scm.connection.example}</connection>
+ <developerConnection>${scm.developerConnection.example}</developerConnection>
+ <url>${scm.url.example}</url>
+ </scm>
</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/images/Counter-screenshot.gif (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Counter-screenshot.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/images/Counter-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/index.rst (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter.jaxx.rst)
===================================================================
--- lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/index.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-example/Counter/src/site/fr/rst/index.rst 2008-10-15 20:36:29 UTC (rev 927)
@@ -0,0 +1,28 @@
+================
+Examples/Counter
+================
+
+
+Screen shot
+-----------
+
+.. image:: images/Counter-screenshot.gif
+
+Set it in action
+----------------
+
+
+|webstart|
+
+To run this example in `Java Web Start`_, click the `following link`_.
+
+
+Source code
+-----------
+
+
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+
+.. |webstart| image:: images/webstart.gif
+
+.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
\ No newline at end of file
Copied: lutinjaxx/trunk/jaxx-example/LabelStyle (from rev 920, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle)
Copied: lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/images/LabelStyle-screenshot.gif (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/LabelStyle-screenshot.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/images/LabelStyle-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/index.rst (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst)
===================================================================
--- lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/index.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-example/LabelStyle/src/site/fr/rst/index.rst 2008-10-15 20:36:29 UTC (rev 927)
@@ -0,0 +1,28 @@
+====================
+Examples/LabelStyles
+====================
+
+This example program creates a number of components which are used to control the appearance of a JLabel.
+Everything is performed through data binding; there are no script tags or explicit event handlers anywhere.
+
+Screen shot
+-----------
+
+.. image:: images/LabelStyle-screenshot.gif
+
+Set it in action
+----------------
+
+|webstart|
+
+To run this example in `Java Web Start`_, click the `following link`_.
+
+
+Source code
+-----------
+
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+
+.. |webstart| image:: images/webstart.gif
+
+.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Copied: lutinjaxx/trunk/jaxx-example/Validation (from rev 920, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation)
Copied: lutinjaxx/trunk/jaxx-example/Validation/src/main/resources/examples/Validation/Model-validation.xml (from rev 922, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources/examples/Validation/Model-validation.xml)
===================================================================
--- lutinjaxx/trunk/jaxx-example/Validation/src/main/resources/examples/Validation/Model-validation.xml (rev 0)
+++ lutinjaxx/trunk/jaxx-example/Validation/src/main/resources/examples/Validation/Model-validation.xml 2008-10-15 20:36:29 UTC (rev 927)
@@ -0,0 +1,32 @@
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+ <validators>
+ <!-- Field Validators for email field -->
+ <field name="text">
+ <field-validator type="required" short-circuit="true">
+ <message>You must enter a value for text.</message>
+ </field-validator>
+ <field-validator type="email" short-circuit="true">
+ <message>Not a valid e-mail.</message>
+ </field-validator>
+ </field>
+
+ <field name="text2">
+ <field-validator type="required" short-circuit="true">
+ <message>You must enter a value for text.</message>
+ </field-validator>
+ <field-validator type="email" short-circuit="true">
+ <message>Not a valid e-mail.</message>
+ </field-validator>
+ </field>
+ <!-- Plain Validator 1 -->
+ <validator type="expression">
+ <param name="expression">text.startsWith("poussin")</param>
+ <message>Email not starts with poussin</message>
+ </validator>
+ <validator type="expression">
+ <param name="expression">text2.startsWith("chemit")</param>
+ <message>Email not starts with chemit</message>
+ </validator>
+ </validators>
\ No newline at end of file
Copied: lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/Validation.jaxx.rst (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Validation.jaxx.rst)
===================================================================
--- lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/Validation.jaxx.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/Validation.jaxx.rst 2008-10-15 20:36:29 UTC (rev 927)
@@ -0,0 +1,28 @@
+=====================
+Examples/LabelStyles2
+=====================
+
+This example program creates a number of components which are used to control the appearance of a JLabel.
+Everything is performed through data binding; there are no script tags or explicit event handlers anywhere.
+
+Screen shot
+-----------
+
+.. image:: images/Validation-screenshot.gif
+
+Set it in action
+----------------
+
+|webstart|
+
+To run this example in `Java Web Start`_, click the `following link`_.
+
+
+Source code
+-----------
+
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+
+.. |webstart| image:: images/webstart.png
+
+.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Property changes on: lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/Validation.jaxx.rst
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/images/Validation-screenshot.jaxx.png (from rev 920, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Validation-screenshot.jaxx.png)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-example/Validation/src/site/fr/rst/images/Validation-screenshot.jaxx.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/sun.jnlp
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/sun.jnlp 2008-10-15 20:36:12 UTC (rev 926)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/sun.jnlp 2008-10-15 20:36:29 UTC (rev 927)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp spec="1.0+" codebase="@url@" href="sun.jnlp">
- <information>
- <title>Sun MicroSystems</title>
- <vendor>Sun MicroSystems, Inc.</vendor>
- <offline-allowed/>
- </information>
- <resources>
- <jar href="lib/@help@"/>
- </resources>
- <component-desc/>
-</jnlp>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/template.vm
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/template.vm 2008-10-15 20:36:12 UTC (rev 926)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/template.vm 2008-10-15 20:36:29 UTC (rev 927)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp
- spec="1.0+"
- codebase="$project.Url" href="$outputFile">
- <information>
- <title>$informationTitle</title>
- <vendor>$informationVendor</vendor>
- <homepage href="$informationHomepage" />
- <description>$informationDescription</description>
- <offline-allowed />
- </information>
- <resources>
- <j2se version="1.5+" max-heap-size="512m"/>
- $dependencies
- <extension name="sun" href="sun.jnlp"/>
- </resources>
- <security>
- <all-permissions />
- </security>
- <application-desc main-class="$mainClass" />
-</jnlp>
1
0
r926 - in lutinjaxx/trunk/jaxx-example: . src src/main src/main/jnlp
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 20:36:12 +0000 (Wed, 15 Oct 2008)
New Revision: 926
Added:
lutinjaxx/trunk/jaxx-example/src/
lutinjaxx/trunk/jaxx-example/src/main/
lutinjaxx/trunk/jaxx-example/src/main/jnlp/
lutinjaxx/trunk/jaxx-example/src/main/jnlp/sun.jnlp
lutinjaxx/trunk/jaxx-example/src/main/jnlp/template.vm
Log:
each example is a module (common jnlp resources)
Copied: lutinjaxx/trunk/jaxx-example/src/main/jnlp/sun.jnlp (from rev 920, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/sun.jnlp)
===================================================================
--- lutinjaxx/trunk/jaxx-example/src/main/jnlp/sun.jnlp (rev 0)
+++ lutinjaxx/trunk/jaxx-example/src/main/jnlp/sun.jnlp 2008-10-15 20:36:12 UTC (rev 926)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0+" codebase="@url@" href="sun.jnlp">
+ <information>
+ <title>Sun MicroSystems</title>
+ <vendor>Sun MicroSystems, Inc.</vendor>
+ <offline-allowed/>
+ </information>
+ <resources>
+ <jar href="lib/@help@"/>
+ </resources>
+ <component-desc/>
+</jnlp>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/jaxx-example/src/main/jnlp/sun.jnlp
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: lutinjaxx/trunk/jaxx-example/src/main/jnlp/template.vm (from rev 920, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/template.vm)
===================================================================
--- lutinjaxx/trunk/jaxx-example/src/main/jnlp/template.vm (rev 0)
+++ lutinjaxx/trunk/jaxx-example/src/main/jnlp/template.vm 2008-10-15 20:36:12 UTC (rev 926)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp
+ spec="1.0+"
+ codebase="$project.Url/bin" href="$outputFile">
+ <information>
+ <title>$informationTitle</title>
+ <vendor>$informationVendor</vendor>
+ <homepage href="$informationHomepage" />
+ <description>$informationDescription</description>
+ <offline-allowed />
+ </information>
+ <resources>
+ <j2se version="1.5+" max-heap-size="512m"/>
+ $dependencies
+ <extension name="sun" href="sun.jnlp"/>
+ </resources>
+ <security>
+ <all-permissions />
+ </security>
+ <application-desc main-class="$mainClass" />
+</jnlp>
Property changes on: lutinjaxx/trunk/jaxx-example/src/main/jnlp/template.vm
___________________________________________________________________
Name: svn:mergeinfo
+
1
0
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 20:34:57 +0000 (Wed, 15 Oct 2008)
New Revision: 925
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
Log:
no more profile in maven-jaxx-plugin
Modified: lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-15 20:34:31 UTC (rev 924)
+++ lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-15 20:34:57 UTC (rev 925)
@@ -130,30 +130,5 @@
<url>${scm.url.son}</url>
</scm>
- <profiles>
- <profile>
- <id>example</id>
- <properties>
- <maven.test.testFailureIgnore>true</maven.test.testFailureIgnore>
- </properties>
- <build>
- <pluginManagement>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>**/*Test.java</include>
- <include>org/codelutin/jaxx/BuildExamples.java</include>
- </includes>
- </configuration>
- </plugin>
- </plugins>
-
- </pluginManagement>
- </build>
- </profile>
- </profiles>
+
</project>
1
0
Author: tchemit
Date: 2008-10-15 20:34:31 +0000 (Wed, 15 Oct 2008)
New Revision: 924
Modified:
lutinjaxx/trunk/pom.xml
Log:
do example only with specified profile since it takes a time...
Modified: lutinjaxx/trunk/pom.xml
===================================================================
--- lutinjaxx/trunk/pom.xml 2008-10-15 19:02:34 UTC (rev 923)
+++ lutinjaxx/trunk/pom.xml 2008-10-15 20:34:31 UTC (rev 924)
@@ -22,7 +22,6 @@
<module>jaxx-core</module>
<module>jaxx-swing-action</module>
<module>maven-jaxx-plugin</module>
- <module>jaxx-example</module>
</modules>
<dependencies>
@@ -201,4 +200,12 @@
<url>${maven.scm.url}</url>
</scm>
+ <profiles>
+ <profile>
+ <id>example</id>
+ <modules>
+ <module>jaxx-example</module>
+ </modules>
+ </profile>
+ </profiles>
</project>
1
0
r923 - lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 19:02:34 +0000 (Wed, 15 Oct 2008)
New Revision: 923
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml
Log:
change groupId
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml 2008-10-15 18:42:15 UTC (rev 922)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml 2008-10-15 19:02:34 UTC (rev 923)
@@ -11,7 +11,7 @@
<parent>
<groupId>org.codelutin</groupId>
- <artifactId>jaxx-example-pom</artifactId>
+ <artifactId>jaxx-example</artifactId>
<version>0.5-SNAPSHOT</version>
</parent>
@@ -20,6 +20,7 @@
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
+ <groupId>org.codelutin.jaxx-example</groupId>
<name>Calculator example</name>
<version>0.5-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
1
0
r922 - lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources/examples/Validation
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 18:42:15 +0000 (Wed, 15 Oct 2008)
New Revision: 922
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources/examples/Validation/Model-validation.xml
Log:
example validation
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources/examples/Validation/Model-validation.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources/examples/Validation/Model-validation.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources/examples/Validation/Model-validation.xml 2008-10-15 18:42:15 UTC (rev 922)
@@ -0,0 +1,32 @@
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+ <validators>
+ <!-- Field Validators for email field -->
+ <field name="text">
+ <field-validator type="required" short-circuit="true">
+ <message>You must enter a value for text.</message>
+ </field-validator>
+ <field-validator type="email" short-circuit="true">
+ <message>Not a valid e-mail.</message>
+ </field-validator>
+ </field>
+
+ <field name="text2">
+ <field-validator type="required" short-circuit="true">
+ <message>You must enter a value for text.</message>
+ </field-validator>
+ <field-validator type="email" short-circuit="true">
+ <message>Not a valid e-mail.</message>
+ </field-validator>
+ </field>
+ <!-- Plain Validator 1 -->
+ <validator type="expression">
+ <param name="expression">text.startsWith("poussin")</param>
+ <message>Email not starts with poussin</message>
+ </validator>
+ <validator type="expression">
+ <param name="expression">text2.startsWith("chemit")</param>
+ <message>Email not starts with chemit</message>
+ </validator>
+ </validators>
\ No newline at end of file
1
0
r920 - in lutinjaxx/trunk: jaxx-core jaxx-core/src/main/java/jaxx/runtime jaxx-core/src/site/fr/rst jaxx-core/src/site/fr/rst/examples jaxx-core/src/site/fr/rst/examples/images maven-jaxx-plugin/src/examples maven-jaxx-plugin/src/test/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 18:38:36 +0000 (Wed, 15 Oct 2008)
New Revision: 920
Added:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/BeanValidator.java
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Validation.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Validation-screenshot.jaxx.png
Removed:
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles2.jaxx.rst
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/
Modified:
lutinjaxx/trunk/jaxx-core/pom.xml
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/exemples.rst
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java
Log:
introduce BeanValidator + example for validation
Modified: lutinjaxx/trunk/jaxx-core/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-core/pom.xml 2008-10-15 18:35:54 UTC (rev 919)
+++ lutinjaxx/trunk/jaxx-core/pom.xml 2008-10-15 18:38:36 UTC (rev 920)
@@ -43,6 +43,16 @@
<artifactId>javahelp</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.opensymphony</groupId>
+ <artifactId>xwork</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.swinglabs</groupId>
+ <artifactId>jxlayer</artifactId>
+ </dependency>
+
</dependencies>
<!-- ************************************************************* -->
Added: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/BeanValidator.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/BeanValidator.java (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/runtime/BeanValidator.java 2008-10-15 18:38:36 UTC (rev 920)
@@ -0,0 +1,494 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package jaxx.runtime;
+
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ValidationAwareSupport;
+import com.opensymphony.xwork2.config.Configuration;
+import com.opensymphony.xwork2.config.ConfigurationManager;
+import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.ValueStackFactory;
+import com.opensymphony.xwork2.validator.ActionValidatorManager;
+import com.opensymphony.xwork2.validator.DelegatingValidatorContext;
+import com.opensymphony.xwork2.validator.ValidationException;
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Graphics2D;
+import java.awt.Insets;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.image.BufferedImage;
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import javax.swing.BorderFactory;
+import javax.swing.JComponent;
+import javax.swing.JList;
+import javax.swing.ListModel;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jdesktop.jxlayer.JXLayer;
+import org.jdesktop.jxlayer.plaf.AbstractLayerUI;
+
+/**
+ * <p>
+ * Permet d'ajouter facilement le support de la validation des champs d'un
+ * bean et de le relier a une interface graphique.
+ * Utilise xwork pour la validation et JXLayer pour la visualisation.
+ *
+ * <p>
+ * Le mieux pour son integration dans Jaxx est de faire de la generation pour
+ * force la compilation du code suivant:
+ *
+ * <pre>
+ * myValidor.getBean().get<field>();
+ * </pre>
+ *
+ * et ceci pour chaque field ajoute a la map fieldRepresentation. De cette
+ * facon meme si le champs field est en texte on a une verification de son
+ * existance a la compilation.
+ *
+ * <p>
+ * La representation en tag pourrait etre
+ * <pre>
+ *
+ * <validator id="myValidator" beanClass="{Personne.class}" errorList="$list">
+ * <field name="name" component="$name"/>
+ * <field name="firstName" component="$firstName"/>
+ * <field name="birthDate" component="$birthDate"/>
+ * </validator>
+ *
+ * <validator beanClass="{Personne.class}" autoField="true" errorList="$list">
+ * <fieldRepresentation name="name" component="$lastName"/>
+ * </validator>
+ *
+ * </pre>
+ *
+ * dans le premier exemple on fait un mapping explicite des champs, mais on voit
+ * que le nom du composant graphique est le meme que celui du champs. Pour eviter
+ * de longue saisie, il est possible d'utiliser le flag <b>autoField</b>
+ * qui pour chaque champs du ayant une methode get du bean recherche un composant
+ * avec cet Id. Il est aussi possible de surcharge un champs explicitement
+ * comme ici name, dans le cas ou le composant qui porterait ce nom serait
+ * utilise pour autre chose.
+ *
+ * <p>
+ * Il faut un handler particulier pour ce composant car les attributs
+ * <b>beanClass</b> et <b>autoField</b> ne sont present que dans le XML jaxx et
+ * servent a la generation. Il faut aussi prendre en compte les elements
+ * fieldRepresentation fils du tag validator.
+ *
+ * <p>
+ * Voici ce que pourrait etre le code genere par jaxx
+ * <pre>
+ * // declaration du bean
+ * BeanValidator<beanClass> $myValidator;
+ *
+ * // init du bean
+ * protected void createMyValidator() {
+ * $myValidator = new BeanValidator<beanClass>();
+ *
+ * // genere seulement si autoField = true
+ * for (Method m : beanClass.getMethod()) {
+ * if (m.getName().startsWith("get")) {
+ * String fieldName = m.getName().substring(3).toLowerCase();
+ * $myValidator.setFieldRepresentation(fieldName, $objectMap.get(fieldName));
+ * }
+ * }
+ *
+ * // pour chaque tag fieldRepresentation
+ * myValidator.setFieldRepresentation("name", $lastName);
+ *
+ * // si beanClass est specifie et n'est pas Object, on force l'acces au champs
+ * // pour validation a la compilation
+ * $myValidator.getBean().getName();
+ *
+ * $objectMap.put("myValidator", $myValidator);
+ * }
+ * </pre>
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class BeanValidator<T> {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(BeanValidator.class);
+
+ protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+
+ protected ValidationAwareSupport validationSupport = new ValidationAwareSupport();
+ protected DelegatingValidatorContext validationContext =
+ new DelegatingValidatorContext(validationSupport);
+
+ protected transient ActionValidatorManager validator = null;
+
+ /** indique si le bean a ete modifie depuis sont arrive */
+ protected boolean changed = false;
+ /** le bean a surveiller */
+ protected T bean = null;
+ /** l'objet qui recoit les notifications de modification du bean */
+ protected Listener l = new Listener();
+ /** permet de faire le lien en un champs du bean et l'objet qui permet de l'editer */
+ protected Map<String, JComponent> fieldRepresentation = new HashMap<String, JComponent>();
+ /** Objet servant a afficher toutes les erreurs */
+ protected JList errorList = null;
+
+ public BeanValidator() {
+ }
+
+ /**
+ * Permet de modifier l'objet permettant d'afficher toutes les errors
+ * @param errorList si null arrete d'afficher les errors
+ */
+ public void setErrorList(JList errorList) {
+ this.errorList = errorList;
+ }
+
+ public JList getErrorList() {
+ return errorList;
+ }
+
+ /**
+ * Permet d'indiquer le composant graphique responsable de l'affichage
+ * d'un attribut du bean
+ * @param fieldname
+ * @param c
+ */
+ public void setFieldRepresentation(String fieldname, JComponent c) {
+ JComponent old = fieldRepresentation.put(fieldname, c);
+ setErrorRepresentation(fieldname, old, c);
+ }
+
+ public void setFieldRepresentation(Map<String, JComponent> fieldRepresentation) {
+ for(Map.Entry<String, JComponent> e : fieldRepresentation.entrySet()) {
+ setFieldRepresentation(e.getKey(), e.getValue());
+ }
+ }
+
+
+
+ public JComponent getFieldRepresentation(String fieldname) {
+ return fieldRepresentation.get(fieldname);
+ }
+
+
+ /**
+ * Retourne vrai si l'objet bean a ete modifie depuis le dernier
+ * {@link #setBean}
+ * @return
+ */
+ public boolean isChanged() {
+ return changed;
+ }
+
+ /**
+ * Permet de force la remise a false de l'etat de changement du bean
+ * @param changed
+ */
+ public void setChanged(boolean changed) {
+ boolean oldChanged = this.changed;
+ this.changed = changed;
+ pcs.firePropertyChange("changed", oldChanged, changed);
+ }
+
+ public T getBean() {
+ return bean;
+ }
+
+ public void setBean(T bean) {
+ T oldBean = this.bean;
+ if (this.bean != null) {
+ try {
+ Method method = this.bean.getClass().getMethod("removePropertyChangeListener", PropertyChangeListener.class);
+ method.invoke(this.bean, l);
+ } catch (Exception eee) {
+ log.info("Can't register as listener", eee);
+ }
+ }
+ this.bean = bean;
+ if (this.bean != null) {
+ try {
+ Method method = this.bean.getClass().getMethod("addPropertyChangeListener", PropertyChangeListener.class);
+ method.invoke(this.bean, l);
+ } catch (Exception eee) {
+ log.info("Can't register as listener", eee);
+ }
+ }
+ validate();
+ pcs.firePropertyChange("bean", oldBean, bean);
+ }
+
+ protected ActionValidatorManager getValidator() {
+ if (validator == null) {
+ ConfigurationManager confManager = new ConfigurationManager();
+ Configuration conf = confManager.getConfiguration();
+
+ ValueStackFactory vsf = conf.getContainer().getInstance(
+ ValueStackFactory.class);
+ ValueStack vs = vsf.createValueStack();
+ ActionContext context = new ActionContext(vs.getContext());
+ ActionContext.setContext(context);
+
+ validator = conf.getContainer().getInstance(
+ ActionValidatorManager.class, "no-annotations");
+ }
+ return validator;
+ }
+
+ /**
+ * il faut eviter le code re-intrant (durant une validation, une autre est
+ * demandee). Pour cela on fait la validation dans un thread, et tant
+ * que la premiere validation n'est pas fini, on ne repond pas aux
+ * solicitations.
+ * Cette method est public pour permettre de force une validation par
+ * programmation, ce qui est utile par exemple si le bean ne supporte
+ * pas les {@link PropertyChangeListener}
+ */
+ public void validate() {
+ // on ne valide que si il y a un bean et que le resultat de la validation
+ // pourra etre affiche quelque part
+ if (bean != null && (getErrorList() != null || fieldRepresentation.size() != 0)) {
+ try {
+
+ validationSupport.clearErrorsAndMessages();
+ getValidator().validate(bean, null, validationContext);
+
+ if(log.isDebugEnabled()) {
+ log.debug("Action errors: " + validationContext.getActionErrors());
+ log.debug("Action messages: " + validationContext.getActionMessages());
+ log.debug("Field errors: " + validationContext.getFieldErrors());
+ }
+
+ System.out.println(validationContext.getFieldErrors());
+
+ // TODO: trouver autre chose
+ // On est obliger de le refaire ici car avec jaxx, lors du
+ // setFieldRepresentation le composant n'a pas encore de pere :(
+ for (String fieldname : fieldRepresentation.keySet()) {
+ JComponent c = fieldRepresentation.get(fieldname);
+ setErrorRepresentation(fieldname, null, c);
+ }
+ } catch (ValidationException eee) {
+ log.warn("Error during validation", eee);
+ }
+ }
+ }
+
+ protected void setErrorRepresentation(String fieldname, JComponent old, JComponent c) {
+ if (old != c) {
+ if (old != null) {
+ // suppression du jxlayer sous l'ancien composant
+ Container container = old.getParent();
+ if (container instanceof JXLayer) {
+ JXLayer<JComponent> jx = (JXLayer<JComponent>)container;
+ jx.setUI(null);
+ }
+ }
+ if (c != null) {
+ // ajout du jxlayer sous ce composant
+ Container container = c.getParent();
+ if (container instanceof JXLayer) {
+ IconValidationUI ui = new IconValidationUI(fieldname, validationSupport.getFieldErrors());
+// TranslucentValidationUI ui = new TranslucentValidationUI(fieldname, validationSupport.getFieldErrors());
+ ui.setEnabled(true);
+
+ JXLayer<JComponent> jx = (JXLayer<JComponent>)container;
+ jx.setUI(ui);
+ }
+ }
+ }
+ }
+
+ /**
+ * Permet d'afficher les messages d'error dans L'ui
+ */
+ protected ListModel getListModel() {
+ // FIXME a implanter
+ return null;
+ }
+
+ protected class Listener implements PropertyChangeListener {
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ validate();
+ setChanged(true);
+ }
+
+ }
+
+ /**
+ * recherche les composants portant le meme nom que les champs de la classe
+ * clazz. Cette methode est statique pour pouvoir eventuellement l'utiliser
+ * dans un autre context (je pense par exemple a la generation jaxx).
+ *
+ * <p>
+ * Si la recherche echoue pour quelque raison que se soit, aucune exception
+ * n'est leve, et la map retournee est tout simplement vide ou incomplete
+ *
+ * @param clazz la classe ou recherche les champs
+ * @param container le container ou rechercher les composants d'edition
+ * @return
+ */
+ public static Map<String, JComponent> lookingForEditor(Class clazz, Container container) {
+ Map<String, JComponent> result = new HashMap<String, JComponent>();
+ try {
+ // looking for all component with name set
+ Map<String, JComponent> allNamedComponent = new HashMap<String, JComponent>();
+ List<Container> todo = new LinkedList<Container>();
+ todo.add(container);
+ while (todo.size() > 0) {
+ for (ListIterator<Container> i = todo.listIterator(); i.hasNext();) {
+ Container parent = i.next();
+ i.remove();
+ for (Component c : parent.getComponents()) {
+ if (c instanceof Container) {
+ i.add((Container) c);
+ String name = c.getName();
+ if (c instanceof JComponent &&
+ name != null && !"".equals(name)) {
+ allNamedComponent.put(name, (JComponent)c);
+ }
+ }
+ }
+ }
+ }
+
+ // looking for all properties on class
+ BeanInfo info = Introspector.getBeanInfo(clazz);
+ PropertyDescriptor[] props = info.getPropertyDescriptors();
+
+ // find if one properties have same name that component
+ for (PropertyDescriptor prop : props) {
+ String name = prop.getName();
+ if (allNamedComponent.containsKey(name)) {
+ result.put(name, allNamedComponent.get(name));
+ }
+ }
+
+ } catch (IntrospectionException eee) {
+ log.warn("Can't introspect bean", eee);
+ }
+
+ System.out.println("Result: " + result);
+
+ return result;
+ }
+
+ public static class TranslucentValidationUI extends AbstractLayerUI<JComponent> {
+
+ protected String field = null;
+ protected Map resultValidation = null;
+ public TranslucentValidationUI(String field, Map resultValidation) {
+ this.field = field;
+ this.resultValidation = resultValidation;
+ }
+
+ @Override
+ protected void paintLayer(Graphics2D g2, JXLayer<JComponent> l) {
+ // paints the layer as is
+ super.paintLayer(g2, l);
+
+ // to be in sync with the view if the layer has a border
+ Insets layerInsets = l.getInsets();
+ g2.translate(layerInsets.left, layerInsets.top);
+
+ JComponent view = l.getView();
+ // To prevent painting on view's border
+ Insets insets = view.getInsets();
+ g2.clip(new Rectangle(insets.left, insets.top,
+ view.getWidth() - insets.left - insets.right,
+ view.getHeight() - insets.top - insets.bottom));
+
+ g2.setColor(!resultValidation.containsKey(field) ?
+ Color.GREEN : Color.RED);
+ g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .2f));
+ g2.fillRect(0, 0, l.getWidth(), l.getHeight());
+ }
+ }
+
+ public static class IconValidationUI extends AbstractLayerUI<JComponent> {
+
+ // The red icon to be shown at the layer's corner
+ private final static BufferedImage INVALID_ICON;
+
+ static {
+ int width = 7;
+ int height = 8;
+ INVALID_ICON = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2 = (Graphics2D) INVALID_ICON.getGraphics();
+ g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
+ g2.setColor(Color.RED);
+ g2.fillRect(0, 0, width, height);
+ g2.setColor(Color.WHITE);
+ g2.drawLine(0, 0, width, height);
+ g2.drawLine(0, height, width, 0);
+ g2.dispose();
+ }
+
+ protected String field = null;
+ protected Map resultValidation = null;
+ public IconValidationUI(String field, Map resultValidation) {
+ this.field = field;
+ this.resultValidation = resultValidation;
+ }
+
+ @Override
+ public void installUI(JComponent c) {
+ super.installUI(c);
+ c.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 3));
+ }
+
+ @Override
+ public void uninstallUI(JComponent c) {
+ super.uninstallUI(c);
+ c.setBorder(null);
+ }
+
+ @Override
+ protected void paintLayer(Graphics2D g2, JXLayer<JComponent> l) {
+ super.paintLayer(g2, l);
+
+ // There is no need to take insets into account for this painter
+ if (resultValidation.containsKey(field)) {
+ g2.drawImage(INVALID_ICON, l.getWidth() - INVALID_ICON.getWidth() - 1, 0, null);
+// g2.drawImage(INVALID_ICON, 0, 0, null);
+ }
+ }
+ }
+
+}
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles2.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles2.jaxx.rst 2008-10-15 18:35:54 UTC (rev 919)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles2.jaxx.rst 2008-10-15 18:38:36 UTC (rev 920)
@@ -1,28 +0,0 @@
-=====================
-Examples/LabelStyles2
-=====================
-
-This example program creates a number of components which are used to control the appearance of a JLabel.
-Everything is performed through data binding; there are no script tags or explicit event handlers anywhere.
-
-Screen shot
------------
-
-.. image:: images/LabelStyle-screenshot.gif
-
-Set it in action
-----------------
-
-|webstart|
-
-To run this example in `Java Web Start`_, click the `following link`_.
-
-
-Source code
------------
-
-.. _Java Web Start: http://java.sun.com/products/javawebstart/
-
-.. |webstart| image:: images/webstart.gif
-
-.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Copied: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Validation.jaxx.rst (from rev 915, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles2.jaxx.rst)
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Validation.jaxx.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Validation.jaxx.rst 2008-10-15 18:38:36 UTC (rev 920)
@@ -0,0 +1,28 @@
+=====================
+Examples/LabelStyles2
+=====================
+
+This example program creates a number of components which are used to control the appearance of a JLabel.
+Everything is performed through data binding; there are no script tags or explicit event handlers anywhere.
+
+Screen shot
+-----------
+
+.. image:: images/Validation-screenshot.gif
+
+Set it in action
+----------------
+
+|webstart|
+
+To run this example in `Java Web Start`_, click the `following link`_.
+
+
+Source code
+-----------
+
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+
+.. |webstart| image:: images/webstart.png
+
+.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Validation.jaxx.rst
___________________________________________________________________
Name: svn:mergeinfo
+
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Validation-screenshot.jaxx.png
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Validation-screenshot.jaxx.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/exemples.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/exemples.rst 2008-10-15 18:35:54 UTC (rev 919)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/exemples.rst 2008-10-15 18:38:36 UTC (rev 920)
@@ -15,10 +15,14 @@
* Counter_ - simple data binding and scripting example. Based on the XUL Grand Coding Challenge.
+ * Validation_ - simple data validation with xworks and jxlayer.
+
.. _Components: examples/Components.jaxx.html
.. _LabelStyles: examples/LabelStyles.jaxx.html
.. _Calculator: examples/Calculator.jaxx.html
-.. _Counter: examples/Counter.jaxx.html
\ No newline at end of file
+.. _Counter: examples/Counter.jaxx.html
+
+.. _Validation: examples/Validation.jaxx.html
\ No newline at end of file
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java 2008-10-15 18:35:54 UTC (rev 919)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java 2008-10-15 18:38:36 UTC (rev 920)
@@ -88,6 +88,10 @@
buildExample();
}
+ public void testValidation() throws Exception {
+ buildExample();
+ }
+
protected void buildExample() throws VerificationException, IOException {
verifier.executeGoals(Arrays.asList("jaxx:generate", "package"));
verifier.verifyErrorFreeLog();
1
0
r919 - in lutinjaxx/trunk/maven-jaxx-plugin/src/examples: . LabelStyle2 Validation Validation/src/main Validation/src/main/java/examples Validation/src/main/java/examples/Validation Validation/src/main/resources/examples/Validation
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 18:35:54 +0000 (Wed, 15 Oct 2008)
New Revision: 919
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources/
Removed:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/LabelStyle/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation/BeanValidator.java
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation/Toto.java
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources/examples/Validation/Toto-validation.xml
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation/Validation.jaxx
Log:
introduce BeanValidator + example for validation
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml 2008-10-15 18:33:00 UTC (rev 918)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml 2008-10-15 18:35:54 UTC (rev 919)
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <!-- ************************************************************* -->
- <!-- *** POM Relationships *************************************** -->
- <!-- ************************************************************* -->
-
- <parent>
- <groupId>org.codelutin</groupId>
- <artifactId>lutinjaxx</artifactId>
- <version>0.5-SNAPSHOT</version>
- </parent>
-
- <artifactId>Validattion</artifactId>
-
- <dependencies>
-
- <dependency>
- <groupId>org.codelutin</groupId>
- <artifactId>jaxx-core</artifactId>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>com.opensymphony</groupId>
- <artifactId>xwork</artifactId>
- <version>2.1.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.swinglabs</groupId>
- <artifactId>jxlayer</artifactId>
- <version>3.0.1</version>
- </dependency>
-
- </dependencies>
-
- <!-- ************************************************************* -->
- <!-- *** Project Information ************************************* -->
- <!-- ************************************************************* -->
- <name>Validattion example</name>
- <version>0.5-SNAPSHOT</version>
- <inceptionYear>2008</inceptionYear>
- <description>Jaxx Validattion (with xwork validation) example</description>
- <url>${example.home.url}</url>
-
- <!-- ************************************************************* -->
- <!-- *** Build Settings ****************************************** -->
- <!-- ************************************************************* -->
-
- <packaging>jar</packaging>
-
- <properties>
- <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
- </properties>
- <build>
- <finalName>${project.artifactId}</finalName>
-
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/main/java</src>
- <force>true</force>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.swinglabs</groupId>
- <artifactId>jxlayer</artifactId>
- <version>3.0.1</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <mainClass>${maven.jar.main.class}</mainClass>
- <classpathPrefix>lib/</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
-
- <plugins>
-
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- </plugin>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
- </plugin>
-
- </plugins>
- </build>
-
- <repositories>
- <repository>
- <id>dowload-javanet-repository</id>
- <name>JavaNetRepository</name>
- <url>http://download.java.net/maven/2</url>
- </repository>
- </repositories>
-</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation (from rev 916, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2)
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml 2008-10-15 13:56:48 UTC (rev 916)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/pom.xml 2008-10-15 18:35:54 UTC (rev 919)
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <!-- ************************************************************* -->
- <!-- *** POM Relationships *************************************** -->
- <!-- ************************************************************* -->
-
- <parent>
- <groupId>org.codelutin</groupId>
- <artifactId>jaxx-example-pom</artifactId>
- <version>0.5-SNAPSHOT</version>
- </parent>
-
- <artifactId>LabelStyle2</artifactId>
-
- <!-- ************************************************************* -->
- <!-- *** Project Information ************************************* -->
- <!-- ************************************************************* -->
- <name>LabelStyle2 example</name>
- <version>0.5-SNAPSHOT</version>
- <inceptionYear>2008</inceptionYear>
- <description>Jaxx LabelStyle2 (with xwork validation) example</description>
- <url>${example.home.url}</url>
-
- <!-- ************************************************************* -->
- <!-- *** Build Settings ****************************************** -->
- <!-- ************************************************************* -->
-
- <packaging>jar</packaging>
-
- <build>
- <finalName>${project.artifactId}</finalName>
- <plugins>
-
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- </plugin>
-
- <plugin>
-
- <artifactId>maven-antrun-plugin</artifactId>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
- <artifactId>webstart-maven-plugin</artifactId>
- </plugin>
-
- </plugins>
- </build>
-</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/pom.xml (from rev 917, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/pom.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/pom.xml 2008-10-15 18:35:54 UTC (rev 919)
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.codelutin</groupId>
+ <artifactId>lutinjaxx</artifactId>
+ <version>0.5-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>Validation</artifactId>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>Validattion example</name>
+ <version>0.5-SNAPSHOT</version>
+ <inceptionYear>2008</inceptionYear>
+ <description>Jaxx Validattion (with xwork validation) example</description>
+ <url>${example.home.url}</url>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>jar</packaging>
+
+ <properties>
+ <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+ </properties>
+ <build>
+ <finalName>${project.artifactId}</finalName>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/main/java</src>
+ <force>true</force>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.swinglabs</groupId>
+ <artifactId>jxlayer</artifactId>
+ <version>3.0.1</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ <classpathPrefix>lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>dowload-javanet-repository</id>
+ <name>JavaNetRepository</name>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ </repositories>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation (from rev 917, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation)
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation/BeanValidator.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/BeanValidator.java 2008-10-15 15:20:25 UTC (rev 917)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation/BeanValidator.java 2008-10-15 18:35:54 UTC (rev 919)
@@ -1,494 +0,0 @@
-/* *##%
- * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- *##%*/
-
-package examples.Validation;
-
-
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ValidationAwareSupport;
-import com.opensymphony.xwork2.config.Configuration;
-import com.opensymphony.xwork2.config.ConfigurationManager;
-import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.ValueStackFactory;
-import com.opensymphony.xwork2.validator.ActionValidatorManager;
-import com.opensymphony.xwork2.validator.DelegatingValidatorContext;
-import com.opensymphony.xwork2.validator.ValidationException;
-import java.awt.AlphaComposite;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.Rectangle;
-import java.awt.RenderingHints;
-import java.awt.image.BufferedImage;
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-import javax.swing.BorderFactory;
-import javax.swing.JComponent;
-import javax.swing.JList;
-import javax.swing.ListModel;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jdesktop.jxlayer.JXLayer;
-import org.jdesktop.jxlayer.plaf.AbstractLayerUI;
-
-/**
- * <p>
- * Permet d'ajouter facilement le support de la validation des champs d'un
- * bean et de le relier a une interface graphique.
- * Utilise xwork pour la validation et JXLayer pour la visualisation.
- *
- * <p>
- * Le mieux pour son integration dans Jaxx est de faire de la generation pour
- * force la compilation du code suivant:
- *
- * <pre>
- * myValidor.getBean().get<field>();
- * </pre>
- *
- * et ceci pour chaque field ajoute a la map fieldRepresentation. De cette
- * facon meme si le champs field est en texte on a une verification de son
- * existance a la compilation.
- *
- * <p>
- * La representation en tag pourrait etre
- * <pre>
- *
- * <validator id="myValidator" beanClass="{Personne.class}" errorList="$list">
- * <field name="name" component="$name"/>
- * <field name="firstName" component="$firstName"/>
- * <field name="birthDate" component="$birthDate"/>
- * </validator>
- *
- * <validator beanClass="{Personne.class}" autoField="true" errorList="$list">
- * <fieldRepresentation name="name" component="$lastName"/>
- * </validator>
- *
- * </pre>
- *
- * dans le premier exemple on fait un mapping explicite des champs, mais on voit
- * que le nom du composant graphique est le meme que celui du champs. Pour eviter
- * de longue saisie, il est possible d'utiliser le flag <b>autoField</b>
- * qui pour chaque champs du ayant une methode get du bean recherche un composant
- * avec cet Id. Il est aussi possible de surcharge un champs explicitement
- * comme ici name, dans le cas ou le composant qui porterait ce nom serait
- * utilise pour autre chose.
- *
- * <p>
- * Il faut un handler particulier pour ce composant car les attributs
- * <b>beanClass</b> et <b>autoField</b> ne sont present que dans le XML jaxx et
- * servent a la generation. Il faut aussi prendre en compte les elements
- * fieldRepresentation fils du tag validator.
- *
- * <p>
- * Voici ce que pourrait etre le code genere par jaxx
- * <pre>
- * // declaration du bean
- * BeanValidator<beanClass> $myValidator;
- *
- * // init du bean
- * protected void createMyValidator() {
- * $myValidator = new BeanValidator<beanClass>();
- *
- * // genere seulement si autoField = true
- * for (Method m : beanClass.getMethod()) {
- * if (m.getName().startsWith("get")) {
- * String fieldName = m.getName().substring(3).toLowerCase();
- * $myValidator.setFieldRepresentation(fieldName, $objectMap.get(fieldName));
- * }
- * }
- *
- * // pour chaque tag fieldRepresentation
- * myValidator.setFieldRepresentation("name", $lastName);
- *
- * // si beanClass est specifie et n'est pas Object, on force l'acces au champs
- * // pour validation a la compilation
- * $myValidator.getBean().getName();
- *
- * $objectMap.put("myValidator", $myValidator);
- * }
- * </pre>
- *
- * @author poussin
- * @version $Revision$
- *
- * Last update: $Date$
- * by : $Author$
- */
-public class BeanValidator<T> {
-
- /** to use log facility, just put in your code: log.info(\"...\"); */
- static private Log log = LogFactory.getLog(BeanValidator.class);
-
- protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
-
- protected ValidationAwareSupport validationSupport = new ValidationAwareSupport();
- protected DelegatingValidatorContext validationContext =
- new DelegatingValidatorContext(validationSupport);
-
- protected transient ActionValidatorManager validator = null;
-
- /** indique si le bean a ete modifie depuis sont arrive */
- protected boolean changed = false;
- /** le bean a surveiller */
- protected T bean = null;
- /** l'objet qui recoit les notifications de modification du bean */
- protected Listener l = new Listener();
- /** permet de faire le lien en un champs du bean et l'objet qui permet de l'editer */
- protected Map<String, JComponent> fieldRepresentation = new HashMap<String, JComponent>();
- /** Objet servant a afficher toutes les erreurs */
- protected JList errorList = null;
-
- public BeanValidator() {
- }
-
- /**
- * Permet de modifier l'objet permettant d'afficher toutes les errors
- * @param errorList si null arrete d'afficher les errors
- */
- public void setErrorList(JList errorList) {
- this.errorList = errorList;
- }
-
- public JList getErrorList() {
- return errorList;
- }
-
- /**
- * Permet d'indiquer le composant graphique responsable de l'affichage
- * d'un attribut du bean
- * @param fieldname
- * @param c
- */
- public void setFieldRepresentation(String fieldname, JComponent c) {
- JComponent old = fieldRepresentation.put(fieldname, c);
- setErrorRepresentation(fieldname, old, c);
- }
-
- public void setFieldRepresentation(Map<String, JComponent> fieldRepresentation) {
- for(Map.Entry<String, JComponent> e : fieldRepresentation.entrySet()) {
- setFieldRepresentation(e.getKey(), e.getValue());
- }
- }
-
-
-
- public JComponent getFieldRepresentation(String fieldname) {
- return fieldRepresentation.get(fieldname);
- }
-
-
- /**
- * Retourne vrai si l'objet bean a ete modifie depuis le dernier
- * {@link #setBean}
- * @return
- */
- public boolean isChanged() {
- return changed;
- }
-
- /**
- * Permet de force la remise a false de l'etat de changement du bean
- * @param changed
- */
- public void setChanged(boolean changed) {
- boolean oldChanged = this.changed;
- this.changed = changed;
- pcs.firePropertyChange("changed", oldChanged, changed);
- }
-
- public T getBean() {
- return bean;
- }
-
- public void setBean(T bean) {
- T oldBean = this.bean;
- if (this.bean != null) {
- try {
- Method method = this.bean.getClass().getMethod("removePropertyChangeListener", PropertyChangeListener.class);
- method.invoke(this.bean, l);
- } catch (Exception eee) {
- log.info("Can't register as listener", eee);
- }
- }
- this.bean = bean;
- if (this.bean != null) {
- try {
- Method method = this.bean.getClass().getMethod("addPropertyChangeListener", PropertyChangeListener.class);
- method.invoke(this.bean, l);
- } catch (Exception eee) {
- log.info("Can't register as listener", eee);
- }
- }
- validate();
- pcs.firePropertyChange("bean", oldBean, bean);
- }
-
- protected ActionValidatorManager getValidator() {
- if (validator == null) {
- ConfigurationManager confManager = new ConfigurationManager();
- Configuration conf = confManager.getConfiguration();
-
- ValueStackFactory vsf = conf.getContainer().getInstance(
- ValueStackFactory.class);
- ValueStack vs = vsf.createValueStack();
- ActionContext context = new ActionContext(vs.getContext());
- ActionContext.setContext(context);
-
- validator = conf.getContainer().getInstance(
- ActionValidatorManager.class, "no-annotations");
- }
- return validator;
- }
-
- /**
- * il faut eviter le code re-intrant (durant une validation, une autre est
- * demandee). Pour cela on fait la validation dans un thread, et tant
- * que la premiere validation n'est pas fini, on ne repond pas aux
- * solicitations.
- * Cette method est public pour permettre de force une validation par
- * programmation, ce qui est utile par exemple si le bean ne supporte
- * pas les {@link PropertyChangeListener}
- */
- public void validate() {
- // on ne valide que si il y a un bean et que le resultat de la validation
- // pourra etre affiche quelque part
- if (bean != null && (getErrorList() != null || fieldRepresentation.size() != 0)) {
- try {
-
- validationSupport.clearErrorsAndMessages();
- getValidator().validate(bean, null, validationContext);
-
- if(log.isDebugEnabled()) {
- log.debug("Action errors: " + validationContext.getActionErrors());
- log.debug("Action messages: " + validationContext.getActionMessages());
- log.debug("Field errors: " + validationContext.getFieldErrors());
- }
-
- System.out.println(validationContext.getFieldErrors());
-
- // TODO: trouver autre chose
- // On est obliger de le refaire ici car avec jaxx, lors du
- // setFieldRepresentation le composant n'a pas encore de pere :(
- for (String fieldname : fieldRepresentation.keySet()) {
- JComponent c = fieldRepresentation.get(fieldname);
- setErrorRepresentation(fieldname, null, c);
- }
- } catch (ValidationException eee) {
- log.warn("Error during validation", eee);
- }
- }
- }
-
- protected void setErrorRepresentation(String fieldname, JComponent old, JComponent c) {
- if (old != c) {
- if (old != null) {
- // suppression du jxlayer sous l'ancien composant
- Container container = old.getParent();
- if (container instanceof JXLayer) {
- JXLayer<JComponent> jx = (JXLayer<JComponent>)container;
- jx.setUI(null);
- }
- }
- if (c != null) {
- // ajout du jxlayer sous ce composant
- Container container = c.getParent();
- if (container instanceof JXLayer) {
- IconValidationUI ui = new IconValidationUI(fieldname, validationSupport.getFieldErrors());
-// TranslucentValidationUI ui = new TranslucentValidationUI(fieldname, validationSupport.getFieldErrors());
- ui.setEnabled(true);
-
- JXLayer<JComponent> jx = (JXLayer<JComponent>)container;
- jx.setUI(ui);
- }
- }
- }
- }
-
- /**
- * Permet d'afficher les messages d'error dans L'ui
- */
- protected ListModel getListModel() {
- // FIXME a implanter
- return null;
- }
-
- protected class Listener implements PropertyChangeListener {
-
- public void propertyChange(PropertyChangeEvent evt) {
- validate();
- setChanged(true);
- }
-
- }
-
- /**
- * recherche les composants portant le meme nom que les champs de la classe
- * clazz. Cette methode est statique pour pouvoir eventuellement l'utiliser
- * dans un autre context (je pense par exemple a la generation jaxx).
- *
- * <p>
- * Si la recherche echoue pour quelque raison que se soit, aucune exception
- * n'est leve, et la map retournee est tout simplement vide ou incomplete
- *
- * @param clazz la classe ou recherche les champs
- * @param container le container ou rechercher les composants d'edition
- * @return
- */
- public static Map<String, JComponent> lookingForEditor(Class clazz, Container container) {
- Map<String, JComponent> result = new HashMap<String, JComponent>();
- try {
- // looking for all component with name set
- Map<String, JComponent> allNamedComponent = new HashMap<String, JComponent>();
- List<Container> todo = new LinkedList<Container>();
- todo.add(container);
- while (todo.size() > 0) {
- for (ListIterator<Container> i = todo.listIterator(); i.hasNext();) {
- Container parent = i.next();
- i.remove();
- for (Component c : parent.getComponents()) {
- if (c instanceof Container) {
- i.add((Container) c);
- String name = c.getName();
- if (c instanceof JComponent &&
- name != null && !"".equals(name)) {
- allNamedComponent.put(name, (JComponent)c);
- }
- }
- }
- }
- }
-
- // looking for all properties on class
- BeanInfo info = Introspector.getBeanInfo(clazz);
- PropertyDescriptor[] props = info.getPropertyDescriptors();
-
- // find if one properties have same name that component
- for (PropertyDescriptor prop : props) {
- String name = prop.getName();
- if (allNamedComponent.containsKey(name)) {
- result.put(name, allNamedComponent.get(name));
- }
- }
-
- } catch (IntrospectionException eee) {
- log.warn("Can't introspect bean", eee);
- }
-
- System.out.println("Result: " + result);
-
- return result;
- }
-
- public static class TranslucentValidationUI extends AbstractLayerUI<JComponent> {
-
- protected String field = null;
- protected Map resultValidation = null;
- public TranslucentValidationUI(String field, Map resultValidation) {
- this.field = field;
- this.resultValidation = resultValidation;
- }
-
- @Override
- protected void paintLayer(Graphics2D g2, JXLayer<JComponent> l) {
- // paints the layer as is
- super.paintLayer(g2, l);
-
- // to be in sync with the view if the layer has a border
- Insets layerInsets = l.getInsets();
- g2.translate(layerInsets.left, layerInsets.top);
-
- JComponent view = l.getView();
- // To prevent painting on view's border
- Insets insets = view.getInsets();
- g2.clip(new Rectangle(insets.left, insets.top,
- view.getWidth() - insets.left - insets.right,
- view.getHeight() - insets.top - insets.bottom));
-
- g2.setColor(!resultValidation.containsKey(field) ?
- Color.GREEN : Color.RED);
- g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .2f));
- g2.fillRect(0, 0, l.getWidth(), l.getHeight());
- }
- }
-
- public static class IconValidationUI extends AbstractLayerUI<JComponent> {
-
- // The red icon to be shown at the layer's corner
- private final static BufferedImage INVALID_ICON;
-
- static {
- int width = 7;
- int height = 8;
- INVALID_ICON = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
- Graphics2D g2 = (Graphics2D) INVALID_ICON.getGraphics();
- g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
- g2.setColor(Color.RED);
- g2.fillRect(0, 0, width, height);
- g2.setColor(Color.WHITE);
- g2.drawLine(0, 0, width, height);
- g2.drawLine(0, height, width, 0);
- g2.dispose();
- }
-
- protected String field = null;
- protected Map resultValidation = null;
- public IconValidationUI(String field, Map resultValidation) {
- this.field = field;
- this.resultValidation = resultValidation;
- }
-
- @Override
- public void installUI(JComponent c) {
- super.installUI(c);
- c.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 3));
- }
-
- @Override
- public void uninstallUI(JComponent c) {
- super.uninstallUI(c);
- c.setBorder(null);
- }
-
- @Override
- protected void paintLayer(Graphics2D g2, JXLayer<JComponent> l) {
- super.paintLayer(g2, l);
-
- // There is no need to take insets into account for this painter
- if (resultValidation.containsKey(field)) {
- g2.drawImage(INVALID_ICON, l.getWidth() - INVALID_ICON.getWidth() - 1, 0, null);
-// g2.drawImage(INVALID_ICON, 0, 0, null);
- }
- }
- }
-
-}
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation/Toto.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Toto.java 2008-10-15 15:20:25 UTC (rev 917)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation/Toto.java 2008-10-15 18:35:54 UTC (rev 919)
@@ -1,41 +0,0 @@
-package examples.Validation;
-
-import java.beans.*;
-
-class Toto {
-
- String text = "initial";
-
- PropertyChangeSupport p;
-
- public Toto() {
- p = new PropertyChangeSupport(this);
- }
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- p.addPropertyChangeListener(listener);
- }
-
- public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
- p.addPropertyChangeListener(propertyName, listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- p.removePropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
- p.removePropertyChangeListener(propertyName, listener);
- }
-
-
- public String getText() {
- return text;
- }
-
- public void setText(String text) {
- String oldText = this.text;
- this.text = text;
- p.firePropertyChange("text", oldText, text);
- }
-}
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation/Validation.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Validation.jaxx 2008-10-15 15:20:25 UTC (rev 917)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/java/examples/Validation/Validation.jaxx 2008-10-15 18:35:54 UTC (rev 919)
@@ -1,14 +1,14 @@
<Application title="Validation.jaxx">
<style source="Validation.css"/>
-
+ <Model id='model'/>
<script>
import org.jdesktop.jxlayer.JXLayer;
+import jaxx.runtime.BeanValidator;
-Toto toto = new Toto();
-
BeanValidator validator = new BeanValidator();
validator.setFieldRepresentation("text", text);
-validator.setBean(toto);
+validator.setFieldRepresentation("text2", text2);
+validator.setBean(model);
</script>
<Table anchor='north' fill='both'>
@@ -16,21 +16,21 @@
<cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
<Table anchor='west' fill='both'>
<row>
- <cell><JLabel text='Email:'/></cell>
+ <cell><JLabel text='Text:'/></cell>
<cell weightx='1'>
<org.jdesktop.jxlayer.JXLayer>
- <JTextField id='text' text='{toto.getText()}'
- onKeyReleased='toto.setText(text.getText())'/>
+ <JTextField id='text' text='{model.getText()}'
+ onKeyReleased='model.setText(text.getText())'/>
</org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
<row>
<cell>
- <JLabel text='Email:'/>
+ <JLabel text='Text2 :'/>
</cell>
<cell weightx='1'>
<org.jdesktop.jxlayer.JXLayer>
- <JTextField id='text2' text='{toto.getText()}' onKeyReleased='toto.setText(text2.getText())'/>
+ <JTextField id='text2' text='{model.getText2()}' onKeyReleased='model.setText2(text2.getText())'/>
</org.jdesktop.jxlayer.JXLayer>
</cell>
</row>
@@ -64,7 +64,7 @@
margin='0'
horizontalAlignment='center'
verticalAlignment='middle'>
- <JLabel text='{toto.getText()}' font-size='{csize.getValue()}' foreground='{new Color(red.getValue(), green.getValue(), blue.getValue())}'/>
+ <JLabel text='{model.getText()}' font-size='{csize.getValue()}' foreground='{new Color(red.getValue(), green.getValue(), blue.getValue())}'/>
</VBox>
</JPanel>
</cell>
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources (from rev 917, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources)
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources/examples/Validation/Toto-validation.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/examples/Validation/Toto-validation.xml 2008-10-15 15:20:25 UTC (rev 917)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Validation/src/main/resources/examples/Validation/Toto-validation.xml 2008-10-15 18:35:54 UTC (rev 919)
@@ -1,19 +0,0 @@
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
- <validators>
- <!-- Field Validators for email field -->
- <field name="text">
- <field-validator type="required" short-circuit="true">
- <message>You must enter a value for text.</message>
- </field-validator>
- <field-validator type="email" short-circuit="true">
- <message>Not a valid e-mail.</message>
- </field-validator>
- </field>
- <!-- Plain Validator 1 -->
- <validator type="expression">
- <param name="expression">text.startsWith("poussin")</param>
- <message>Email not starts with poussin</message>
- </validator>
- </validators>
\ No newline at end of file
1
0
Author: tchemit
Date: 2008-10-15 18:33:00 +0000 (Wed, 15 Oct 2008)
New Revision: 918
Added:
lutinjaxx/trunk/jaxx-example/
Removed:
lutinjaxx/trunk/jaxx-example-pom/
Modified:
lutinjaxx/trunk/pom.xml
Log:
rename example pom
Copied: lutinjaxx/trunk/jaxx-example (from rev 916, lutinjaxx/trunk/jaxx-example-pom)
Modified: lutinjaxx/trunk/pom.xml
===================================================================
--- lutinjaxx/trunk/pom.xml 2008-10-15 15:20:25 UTC (rev 917)
+++ lutinjaxx/trunk/pom.xml 2008-10-15 18:33:00 UTC (rev 918)
@@ -21,8 +21,8 @@
<module>jaxx-util</module>
<module>jaxx-core</module>
<module>jaxx-swing-action</module>
- <module>jaxx-example-pom</module>
<module>maven-jaxx-plugin</module>
+ <module>jaxx-example</module>
</modules>
<dependencies>
@@ -59,7 +59,9 @@
<labs.project>buix</labs.project>
<!-- override this property to define scm url property -->
- <scm.url.son>http://${labs.host}/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk/${pom.artifactId}/?root=${labs.project}</scm.url.son>
+ <scm.url.son>
+ http://${labs.host}/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk/${pom.artifactId}/?root=${labs.project}
+ </scm.url.son>
<!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance -->
<scm.developerConnection.son>
@@ -133,6 +135,11 @@
<artifactId>jaxx-swing-action</artifactId>
<version>${current.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-example</artifactId>
+ <version>${current.version}</version>
+ </dependency>
<dependency>
<groupId>com.sun</groupId>
@@ -169,6 +176,19 @@
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>com.opensymphony</groupId>
+ <artifactId>xwork</artifactId>
+ <version>2.1.1-cl_20081015</version>
+ <!--version>2.1.1</version-->
+ </dependency>
+
+ <dependency>
+ <groupId>org.swinglabs</groupId>
+ <artifactId>jxlayer</artifactId>
+ <version>3.0.1</version>
+ </dependency>
+
</dependencies>
</dependencyManagement>
1
0
r917 - in lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2: . src/main src/main/java/examples src/main/java/examples/Validation src/main/resources src/main/resources/examples src/main/resources/examples/Validation
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 15:20:25 +0000 (Wed, 15 Oct 2008)
New Revision: 917
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Model.java
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Validation.css
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Validation.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/examples/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/examples/Validation/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/examples/Validation/Toto-validation.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/log4j.properties
Removed:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/LabelStyle.css
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/LabelStyle.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Toto-validation.xml
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/BeanValidator.java
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Toto.java
Log:
rename example to Validation
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml 2008-10-15 13:56:48 UTC (rev 916)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml 2008-10-15 15:20:25 UTC (rev 917)
@@ -11,19 +11,41 @@
<parent>
<groupId>org.codelutin</groupId>
- <artifactId>jaxx-example-pom</artifactId>
+ <artifactId>lutinjaxx</artifactId>
<version>0.5-SNAPSHOT</version>
</parent>
- <artifactId>LabelStyle2</artifactId>
+ <artifactId>Validattion</artifactId>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.opensymphony</groupId>
+ <artifactId>xwork</artifactId>
+ <version>2.1.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.swinglabs</groupId>
+ <artifactId>jxlayer</artifactId>
+ <version>3.0.1</version>
+ </dependency>
+
+ </dependencies>
+
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
- <name>LabelStyle2 example</name>
+ <name>Validattion example</name>
<version>0.5-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
- <description>Jaxx LabelStyle2 (with xwork validation) example</description>
+ <description>Jaxx Validattion (with xwork validation) example</description>
<url>${example.home.url}</url>
<!-- ************************************************************* -->
@@ -32,15 +54,68 @@
<packaging>jar</packaging>
+ <properties>
+ <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+ </properties>
<build>
<finalName>${project.artifactId}</finalName>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/main/java</src>
+ <force>true</force>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.swinglabs</groupId>
+ <artifactId>jxlayer</artifactId>
+ <version>3.0.1</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ <classpathPrefix>lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
<plugins>
<plugin>
<groupId>org.codelutin</groupId>
<artifactId>maven-jaxx-plugin</artifactId>
</plugin>
-
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -52,7 +127,6 @@
</plugin>
<plugin>
-
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
@@ -63,4 +137,12 @@
</plugins>
</build>
+
+ <repositories>
+ <repository>
+ <id>dowload-javanet-repository</id>
+ <name>JavaNetRepository</name>
+ <url>http://download.java.net/maven/2</url>
+ </repository>
+ </repositories>
</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation (from rev 916, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle)
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/BeanValidator.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/BeanValidator.java 2008-10-15 13:56:48 UTC (rev 916)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/BeanValidator.java 2008-10-15 15:20:25 UTC (rev 917)
@@ -17,7 +17,7 @@
* USA.
*##%*/
-package examples.LabelStyle;
+package examples.Validation;
import com.opensymphony.xwork2.ActionContext;
@@ -38,7 +38,6 @@
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
-import java.beans.BeanDescriptor;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
@@ -52,8 +51,6 @@
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JList;
@@ -85,11 +82,11 @@
* La representation en tag pourrait etre
* <pre>
*
- * <validator id="myValidator" beanClass="{Personne.class}" errorList="$list">
- * <field name="name" component="$name"/>
- * <field name="firstName" component="$firstName"/>
- * <field name="birthDate" component="$birthDate"/>
- * </validator>
+ * <validator id="myValidator" beanClass="{Personne.class}" errorList="$list">
+ * <field name="name" component="$name"/>
+ * <field name="firstName" component="$firstName"/>
+ * <field name="birthDate" component="$birthDate"/>
+ * </validator>
*
* <validator beanClass="{Personne.class}" autoField="true" errorList="$list">
* <fieldRepresentation name="name" component="$lastName"/>
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/LabelStyle.css
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/LabelStyle.css 2008-10-15 13:56:48 UTC (rev 916)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/LabelStyle.css 2008-10-15 15:20:25 UTC (rev 917)
@@ -1,34 +0,0 @@
-JSlider {
- paintTicks: true;
-}
-
-JSlider.color {
- minorTickSpacing: 10;
- majorTickSpacing: 50;
- border: { BorderFactory.createEmptyBorder(1, 1, 1, 1) };
-}
-
-JSlider.color:focused {
- border: { BorderFactory.createLineBorder(Color.BLACK, 1) };
-}
-
-JSlider#red:focused {
- background: #E7ADAD;
-}
-
-JSlider#green:focused {
- background: #B2E7AD;
-}
-
-JSlider#blue:focused {
- background: #ADB2E7;
-}
-
-JSlider#csize {
- minorTickSpacing: 2;
- majorTickSpacing: 6;
-}
-
-JRadioButton {
- enabled: { backgroundCheckbox.isSelected() };
-}
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/LabelStyle.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/LabelStyle.jaxx 2008-10-15 13:56:48 UTC (rev 916)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/LabelStyle.jaxx 2008-10-15 15:20:25 UTC (rev 917)
@@ -1,80 +0,0 @@
-<Application title="LabelStyle.jaxx">
- <style source="LabelStyle.css"/>
-
-<script>
-//import org.jdesktop.jxlayer.JXLayer;
-
-Toto toto = new Toto();
-
-BeanValidator validator = new BeanValidator();
-validator.setFieldRepresentation("text", text);
-validator.setBean(toto);
-</script>
-
- <Table anchor='north' fill='both'>
- <row>
- <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
- <Table anchor='west' fill='both'>
- <row>
- <cell><JLabel text='Text:'/></cell>
- <cell weightx='1'>
- <!--org.jdesktop.jxlayer.JXLayer-->
- <JTextField id='text' text='{toto.getText()}'
- onKeyReleased='toto.setText(text.getText())'/>
- <!--/org.jdesktop.jxlayer.JXLayer-->
- </cell>
- </row>
-
- <row>
- <cell><JLabel text='Red:'/></cell>
- <cell><JSlider id='red' value='128' maximum='255' styleClass='color'/></cell>
- </row>
-
- <row>
- <cell><JLabel text='Green:'/></cell>
- <cell><JSlider id='green' value='0' maximum='255' styleClass='color'/></cell>
- </row>
-
- <row>
- <cell><JLabel text='Blue:'/></cell>
- <cell><JSlider id='blue' value='255' maximum='255' styleClass='color'/></cell>
- </row>
-
- <row>
- <cell><JLabel text='Size:'/></cell>
- <cell><JSlider id='csize' value='36' minimum='6' maximum='60'/></cell>
- </row>
-
- <row>
- <cell columns='2' fill='both' weighty='1'>
- <JPanel border='{BorderFactory.createTitledBorder("Preview")}'
- height='90'
- layout='{new BorderLayout()}'>
- <VBox background='{backgroundCheckbox.isSelected() ? backgroundColor.getSelectedValue() : null}'
- margin='0'
- horizontalAlignment='center'
- verticalAlignment='middle'>
- <JLabel text='{toto.getText()}' font-size='{csize.getValue()}' foreground='{new Color(red.getValue(), green.getValue(), blue.getValue())}'/>
- </VBox>
- </JPanel>
- </cell>
- </row>
- </Table>
- </cell>
-
- <cell>
- <VBox spacing='0' border='{BorderFactory.createTitledBorder("Background")}'>
- <JCheckBox id='backgroundCheckbox' text='Show Background'/>
- <JRadioButton text='Red' buttonGroup='backgroundColor' value='{Color.RED}' selected='true'/>
- <JRadioButton text='Orange' buttonGroup='backgroundColor' value='{Color.ORANGE}'/>
- <JRadioButton text='Yellow' buttonGroup='backgroundColor' value='{Color.YELLOW}'/>
- <JRadioButton text='Green' buttonGroup='backgroundColor' value='{Color.GREEN}'/>
- <JRadioButton text='Cyan' buttonGroup='backgroundColor' value='{Color.CYAN}'/>
- <JRadioButton text='Blue' buttonGroup='backgroundColor' value='{Color.BLUE}'/>
- <JRadioButton text='Purple' buttonGroup='backgroundColor' value='{new Color(160, 30, 255)}'/>
- </VBox>
- </cell>
- </row>
- </Table>
-
-</Application>
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Model.java (from rev 916, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto.java)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Model.java (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Model.java 2008-10-15 15:20:25 UTC (rev 917)
@@ -0,0 +1,54 @@
+package examples.Validation;
+
+import java.beans.*;
+
+public class Model {
+
+ protected String text = "initial";
+
+ protected String text2 = "initial";
+
+ PropertyChangeSupport p;
+
+ public Model() {
+ p = new PropertyChangeSupport(this);
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ p.addPropertyChangeListener(listener);
+ }
+
+ public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ p.removePropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.removePropertyChangeListener(propertyName, listener);
+ }
+
+
+ public String getText() {
+ return text;
+ }
+
+ public String getText2() {
+ return text2;
+ }
+
+ public void setText(String text) {
+ String oldText = this.text;
+ this.text = text;
+ p.firePropertyChange("text", oldText, text);
+ }
+
+ public void setText2(String text2) {
+ String oldText2 = this.text2;
+ this.text2 = text2;
+ p.firePropertyChange("text2", oldText2, text2);
+ }
+
+}
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Model.java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Toto-validation.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto-validation.xml 2008-10-15 13:56:48 UTC (rev 916)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Toto-validation.xml 2008-10-15 15:20:25 UTC (rev 917)
@@ -1,19 +0,0 @@
-<!DOCTYPE validators PUBLIC
- "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
- "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
- <validators>
- <!-- Field Validators for email field -->
- <field name="text">
- <field-validator type="required" short-circuit="true">
- <message>You must enter a value for text.</message>
- </field-validator>
- <field-validator type="email" short-circuit="true">
- <message>Not a valid e-mail.</message>
- </field-validator>
- </field>
- <!-- Plain Validator 1 -->
- <validator type="expression">
- <param name="expression">text.startsWith("poussin")</param>
- <message>Email not starts with poussin</message>
- </validator>
- </validators>
\ No newline at end of file
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Toto.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto.java 2008-10-15 13:56:48 UTC (rev 916)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Toto.java 2008-10-15 15:20:25 UTC (rev 917)
@@ -1,4 +1,4 @@
-package examples.LabelStyle;
+package examples.Validation;
import java.beans.*;
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Validation.css
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Validation.css (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Validation.css 2008-10-15 15:20:25 UTC (rev 917)
@@ -0,0 +1,34 @@
+JSlider {
+ paintTicks: true;
+}
+
+JSlider.color {
+ minorTickSpacing: 10;
+ majorTickSpacing: 50;
+ border: { BorderFactory.createEmptyBorder(1, 1, 1, 1) };
+}
+
+JSlider.color:focused {
+ border: { BorderFactory.createLineBorder(Color.BLACK, 1) };
+}
+
+JSlider#red:focused {
+ background: #E7ADAD;
+}
+
+JSlider#green:focused {
+ background: #B2E7AD;
+}
+
+JSlider#blue:focused {
+ background: #ADB2E7;
+}
+
+JSlider#csize {
+ minorTickSpacing: 2;
+ majorTickSpacing: 6;
+}
+
+JRadioButton {
+ enabled: { backgroundCheckbox.isSelected() };
+}
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Validation.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Validation.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/Validation/Validation.jaxx 2008-10-15 15:20:25 UTC (rev 917)
@@ -0,0 +1,90 @@
+<Application title="Validation.jaxx">
+ <style source="Validation.css"/>
+
+<script>
+import org.jdesktop.jxlayer.JXLayer;
+
+Toto toto = new Toto();
+
+BeanValidator validator = new BeanValidator();
+validator.setFieldRepresentation("text", text);
+validator.setBean(toto);
+</script>
+
+ <Table anchor='north' fill='both'>
+ <row>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell><JLabel text='Email:'/></cell>
+ <cell weightx='1'>
+ <org.jdesktop.jxlayer.JXLayer>
+ <JTextField id='text' text='{toto.getText()}'
+ onKeyReleased='toto.setText(text.getText())'/>
+ </org.jdesktop.jxlayer.JXLayer>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text='Email:'/>
+ </cell>
+ <cell weightx='1'>
+ <org.jdesktop.jxlayer.JXLayer>
+ <JTextField id='text2' text='{toto.getText()}' onKeyReleased='toto.setText(text2.getText())'/>
+ </org.jdesktop.jxlayer.JXLayer>
+ </cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Red:'/></cell>
+ <cell><JSlider id='red' value='128' maximum='255' styleClass='color'/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Green:'/></cell>
+ <cell><JSlider id='green' value='0' maximum='255' styleClass='color'/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Blue:'/></cell>
+ <cell><JSlider id='blue' value='255' maximum='255' styleClass='color'/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Size:'/></cell>
+ <cell><JSlider id='csize' value='36' minimum='6' maximum='60'/></cell>
+ </row>
+
+ <row>
+ <cell columns='2' fill='both' weighty='1'>
+ <JPanel border='{BorderFactory.createTitledBorder("Preview")}'
+ height='90'
+ layout='{new BorderLayout()}'>
+ <VBox background='{(Color)(backgroundCheckbox.isSelected() ? backgroundColor.getSelectedValue() : null)}'
+ margin='0'
+ horizontalAlignment='center'
+ verticalAlignment='middle'>
+ <JLabel text='{toto.getText()}' font-size='{csize.getValue()}' foreground='{new Color(red.getValue(), green.getValue(), blue.getValue())}'/>
+ </VBox>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
+ </cell>
+
+ <cell>
+ <VBox spacing='0' border='{BorderFactory.createTitledBorder("Background")}'>
+ <JCheckBox id='backgroundCheckbox' text='Show Background'/>
+ <JRadioButton text='Red' buttonGroup='backgroundColor' value='{Color.RED}' selected='true'/>
+ <JRadioButton text='Orange' buttonGroup='backgroundColor' value='{Color.ORANGE}'/>
+ <JRadioButton text='Yellow' buttonGroup='backgroundColor' value='{Color.YELLOW}'/>
+ <JRadioButton text='Green' buttonGroup='backgroundColor' value='{Color.GREEN}'/>
+ <JRadioButton text='Cyan' buttonGroup='backgroundColor' value='{Color.CYAN}'/>
+ <JRadioButton text='Blue' buttonGroup='backgroundColor' value='{Color.BLUE}'/>
+ <JRadioButton text='Purple' buttonGroup='backgroundColor' value='{new Color(160, 30, 255)}'/>
+ </VBox>
+ </cell>
+ </row>
+ </Table>
+
+</Application>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/examples/Validation/Toto-validation.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/examples/Validation/Toto-validation.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/examples/Validation/Toto-validation.xml 2008-10-15 15:20:25 UTC (rev 917)
@@ -0,0 +1,19 @@
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+ <validators>
+ <!-- Field Validators for email field -->
+ <field name="text">
+ <field-validator type="required" short-circuit="true">
+ <message>You must enter a value for text.</message>
+ </field-validator>
+ <field-validator type="email" short-circuit="true">
+ <message>Not a valid e-mail.</message>
+ </field-validator>
+ </field>
+ <!-- Plain Validator 1 -->
+ <validator type="expression">
+ <param name="expression">text.startsWith("poussin")</param>
+ <message>Email not starts with poussin</message>
+ </validator>
+ </validators>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/log4j.properties (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/main/resources/log4j.properties)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/log4j.properties (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/log4j.properties 2008-10-15 15:20:25 UTC (rev 917)
@@ -0,0 +1,9 @@
+# Global logging configuration
+log4j.rootLogger=INFO, stdout
+# Console output...
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
+
+#log4j.logger.org.codelutin.jaxx=DEBUG
+log4j.logger.examples=DEBUG
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/resources/log4j.properties
___________________________________________________________________
Name: svn:mergeinfo
+
1
0
r916 - in lutinjaxx/trunk: . jaxx-example-pom maven-jaxx-plugin/src/examples maven-jaxx-plugin/src/examples/Calculator maven-jaxx-plugin/src/examples/Components maven-jaxx-plugin/src/examples/Counter maven-jaxx-plugin/src/examples/LabelStyle maven-jaxx-plugin/src/examples/LabelStyle2 maven-jaxx-plugin/src/examples/LabelStyle2/src maven-jaxx-plugin/src/examples/LabelStyle2/src/main maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 13:56:48 +0000 (Wed, 15 Oct 2008)
New Revision: 916
Added:
lutinjaxx/trunk/jaxx-example-pom/
lutinjaxx/trunk/jaxx-example-pom/LICENSE.txt
lutinjaxx/trunk/jaxx-example-pom/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/BeanValidator.java
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/LabelStyle.css
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/LabelStyle.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto-validation.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto.java
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/sun.jnlp
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/template.vm
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/pom.xml
lutinjaxx/trunk/pom.xml
Log:
improve example pom + integrate xwork validation
Added: lutinjaxx/trunk/jaxx-example-pom/LICENSE.txt
===================================================================
--- lutinjaxx/trunk/jaxx-example-pom/LICENSE.txt (rev 0)
+++ lutinjaxx/trunk/jaxx-example-pom/LICENSE.txt 2008-10-15 13:56:48 UTC (rev 916)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Copied: lutinjaxx/trunk/jaxx-example-pom/pom.xml (from rev 910, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml)
===================================================================
--- lutinjaxx/trunk/jaxx-example-pom/pom.xml (rev 0)
+++ lutinjaxx/trunk/jaxx-example-pom/pom.xml 2008-10-15 13:56:48 UTC (rev 916)
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.codelutin</groupId>
+ <artifactId>lutinjaxx</artifactId>
+ <version>0.5-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>jaxx-example-pom</artifactId>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>jaxx example pom</name>
+ <version>0.5-SNAPSHOT</version>
+ <inceptionYear>2008</inceptionYear>
+ <description>Jaxx Example super pom</description>
+ <url>${example.home.url}</url>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>pom</packaging>
+
+ <properties>
+
+ <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+
+ <example.home.url>${site.home.url}/lutinjaxx/maven-jaxx-plugin/examples</example.home.url>
+
+ <!-- jnlp -->
+ <keystorepath>${keystorepath}</keystorepath>
+ <keystorealias>CodeLutin</keystorealias>
+ <keystorepass>codelutin</keystorepass>
+
+ </properties>
+
+ <build>
+
+ <pluginManagement>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <version>0.5-SNAPSHOT</version>
+ <configuration>
+ <src>${basedir}/src/main/java</src>
+ <force>true</force>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ <classpathPrefix>lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
+ <execution>
+ <id>JnlpSun</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <copy file="${project.basedir}/src/main/jnlp/sun.jnlp"
+ todir="${project.basedir}/target/jnlp" failonerror="false">
+ <filterset>
+ <filter token="help" value="javahelp-2.0.02.jar"/>
+ <filter token="url" value="${project.url}"/>
+ </filterset>
+ </copy>
+ <copy file="${project.build.directory}/lib/javahelp-2.0.02.jar"
+ todir="${project.basedir}/target/jnlp/lib" failonerror="false"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <version>1.0-alpha-2</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jnlp</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <dependencies>
+ <excludes>
+ <exclude>javax.help:javahelp</exclude>
+ </excludes>
+ </dependencies>
+ <libPath>lib</libPath>
+ <jnlp>
+ <outputFile>launch-${project.artifactId}.jnlp</outputFile>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ </jnlp>
+
+ <sign>
+ <keystore>${keystorepath}</keystore>
+ <keypass/>
+ <storepass>${keystorepass}</storepass>
+ <storetype/>
+ <alias>${keystorealias}</alias>
+ <validity/>
+ <dnameCn/>
+ <dnameOu/>
+ <dnameO/>
+ <dnameL/>
+ <dnameSt/>
+ <dnameC/>
+ <verify>false</verify>
+ <keystoreConfig>
+ <delete>false</delete>
+ <gen>false</gen>
+ </keystoreConfig>
+ </sign>
+
+
+ <pack200>false</pack200>
+ <gzip>true</gzip>
+ <verbose>false</verbose>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </pluginManagement>
+
+ </build>
+</project>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/jaxx-example-pom/pom.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator
___________________________________________________________________
Name: svn:ignore
+ target
LICENSE.txt
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml 2008-10-15 13:47:54 UTC (rev 915)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml 2008-10-15 13:56:48 UTC (rev 916)
@@ -11,22 +11,12 @@
<parent>
<groupId>org.codelutin</groupId>
- <artifactId>lutinjaxx</artifactId>
+ <artifactId>jaxx-example-pom</artifactId>
<version>0.5-SNAPSHOT</version>
</parent>
<artifactId>Calculator</artifactId>
- <dependencies>
-
- <dependency>
- <groupId>org.codelutin</groupId>
- <artifactId>jaxx-core</artifactId>
- <scope>compile</scope>
- </dependency>
-
- </dependencies>
-
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
@@ -34,130 +24,41 @@
<version>0.5-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
<description>Jaxx Calculator example</description>
- <url>${site.home.url}/lutinjaxx/maven-jaxx-plugin/examples</url>
+ <url>${example.home.url}</url>
- <properties>
- <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
- <!-- jnlp -->
- <keystorepath>${keystorepath}</keystorepath>
- <keystorealias>CodeLutin</keystorealias>
- <keystorepass>codelutin</keystorepass>
+ <packaging>jar</packaging>
- </properties>
-
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/main/java</src>
- <force>true</force>
- </configuration>
+ <artifactId>maven-jaxx-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <mainClass>${maven.jar.main.class}</mainClass>
- <classpathPrefix>lib/</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
- <execution>
- <id>JnlpSun</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <copy file="${project.basedir}/src/main/jnlp/sun.jnlp"
- todir="${project.basedir}/target/jnlp">
- <filterset>
- <filter token="help" value="javahelp-2.0.02.jar"/>
- <filter token="url" value="${project.url}"/>
- </filterset>
- </copy>
- <copy file="${project.build.directory}/lib/javahelp-2.0.02.jar"
- todir="${project.basedir}/target/jnlp/lib"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
- <version>1.0-alpha-2</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>jnlp</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <dependencies>
- <excludes>
- <exclude>javax.help:javahelp</exclude>
- </excludes>
- </dependencies>
- <libPath>lib</libPath>
- <jnlp>
- <outputFile>launch-${project.artifactId}.jnlp</outputFile>
- <mainClass>${maven.jar.main.class}</mainClass>
- </jnlp>
-
- <sign>
- <keystore>${keystorepath}</keystore>
- <keypass/>
- <storepass>${keystorepass}</storepass>
- <storetype/>
- <alias>${keystorealias}</alias>
- <validity/>
- <dnameCn/>
- <dnameOu/>
- <dnameO/>
- <dnameL/>
- <dnameSt/>
- <dnameC/>
- <verify>false</verify>
- <keystoreConfig>
- <delete>false</delete>
- <gen>false</gen>
- </keystoreConfig>
- </sign>
-
-
- <pack200>false</pack200>
- <gzip>true</gzip>
- <verbose>false</verbose>
- </configuration>
</plugin>
</plugins>
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components
___________________________________________________________________
Name: svn:ignore
+ target
LICENSE.txt
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/pom.xml 2008-10-15 13:47:54 UTC (rev 915)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/pom.xml 2008-10-15 13:56:48 UTC (rev 916)
@@ -11,41 +11,27 @@
<parent>
<groupId>org.codelutin</groupId>
- <artifactId>lutinjaxx</artifactId>
+ <artifactId>jaxx-example-pom</artifactId>
<version>0.5-SNAPSHOT</version>
</parent>
<artifactId>Components</artifactId>
- <dependencies>
-
- <dependency>
- <groupId>org.codelutin</groupId>
- <artifactId>jaxx-core</artifactId>
- <scope>compile</scope>
- </dependency>
-
- </dependencies>
-
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
<name>Components example</name>
<version>0.5-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
- <description>Jaxx Calculator example</description>
- <url>${site.home.url}/lutinjaxx/maven-jaxx-plugin/examples</url>
+ <description>Jaxx Components example</description>
+ <url>${example.home.url}</url>
- <properties>
- <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
- <!-- jnlp -->
- <keystorepath>${keystorepath}</keystorepath>
- <keystorealias>CodeLutin</keystorealias>
- <keystorepass>codelutin</keystorepass>
+ <packaging>jar</packaging>
- </properties>
-
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
@@ -53,111 +39,26 @@
<plugin>
<groupId>org.codelutin</groupId>
<artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/main/java</src>
- <force>true</force>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <mainClass>${maven.jar.main.class}</mainClass>
- <classpathPrefix>lib/</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
- <execution>
- <id>JnlpSun</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <copy file="${project.basedir}/src/main/jnlp/sun.jnlp"
- todir="${project.basedir}/target/jnlp">
- <filterset>
- <filter token="help" value="javahelp-2.0.02.jar"/>
- <filter token="url" value="${project.url}"/>
- </filterset>
- </copy>
- <copy file="${project.build.directory}/lib/javahelp-2.0.02.jar"
- todir="${project.basedir}/target/jnlp/lib"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
- <version>1.0-alpha-2</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>jnlp</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <dependencies>
- <excludes>
- <exclude>javax.help:javahelp</exclude>
- </excludes>
- </dependencies>
- <libPath>lib</libPath>
- <jnlp>
- <outputFile>launch-${project.artifactId}.jnlp</outputFile>
- <mainClass>${maven.jar.main.class}</mainClass>
- </jnlp>
-
- <sign>
- <keystore>${keystorepath}</keystore>
- <keypass/>
- <storepass>${keystorepass}</storepass>
- <storetype/>
- <alias>${keystorealias}</alias>
- <validity/>
- <dnameCn/>
- <dnameOu/>
- <dnameO/>
- <dnameL/>
- <dnameSt/>
- <dnameC/>
- <verify>false</verify>
- <keystoreConfig>
- <delete>false</delete>
- <gen>false</gen>
- </keystoreConfig>
- </sign>
-
-
- <pack200>false</pack200>
- <gzip>true</gzip>
- <verbose>false</verbose>
- </configuration>
</plugin>
</plugins>
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter
___________________________________________________________________
Name: svn:ignore
+ target
LICENSE.txt
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/pom.xml 2008-10-15 13:47:54 UTC (rev 915)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/pom.xml 2008-10-15 13:56:48 UTC (rev 916)
@@ -11,41 +11,27 @@
<parent>
<groupId>org.codelutin</groupId>
- <artifactId>lutinjaxx</artifactId>
+ <artifactId>jaxx-example-pom</artifactId>
<version>0.5-SNAPSHOT</version>
</parent>
<artifactId>Counter</artifactId>
- <dependencies>
-
- <dependency>
- <groupId>org.codelutin</groupId>
- <artifactId>jaxx-core</artifactId>
- <scope>compile</scope>
- </dependency>
-
- </dependencies>
-
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
<name>Counter example</name>
<version>0.5-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
- <description>Jaxx Calculator example</description>
- <url>${site.home.url}/lutinjaxx/maven-jaxx-plugin/examples</url>
+ <description>Jaxx Counter example</description>
+ <url>${example.home.url}</url>
- <properties>
- <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
- <!-- jnlp -->
- <keystorepath>${keystorepath}</keystorepath>
- <keystorealias>CodeLutin</keystorealias>
- <keystorepass>codelutin</keystorepass>
+ <packaging>jar</packaging>
- </properties>
-
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
@@ -53,111 +39,26 @@
<plugin>
<groupId>org.codelutin</groupId>
<artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/main/java</src>
- <force>true</force>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <mainClass>${maven.jar.main.class}</mainClass>
- <classpathPrefix>lib/</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
- <execution>
- <id>JnlpSun</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <copy file="${project.basedir}/src/main/jnlp/sun.jnlp"
- todir="${project.basedir}/target/jnlp">
- <filterset>
- <filter token="help" value="javahelp-2.0.02.jar"/>
- <filter token="url" value="${project.url}"/>
- </filterset>
- </copy>
- <copy file="${project.build.directory}/lib/javahelp-2.0.02.jar"
- todir="${project.basedir}/target/jnlp/lib"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
- <version>1.0-alpha-2</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>jnlp</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <dependencies>
- <excludes>
- <exclude>javax.help:javahelp</exclude>
- </excludes>
- </dependencies>
- <libPath>lib</libPath>
- <jnlp>
- <outputFile>launch-${project.artifactId}.jnlp</outputFile>
- <mainClass>${maven.jar.main.class}</mainClass>
- </jnlp>
-
- <sign>
- <keystore>${keystorepath}</keystore>
- <keypass/>
- <storepass>${keystorepass}</storepass>
- <storetype/>
- <alias>${keystorealias}</alias>
- <validity/>
- <dnameCn/>
- <dnameOu/>
- <dnameO/>
- <dnameL/>
- <dnameSt/>
- <dnameC/>
- <verify>false</verify>
- <keystoreConfig>
- <delete>false</delete>
- <gen>false</gen>
- </keystoreConfig>
- </sign>
-
-
- <pack200>false</pack200>
- <gzip>true</gzip>
- <verbose>false</verbose>
- </configuration>
</plugin>
</plugins>
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle
___________________________________________________________________
Name: svn:ignore
+ target
LICENSE.txt
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/pom.xml 2008-10-15 13:47:54 UTC (rev 915)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/pom.xml 2008-10-15 13:56:48 UTC (rev 916)
@@ -11,41 +11,27 @@
<parent>
<groupId>org.codelutin</groupId>
- <artifactId>lutinjaxx</artifactId>
+ <artifactId>jaxx-example-pom</artifactId>
<version>0.5-SNAPSHOT</version>
</parent>
<artifactId>LabelStyle</artifactId>
- <dependencies>
-
- <dependency>
- <groupId>org.codelutin</groupId>
- <artifactId>jaxx-core</artifactId>
- <scope>compile</scope>
- </dependency>
-
- </dependencies>
-
<!-- ************************************************************* -->
<!-- *** Project Information ************************************* -->
<!-- ************************************************************* -->
<name>LabelStyle example</name>
<version>0.5-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
- <description>Jaxx Calculator example</description>
- <url>${site.home.url}/lutinjaxx/maven-jaxx-plugin/examples</url>
+ <description>Jaxx LabelStyle example</description>
+ <url>${example.home.url}</url>
- <properties>
- <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
- <!-- jnlp -->
- <keystorepath>${keystorepath}</keystorepath>
- <keystorealias>CodeLutin</keystorealias>
- <keystorepass>codelutin</keystorepass>
+ <packaging>jar</packaging>
- </properties>
-
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
@@ -53,111 +39,26 @@
<plugin>
<groupId>org.codelutin</groupId>
<artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/main/java</src>
- <force>true</force>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <mainClass>${maven.jar.main.class}</mainClass>
- <classpathPrefix>lib/</classpathPrefix>
- </manifest>
- </archive>
- </configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
- <execution>
- <id>JnlpSun</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <copy file="${project.basedir}/src/main/jnlp/sun.jnlp"
- todir="${project.basedir}/target/jnlp">
- <filterset>
- <filter token="help" value="javahelp-2.0.02.jar"/>
- <filter token="url" value="${project.url}"/>
- </filterset>
- </copy>
- <copy file="${project.build.directory}/lib/javahelp-2.0.02.jar"
- todir="${project.basedir}/target/jnlp/lib"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
- <version>1.0-alpha-2</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>jnlp</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <dependencies>
- <excludes>
- <exclude>javax.help:javahelp</exclude>
- </excludes>
- </dependencies>
- <libPath>lib</libPath>
- <jnlp>
- <outputFile>launch-${project.artifactId}.jnlp</outputFile>
- <mainClass>${maven.jar.main.class}</mainClass>
- </jnlp>
-
- <sign>
- <keystore>${keystorepath}</keystore>
- <keypass/>
- <storepass>${keystorepass}</storepass>
- <storetype/>
- <alias>${keystorealias}</alias>
- <validity/>
- <dnameCn/>
- <dnameOu/>
- <dnameO/>
- <dnameL/>
- <dnameSt/>
- <dnameC/>
- <verify>false</verify>
- <keystoreConfig>
- <delete>false</delete>
- <gen>false</gen>
- </keystoreConfig>
- </sign>
-
-
- <pack200>false</pack200>
- <gzip>true</gzip>
- <verbose>false</verbose>
- </configuration>
</plugin>
</plugins>
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2
___________________________________________________________________
Name: svn:ignore
+ target
LICENSE.txt
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml (from rev 910, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/pom.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml 2008-10-15 13:56:48 UTC (rev 916)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-example-pom</artifactId>
+ <version>0.5-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>LabelStyle2</artifactId>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>LabelStyle2 example</name>
+ <version>0.5-SNAPSHOT</version>
+ <inceptionYear>2008</inceptionYear>
+ <description>Jaxx LabelStyle2 (with xwork validation) example</description>
+ <url>${example.home.url}</url>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>jar</packaging>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/pom.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/BeanValidator.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/BeanValidator.java (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/BeanValidator.java 2008-10-15 13:56:48 UTC (rev 916)
@@ -0,0 +1,497 @@
+/* *##%
+ * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *##%*/
+
+package examples.LabelStyle;
+
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ValidationAwareSupport;
+import com.opensymphony.xwork2.config.Configuration;
+import com.opensymphony.xwork2.config.ConfigurationManager;
+import com.opensymphony.xwork2.util.ValueStack;
+import com.opensymphony.xwork2.util.ValueStackFactory;
+import com.opensymphony.xwork2.validator.ActionValidatorManager;
+import com.opensymphony.xwork2.validator.DelegatingValidatorContext;
+import com.opensymphony.xwork2.validator.ValidationException;
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Graphics2D;
+import java.awt.Insets;
+import java.awt.Rectangle;
+import java.awt.RenderingHints;
+import java.awt.image.BufferedImage;
+import java.beans.BeanDescriptor;
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.swing.BorderFactory;
+import javax.swing.JComponent;
+import javax.swing.JList;
+import javax.swing.ListModel;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jdesktop.jxlayer.JXLayer;
+import org.jdesktop.jxlayer.plaf.AbstractLayerUI;
+
+/**
+ * <p>
+ * Permet d'ajouter facilement le support de la validation des champs d'un
+ * bean et de le relier a une interface graphique.
+ * Utilise xwork pour la validation et JXLayer pour la visualisation.
+ *
+ * <p>
+ * Le mieux pour son integration dans Jaxx est de faire de la generation pour
+ * force la compilation du code suivant:
+ *
+ * <pre>
+ * myValidor.getBean().get<field>();
+ * </pre>
+ *
+ * et ceci pour chaque field ajoute a la map fieldRepresentation. De cette
+ * facon meme si le champs field est en texte on a une verification de son
+ * existance a la compilation.
+ *
+ * <p>
+ * La representation en tag pourrait etre
+ * <pre>
+ *
+ * <validator id="myValidator" beanClass="{Personne.class}" errorList="$list">
+ * <field name="name" component="$name"/>
+ * <field name="firstName" component="$firstName"/>
+ * <field name="birthDate" component="$birthDate"/>
+ * </validator>
+ *
+ * <validator beanClass="{Personne.class}" autoField="true" errorList="$list">
+ * <fieldRepresentation name="name" component="$lastName"/>
+ * </validator>
+ *
+ * </pre>
+ *
+ * dans le premier exemple on fait un mapping explicite des champs, mais on voit
+ * que le nom du composant graphique est le meme que celui du champs. Pour eviter
+ * de longue saisie, il est possible d'utiliser le flag <b>autoField</b>
+ * qui pour chaque champs du ayant une methode get du bean recherche un composant
+ * avec cet Id. Il est aussi possible de surcharge un champs explicitement
+ * comme ici name, dans le cas ou le composant qui porterait ce nom serait
+ * utilise pour autre chose.
+ *
+ * <p>
+ * Il faut un handler particulier pour ce composant car les attributs
+ * <b>beanClass</b> et <b>autoField</b> ne sont present que dans le XML jaxx et
+ * servent a la generation. Il faut aussi prendre en compte les elements
+ * fieldRepresentation fils du tag validator.
+ *
+ * <p>
+ * Voici ce que pourrait etre le code genere par jaxx
+ * <pre>
+ * // declaration du bean
+ * BeanValidator<beanClass> $myValidator;
+ *
+ * // init du bean
+ * protected void createMyValidator() {
+ * $myValidator = new BeanValidator<beanClass>();
+ *
+ * // genere seulement si autoField = true
+ * for (Method m : beanClass.getMethod()) {
+ * if (m.getName().startsWith("get")) {
+ * String fieldName = m.getName().substring(3).toLowerCase();
+ * $myValidator.setFieldRepresentation(fieldName, $objectMap.get(fieldName));
+ * }
+ * }
+ *
+ * // pour chaque tag fieldRepresentation
+ * myValidator.setFieldRepresentation("name", $lastName);
+ *
+ * // si beanClass est specifie et n'est pas Object, on force l'acces au champs
+ * // pour validation a la compilation
+ * $myValidator.getBean().getName();
+ *
+ * $objectMap.put("myValidator", $myValidator);
+ * }
+ * </pre>
+ *
+ * @author poussin
+ * @version $Revision$
+ *
+ * Last update: $Date$
+ * by : $Author$
+ */
+public class BeanValidator<T> {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(BeanValidator.class);
+
+ protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
+
+ protected ValidationAwareSupport validationSupport = new ValidationAwareSupport();
+ protected DelegatingValidatorContext validationContext =
+ new DelegatingValidatorContext(validationSupport);
+
+ protected transient ActionValidatorManager validator = null;
+
+ /** indique si le bean a ete modifie depuis sont arrive */
+ protected boolean changed = false;
+ /** le bean a surveiller */
+ protected T bean = null;
+ /** l'objet qui recoit les notifications de modification du bean */
+ protected Listener l = new Listener();
+ /** permet de faire le lien en un champs du bean et l'objet qui permet de l'editer */
+ protected Map<String, JComponent> fieldRepresentation = new HashMap<String, JComponent>();
+ /** Objet servant a afficher toutes les erreurs */
+ protected JList errorList = null;
+
+ public BeanValidator() {
+ }
+
+ /**
+ * Permet de modifier l'objet permettant d'afficher toutes les errors
+ * @param errorList si null arrete d'afficher les errors
+ */
+ public void setErrorList(JList errorList) {
+ this.errorList = errorList;
+ }
+
+ public JList getErrorList() {
+ return errorList;
+ }
+
+ /**
+ * Permet d'indiquer le composant graphique responsable de l'affichage
+ * d'un attribut du bean
+ * @param fieldname
+ * @param c
+ */
+ public void setFieldRepresentation(String fieldname, JComponent c) {
+ JComponent old = fieldRepresentation.put(fieldname, c);
+ setErrorRepresentation(fieldname, old, c);
+ }
+
+ public void setFieldRepresentation(Map<String, JComponent> fieldRepresentation) {
+ for(Map.Entry<String, JComponent> e : fieldRepresentation.entrySet()) {
+ setFieldRepresentation(e.getKey(), e.getValue());
+ }
+ }
+
+
+
+ public JComponent getFieldRepresentation(String fieldname) {
+ return fieldRepresentation.get(fieldname);
+ }
+
+
+ /**
+ * Retourne vrai si l'objet bean a ete modifie depuis le dernier
+ * {@link #setBean}
+ * @return
+ */
+ public boolean isChanged() {
+ return changed;
+ }
+
+ /**
+ * Permet de force la remise a false de l'etat de changement du bean
+ * @param changed
+ */
+ public void setChanged(boolean changed) {
+ boolean oldChanged = this.changed;
+ this.changed = changed;
+ pcs.firePropertyChange("changed", oldChanged, changed);
+ }
+
+ public T getBean() {
+ return bean;
+ }
+
+ public void setBean(T bean) {
+ T oldBean = this.bean;
+ if (this.bean != null) {
+ try {
+ Method method = this.bean.getClass().getMethod("removePropertyChangeListener", PropertyChangeListener.class);
+ method.invoke(this.bean, l);
+ } catch (Exception eee) {
+ log.info("Can't register as listener", eee);
+ }
+ }
+ this.bean = bean;
+ if (this.bean != null) {
+ try {
+ Method method = this.bean.getClass().getMethod("addPropertyChangeListener", PropertyChangeListener.class);
+ method.invoke(this.bean, l);
+ } catch (Exception eee) {
+ log.info("Can't register as listener", eee);
+ }
+ }
+ validate();
+ pcs.firePropertyChange("bean", oldBean, bean);
+ }
+
+ protected ActionValidatorManager getValidator() {
+ if (validator == null) {
+ ConfigurationManager confManager = new ConfigurationManager();
+ Configuration conf = confManager.getConfiguration();
+
+ ValueStackFactory vsf = conf.getContainer().getInstance(
+ ValueStackFactory.class);
+ ValueStack vs = vsf.createValueStack();
+ ActionContext context = new ActionContext(vs.getContext());
+ ActionContext.setContext(context);
+
+ validator = conf.getContainer().getInstance(
+ ActionValidatorManager.class, "no-annotations");
+ }
+ return validator;
+ }
+
+ /**
+ * il faut eviter le code re-intrant (durant une validation, une autre est
+ * demandee). Pour cela on fait la validation dans un thread, et tant
+ * que la premiere validation n'est pas fini, on ne repond pas aux
+ * solicitations.
+ * Cette method est public pour permettre de force une validation par
+ * programmation, ce qui est utile par exemple si le bean ne supporte
+ * pas les {@link PropertyChangeListener}
+ */
+ public void validate() {
+ // on ne valide que si il y a un bean et que le resultat de la validation
+ // pourra etre affiche quelque part
+ if (bean != null && (getErrorList() != null || fieldRepresentation.size() != 0)) {
+ try {
+
+ validationSupport.clearErrorsAndMessages();
+ getValidator().validate(bean, null, validationContext);
+
+ if(log.isDebugEnabled()) {
+ log.debug("Action errors: " + validationContext.getActionErrors());
+ log.debug("Action messages: " + validationContext.getActionMessages());
+ log.debug("Field errors: " + validationContext.getFieldErrors());
+ }
+
+ System.out.println(validationContext.getFieldErrors());
+
+ // TODO: trouver autre chose
+ // On est obliger de le refaire ici car avec jaxx, lors du
+ // setFieldRepresentation le composant n'a pas encore de pere :(
+ for (String fieldname : fieldRepresentation.keySet()) {
+ JComponent c = fieldRepresentation.get(fieldname);
+ setErrorRepresentation(fieldname, null, c);
+ }
+ } catch (ValidationException eee) {
+ log.warn("Error during validation", eee);
+ }
+ }
+ }
+
+ protected void setErrorRepresentation(String fieldname, JComponent old, JComponent c) {
+ if (old != c) {
+ if (old != null) {
+ // suppression du jxlayer sous l'ancien composant
+ Container container = old.getParent();
+ if (container instanceof JXLayer) {
+ JXLayer<JComponent> jx = (JXLayer<JComponent>)container;
+ jx.setUI(null);
+ }
+ }
+ if (c != null) {
+ // ajout du jxlayer sous ce composant
+ Container container = c.getParent();
+ if (container instanceof JXLayer) {
+ IconValidationUI ui = new IconValidationUI(fieldname, validationSupport.getFieldErrors());
+// TranslucentValidationUI ui = new TranslucentValidationUI(fieldname, validationSupport.getFieldErrors());
+ ui.setEnabled(true);
+
+ JXLayer<JComponent> jx = (JXLayer<JComponent>)container;
+ jx.setUI(ui);
+ }
+ }
+ }
+ }
+
+ /**
+ * Permet d'afficher les messages d'error dans L'ui
+ */
+ protected ListModel getListModel() {
+ // FIXME a implanter
+ return null;
+ }
+
+ protected class Listener implements PropertyChangeListener {
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ validate();
+ setChanged(true);
+ }
+
+ }
+
+ /**
+ * recherche les composants portant le meme nom que les champs de la classe
+ * clazz. Cette methode est statique pour pouvoir eventuellement l'utiliser
+ * dans un autre context (je pense par exemple a la generation jaxx).
+ *
+ * <p>
+ * Si la recherche echoue pour quelque raison que se soit, aucune exception
+ * n'est leve, et la map retournee est tout simplement vide ou incomplete
+ *
+ * @param clazz la classe ou recherche les champs
+ * @param container le container ou rechercher les composants d'edition
+ * @return
+ */
+ public static Map<String, JComponent> lookingForEditor(Class clazz, Container container) {
+ Map<String, JComponent> result = new HashMap<String, JComponent>();
+ try {
+ // looking for all component with name set
+ Map<String, JComponent> allNamedComponent = new HashMap<String, JComponent>();
+ List<Container> todo = new LinkedList<Container>();
+ todo.add(container);
+ while (todo.size() > 0) {
+ for (ListIterator<Container> i = todo.listIterator(); i.hasNext();) {
+ Container parent = i.next();
+ i.remove();
+ for (Component c : parent.getComponents()) {
+ if (c instanceof Container) {
+ i.add((Container) c);
+ String name = c.getName();
+ if (c instanceof JComponent &&
+ name != null && !"".equals(name)) {
+ allNamedComponent.put(name, (JComponent)c);
+ }
+ }
+ }
+ }
+ }
+
+ // looking for all properties on class
+ BeanInfo info = Introspector.getBeanInfo(clazz);
+ PropertyDescriptor[] props = info.getPropertyDescriptors();
+
+ // find if one properties have same name that component
+ for (PropertyDescriptor prop : props) {
+ String name = prop.getName();
+ if (allNamedComponent.containsKey(name)) {
+ result.put(name, allNamedComponent.get(name));
+ }
+ }
+
+ } catch (IntrospectionException eee) {
+ log.warn("Can't introspect bean", eee);
+ }
+
+ System.out.println("Result: " + result);
+
+ return result;
+ }
+
+ public static class TranslucentValidationUI extends AbstractLayerUI<JComponent> {
+
+ protected String field = null;
+ protected Map resultValidation = null;
+ public TranslucentValidationUI(String field, Map resultValidation) {
+ this.field = field;
+ this.resultValidation = resultValidation;
+ }
+
+ @Override
+ protected void paintLayer(Graphics2D g2, JXLayer<JComponent> l) {
+ // paints the layer as is
+ super.paintLayer(g2, l);
+
+ // to be in sync with the view if the layer has a border
+ Insets layerInsets = l.getInsets();
+ g2.translate(layerInsets.left, layerInsets.top);
+
+ JComponent view = l.getView();
+ // To prevent painting on view's border
+ Insets insets = view.getInsets();
+ g2.clip(new Rectangle(insets.left, insets.top,
+ view.getWidth() - insets.left - insets.right,
+ view.getHeight() - insets.top - insets.bottom));
+
+ g2.setColor(!resultValidation.containsKey(field) ?
+ Color.GREEN : Color.RED);
+ g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .2f));
+ g2.fillRect(0, 0, l.getWidth(), l.getHeight());
+ }
+ }
+
+ public static class IconValidationUI extends AbstractLayerUI<JComponent> {
+
+ // The red icon to be shown at the layer's corner
+ private final static BufferedImage INVALID_ICON;
+
+ static {
+ int width = 7;
+ int height = 8;
+ INVALID_ICON = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+ Graphics2D g2 = (Graphics2D) INVALID_ICON.getGraphics();
+ g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
+ g2.setColor(Color.RED);
+ g2.fillRect(0, 0, width, height);
+ g2.setColor(Color.WHITE);
+ g2.drawLine(0, 0, width, height);
+ g2.drawLine(0, height, width, 0);
+ g2.dispose();
+ }
+
+ protected String field = null;
+ protected Map resultValidation = null;
+ public IconValidationUI(String field, Map resultValidation) {
+ this.field = field;
+ this.resultValidation = resultValidation;
+ }
+
+ @Override
+ public void installUI(JComponent c) {
+ super.installUI(c);
+ c.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 3));
+ }
+
+ @Override
+ public void uninstallUI(JComponent c) {
+ super.uninstallUI(c);
+ c.setBorder(null);
+ }
+
+ @Override
+ protected void paintLayer(Graphics2D g2, JXLayer<JComponent> l) {
+ super.paintLayer(g2, l);
+
+ // There is no need to take insets into account for this painter
+ if (resultValidation.containsKey(field)) {
+ g2.drawImage(INVALID_ICON, l.getWidth() - INVALID_ICON.getWidth() - 1, 0, null);
+// g2.drawImage(INVALID_ICON, 0, 0, null);
+ }
+ }
+ }
+
+}
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/LabelStyle.css
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/LabelStyle.css (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/LabelStyle.css 2008-10-15 13:56:48 UTC (rev 916)
@@ -0,0 +1,34 @@
+JSlider {
+ paintTicks: true;
+}
+
+JSlider.color {
+ minorTickSpacing: 10;
+ majorTickSpacing: 50;
+ border: { BorderFactory.createEmptyBorder(1, 1, 1, 1) };
+}
+
+JSlider.color:focused {
+ border: { BorderFactory.createLineBorder(Color.BLACK, 1) };
+}
+
+JSlider#red:focused {
+ background: #E7ADAD;
+}
+
+JSlider#green:focused {
+ background: #B2E7AD;
+}
+
+JSlider#blue:focused {
+ background: #ADB2E7;
+}
+
+JSlider#csize {
+ minorTickSpacing: 2;
+ majorTickSpacing: 6;
+}
+
+JRadioButton {
+ enabled: { backgroundCheckbox.isSelected() };
+}
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/LabelStyle.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/LabelStyle.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/LabelStyle.jaxx 2008-10-15 13:56:48 UTC (rev 916)
@@ -0,0 +1,80 @@
+<Application title="LabelStyle.jaxx">
+ <style source="LabelStyle.css"/>
+
+<script>
+//import org.jdesktop.jxlayer.JXLayer;
+
+Toto toto = new Toto();
+
+BeanValidator validator = new BeanValidator();
+validator.setFieldRepresentation("text", text);
+validator.setBean(toto);
+</script>
+
+ <Table anchor='north' fill='both'>
+ <row>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell><JLabel text='Text:'/></cell>
+ <cell weightx='1'>
+ <!--org.jdesktop.jxlayer.JXLayer-->
+ <JTextField id='text' text='{toto.getText()}'
+ onKeyReleased='toto.setText(text.getText())'/>
+ <!--/org.jdesktop.jxlayer.JXLayer-->
+ </cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Red:'/></cell>
+ <cell><JSlider id='red' value='128' maximum='255' styleClass='color'/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Green:'/></cell>
+ <cell><JSlider id='green' value='0' maximum='255' styleClass='color'/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Blue:'/></cell>
+ <cell><JSlider id='blue' value='255' maximum='255' styleClass='color'/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Size:'/></cell>
+ <cell><JSlider id='csize' value='36' minimum='6' maximum='60'/></cell>
+ </row>
+
+ <row>
+ <cell columns='2' fill='both' weighty='1'>
+ <JPanel border='{BorderFactory.createTitledBorder("Preview")}'
+ height='90'
+ layout='{new BorderLayout()}'>
+ <VBox background='{backgroundCheckbox.isSelected() ? backgroundColor.getSelectedValue() : null}'
+ margin='0'
+ horizontalAlignment='center'
+ verticalAlignment='middle'>
+ <JLabel text='{toto.getText()}' font-size='{csize.getValue()}' foreground='{new Color(red.getValue(), green.getValue(), blue.getValue())}'/>
+ </VBox>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
+ </cell>
+
+ <cell>
+ <VBox spacing='0' border='{BorderFactory.createTitledBorder("Background")}'>
+ <JCheckBox id='backgroundCheckbox' text='Show Background'/>
+ <JRadioButton text='Red' buttonGroup='backgroundColor' value='{Color.RED}' selected='true'/>
+ <JRadioButton text='Orange' buttonGroup='backgroundColor' value='{Color.ORANGE}'/>
+ <JRadioButton text='Yellow' buttonGroup='backgroundColor' value='{Color.YELLOW}'/>
+ <JRadioButton text='Green' buttonGroup='backgroundColor' value='{Color.GREEN}'/>
+ <JRadioButton text='Cyan' buttonGroup='backgroundColor' value='{Color.CYAN}'/>
+ <JRadioButton text='Blue' buttonGroup='backgroundColor' value='{Color.BLUE}'/>
+ <JRadioButton text='Purple' buttonGroup='backgroundColor' value='{new Color(160, 30, 255)}'/>
+ </VBox>
+ </cell>
+ </row>
+ </Table>
+
+</Application>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto-validation.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto-validation.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto-validation.xml 2008-10-15 13:56:48 UTC (rev 916)
@@ -0,0 +1,19 @@
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+ <validators>
+ <!-- Field Validators for email field -->
+ <field name="text">
+ <field-validator type="required" short-circuit="true">
+ <message>You must enter a value for text.</message>
+ </field-validator>
+ <field-validator type="email" short-circuit="true">
+ <message>Not a valid e-mail.</message>
+ </field-validator>
+ </field>
+ <!-- Plain Validator 1 -->
+ <validator type="expression">
+ <param name="expression">text.startsWith("poussin")</param>
+ <message>Email not starts with poussin</message>
+ </validator>
+ </validators>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto.java (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/java/examples/LabelStyle/Toto.java 2008-10-15 13:56:48 UTC (rev 916)
@@ -0,0 +1,41 @@
+package examples.LabelStyle;
+
+import java.beans.*;
+
+class Toto {
+
+ String text = "initial";
+
+ PropertyChangeSupport p;
+
+ public Toto() {
+ p = new PropertyChangeSupport(this);
+ }
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ p.addPropertyChangeListener(listener);
+ }
+
+ public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ p.removePropertyChangeListener(listener);
+ }
+
+ public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ p.removePropertyChangeListener(propertyName, listener);
+ }
+
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ String oldText = this.text;
+ this.text = text;
+ p.firePropertyChange("text", oldText, text);
+ }
+}
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/sun.jnlp (from rev 910, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/sun.jnlp)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/sun.jnlp (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/sun.jnlp 2008-10-15 13:56:48 UTC (rev 916)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0+" codebase="@url@" href="sun.jnlp">
+ <information>
+ <title>Sun MicroSystems</title>
+ <vendor>Sun MicroSystems, Inc.</vendor>
+ <offline-allowed/>
+ </information>
+ <resources>
+ <jar href="lib/@help@"/>
+ </resources>
+ <component-desc/>
+</jnlp>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/sun.jnlp
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/template.vm (from rev 910, lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/template.vm)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/template.vm (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/template.vm 2008-10-15 13:56:48 UTC (rev 916)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp
+ spec="1.0+"
+ codebase="$project.Url" href="$outputFile">
+ <information>
+ <title>$informationTitle</title>
+ <vendor>$informationVendor</vendor>
+ <homepage href="$informationHomepage" />
+ <description>$informationDescription</description>
+ <offline-allowed />
+ </information>
+ <resources>
+ <j2se version="1.5+" max-heap-size="512m"/>
+ $dependencies
+ <extension name="sun" href="sun.jnlp"/>
+ </resources>
+ <security>
+ <all-permissions />
+ </security>
+ <application-desc main-class="$mainClass" />
+</jnlp>
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle2/src/main/jnlp/template.vm
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: lutinjaxx/trunk/pom.xml
===================================================================
--- lutinjaxx/trunk/pom.xml 2008-10-15 13:47:54 UTC (rev 915)
+++ lutinjaxx/trunk/pom.xml 2008-10-15 13:56:48 UTC (rev 916)
@@ -21,6 +21,7 @@
<module>jaxx-util</module>
<module>jaxx-core</module>
<module>jaxx-swing-action</module>
+ <module>jaxx-example-pom</module>
<module>maven-jaxx-plugin</module>
</modules>
@@ -47,6 +48,8 @@
<properties>
+ <license-switcher.version>0.5-SNAPSHOT</license-switcher.version>
+
<!-- current version -->
<current.version>0.5-SNAPSHOT</current.version>
1
0
r915 - lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 13:47:54 +0000 (Wed, 15 Oct 2008)
New Revision: 915
Added:
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles2.jaxx.rst
Log:
add LabelStyle2 example
Copied: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles2.jaxx.rst (from rev 909, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst)
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles2.jaxx.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles2.jaxx.rst 2008-10-15 13:47:54 UTC (rev 915)
@@ -0,0 +1,28 @@
+=====================
+Examples/LabelStyles2
+=====================
+
+This example program creates a number of components which are used to control the appearance of a JLabel.
+Everything is performed through data binding; there are no script tags or explicit event handlers anywhere.
+
+Screen shot
+-----------
+
+.. image:: images/LabelStyle-screenshot.gif
+
+Set it in action
+----------------
+
+|webstart|
+
+To run this example in `Java Web Start`_, click the `following link`_.
+
+
+Source code
+-----------
+
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+
+.. |webstart| image:: images/webstart.gif
+
+.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles2.jaxx.rst
___________________________________________________________________
Name: svn:mergeinfo
+
1
0
r914 - lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 13:46:48 +0000 (Wed, 15 Oct 2008)
New Revision: 914
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java
Log:
skip goal for non java capable project
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java 2008-10-15 13:46:23 UTC (rev 913)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java 2008-10-15 13:46:48 UTC (rev 914)
@@ -149,10 +149,21 @@
protected CompilerOptions options;
- protected MirroredFileUpdater updater ;
+ protected MirroredFileUpdater updater;
+ protected boolean skip = true;
+
protected void init() {
+ if (project!=null && ("pom".equals(project.getPackaging()) || "site".equals(project.getPackaging()))) {
+ // nothing to be done for this type of packaging
+ skip = true;
+ getLog().info("skip generate goal for packaging " + project.getPackaging());
+ return;
+ }
+
+ skip=false;
+
if (!outResource.exists()) {
outResource.mkdirs();
}
@@ -182,7 +193,7 @@
} else {
// filter files
List<String> listFiles = new ArrayList<String>();
-
+
for (String file : files) {
if (updater.isFileUpToDate(new File(src, file))) {
if (verbose) {
@@ -207,16 +218,6 @@
}
- protected void doExecute() throws Exception {
-
- // force compiler init from here, not in a static block
- TagManager.reset(verbose);
-
- if (!JAXXCompiler.compile(src, files, options)) {
- throw new MojoFailureException("Aborting due to errors reported by jaxxc");
- }
- }
-
public CompilerOptions toCompilerOptions() {
CompilerOptions result = new CompilerOptions();
result.setClassPath(src.getPath());
@@ -233,41 +234,17 @@
return result;
}
- protected void printInit() {
- getLog().info(options.toString());
- getLog().info("includes : " + Arrays.toString(includes));
- for (String file : files) {
- getLog().info("will generate "+file);
- }
+ public void execute() throws MojoExecutionException, MojoFailureException {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- getLog().info(cl.toString());
- if (cl.getClass().getSimpleName().equals("RealmClassLoader")) {
- try {
- java.lang.reflect.Method m = cl.getClass().getDeclaredMethod("getURLs");
- m.setAccessible(true);
- URL[] urls = (URL[]) m.invoke(cl);
+ init();
- for (URL url : urls) {
- getLog().info("url in class loader " + url);
- }
- } catch (Exception e) {
- getLog().warn("??? : " + e.getMessage(), e);
+ if (skip) {
+ if (verbose) {
+ getLog().info("jaxx - skip!");
}
+ return;
}
-
- //fixme should remove this silly test when we will make real maven plugin tests :)
- if (getPluginContext() != null) {
- for (Object e : getPluginContext().keySet()) {
- getLog().info("pluginContext " + e + " : " + getPluginContext().get(e));
- }
- }
- }
-
- public void execute() throws MojoExecutionException, MojoFailureException {
-
- init();
-
+
if (files.length == 0) {
getLog().info("jaxx - no jaxx file to treate. ");
return;
@@ -277,8 +254,13 @@
try {
- doExecute();
+ // force compiler init from here, not in a static block
+ TagManager.reset(verbose);
+ if (!JAXXCompiler.compile(src, files, options)) {
+ throw new MojoFailureException("Aborting due to errors reported by jaxxc");
+ }
+
} catch (Exception e) {
getLog().error(e);
Throwable e2 = e;
@@ -341,6 +323,37 @@
return loader;
}
+ protected void printInit() {
+ getLog().info(options.toString());
+ getLog().info("includes : " + Arrays.toString(includes));
+ for (String file : files) {
+ getLog().info("will generate " + file);
+ }
+
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ getLog().info(cl.toString());
+ if (cl.getClass().getSimpleName().equals("RealmClassLoader")) {
+ try {
+ java.lang.reflect.Method m = cl.getClass().getDeclaredMethod("getURLs");
+ m.setAccessible(true);
+ URL[] urls = (URL[]) m.invoke(cl);
+
+ for (URL url : urls) {
+ getLog().info("url in class loader " + url);
+ }
+ } catch (Exception e) {
+ getLog().warn("??? : " + e.getMessage(), e);
+ }
+ }
+
+ //fixme should remove this silly test when we will make real maven plugin tests :)
+ if (getPluginContext() != null) {
+ for (Object e : getPluginContext().keySet()) {
+ getLog().info("pluginContext " + e + " : " + getPluginContext().get(e));
+ }
+ }
+ }
+
public File getOutJava() {
return outJava;
}
1
0
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 13:46:23 +0000 (Wed, 15 Oct 2008)
New Revision: 913
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
Log:
add example build
Modified: lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-15 12:02:44 UTC (rev 912)
+++ lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-15 13:46:23 UTC (rev 913)
@@ -130,4 +130,30 @@
<url>${scm.url.son}</url>
</scm>
+ <profiles>
+ <profile>
+ <id>example</id>
+ <properties>
+ <maven.test.testFailureIgnore>true</maven.test.testFailureIgnore>
+ </properties>
+ <build>
+ <pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ <include>org/codelutin/jaxx/BuildExamples.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ </pluginManagement>
+ </build>
+ </profile>
+ </profiles>
</project>
1
0
r912 - in lutinjaxx/trunk: jaxx-swing-action/src/site jaxx-swing-action/src/site/resources jaxx-util/src/site jaxx-util/src/site/resources maven-jaxx-plugin/src/site src/site
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 12:02:44 +0000 (Wed, 15 Oct 2008)
New Revision: 912
Added:
lutinjaxx/trunk/jaxx-swing-action/src/site/resources/
lutinjaxx/trunk/jaxx-swing-action/src/site/resources/jaxx.png
lutinjaxx/trunk/jaxx-util/src/site/resources/
lutinjaxx/trunk/jaxx-util/src/site/resources/jaxx.png
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml
lutinjaxx/trunk/src/site/site.xml
Log:
improve site
Added: lutinjaxx/trunk/jaxx-swing-action/src/site/resources/jaxx.png
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-swing-action/src/site/resources/jaxx.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/jaxx-util/src/site/resources/jaxx.png
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-util/src/site/resources/jaxx.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml 2008-10-15 12:01:43 UTC (rev 911)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml 2008-10-15 12:02:44 UTC (rev 912)
@@ -1,37 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="${project.name}">
- <!--publishDate format="dd/MM/yyyy"/>
-
- <skin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-lutin-skin</artifactId>
- <version>0.2</version>
- </skin-->
-
<bannerLeft>
<name>${project.name}</name>
<src>jaxx.png</src>
<href>index.html</href>
</bannerLeft>
- <!--bannerRight>
- <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
- <href>${project.organization.url}</href>
- </bannerRight>
-
<poweredBy>
<logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
<logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/>
<logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText"
img="images/restructuredtext-logo.png"/>
- </poweredBy-->
-
+ </poweredBy>
+
<body>
- <!--links>
- <item name="Labs" href="http://labs.libre-entreprise.org/"/>
- <item name="${project.organization.name}" href="${project.organization.url}"/>
- </links-->
<menu ref="parent"/>
Modified: lutinjaxx/trunk/src/site/site.xml
===================================================================
--- lutinjaxx/trunk/src/site/site.xml 2008-10-15 12:01:43 UTC (rev 911)
+++ lutinjaxx/trunk/src/site/site.xml 2008-10-15 12:02:44 UTC (rev 912)
@@ -6,7 +6,7 @@
<skin>
<groupId>org.codelutin</groupId>
<artifactId>maven-lutin-skin</artifactId>
- <version>0.2</version>
+ <version>0.2.1</version>
</skin>
<bannerLeft>
1
0
r911 - lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 12:01:43 +0000 (Wed, 15 Oct 2008)
New Revision: 911
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java
Log:
improve log
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java 2008-10-15 12:00:26 UTC (rev 910)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java 2008-10-15 12:01:43 UTC (rev 911)
@@ -11,7 +11,7 @@
/** @author chemit */
public abstract class JaxxBaseTest extends AbstractMojoTestCase {
/** log */
- protected static final Log log = LogFactory.getLog(JaxxBaseTest.class);
+ protected Log log;
protected JaxxGeneratorMojo mojo;
@@ -22,7 +22,7 @@
@Override
protected void setUp() throws Exception {
super.setUp();
- log.info(getName());
+ getLog().info(getName());
pomFile = getPomFile();
mojo = (JaxxGeneratorMojo) lookupMojo("generate", pomFile);
assertNotNull(mojo);
@@ -48,7 +48,7 @@
// check we have a the required/forbidden pattern
File f = new File(mojo.getOutJava(), file.substring(0, file.length() - 4) + "java");
if (mojo.isVerbose()) {
- log.info("check generated file " + f);
+ getLog().info("check generated file " + f);
}
assertTrue("generated file " + f + " was not found...", f.exists());
@@ -58,4 +58,11 @@
assertEquals(errorMessage + pattern + " in file " + f, required, content.contains(pattern));
}
}
+
+ protected Log getLog() {
+ if (log == null) {
+ log = LogFactory.getLog(getClass());
+ }
+ return log;
+ }
}
1
0
r910 - in lutinjaxx/trunk/maven-jaxx-plugin/src: . examples examples/Calculator examples/Calculator/src examples/Calculator/src/main examples/Calculator/src/main/java examples/Calculator/src/main/java/examples examples/Calculator/src/main/java/examples/Calculator examples/Calculator/src/main/jnlp examples/Components examples/Components/src examples/Components/src/main examples/Components/src/main/java examples/Components/src/main/java/examples examples/Components/src/main/java/examples/Compon
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 12:00:26 +0000 (Wed, 15 Oct 2008)
New Revision: 910
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/Calculator.css
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/Calculator.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/CalculatorEngine.java
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/sun.jnlp
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/template.vm
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/Components.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/DemoPanel.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JButtonDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JCheckBoxDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JCheckBoxMenuItemDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JComboBoxDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JDialogDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JListDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JMenuItemDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JPasswordFieldDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JProgressBarDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JRadioButtonDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JRadioButtonMenuItemDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSliderDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSpinnerDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSplitPaneDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JTextAreaDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JTextFieldDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JToggleButtonDemo.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/Amethyst.jpg
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/Lynx.jpg
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/Tomato.jpg
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/pencil_black.gif
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/jnlp/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/jnlp/sun.jnlp
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/jnlp/template.vm
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/java/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/java/examples/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/java/examples/Counter/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/java/examples/Counter/Counter.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/jnlp/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/jnlp/sun.jnlp
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/jnlp/template.vm
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/examples/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/examples/LabelStyle/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/examples/LabelStyle/LabelStyle.css
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/examples/LabelStyle/LabelStyle.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/sun.jnlp
lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/template.vm
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java
Log:
mise en place des examples
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/pom.xml 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.codelutin</groupId>
+ <artifactId>lutinjaxx</artifactId>
+ <version>0.5-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>Calculator</artifactId>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>Calculator example</name>
+ <version>0.5-SNAPSHOT</version>
+ <inceptionYear>2008</inceptionYear>
+ <description>Jaxx Calculator example</description>
+ <url>${site.home.url}/lutinjaxx/maven-jaxx-plugin/examples</url>
+
+ <properties>
+ <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+
+ <!-- jnlp -->
+ <keystorepath>${keystorepath}</keystorepath>
+ <keystorealias>CodeLutin</keystorealias>
+ <keystorepass>codelutin</keystorepass>
+
+ </properties>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/main/java</src>
+ <force>true</force>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ <classpathPrefix>lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
+ <execution>
+ <id>JnlpSun</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <copy file="${project.basedir}/src/main/jnlp/sun.jnlp"
+ todir="${project.basedir}/target/jnlp">
+ <filterset>
+ <filter token="help" value="javahelp-2.0.02.jar"/>
+ <filter token="url" value="${project.url}"/>
+ </filterset>
+ </copy>
+ <copy file="${project.build.directory}/lib/javahelp-2.0.02.jar"
+ todir="${project.basedir}/target/jnlp/lib"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <version>1.0-alpha-2</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jnlp</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <dependencies>
+ <excludes>
+ <exclude>javax.help:javahelp</exclude>
+ </excludes>
+ </dependencies>
+ <libPath>lib</libPath>
+ <jnlp>
+ <outputFile>launch-${project.artifactId}.jnlp</outputFile>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ </jnlp>
+
+ <sign>
+ <keystore>${keystorepath}</keystore>
+ <keypass/>
+ <storepass>${keystorepass}</storepass>
+ <storetype/>
+ <alias>${keystorealias}</alias>
+ <validity/>
+ <dnameCn/>
+ <dnameOu/>
+ <dnameO/>
+ <dnameL/>
+ <dnameSt/>
+ <dnameC/>
+ <verify>false</verify>
+ <keystoreConfig>
+ <delete>false</delete>
+ <gen>false</gen>
+ </keystoreConfig>
+ </sign>
+
+
+ <pack200>false</pack200>
+ <gzip>true</gzip>
+ <verbose>false</verbose>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/Calculator.css
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/Calculator.css (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/Calculator.css 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,52 @@
+Application {
+ lookAndFeel: system;
+}
+
+#table {
+ border: {BorderFactory.createEmptyBorder(4, 4, 4, 4)};
+ font-face: "Trebuchet MS";
+}
+
+#display {
+ background: #BCE5AD;
+ opaque: true;
+ horizontalAlignment: right;
+ border: {BorderFactory.createBevelBorder(BevelBorder.LOWERED)};
+ font-size: 22;
+ font-weight: bold;
+}
+
+#display:{object.getText().startsWith("-")} {
+ foreground: red;
+}
+
+JButton {
+ font-size: 18;
+ width: 60;
+ height: 35;
+}
+
+JButton.digit {
+ foreground: blue;
+}
+
+JButton#dot {
+ font-size: 20;
+}
+
+JButton.operator {
+ font-size: 18;
+ foreground: #009900;
+}
+
+JButton.clear {
+ foreground: red;
+}
+
+JButton:mouseover {
+ font-weight: bold;
+}
+
+JButton.operator:mouseover {
+ font-weight: normal;
+}
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/Calculator.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/Calculator.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/Calculator.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,46 @@
+<Application title='Calculator'>
+ <style source='Calculator.css'/>
+
+ <!-- use fully-qualified name just in case this is compiled into a different package -->
+ <examples.Calculator.CalculatorEngine id='engine'/>
+
+ <Table fill='both' id='table'>
+ <row>
+ <cell columns='4'><JLabel id='display' text='{engine.getDisplayText()}'/></cell>
+ </row>
+
+ <row>
+ <cell columns='2'><JButton id='c' text='C' onActionPerformed='engine.clear()' styleClass='clear'/></cell>
+ <cell><JButton id='ce' text='CE' onActionPerformed='engine.clearEntry()' styleClass='clear'/></cell>
+ <cell><JButton id='equals' text='=' onActionPerformed='engine.equal()' styleClass='operator'/></cell>
+ </row>
+
+ <row>
+ <cell><JButton id='d7' text='7' onActionPerformed='engine.digit(7)' styleClass='digit'/></cell>
+ <cell><JButton id='d8' text='8' onActionPerformed='engine.digit(8)' styleClass='digit'/></cell>
+ <cell><JButton id='d9' text='9' onActionPerformed='engine.digit(9)' styleClass='digit'/></cell>
+ <cell><JButton id='plus' text='+' onActionPerformed='engine.add()' styleClass='operator'/></cell>
+ </row>
+
+ <row>
+ <cell><JButton id='d4' text='4' onActionPerformed='engine.digit(4)' styleClass='digit'/></cell>
+ <cell><JButton id='d5' text='5' onActionPerformed='engine.digit(5)' styleClass='digit'/></cell>
+ <cell><JButton id='d6' text='6' onActionPerformed='engine.digit(6)' styleClass='digit'/></cell>
+ <cell><JButton id='subtract' text='-' onActionPerformed='engine.subtract()' styleClass='operator'/></cell>
+ </row>
+
+ <row>
+ <cell><JButton id='d1' text='1' onActionPerformed='engine.digit(1)' styleClass='digit'/></cell>
+ <cell><JButton id='d2' text='2' onActionPerformed='engine.digit(2)' styleClass='digit'/></cell>
+ <cell><JButton id='d3' text='3' onActionPerformed='engine.digit(3)' styleClass='digit'/></cell>
+ <cell><JButton id='multiply' text='x' onActionPerformed='engine.multiply()' styleClass='operator'/></cell>
+ </row>
+
+ <row>
+ <cell><JButton id='d0' text='0' onActionPerformed='engine.digit(0)' styleClass='digit'/></cell>
+ <cell><JButton id='sign' text='+/-' onActionPerformed='engine.toggleSign()' styleClass='operator'/></cell>
+ <cell><JButton id='dot' text='.' onActionPerformed='engine.dot()' styleClass='digit'/></cell>
+ <cell><JButton id='divide' text='÷' onActionPerformed='engine.divide()' styleClass='operator'/></cell>
+ </row>
+ </Table>
+</Application>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/CalculatorEngine.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/CalculatorEngine.java (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/java/examples/Calculator/CalculatorEngine.java 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,165 @@
+package examples.Calculator;
+
+import java.beans.*;
+import java.math.*;
+
+public class CalculatorEngine {
+ public static final String DISPLAY_TEXT_PROPERTY = "displayText";
+
+ public static final int ADD = 0;
+ public static final int SUBTRACT = 1;
+ public static final int MULTIPLY =2;
+ public static final int DIVIDE = 3;
+ public static final int RESULT = 4;
+
+ private int operation = -1;
+ private boolean clear = true; // true to clear on next key
+ private String displayText = "0";
+ private BigDecimal value;
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+
+ public String getDisplayText() {
+ return displayText;
+ }
+
+
+ public void setDisplayText(String displayText) {
+ String oldDisplayText = this.displayText;
+ this.displayText = displayText;
+ firePropertyChange(DISPLAY_TEXT_PROPERTY, oldDisplayText, displayText);
+ }
+
+
+ public void clear() {
+ clearEntry();
+ value = new BigDecimal(0);
+ operation = -1;
+ }
+
+
+ public void clearEntry() {
+ setDisplayText("0");
+ clear = true;
+ }
+
+
+ private void checkClear() {
+ if (clear) {
+ setDisplayText("");
+ clear = false;
+ }
+ }
+
+
+ public void digit(int digit) {
+ checkClear();
+ setDisplayText(getDisplayText() + String.valueOf(digit));
+ }
+
+
+ public void dot() {
+ checkClear();
+ if (getDisplayText().indexOf('.') == -1) {
+ if (getDisplayText().length() == 0)
+ setDisplayText("0.");
+ else
+ setDisplayText(getDisplayText() + '.');
+ }
+ }
+
+
+ public void toggleSign() {
+ String text = getDisplayText();
+ if (text.startsWith("-"))
+ text = text.substring(1);
+ else if (!text.equals("0"))
+ text = '-' + text;
+ setDisplayText(text);
+ }
+
+
+ public void equal() {
+ BigDecimal displayValue = new BigDecimal(getDisplayText());
+ BigDecimal newValue = displayValue;
+ switch (operation) {
+ case ADD: newValue = value.add(displayValue); break;
+ case SUBTRACT: newValue = value.subtract(displayValue); break;
+ case MULTIPLY: newValue = value.multiply(displayValue); break;
+ case DIVIDE: newValue = value.divide(displayValue, 8, BigDecimal.ROUND_HALF_UP); break;
+ }
+ value = newValue;
+ setDisplayText(toString(newValue));
+ clear = true;
+ operation = -1;
+ }
+
+
+ public static String toString(BigDecimal decimal) {
+ // can't use stripTrailingZeros, as it wasn't introduced until 1.5
+ String result = decimal.toString();
+ if (result.indexOf(".") != -1) {
+ while (result.endsWith("0"))
+ result = result.substring(0, result.length() - 1);
+ if (result.endsWith("."))
+ result = result.substring(0, result.length() - 1);
+ }
+ return result;
+ }
+
+
+ public void operation(int operation) {
+ if (this.operation != -1)
+ equal();
+ else {
+ value = new BigDecimal(getDisplayText());
+ clear = true;
+ }
+ this.operation = operation;
+ }
+
+
+ public void add() {
+ operation(ADD);
+ }
+
+
+ public void subtract() {
+ operation(SUBTRACT);
+ }
+
+
+ public void multiply() {
+ operation(MULTIPLY);
+ }
+
+
+ public void divide() {
+ operation(DIVIDE);
+ }
+
+
+ public void addPropertyChangeListener(PropertyChangeListener listener) {
+ propertyChangeSupport.addPropertyChangeListener(listener);
+ }
+
+
+ public void addPropertyChangeListener(String property, PropertyChangeListener listener) {
+ propertyChangeSupport.addPropertyChangeListener(property, listener);
+ }
+
+
+ public void removePropertyChangeListener(PropertyChangeListener listener) {
+ propertyChangeSupport.removePropertyChangeListener(listener);
+ }
+
+
+ public void removePropertyChangeListener(String property, PropertyChangeListener listener) {
+ propertyChangeSupport.removePropertyChangeListener(property, listener);
+ }
+
+
+ protected void firePropertyChange(String property, Object oldValue, Object newValue) {
+ propertyChangeSupport.firePropertyChange(property, oldValue, newValue);
+ }
+}
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/sun.jnlp
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/sun.jnlp (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/sun.jnlp 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0+" codebase="@url@" href="sun.jnlp">
+ <information>
+ <title>Sun MicroSystems</title>
+ <vendor>Sun MicroSystems, Inc.</vendor>
+ <offline-allowed/>
+ </information>
+ <resources>
+ <jar href="lib/@help@"/>
+ </resources>
+ <component-desc/>
+</jnlp>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/template.vm
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/template.vm (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Calculator/src/main/jnlp/template.vm 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp
+ spec="1.0+"
+ codebase="$project.Url" href="$outputFile">
+ <information>
+ <title>$informationTitle</title>
+ <vendor>$informationVendor</vendor>
+ <homepage href="$informationHomepage" />
+ <description>$informationDescription</description>
+ <offline-allowed />
+ </information>
+ <resources>
+ <j2se version="1.5+" max-heap-size="512m"/>
+ $dependencies
+ <extension name="sun" href="sun.jnlp"/>
+ </resources>
+ <security>
+ <all-permissions />
+ </security>
+ <application-desc main-class="$mainClass" />
+</jnlp>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/pom.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/pom.xml 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.codelutin</groupId>
+ <artifactId>lutinjaxx</artifactId>
+ <version>0.5-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>Components</artifactId>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>Components example</name>
+ <version>0.5-SNAPSHOT</version>
+ <inceptionYear>2008</inceptionYear>
+ <description>Jaxx Calculator example</description>
+ <url>${site.home.url}/lutinjaxx/maven-jaxx-plugin/examples</url>
+
+ <properties>
+ <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+
+ <!-- jnlp -->
+ <keystorepath>${keystorepath}</keystorepath>
+ <keystorealias>CodeLutin</keystorealias>
+ <keystorepass>codelutin</keystorepass>
+
+ </properties>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/main/java</src>
+ <force>true</force>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ <classpathPrefix>lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
+ <execution>
+ <id>JnlpSun</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <copy file="${project.basedir}/src/main/jnlp/sun.jnlp"
+ todir="${project.basedir}/target/jnlp">
+ <filterset>
+ <filter token="help" value="javahelp-2.0.02.jar"/>
+ <filter token="url" value="${project.url}"/>
+ </filterset>
+ </copy>
+ <copy file="${project.build.directory}/lib/javahelp-2.0.02.jar"
+ todir="${project.basedir}/target/jnlp/lib"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <version>1.0-alpha-2</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jnlp</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <dependencies>
+ <excludes>
+ <exclude>javax.help:javahelp</exclude>
+ </excludes>
+ </dependencies>
+ <libPath>lib</libPath>
+ <jnlp>
+ <outputFile>launch-${project.artifactId}.jnlp</outputFile>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ </jnlp>
+
+ <sign>
+ <keystore>${keystorepath}</keystore>
+ <keypass/>
+ <storepass>${keystorepass}</storepass>
+ <storetype/>
+ <alias>${keystorealias}</alias>
+ <validity/>
+ <dnameCn/>
+ <dnameOu/>
+ <dnameO/>
+ <dnameL/>
+ <dnameSt/>
+ <dnameC/>
+ <verify>false</verify>
+ <keystoreConfig>
+ <delete>false</delete>
+ <gen>false</gen>
+ </keystoreConfig>
+ </sign>
+
+
+ <pack200>false</pack200>
+ <gzip>true</gzip>
+ <verbose>false</verbose>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/Components.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/Components.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/Components.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,81 @@
+<Application title="Component Demo" width='600' height='600' defaultCloseOperation='exit_on_close'>
+ <script>
+ protected void changePanel() {
+ Object value = list.getSelectionValue();
+ if (value instanceof DemoPanel) {
+ cardLayout.show(preview, ((DemoPanel) value).getLabel());
+ }
+ }
+ </script>
+ <JSplitPane dividerLocation='200'>
+ <JScrollPane>
+ <JTree id='list' showsRootHandles='true' onValueChanged='changePanel()'
+ cellRenderer='{new javax.swing.tree.DefaultTreeCellRenderer() {
+ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
+ if (value instanceof DemoPanel)
+ value = ((DemoPanel) value).getLabel();
+ return super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
+ }
+ }
+ }'>
+ <item value='Buttons'>
+ <item value='{buttonDemo}'/>
+ <item value='{checkBoxDemo}'/>
+ <item value='{radioButtonDemo}'/>
+ <item value='{toggleButtonDemo}'/>
+ </item>
+
+ <item value='Form elements'>
+ <item value='Text'>
+ <item value='{passwordFieldDemo}'/>
+ <item value='{textFieldDemo}'/>
+ <item value='{textAreaDemo}'/>
+ </item>
+
+ <item value='{comboBoxDemo}'/>
+ <item value='{listDemo}'/>
+ <item value='{sliderDemo}'/>
+ <item value='{spinnerDemo}'/>
+ </item>
+
+ <item value='Layout components'>
+ <item value='{splitPaneDemo}'/>
+ </item>
+
+ <item value='Menus'>
+ <item value='{menuItemDemo}'/>
+ <item value='{checkBoxMenuItemDemo}'/>
+ <item value='{radioButtonMenuItemDemo}'/>
+ </item>
+
+ <item value='Windows'>
+ <item value='{dialogDemo}'/>
+ </item>
+
+ <item value='{progressBarDemo}'/>
+ </JTree>
+ </JScrollPane>
+
+ <java.awt.CardLayout id='cardLayout'/>
+
+ <JPanel id='preview' layout='{cardLayout}'>
+ <examples.Components.JButtonDemo id='buttonDemo' constraints='buttonDemo.getLabel()'/>
+ <examples.Components.JCheckBoxDemo id='checkBoxDemo' constraints='checkBoxDemo.getLabel()'/>
+ <examples.Components.JCheckBoxMenuItemDemo id='checkBoxMenuItemDemo' constraints='checkBoxMenuItemDemo.getLabel()'/>
+ <examples.Components.JComboBoxDemo id='comboBoxDemo' constraints='comboBoxDemo.getLabel()'/>
+ <examples.Components.JDialogDemo id='dialogDemo' constraints='dialogDemo.getLabel()'/>
+ <examples.Components.JListDemo id='listDemo' constraints='listDemo.getLabel()'/>
+ <examples.Components.JMenuItemDemo id='menuItemDemo' constraints='menuItemDemo.getLabel()'/>
+ <examples.Components.JPasswordFieldDemo id='passwordFieldDemo' constraints='passwordFieldDemo.getLabel()'/>
+ <examples.Components.JProgressBarDemo id='progressBarDemo' constraints='progressBarDemo.getLabel()'/>
+ <examples.Components.JSliderDemo id='sliderDemo' constraints='sliderDemo.getLabel()'/>
+ <examples.Components.JSpinnerDemo id='spinnerDemo' constraints='spinnerDemo.getLabel()'/>
+ <examples.Components.JSplitPaneDemo id='splitPaneDemo' constraints='splitPaneDemo.getLabel()'/>
+ <examples.Components.JRadioButtonDemo id='radioButtonDemo' constraints='radioButtonDemo.getLabel()'/>
+ <examples.Components.JRadioButtonMenuItemDemo id='radioButtonMenuItemDemo' constraints='radioButtonMenuItemDemo.getLabel()'/>
+ <examples.Components.JToggleButtonDemo id='toggleButtonDemo' constraints='toggleButtonDemo.getLabel()'/>
+ <examples.Components.JTextFieldDemo id='textFieldDemo' constraints='textFieldDemo.getLabel()'/>
+ <examples.Components.JTextAreaDemo id='textAreaDemo' constraints='textAreaDemo.getLabel()'/>
+ </JPanel>
+ </JSplitPane>
+</Application>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/DemoPanel.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/DemoPanel.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/DemoPanel.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,45 @@
+<JTabbedPane id='top'>
+ <script><![CDATA[
+ import java.io.*;
+
+ public String getLabel() {
+ String name = getClass().getName();
+ name = name.substring(name.lastIndexOf(".") + 1);
+ if (name.endsWith("Demo"))
+ name = name.substring(0, name.length() - "Demo".length());
+ return name;
+ }
+
+
+ public String getDemoTabTitle() {
+ return getLabel() + " Demo";
+ }
+
+
+ public String loadSource() {
+ try {
+ String className = getClass().getName();
+ Reader in = new InputStreamReader(getClass().getResourceAsStream(className.substring(className.lastIndexOf(".") + 1) + ".jaxx"));
+ StringWriter out = new StringWriter();
+ char[] buffer = new char[2048];
+ int c;
+ while ((c = in.read(buffer)) > 0)
+ out.write(buffer, 0, c);
+ return out.toString();
+ }
+ catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ ]]></script>
+
+ <tab title='{getDemoTabTitle()}'>
+ <JPanel id='demoPanel'/>
+ </tab>
+
+ <tab title='Source'>
+ <JScrollPane height='100'>
+ <JTextArea text='{loadSource()}' editable='false'/>
+ </JScrollPane>
+ </tab>
+</JTabbedPane>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JButtonDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JButtonDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JButtonDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,28 @@
+<DemoPanel>
+ <style>
+ JButton.fancy {
+ foreground: blue;
+ font-face: Arial;
+ font-size: 18;
+ }
+
+ JButton.fancy:mouseover {
+ foreground: red;
+ font-style: italic;
+ }
+ </style>
+
+ <script>
+ public void buttonClicked(JButton button) {
+ JOptionPane.showMessageDialog(this, button.getText() + " clicked!", "onActionPerformed", JOptionPane.INFORMATION_MESSAGE);
+ }
+ </script>
+
+ <javax.swing.ImageIcon id='pencil' constructorParams='getClass().getResource("images/pencil_black.gif")'/>
+
+ <VBox id='demoPanel' horizontalAlignment='center' verticalAlignment='middle'>
+ <JButton text='Simple Button' onActionPerformed='buttonClicked((JButton) event.getSource())'/>
+ <JButton text='Fancy Button' styleClass='fancy' icon='{pencil}'
+ onActionPerformed='buttonClicked((JButton) event.getSource())'/>
+ </VBox>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JCheckBoxDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JCheckBoxDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JCheckBoxDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,29 @@
+<DemoPanel>
+ <script><![CDATA[
+ public String getText(boolean bold, boolean italic, boolean underline) {
+ String text ="Sample Text";
+ if (bold)
+ text = "<b>" + text + "</b>";
+ if (italic)
+ text = "<i>" + text + "</i>";
+ if (underline)
+ text = "<u>" + text + "</u>";
+ return "<html>" + text;
+ }
+ ]]></script>
+
+ <VBox id='demoPanel' horizontalAlignment='center' verticalAlignment='middle'>
+ <Table anchor='west'>
+ <row>
+ <cell><JCheckBox id='bold' text='Bold' mnemonic='B'/></cell>
+ <cell rows='3'><JLabel font='{new Font("Arial", 0, 18)}' text='{getText(bold.isSelected(), italic.isSelected(), underline.isSelected())}'/></cell>
+ </row>
+ <row>
+ <cell><JCheckBox id='italic' text='Italic' mnemonic='I'/></cell>
+ </row>
+ <row>
+ <cell><JCheckBox id='underline' text='Underline' mnemonic='U'/></cell>
+ </row>
+ </Table>
+ </VBox>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JCheckBoxMenuItemDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JCheckBoxMenuItemDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JCheckBoxMenuItemDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,59 @@
+<JMenuItemDemo>
+ <style>
+ .form {
+ enabled: { enabledCheckBox.isSelected() };
+ editable: { editableCheckBox.isSelected() };
+ }
+ </style>
+
+ <JMenuBar id='menuBar'>
+ <JMenu text='View'>
+ <JCheckBoxMenuItem id='enabledCheckBox' text='Enabled' selected='true'/>
+ <JCheckBoxMenuItem id='editableCheckBox' text='Editable' selected='true'/>
+ </JMenu>
+ </JMenuBar>
+
+ <Table id='framePanel' anchor='northwest'>
+ <row>
+ <cell>
+ <JLabel text='First Name:' displayedMnemonic='F' labelFor='{firstName}'/>
+ </cell>
+
+ <cell weightx='1' fill='horizontal'>
+ <JTextField id='firstName' styleClass="form"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Last Name:' displayedMnemonic='L' labelFor='{lastName}'/>
+ </cell>
+
+ <cell fill='horizontal'>
+ <JTextField id='lastName' styleClass="form"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Email Address:' displayedMnemonic='E' labelFor='{email}'/>
+ </cell>
+
+ <cell fill='horizontal'>
+ <JTextField id='email' styleClass="form"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Comments:' displayedMnemonic='C' labelFor='{comments}'/>
+ </cell>
+
+ <cell weightx='1' weighty='1' fill='both'>
+ <JScrollPane width='150' height='75'>
+ <JTextArea id='comments' styleClass="form"/>
+ </JScrollPane>
+ </cell>
+ </row>
+ </Table>
+</JMenuItemDemo>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JComboBoxDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JComboBoxDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JComboBoxDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,21 @@
+<DemoPanel>
+ <Table id='demoPanel'>
+ <row>
+ <cell>
+ <JLabel text='Button label:'/>
+ </cell>
+
+ <cell>
+ <JComboBox id='comboBox' editable='true'>
+ <item value='OK' selected='true'/>
+ <item value='Cancel'/>
+ <item value='Help'/>
+ </JComboBox>
+ </cell>
+
+ <cell>
+ <JButton text='{comboBox.getSelectedItem()}'/>
+ </cell>
+ </row>
+ </Table>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JDialogDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JDialogDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JDialogDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,78 @@
+<DemoPanel>
+ <script>
+ String username;
+ String password;
+
+ private class OKAction extends javax.swing.AbstractAction {
+ public OKAction() {
+ putValue(NAME, "OK");
+ }
+
+
+ public void actionPerformed(ActionEvent e) {
+ username = usernameField.getText();
+ password = new String(passwordField.getPassword());
+ dialog.dispose();
+ }
+ }
+
+
+ private class CancelAction extends javax.swing.AbstractAction {
+ public CancelAction() {
+ putValue(NAME, "Cancel");
+ }
+
+
+ public void actionPerformed(ActionEvent e) {
+ dialog.dispose();
+ }
+ }
+
+ JRootPane rootPane = dialog.getRootPane();
+ rootPane.setDefaultButton(ok);
+ rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "cancel");
+ rootPane.getActionMap().put("cancel", new CancelAction());
+ </script>
+
+ <JDialog title='Sign on' id='dialog' modal='true' onWindowOpened='dialog.setLocationRelativeTo(demoPanel);
+ passwordField.setText("");'>
+ <Table>
+ <row>
+ <cell>
+ <JLabel text='Username:' displayedMnemonic='U' labelFor='{usernameField}'/>
+ </cell>
+
+ <cell>
+ <JTextField id='usernameField'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Password:' displayedMnemonic='P' labelFor='{passwordField}'/>
+ </cell>
+
+ <cell>
+ <JPasswordField id='passwordField'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell columns='2'>
+ <JPanel layout='{new GridLayout(1, 0, 6, 6)}'>
+ <JButton id='ok' text='OK' action='{new OKAction()}'/>
+ <JButton text='Cancel' action='{new CancelAction()}'/>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
+ </JDialog>
+
+ <VBox id='demoPanel' horizontalAlignment='center' verticalAlignment='middle'>
+ <JButton text='Show password dialog' onActionPerformed='dialog.setVisible(true)'/>
+ <VBox>
+ <JLabel text='{username != null ? "Username: " + username : ""}'/>
+ <JLabel text='{password != null ? "Password: " + password : ""}'/>
+ </VBox>
+ </VBox>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JListDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JListDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JListDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,59 @@
+<DemoPanel>
+ <Table id='demoPanel'>
+ <row>
+ <cell>
+ <JLabel text='Supported Swing components:'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JScrollPane>
+ <JList>
+ <item value='JApplet'/>
+ <item value='JButton'/>
+ <item value='JCheckBox'/>
+ <item value='JCheckBoxMenuItem'/>
+ <item value='JColorChooser'/>
+ <item value='JComboBox'/>
+ <item value='JDesktopPane'/>
+ <item value='JDialog'/>
+ <item value='JEditorPane'/>
+ <item value='JFileChooser'/>
+ <item value='JFormattedTextField'/>
+ <item value='JFrame'/>
+ <item value='JInternalFrame'/>
+ <item value='JLabel'/>
+ <item value='JLayeredPane'/>
+ <item value='JList'/>
+ <item value='JMenu'/>
+ <item value='JMenuBar'/>
+ <item value='JMenuItem'/>
+ <item value='JOptionPane'/>
+ <item value='JPanel'/>
+ <item value='JPasswordField'/>
+ <item value='JPopupMenu'/>
+ <item value='JProgressBar'/>
+ <item value='JRadioButton'/>
+ <item value='JRadioButtonMenuItem'/>
+ <item value='JScrollBar'/>
+ <item value='JScrollPane'/>
+ <item value='JSeparator'/>
+ <item value='JSlider'/>
+ <item value='JSpinner'/>
+ <item value='JSplitPane'/>
+ <item value='JTabbedPane'/>
+ <item value='JTable'/>
+ <item value='JTextArea'/>
+ <item value='JTextField'/>
+ <item value='JTextPane'/>
+ <item value='JToggleButton'/>
+ <item value='JToolBar'/>
+ <item value='JTree'/>
+ <item value='JWindow'/>
+ </JList>
+ </JScrollPane>
+ </cell>
+ </row>
+ </Table>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JMenuItemDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JMenuItemDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JMenuItemDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,23 @@
+<DemoPanel>
+ <script>
+ private void displayMessage() {
+ JOptionPane.showMessageDialog(demoPanel, "Menu item clicked");
+ }
+ </script>
+
+ <JPanel id='demoPanel'>
+ <JDesktopPane width='350' height='400' background='{null}'>
+ <JInternalFrame title='JMenu demo' width='300' height='250' resizable='true'>
+ <JMenuBar id='menuBar'>
+ <JMenu text='Demo'>
+ <JMenuItem text='Message Box' onActionPerformed='displayMessage()'/>
+ </JMenu>
+ </JMenuBar>
+
+ <JPanel id='framePanel'>
+ <JLabel text='JMenu demo' id='demoMessage' horizontalAlignment='center'/>
+ </JPanel>
+ </JInternalFrame>
+ </JDesktopPane>
+ </JPanel>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JPasswordFieldDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JPasswordFieldDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JPasswordFieldDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,10 @@
+<DemoPanel>
+ <VBox id='demoPanel' horizontalAlignment='center' verticalAlignment='middle'>
+ <HBox>
+ <JLabel text='Password:' displayedMnemonic='P' labelFor='{password}'/>
+ <JPasswordField id='password'/>
+ </HBox>
+
+ <JLabel text='You entered: {new String(password.getPassword())}'/>
+ </VBox>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JProgressBarDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JProgressBarDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JProgressBarDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,72 @@
+<DemoPanel>
+ <script><![CDATA[
+ import javax.swing.Timer;
+
+ int red = 0;
+ int green = 0;
+ int blue = 0;
+ int speed = 2;
+ int redDirection = 1;
+ int greenDirection = 1;
+ int blueDirection = 1;
+
+ Timer redTimer = new Timer(5, new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ red = Math.max(0, Math.min(255, red + speed * redDirection));
+ if (red == 0 || red == 255)
+ redDirection = -redDirection;
+ }
+ });
+
+ Timer greenTimer = new Timer(50, new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ green = Math.max(0, Math.min(255, green + speed * greenDirection));
+ if (green == 0 || green == 255)
+ greenDirection = -greenDirection;
+ }
+ });
+
+ Timer blueTimer = new Timer(500, new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ blue = Math.max(0, Math.min(255, blue + speed * blueDirection));
+ if (blue == 0 || blue == 255)
+ blueDirection = -blueDirection;
+ }
+ });
+
+ redTimer.start();
+ greenTimer.start();
+ blueTimer.start();
+ ]]></script>
+
+ <Table insets='6' id='demoPanel'>
+ <row>
+ <cell columns='3'>
+ <JLabel text='Welcome to the JAXX framework!' font='{UIManager.getFont("Label.font").deriveFont(18f)}' foreground='{new Color(red, green, blue)}'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell columns='3' fill='horizontal'>
+ <JProgressBar foreground='{new Color(red, 0, 0)}' value='{red}' maximum='255'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell columns='3' fill='horizontal'>
+ <JProgressBar foreground='{new Color(0, green, 0)}' value='{green}' maximum='255'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell columns='3' fill='horizontal'>
+ <JProgressBar foreground='{new Color(0, 0, blue)}' value='{blue}' maximum='255'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell weightx='1' anchor='east'><JButton text='Start' onActionPerformed='redTimer.start(); greenTimer.start(); blueTimer.start()'/></cell>
+ <cell><JButton text='Stop' onActionPerformed='redTimer.stop(); greenTimer.stop(); blueTimer.stop()'/></cell>
+ </row>
+ </Table>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JRadioButtonDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JRadioButtonDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JRadioButtonDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,11 @@
+<DemoPanel>
+ <HBox id='demoPanel' horizontalAlignment='center' verticalAlignment='middle'>
+ <VBox>
+ <JRadioButton text='Animal' value='Lynx.jpg' buttonGroup='radioButtons' selected='true'/>
+ <JRadioButton text='Vegetable' buttonGroup='radioButtons' value='Tomato.jpg'/>
+ <JRadioButton text='Mineral' buttonGroup='radioButtons' value='Amethyst.jpg'/>
+ </VBox>
+
+ <JLabel icon='{new ImageIcon(getClass().getResource("images/" + radioButtons.getSelectedValue()))}'/>
+ </HBox>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JRadioButtonMenuItemDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JRadioButtonMenuItemDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JRadioButtonMenuItemDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,14 @@
+<JMenuItemDemo>
+ <JMenuBar id='menuBar'>
+ <JMenu text='Font size'>
+ <JRadioButtonMenuItem text='10' value='{new Integer(10)}' buttonGroup='fontSize'/>
+ <JRadioButtonMenuItem text='12' value='{new Integer(12)}' buttonGroup='fontSize' selected='true'/>
+ <JRadioButtonMenuItem text='14' value='{new Integer(14)}' buttonGroup='fontSize'/>
+ <JRadioButtonMenuItem text='18' value='{new Integer(18)}' buttonGroup='fontSize'/>
+ <JRadioButtonMenuItem text='24' value='{new Integer(24)}' buttonGroup='fontSize'/>
+ </JMenu>
+ </JMenuBar>
+
+ <JLabel id='demoMessage' text='Font size: {fontSize.getSelectedValue()}' horizontalAlignment='center'
+ font='{UIManager.getFont("Label.font").deriveFont(fontSize.getSelectedValue() != null ? (float) ((Integer) fontSize.getSelectedValue()).intValue() : 12)}'/>
+</JMenuItemDemo>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSliderDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSliderDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSliderDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,12 @@
+<DemoPanel>
+ <HBox id='demoPanel' horizontalAlignment='center' verticalAlignment='middle'>
+ <VBox>
+ <JSlider id='red' maximum='255' value='200'/>
+ <JSlider id='green' maximum='255' value='180'/>
+ <JSlider id='blue' maximum='255' value='240'/>
+ </VBox>
+
+ <JPanel border='{BorderFactory.createEtchedBorder()}' width='64' height='64'
+ background='{new Color(red.getValue(), green.getValue(), blue.getValue())}'/>
+ </HBox>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSpinnerDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSpinnerDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSpinnerDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,13 @@
+<DemoPanel>
+ <HBox id='demoPanel' horizontalAlignment='center' verticalAlignment='middle'>
+ <JLabel text='Spacing:' displayedMnemonic='S' labelFor='{spinner}'/>
+
+ <JSpinner minimum='0' maximum='50' id='spinner'/>
+
+ <VBox spacing='{((Integer) spinner.getValue()).intValue()}'>
+ <JLabel text='Use the spinner to'/>
+ <JLabel text='adjust the spacing'/>
+ <JLabel text='between these lines'/>
+ </VBox>
+ </HBox>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSplitPaneDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSplitPaneDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JSplitPaneDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,13 @@
+<DemoPanel>
+ <JPanel id='demoPanel' layout='{new BorderLayout()}'>
+ <JSplitPane>
+ <JScrollPane>
+ <JLabel icon='{new ImageIcon(getClass().getResource("images/Amethyst.jpg"))}'/>
+ </JScrollPane>
+
+ <JScrollPane>
+ <JLabel icon='{new ImageIcon(getClass().getResource("images/Lynx.jpg"))}'/>
+ </JScrollPane>
+ </JSplitPane>
+ </JPanel>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JTextAreaDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JTextAreaDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JTextAreaDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,33 @@
+<DemoPanel>
+ <Table id='demoPanel' anchor='northwest'>
+ <row>
+ <cell>
+ <JLabel text='Normal text:' displayedMnemonic='N' labelFor='{textArea}'/>
+ </cell>
+
+ <cell weightx='1' fill='both'>
+ <JScrollPane height='120'>
+ <JTextArea id='textArea' text='Try typing some text here.'/>
+ </JScrollPane>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
+ <JLabel text='Upper case text:'/>
+ </cell>
+
+ <cell weightx='1' fill='both'>
+ <JScrollPane height='120'>
+ <JTextArea editable='false' background='{null}' text='{textArea.getText().toUpperCase()}'/>
+ </JScrollPane>
+ </cell>
+ </row>
+
+ <row>
+ <cell weighty='1'>
+ <JPanel/>
+ </cell>
+ </row>
+ </Table>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JTextFieldDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JTextFieldDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JTextFieldDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,21 @@
+<DemoPanel>
+ <JPanel id='demoPanel'>
+ <Table>
+ <row>
+ <cell>
+ <JLabel text='Your name:' displayedMnemonic='n' labelFor='{textField}'/>
+ </cell>
+
+ <cell>
+ <JTextField id='textField'/>
+ </cell>
+ </row>
+
+ <row>
+ <cell columns='2'>
+ <JButton text='Greet' onActionPerformed='JOptionPane.showMessageDialog(demoPanel, "Hello, " + textField.getText() + "!")'/>
+ </cell>
+ </row>
+ </Table>
+ </JPanel>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JToggleButtonDemo.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JToggleButtonDemo.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/JToggleButtonDemo.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,9 @@
+<DemoPanel>
+ <HBox id='demoPanel' horizontalAlignment='center' verticalAlignment='middle'>
+ <JToggleButton text='1' id='one'/>
+ <JToggleButton text='2' id='two'/>
+ <JToggleButton text='3' id='three'/>
+
+ <JLabel text='Total: {(one.isSelected() ? 1 : 0) + (two.isSelected() ? 2 : 0) + (three.isSelected() ? 3 : 0)}'/>
+ </HBox>
+</DemoPanel>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/Amethyst.jpg
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/Amethyst.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/Lynx.jpg
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/Lynx.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/Tomato.jpg
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/Tomato.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/pencil_black.gif
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/java/examples/Components/images/pencil_black.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/jnlp/sun.jnlp
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/jnlp/sun.jnlp (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/jnlp/sun.jnlp 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0+" codebase="@url@" href="sun.jnlp">
+ <information>
+ <title>Sun MicroSystems</title>
+ <vendor>Sun MicroSystems, Inc.</vendor>
+ <offline-allowed/>
+ </information>
+ <resources>
+ <jar href="lib/@help@"/>
+ </resources>
+ <component-desc/>
+</jnlp>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/jnlp/template.vm
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/jnlp/template.vm (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Components/src/main/jnlp/template.vm 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp
+ spec="1.0+"
+ codebase="$project.Url" href="$outputFile">
+ <information>
+ <title>$informationTitle</title>
+ <vendor>$informationVendor</vendor>
+ <homepage href="$informationHomepage" />
+ <description>$informationDescription</description>
+ <offline-allowed />
+ </information>
+ <resources>
+ <j2se version="1.5+" max-heap-size="512m"/>
+ $dependencies
+ <extension name="sun" href="sun.jnlp"/>
+ </resources>
+ <security>
+ <all-permissions />
+ </security>
+ <application-desc main-class="$mainClass" />
+</jnlp>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/pom.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/pom.xml 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.codelutin</groupId>
+ <artifactId>lutinjaxx</artifactId>
+ <version>0.5-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>Counter</artifactId>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>Counter example</name>
+ <version>0.5-SNAPSHOT</version>
+ <inceptionYear>2008</inceptionYear>
+ <description>Jaxx Calculator example</description>
+ <url>${site.home.url}/lutinjaxx/maven-jaxx-plugin/examples</url>
+
+ <properties>
+ <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+
+ <!-- jnlp -->
+ <keystorepath>${keystorepath}</keystorepath>
+ <keystorealias>CodeLutin</keystorealias>
+ <keystorepass>codelutin</keystorepass>
+
+ </properties>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/main/java</src>
+ <force>true</force>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ <classpathPrefix>lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
+ <execution>
+ <id>JnlpSun</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <copy file="${project.basedir}/src/main/jnlp/sun.jnlp"
+ todir="${project.basedir}/target/jnlp">
+ <filterset>
+ <filter token="help" value="javahelp-2.0.02.jar"/>
+ <filter token="url" value="${project.url}"/>
+ </filterset>
+ </copy>
+ <copy file="${project.build.directory}/lib/javahelp-2.0.02.jar"
+ todir="${project.basedir}/target/jnlp/lib"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <version>1.0-alpha-2</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jnlp</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <dependencies>
+ <excludes>
+ <exclude>javax.help:javahelp</exclude>
+ </excludes>
+ </dependencies>
+ <libPath>lib</libPath>
+ <jnlp>
+ <outputFile>launch-${project.artifactId}.jnlp</outputFile>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ </jnlp>
+
+ <sign>
+ <keystore>${keystorepath}</keystore>
+ <keypass/>
+ <storepass>${keystorepass}</storepass>
+ <storetype/>
+ <alias>${keystorealias}</alias>
+ <validity/>
+ <dnameCn/>
+ <dnameOu/>
+ <dnameO/>
+ <dnameL/>
+ <dnameSt/>
+ <dnameC/>
+ <verify>false</verify>
+ <keystoreConfig>
+ <delete>false</delete>
+ <gen>false</gen>
+ </keystoreConfig>
+ </sign>
+
+
+ <pack200>false</pack200>
+ <gzip>true</gzip>
+ <verbose>false</verbose>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/java/examples/Counter/Counter.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/java/examples/Counter/Counter.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/java/examples/Counter/Counter.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,9 @@
+<Application title="Counter">
+ <script>int count;</script>
+ <JTextField text='{count}' constraints='BorderLayout.NORTH'/>
+ <HBox constraints='BorderLayout.SOUTH'>
+ <JButton text='Dec (-)' onActionPerformed='count--'/>
+ <JButton text='Reset' onActionPerformed='count = 0'/>
+ <JButton text='Inc (+)' onActionPerformed='count++'/>
+ </HBox>
+</Application>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/jnlp/sun.jnlp
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/jnlp/sun.jnlp (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/jnlp/sun.jnlp 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0+" codebase="@url@" href="sun.jnlp">
+ <information>
+ <title>Sun MicroSystems</title>
+ <vendor>Sun MicroSystems, Inc.</vendor>
+ <offline-allowed/>
+ </information>
+ <resources>
+ <jar href="lib/@help@"/>
+ </resources>
+ <component-desc/>
+</jnlp>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/jnlp/template.vm
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/jnlp/template.vm (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/Counter/src/main/jnlp/template.vm 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp
+ spec="1.0+"
+ codebase="$project.Url" href="$outputFile">
+ <information>
+ <title>$informationTitle</title>
+ <vendor>$informationVendor</vendor>
+ <homepage href="$informationHomepage" />
+ <description>$informationDescription</description>
+ <offline-allowed />
+ </information>
+ <resources>
+ <j2se version="1.5+" max-heap-size="512m"/>
+ $dependencies
+ <extension name="sun" href="sun.jnlp"/>
+ </resources>
+ <security>
+ <all-permissions />
+ </security>
+ <application-desc main-class="$mainClass" />
+</jnlp>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/pom.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/pom.xml 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.codelutin</groupId>
+ <artifactId>lutinjaxx</artifactId>
+ <version>0.5-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>LabelStyle</artifactId>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>jaxx-core</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>LabelStyle example</name>
+ <version>0.5-SNAPSHOT</version>
+ <inceptionYear>2008</inceptionYear>
+ <description>Jaxx Calculator example</description>
+ <url>${site.home.url}/lutinjaxx/maven-jaxx-plugin/examples</url>
+
+ <properties>
+ <maven.jar.main.class>examples.${project.artifactId}.${project.artifactId}</maven.jar.main.class>
+
+ <!-- jnlp -->
+ <keystorepath>${keystorepath}</keystorepath>
+ <keystorealias>CodeLutin</keystorealias>
+ <keystorepass>codelutin</keystorepass>
+
+ </properties>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/main/java</src>
+ <force>true</force>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ <classpathPrefix>lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <!-- Ajout des libs signe par Sun dans un fichier jnlp separe -->
+ <execution>
+ <id>JnlpSun</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <copy file="${project.basedir}/src/main/jnlp/sun.jnlp"
+ todir="${project.basedir}/target/jnlp">
+ <filterset>
+ <filter token="help" value="javahelp-2.0.02.jar"/>
+ <filter token="url" value="${project.url}"/>
+ </filterset>
+ </copy>
+ <copy file="${project.build.directory}/lib/javahelp-2.0.02.jar"
+ todir="${project.basedir}/target/jnlp/lib"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <version>1.0-alpha-2</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>jnlp</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <dependencies>
+ <excludes>
+ <exclude>javax.help:javahelp</exclude>
+ </excludes>
+ </dependencies>
+ <libPath>lib</libPath>
+ <jnlp>
+ <outputFile>launch-${project.artifactId}.jnlp</outputFile>
+ <mainClass>${maven.jar.main.class}</mainClass>
+ </jnlp>
+
+ <sign>
+ <keystore>${keystorepath}</keystore>
+ <keypass/>
+ <storepass>${keystorepass}</storepass>
+ <storetype/>
+ <alias>${keystorealias}</alias>
+ <validity/>
+ <dnameCn/>
+ <dnameOu/>
+ <dnameO/>
+ <dnameL/>
+ <dnameSt/>
+ <dnameC/>
+ <verify>false</verify>
+ <keystoreConfig>
+ <delete>false</delete>
+ <gen>false</gen>
+ </keystoreConfig>
+ </sign>
+
+
+ <pack200>false</pack200>
+ <gzip>true</gzip>
+ <verbose>false</verbose>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/examples/LabelStyle/LabelStyle.css
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/examples/LabelStyle/LabelStyle.css (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/examples/LabelStyle/LabelStyle.css 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,34 @@
+JSlider {
+ paintTicks: true;
+}
+
+JSlider.color {
+ minorTickSpacing: 10;
+ majorTickSpacing: 50;
+ border: { BorderFactory.createEmptyBorder(1, 1, 1, 1) };
+}
+
+JSlider.color:focused {
+ border: { BorderFactory.createLineBorder(Color.BLACK, 1) };
+}
+
+JSlider#red:focused {
+ background: #E7ADAD;
+}
+
+JSlider#green:focused {
+ background: #B2E7AD;
+}
+
+JSlider#blue:focused {
+ background: #ADB2E7;
+}
+
+JSlider#dummySize {
+ minorTickSpacing: 2;
+ majorTickSpacing: 6;
+}
+
+JRadioButton {
+ enabled: { backgroundCheckbox.isSelected() };
+}
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/examples/LabelStyle/LabelStyle.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/examples/LabelStyle/LabelStyle.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/java/examples/LabelStyle/LabelStyle.jaxx 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,64 @@
+<Application title="LabelStyle.jaxx">
+ <style source="LabelStyle.css"/>
+
+ <Table anchor='north' fill='both'>
+ <row>
+ <cell weightx='1' weighty='1' insets='6, 3, 0, 0'>
+ <Table anchor='west' fill='both'>
+ <row>
+ <cell><JLabel text='Text:'/></cell>
+ <cell weightx='1'><JTextField id='text' text='Data Binding'/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Red:'/></cell>
+ <cell><JSlider id='red' value='128' maximum='255' styleClass='color'/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Green:'/></cell>
+ <cell><JSlider id='green' value='0' maximum='255' styleClass='color'/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Blue:'/></cell>
+ <cell><JSlider id='blue' value='255' maximum='255' styleClass='color'/></cell>
+ </row>
+
+ <row>
+ <cell><JLabel text='Size:'/></cell>
+ <cell><JSlider id='dummySize' value='36' minimum='6' maximum='60'/></cell>
+ </row>
+
+ <row>
+ <cell columns='2' fill='both' weighty='1'>
+ <JPanel border='{BorderFactory.createTitledBorder("Preview")}'
+ height='90'
+ layout='{new BorderLayout()}'>
+ <VBox background='{(Color)( backgroundCheckbox.isSelected() ? backgroundColor.getSelectedValue() : null)}'
+ margin='0'
+ horizontalAlignment='center'
+ verticalAlignment='middle'>
+ <JLabel text='{text.getText()}' font-size='{dummySize.getValue()}' foreground='{new Color(red.getValue(), green.getValue(), blue.getValue())}'/>
+ </VBox>
+ </JPanel>
+ </cell>
+ </row>
+ </Table>
+ </cell>
+
+ <cell>
+ <VBox spacing='0' border='{BorderFactory.createTitledBorder("Background")}'>
+ <JCheckBox id='backgroundCheckbox' text='Show Background'/>
+ <JRadioButton text='Red' buttonGroup='backgroundColor' value='{Color.RED}' selected='true'/>
+ <JRadioButton text='Orange' buttonGroup='backgroundColor' value='{Color.ORANGE}'/>
+ <JRadioButton text='Yellow' buttonGroup='backgroundColor' value='{Color.YELLOW}'/>
+ <JRadioButton text='Green' buttonGroup='backgroundColor' value='{Color.GREEN}'/>
+ <JRadioButton text='Cyan' buttonGroup='backgroundColor' value='{Color.CYAN}'/>
+ <JRadioButton text='Blue' buttonGroup='backgroundColor' value='{Color.BLUE}'/>
+ <JRadioButton text='Purple' buttonGroup='backgroundColor' value='{new Color(160, 30, 255)}'/>
+ </VBox>
+ </cell>
+ </row>
+ </Table>
+</Application>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/sun.jnlp
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/sun.jnlp (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/sun.jnlp 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0+" codebase="@url@" href="sun.jnlp">
+ <information>
+ <title>Sun MicroSystems</title>
+ <vendor>Sun MicroSystems, Inc.</vendor>
+ <offline-allowed/>
+ </information>
+ <resources>
+ <jar href="lib/@help@"/>
+ </resources>
+ <component-desc/>
+</jnlp>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/template.vm
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/template.vm (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/examples/LabelStyle/src/main/jnlp/template.vm 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp
+ spec="1.0+"
+ codebase="$project.Url" href="$outputFile">
+ <information>
+ <title>$informationTitle</title>
+ <vendor>$informationVendor</vendor>
+ <homepage href="$informationHomepage" />
+ <description>$informationDescription</description>
+ <offline-allowed />
+ </information>
+ <resources>
+ <j2se version="1.5+" max-heap-size="512m"/>
+ $dependencies
+ <extension name="sun" href="sun.jnlp"/>
+ </resources>
+ <security>
+ <all-permissions />
+ </security>
+ <application-desc main-class="$mainClass" />
+</jnlp>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/BuildExamples.java 2008-10-15 12:00:26 UTC (rev 910)
@@ -0,0 +1,99 @@
+package org.codelutin.jaxx;
+
+import junit.framework.TestCase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.VerificationException;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/** @author chemit */
+public class BuildExamples extends TestCase {
+
+ protected static final Log log = LogFactory.getLog(BuildExamples.class);
+
+ protected File srcDir;
+
+ protected File destDir;
+
+ protected File siteDir;
+ protected File siteDestDir;
+
+ protected Verifier verifier;
+
+ protected File getBasedir() {
+ String b = System.getenv("basedir");
+ if (b == null) {
+ b = new File("").getAbsolutePath();
+ }
+ return new File(b);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ log.info("start " + getName());
+ String dirname = getName().substring(4);
+
+ srcDir = new File(getBasedir(), "src" + File.separator + "examples" + File.separator + dirname);
+ destDir = new File(getBasedir(), "target" + File.separator + "examples" + File.separator + dirname);
+ siteDestDir = new File(getBasedir(), "target" + File.separator + "generated-site" + File.separator + "resources" + File.separator + "examples");
+ siteDir = new File(destDir, "target" + File.separator + "jnlp");
+
+ destDir.mkdirs();
+
+ FileUtils.copyDirectoryStructure(srcDir, destDir);
+
+ verifier = new Verifier(destDir.getAbsolutePath(), true);
+
+ List<String> cliOptions = new ArrayList<String>();
+ cliOptions.add("-Dmaven.verbose=true");
+ verifier.setCliOptions(cliOptions);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ srcDir = destDir = null;
+ if (verifier != null) {
+ verifier.resetStreams();
+ verifier = null;
+ }
+ }
+
+ /**
+ * fixme : make this test works again.
+ *
+ * @throws Exception if any
+ */
+ public void estComponents() throws Exception {
+ buildExample();
+ }
+
+ public void testCalculator() throws Exception {
+ buildExample();
+ }
+
+ public void testCounter() throws Exception {
+ buildExample();
+ }
+
+ public void testLabelStyle() throws Exception {
+ buildExample();
+ }
+
+ protected void buildExample() throws VerificationException, IOException {
+ verifier.executeGoals(Arrays.asList("jaxx:generate", "package"));
+ verifier.verifyErrorFreeLog();
+ FileUtils.copyDirectory(new File(siteDir, "lib"), new File(siteDestDir,"lib"));
+ FileUtils.copyDirectory(siteDir, siteDestDir,"*.jnlp","");
+ }
+
+
+}
1
0
r909 - in lutinjaxx/trunk/jaxx-core/src/site: . fr/rst/examples fr/rst/examples/images resources
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 15, 2008
Oct. 15, 2008
Author: tchemit
Date: 2008-10-15 11:59:59 +0000 (Wed, 15 Oct 2008)
New Revision: 909
Added:
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Calculator-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Components-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Counter-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/LabelStyle-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/webstart.gif
lutinjaxx/trunk/jaxx-core/src/site/resources/
lutinjaxx/trunk/jaxx-core/src/site/resources/jaxx.png
lutinjaxx/trunk/jaxx-core/src/site/site.xml
Removed:
lutinjaxx/trunk/jaxx-core/src/site/examples/
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyle-screenshot.gif
Modified:
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst
Log:
mise en place des examples
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator-screenshot.gif
===================================================================
(Binary files differ)
Copied: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator.jaxx.rst (from rev 902, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst)
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator.jaxx.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator.jaxx.rst 2008-10-15 11:59:59 UTC (rev 909)
@@ -0,0 +1,30 @@
+===================
+Examples/Calculator
+===================
+
+This is an implementation of Challenge #2 from the `XUL Grand Coding Challenge 2004`_ . Because this example program
+has been implemented in so many different languages, you can easily compare JAXX's
+syntax against the competition and decide for yourself which you prefer.
+
+Screen shot
+-----------
+
+.. image:: images/Calculator-screenshot.gif
+
+Set it in action
+----------------
+
+|webstart|
+
+To run this example in `Java Web Start`_, click the `following link`_.
+
+Source code
+-----------
+
+.. _XUL Grand Coding Challenge 2004: http://xul.sourceforge.net/challenge.html
+
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+
+.. |webstart| image:: images/webstart.gif
+
+.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator.jaxx.rst
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components-screenshot.gif
===================================================================
(Binary files differ)
Modified: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst 2008-10-14 13:25:31 UTC (rev 908)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst 2008-10-15 11:59:59 UTC (rev 909)
@@ -9,31 +9,25 @@
Screen shot
-----------
-.. image:: Components-screenshot.gif
+.. image:: images/Components-screenshot.gif
Set it in action
----------------
-To run this example in Java Web Start, click the following link: webstart.gif
+|webstart|
-To compile and run it yourself, first follow the instructions for installing JAXX. Then download and save the source
-code using the link below. Once you have done that, compile and run it as follows:
+To run this example in `Java Web Start`_, click the `following link`_.
-::
- c:\jaxx\examples\Components> jaxxc Components.jaxx
- c:\jaxx\examples\Components> java -classpath .;c:\jaxx\lib\jaxx-runtime.jar Components
-
-The first command above assumes that you are in the directory containing the Components.jaxx file. Compiling it as
-shown will produce a class file named Components.class in the current directory, and because you were in the same
-directory as the JAXX file the resulting class will not be placed in a package (its fully-qualified name is
-just Components).
-
-At this point Components is a perfectly ordinary Java class, and the only special requirement to run it is that
-jaxx-runtime.jar be in the classpath.
-
Source code
-----------
Unlike the other examples, the source code for Components is too big to display here. You can view it yourself by
-downloading JAXX, and you can also view the source code for the individual demos by clicking the "Source" tabs.
\ No newline at end of file
+downloading JAXX, and you can also view the source code for the individual demos by clicking the "Source" tabs.
+
+
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+
+.. |webstart| image:: images/webstart.gif
+
+.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter-screenshot.gif
===================================================================
(Binary files differ)
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter.jaxx.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter.jaxx.rst 2008-10-15 11:59:59 UTC (rev 909)
@@ -0,0 +1,28 @@
+================
+Examples/Counter
+================
+
+
+Screen shot
+-----------
+
+.. image:: images/Counter-screenshot.gif
+
+Set it in action
+----------------
+
+
+|webstart|
+
+To run this example in `Java Web Start`_, click the `following link`_.
+
+
+Source code
+-----------
+
+
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+
+.. |webstart| image:: images/webstart.gif
+
+.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
\ No newline at end of file
Deleted: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyle-screenshot.gif
===================================================================
(Binary files differ)
Modified: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst 2008-10-14 13:25:31 UTC (rev 908)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst 2008-10-15 11:59:59 UTC (rev 909)
@@ -8,30 +8,21 @@
Screen shot
-----------
-.. image:: LabelStyle-screenshot.gif
+.. image:: images/LabelStyle-screenshot.gif
Set it in action
----------------
-To run this example in Java Web Start, click the following link: webstart.gif
+|webstart|
-To compile and run it yourself, first follow the instructions for installing JAXX. Then download and save the
-source code using the link below. Once you have done that, compile and run it as follows:
+To run this example in `Java Web Start`_, click the `following link`_.
-::
- c:\jaxx\examples> jaxxc LabelStyle.jaxx
- c:\jaxx\examples> java -classpath .;c:\jaxx\lib\jaxx-runtime.jar LabelStyle
-
-The first command above assumes that you are in the directory containing the LabelStyle.jaxx file. Compiling it as
-shown will produce a class file named LabelStyle.class in the current directory, and because you were in the same
-directory as the JAXX file the resulting class will not be placed in a package (its fully-qualified name is just LabelStyle).
-
-At this point LabelStyle is a perfectly ordinary Java class, and the only special requirement to run it is
-that jaxx-runtime.jar be in the classpath.
-
-
Source code
-----------
+.. _Java Web Start: http://java.sun.com/products/javawebstart/
+.. |webstart| image:: images/webstart.gif
+
+.. _following link: http://buix.labs.libre-entreprise.org/lutinjaxx/maven-jaxx-plugin/examples/…
Copied: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Calculator-screenshot.gif (from rev 902, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator-screenshot.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Calculator-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Components-screenshot.gif (from rev 902, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components-screenshot.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Components-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Counter-screenshot.gif (from rev 902, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter-screenshot.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/Counter-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/LabelStyle-screenshot.gif (from rev 902, lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyle-screenshot.gif)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/LabelStyle-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/webstart.gif
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/images/webstart.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: lutinjaxx/trunk/jaxx-core/src/site/resources/jaxx.png (from rev 902, lutinjaxx/trunk/src/site/resources/jaxx.png)
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/resources/jaxx.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:mergeinfo
+
Copied: lutinjaxx/trunk/jaxx-core/src/site/site.xml (from rev 903, lutinjaxx/trunk/src/site/site.xml)
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/site.xml (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/site/site.xml 2008-10-15 11:59:59 UTC (rev 909)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="${project.name}">
+
+ <bannerLeft>
+ <name>${project.name}</name>
+ <src>jaxx.png</src>
+ <href>index.html</href>
+ </bannerLeft>
+
+ <poweredBy>
+ <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
+ <logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/>
+ <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText"
+ img="images/restructuredtext-logo.png"/>
+ </poweredBy>
+
+ <body>
+
+ <menu ref="parent"/>
+
+ <menu name="Utilisateur">
+ <item name="Accueil" href="index.html"/>
+ <item name="Exemples" href="exemples.html">
+ <item name="Components" href="examples/Components.jaxx.html"/>
+ <item name="LabelStyles" href="examples/LabelStyles.jaxx.html"/>
+ <item name="Calculator" href="examples/Calculator.jaxx.html"/>
+ <item name="Counter" href="examples/Counter.jaxx.html"/>
+ </item>
+ </menu>
+
+ <menu name="Téléchargement">
+ <item href="${labs.builder.url}/org/codelutin/${project.artifactId}/${project.version}"
+ name="Télécharger la dernière version"/>
+ <item href="${labs.builder.url}/org/codelutin/${project.artifactId}"
+ name="Voir toutes les versions"/>
+ </menu>
+
+ <menu name="Développeur">
+ <item name="A faire" href="Todo.html"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ </body>
+</project>
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/site.xml
___________________________________________________________________
Name: svn:mergeinfo
+
1
0
Oct. 14, 2008
Author: tchemit
Date: 2008-10-14 13:25:31 +0000 (Tue, 14 Oct 2008)
New Revision: 908
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
Log:
add dependency verifier to build examples
Modified: lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-14 13:24:27 UTC (rev 907)
+++ lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-14 13:25:31 UTC (rev 908)
@@ -50,14 +50,22 @@
<artifactId>maven-project</artifactId>
<scope>compile</scope>
</dependency>
- <dependency>
+
+ <dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
- <version>1.1</version>
- <scope>compile</scope>
+ <version>1.1</version>
+ <scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-verifier</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.codelutin</groupId>
<artifactId>lutinpluginutil</artifactId>
<scope>compile</scope>
1
0
r907 - in lutinjaxx/trunk/maven-jaxx-plugin/src/test: java/org/codelutin/jaxx resources/testcases
by tchemit@users.labs.libre-entreprise.org Oct. 14, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 14, 2008
Oct. 14, 2008
Author: tchemit
Date: 2008-10-14 13:24:27 +0000 (Tue, 14 Oct 2008)
New Revision: 907
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Errors.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Force.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nText.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nTitle.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nToolTipText.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/NoLog.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/WithLog.xml
Removed:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/errors.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_text.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_title.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_tooltiptext.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/nolog.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/withlog.xml
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java
Log:
automatic test mapping
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-14 08:13:30 UTC (rev 906)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-14 13:24:27 UTC (rev 907)
@@ -14,25 +14,21 @@
}
public void testInnerClasses() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("InnerClasses");
mojo.execute();
assertEquals(1, mojo.getFiles().length);
}
public void testSpecialSubclassing() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("SpecialSubclassing");
mojo.execute();
assertEquals(7, mojo.getFiles().length);
}
- public void testCssTests() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("CSSTests");
+ public void testCSSTests() throws Exception {
mojo.execute();
assertEquals(7, mojo.getFiles().length);
}
- public void testWithLogTests() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("withlog");
+ public void testWithLog() throws Exception {
mojo.execute();
String[] files = mojo.getFiles();
assertEquals(2, files.length);
@@ -55,8 +51,7 @@
checkPattern(mojo, "import org.apache.commons.logging.LogFactory;", false, withnoLogFile);
}
- public void testNoLogTests() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("nolog");
+ public void testNoLog() throws Exception {
mojo.execute();
String[] files = mojo.getFiles();
assertEquals(2, files.length);
@@ -66,7 +61,6 @@
}
public void testErrors() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("errors");
// init mojo to get alls files to treate
mojo.init();
String[] files = mojo.getFiles();
@@ -88,32 +82,27 @@
}
public void testInitializers() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("Initializers");
mojo.execute();
assertEquals(1, mojo.getFiles().length);
}
public void testScript() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("Script");
mojo.execute();
assertEquals(1, mojo.getFiles().length);
}
public void testOverridingDataBindings() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("OverridingDataBindings");
mojo.execute();
assertEquals(3, mojo.getFiles().length);
}
public void testClassReferences() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("ClassReferences");
mojo.execute();
assertEquals(6, mojo.getFiles().length);
}
public void testForce() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("force");
// first round, with force option so will generate theonly JButton.jaxx file
mojo.execute();
String[] files = mojo.getFiles();
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-14 08:13:30 UTC (rev 906)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-14 13:24:27 UTC (rev 907)
@@ -11,7 +11,6 @@
}
public void testI18nText() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("i18n_text");
mojo.setI18nable(false);
mojo.execute();
checkPattern(mojo, "testId.setText(_(\"test.text\"));", false, mojo.getFiles());
@@ -23,7 +22,6 @@
}
public void testI18nTitle() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("i18n_title");
mojo.setI18nable(false);
mojo.execute();
checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", false, mojo.getFiles());
@@ -35,7 +33,6 @@
}
public void testI18nToolTipText() throws Exception {
- JaxxGeneratorMojo mojo = getMojo("i18n_tooltiptext");
mojo.setI18nable(false);
mojo.execute();
checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", false, mojo.getFiles());
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java 2008-10-14 08:13:30 UTC (rev 906)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java 2008-10-14 13:24:27 UTC (rev 907)
@@ -13,24 +13,39 @@
/** log */
protected static final Log log = LogFactory.getLog(JaxxBaseTest.class);
+ protected JaxxGeneratorMojo mojo;
+
+ protected File pomFile;
+
public abstract String getPrefix();
@Override
protected void setUp() throws Exception {
super.setUp();
log.info(getName());
+ pomFile = getPomFile();
+ mojo = (JaxxGeneratorMojo) lookupMojo("generate", pomFile);
+ assertNotNull(mojo);
}
- protected JaxxGeneratorMojo getMojo(String s) throws Exception {
- File testPom = new File(getBasedir(), getPrefix() + s + ".xml");
- JaxxGeneratorMojo mojo = (JaxxGeneratorMojo) lookupMojo("generate", testPom);
- assertNotNull(mojo);
- return mojo;
+ protected File getPomFile() {
+ return new File(getBasedir(), getPrefix() + getName().substring(4) + ".xml");
}
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ if (mojo != null) {
+ mojo = null;
+ }
+ if (pomFile != null) {
+ pomFile = null;
+ }
+ }
+
protected void checkPattern(JaxxGeneratorMojo mojo, String pattern, boolean required, String... files) throws IOException {
for (String file : files) {
- // check we have a the required testId.setTitle(_("test.title"));
+ // check we have a the required/forbidden pattern
File f = new File(mojo.getOutJava(), file.substring(0, file.length() - 4) + "java");
if (mojo.isVerbose()) {
log.info("check generated file " + f);
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Errors.xml (from rev 906, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/errors.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Errors.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Errors.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/errors/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Force.xml (from rev 906, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Force.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Force.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/force/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nText.xml (from rev 906, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_text.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nText.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nText.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/i18n/text/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nTitle.xml (from rev 906, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_title.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nTitle.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nTitle.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/i18n/title/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nToolTipText.xml (from rev 906, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_tooltiptext.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nToolTipText.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/I18nToolTipText.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/i18n/tooltiptext/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/NoLog.xml (from rev 906, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/nolog.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/NoLog.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/NoLog.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <addLogger>false</addLogger>
+ <includes>
+ <value>**/log/nolog/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/WithLog.xml (from rev 906, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/withlog.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/WithLog.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/WithLog.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <addLogger>true</addLogger>
+ <includes>
+ <value>**/log/withlog/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/WithLog.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/errors.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/errors.xml 2008-10-14 08:13:30 UTC (rev 906)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/errors.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <includes>
- <value>**/errors/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force.xml 2008-10-14 08:13:30 UTC (rev 906)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <includes>
- <value>**/force/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_text.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_text.xml 2008-10-14 08:13:30 UTC (rev 906)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_text.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <i18nable>true</i18nable>
- <includes>
- <value>**/i18n/text/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_title.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_title.xml 2008-10-14 08:13:30 UTC (rev 906)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_title.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <i18nable>true</i18nable>
- <includes>
- <value>**/i18n/title/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_tooltiptext.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_tooltiptext.xml 2008-10-14 08:13:30 UTC (rev 906)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_tooltiptext.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <i18nable>true</i18nable>
- <includes>
- <value>**/i18n/tooltiptext/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/nolog.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/nolog.xml 2008-10-14 08:13:30 UTC (rev 906)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/nolog.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <addLogger>false</addLogger>
- <includes>
- <value>**/log/nolog/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/withlog.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/withlog.xml 2008-10-14 08:13:30 UTC (rev 906)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/withlog.xml 2008-10-14 13:24:27 UTC (rev 907)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <addLogger>true</addLogger>
- <includes>
- <value>**/log/withlog/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
1
0
r906 - in lutinjaxx/trunk/maven-jaxx-plugin/src/test: java/org/codelutin/jaxx resources resources/testcases
by tchemit@users.labs.libre-entreprise.org Oct. 14, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 14, 2008
Oct. 14, 2008
Author: tchemit
Date: 2008-10-14 08:13:30 +0000 (Tue, 14 Oct 2008)
New Revision: 906
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Initializers.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/InnerClasses.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/OverridingDataBindings.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Script.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/errors.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_text.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_title.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_tooltiptext.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/nolog.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/withlog.xml
Removed:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/CSSTests.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/ClassReferences.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Initializers.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/InnerClasses.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/OverridingDataBindings.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Script.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/SpecialSubclassing.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/errors.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/force.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_text.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_title.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_tooltiptext.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/nolog.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/withlog.xml
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java
Log:
utf-8 form test poms
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-14 08:13:30 UTC (rev 906)
@@ -7,6 +7,12 @@
public class CompilerTest extends JaxxBaseTest {
+ protected String prefix = "src" + File.separator + "test" + File.separator + "resources" + File.separator + "testcases" + File.separator;
+
+ public String getPrefix() {
+ return prefix;
+ }
+
public void testInnerClasses() throws Exception {
JaxxGeneratorMojo mojo = getMojo("InnerClasses");
mojo.execute();
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,8 +1,15 @@
package org.codelutin.jaxx;
+import java.io.File;
+
public class I18nTest extends JaxxBaseTest {
+ protected String prefix = "src" + File.separator + "test" + File.separator + "resources" + File.separator + "testcases" + File.separator;
+ public String getPrefix() {
+ return prefix;
+ }
+
public void testI18nText() throws Exception {
JaxxGeneratorMojo mojo = getMojo("i18n_text");
mojo.setI18nable(false);
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java 2008-10-14 08:13:30 UTC (rev 906)
@@ -13,6 +13,8 @@
/** log */
protected static final Log log = LogFactory.getLog(JaxxBaseTest.class);
+ public abstract String getPrefix();
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -20,7 +22,7 @@
}
protected JaxxGeneratorMojo getMojo(String s) throws Exception {
- File testPom = new File(getBasedir(), "src/test/resources/" + s + ".xml");
+ File testPom = new File(getBasedir(), getPrefix() + s + ".xml");
JaxxGeneratorMojo mojo = (JaxxGeneratorMojo) lookupMojo("generate", testPom);
assertNotNull(mojo);
return mojo;
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/CSSTests.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/CSSTests.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/CSSTests.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <i18nable>false</i18nable>
- <includes>
- <value>**/CSSTests/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/ClassReferences.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/ClassReferences.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/ClassReferences.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <includes>
- <value>**/ClassReferences/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Initializers.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Initializers.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Initializers.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <includes>
- <value>**/Initializers/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/InnerClasses.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/InnerClasses.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/InnerClasses.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <includes>
- <value>**/InnerClasses/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/OverridingDataBindings.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/OverridingDataBindings.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/OverridingDataBindings.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <includes>
- <value>**/OverridingDataBindings/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Script.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Script.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Script.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <includes>
- <value>**/Script/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/SpecialSubclassing.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/SpecialSubclassing.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/SpecialSubclassing.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <includes>
- <value>**/SpecialSubclassing/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/errors.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/errors.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/errors.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <includes>
- <value>**/errors/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/force.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/force.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/force.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <includes>
- <value>**/force/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_text.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_text.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_text.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <i18nable>true</i18nable>
- <includes>
- <value>**/i18n/text/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_title.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_title.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_title.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <i18nable>true</i18nable>
- <includes>
- <value>**/i18n/title/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_tooltiptext.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_tooltiptext.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_tooltiptext.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <i18nable>true</i18nable>
- <includes>
- <value>**/i18n/tooltiptext/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/nolog.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/nolog.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/nolog.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <addLogger>false</addLogger>
- <includes>
- <value>**/log/nolog/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/CSSTests.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/CSSTests.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>false</i18nable>
+ <includes>
+ <value>**/CSSTests/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/ClassReferences.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/ClassReferences.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/ClassReferences/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Initializers.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Initializers.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Initializers.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Initializers.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/Initializers/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/InnerClasses.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/InnerClasses.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/InnerClasses.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/InnerClasses.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/InnerClasses/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/OverridingDataBindings.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/OverridingDataBindings.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/OverridingDataBindings.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/OverridingDataBindings.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/OverridingDataBindings/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Script.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Script.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Script.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/Script.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/Script/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/SpecialSubclassing.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/SpecialSubclassing.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/SpecialSubclassing/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/errors.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/errors.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/errors.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/errors.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/errors/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/force.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/force/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_text.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_text.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_text.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_text.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/i18n/text/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_title.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_title.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_title.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_title.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/i18n/title/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_tooltiptext.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_tooltiptext.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_tooltiptext.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n_tooltiptext.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/i18n/tooltiptext/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/nolog.xml (from rev 904, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/nolog.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/nolog.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/nolog.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <addLogger>false</addLogger>
+ <includes>
+ <value>**/log/nolog/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/withlog.xml (from rev 904, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/withlog.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/withlog.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/withlog.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <addLogger>true</addLogger>
+ <includes>
+ <value>**/log/withlog/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/withlog.xml
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/withlog.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/withlog.xml 2008-10-14 07:11:59 UTC (rev 905)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/withlog.xml 2008-10-14 08:13:30 UTC (rev 906)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <build>
- <plugins>
- <plugin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${basedir}/src/test/resources</src>
- <outJava>${basedir}/target/it-generated-source/java</outJava>
- <outResource>${basedir}/target/it-generated-source/resources</outResource>
- <force>true</force>
- <addLogger>true</addLogger>
- <includes>
- <value>**/log/withlog/*.jaxx</value>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
1
0
r905 - lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler
by tchemit@users.labs.libre-entreprise.org Oct. 14, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 14, 2008
Oct. 14, 2008
Author: tchemit
Date: 2008-10-14 07:11:59 +0000 (Tue, 14 Oct 2008)
New Revision: 905
Modified:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java
Log:
unused import
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java 2008-10-13 18:11:46 UTC (rev 904)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java 2008-10-14 07:11:59 UTC (rev 905)
@@ -1,7 +1,6 @@
package jaxx.compiler;
import java.io.File;
-import java.util.Arrays;
/**
* Stores options which affect the jaxxc tool's operation. These options are generally specified by the
1
0
r904 - in lutinjaxx/trunk: jaxx-core jaxx-core/src/main/java/jaxx/compiler maven-jaxx-plugin maven-jaxx-plugin/src/main/java/org/codelutin/jaxx maven-jaxx-plugin/src/test/java/org/codelutin/jaxx maven-jaxx-plugin/src/test/resources maven-jaxx-plugin/src/test/resources/testcases maven-jaxx-plugin/src/test/resources/testcases/log maven-jaxx-plugin/src/test/resources/testcases/log/nolog maven-jaxx-plugin/src/test/resources/testcases/log/withlog
by tchemit@users.labs.libre-entreprise.org Oct. 13, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 13, 2008
Oct. 13, 2008
Author: tchemit
Date: 2008-10-13 18:11:46 +0000 (Mon, 13 Oct 2008)
New Revision: 904
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/nolog.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLog.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLogSon.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/NoLog.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/WithLog.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/withlog.xml
Modified:
lutinjaxx/trunk/jaxx-core/changelog
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java
lutinjaxx/trunk/maven-jaxx-plugin/changelog
lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
Log:
jaxx can now generate logger in jaxx files
Modified: lutinjaxx/trunk/jaxx-core/changelog
===================================================================
--- lutinjaxx/trunk/jaxx-core/changelog 2008-10-11 15:38:18 UTC (rev 903)
+++ lutinjaxx/trunk/jaxx-core/changelog 2008-10-13 18:11:46 UTC (rev 904)
@@ -1,4 +1,5 @@
ver-0-5 chemit 20081002
+ * 20081013 [chemit] can generate logger on jaxx files
* 20081011 [chemit] improve site
* 20081011 [chemit] fix bug on JavaFileParser : works again
* 20081002 [chemit] Using lutinproject 3.0, changing groupId to org.codelutin
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java 2008-10-11 15:38:18 UTC (rev 903)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java 2008-10-13 18:11:46 UTC (rev 904)
@@ -18,6 +18,9 @@
/** a flag to enable or disable i18n generation */
private boolean i18nable;
+ /** a flag to add or not logger on generated jaxx files */
+ private boolean addLogger;
+
/**
* Returns the target directory, generally specified with the "-d" option on the command line.
*
@@ -160,16 +163,25 @@
this.i18nable = i18nable;
}
+ public boolean isAddLogger() {
+ return addLogger;
+ }
+
+ public void setAddLogger(boolean addLogger) {
+ this.addLogger = addLogger;
+ }
+
@Override
public String toString() {
StringBuilder sb = new StringBuilder(super.toString());
- sb.append("\nclassPath: ").append(getClassPath());
- sb.append("\njavaOut : ").append(getTargetDirectory());
- sb.append("\noutClass : ").append(getJavacTargetDirectory());
- sb.append("\njavacOpts: ").append(getJavacOpts());
- sb.append("\nverbose: ").append(isVerbose());
- sb.append("\noptiomize: ").append(getOptimize());
- sb.append("\ni18nable: ").append(isI18nable());
+ sb.append("\nclassPath : ").append(getClassPath());
+ sb.append("\njavaOut : ").append(getTargetDirectory());
+ sb.append("\noutClass : ").append(getJavacTargetDirectory());
+ sb.append("\njavacOpts : ").append(getJavacOpts());
+ sb.append("\nverbose : ").append(isVerbose());
+ sb.append("\noptiomize : ").append(getOptimize());
+ sb.append("\ni18nable : ").append(isI18nable());
+ sb.append("\naddLogger : ").append(isAddLogger());
return sb.toString();
}
}
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java 2008-10-11 15:38:18 UTC (rev 903)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java 2008-10-13 18:11:46 UTC (rev 904)
@@ -242,17 +242,6 @@
private static final int PASS_2 = 1;
private static int currentPass;
- static {
- try {
- // fixme beware, this is a very dangerous thing to use a static block
- //loadLibraries();
- // fixeme for the moment the compiler is init in maven plugin, not here
- }
- catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
public static void init() {
// forces static initializer to run if it hasn't yet
}
@@ -293,8 +282,9 @@
this.outputClassName = outputClassName;
this.options = options;
addImport(outputClassName.substring(0, outputClassName.lastIndexOf(".") + 1) + "*");
- for (Object staticImport : staticImports)
+ for (Object staticImport : staticImports) {
addImport((String) staticImport);
+ }
}
@@ -674,6 +664,13 @@
}
if (!superclassIsJAXXObject) {
+ // add logger
+ if (getOptions().isAddLogger()) {
+ javaFile.addImport("org.apache.commons.logging.Log");
+ javaFile.addImport("org.apache.commons.logging.LogFactory");
+ javaFile.addField(createLoggerField(fullClassName));
+ }
+
javaFile.addField(new JavaField(Modifier.PROTECTED, "java.util.List<Object>", "$activeBindings", "new ArrayList<Object>()"));
javaFile.addField(new JavaField(Modifier.PROTECTED, "java.util.Map<String,Object>", "$bindingSources", "new HashMap<String,Object>()"));
}
@@ -722,9 +719,9 @@
javaFile.addField(createJAXXObjectDescriptorField());
javaFile.addMethod(createGetJAXXObjectDescriptorMethod());
-/*
- * Gestion du context
- */
+ /*
+ * Gestion du context
+ */
javaFile.addField(createContextField());
javaFile.addMethod(createSetContextValueMethod());
javaFile.addMethod(createSetContextValueNameMethod());
@@ -791,6 +788,9 @@
}
}
+ private JavaField createLoggerField(String className) {
+ return new JavaField(Modifier.PUBLIC+Modifier.STATIC+Modifier.FINAL, "Log", "log", "LogFactory.getLog("+className+".class)");
+ }
/*
* Gestion du context
*/
Modified: lutinjaxx/trunk/maven-jaxx-plugin/changelog
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/changelog 2008-10-11 15:38:18 UTC (rev 903)
+++ lutinjaxx/trunk/maven-jaxx-plugin/changelog 2008-10-13 18:11:46 UTC (rev 904)
@@ -1,4 +1,5 @@
ver-0-5 chemit 20081002
+ * 20081013 [chemit] can generate logger on jaxx files
* 20081011 [chemit] improve site
* 20081011 [chemit] refactor tests of the plugin using maven-plugin-testing-harness plugin
* 20081002 [chemit] Using lutinpluginproject 3.0, changing groupId to org.codelutin
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java 2008-10-11 15:38:18 UTC (rev 903)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java 2008-10-13 18:11:46 UTC (rev 904)
@@ -133,6 +133,16 @@
*/
protected boolean i18nable;
+
+ /**
+ * flag to add logger to each generated jaxx file.
+ * <p/>
+ * By default, always add it.
+ *
+ * @parameter expression="${jaxx.addLogger}" default-value="true"
+ */
+ protected boolean addLogger;
+
protected String[] files;
private static final String[] INCLUDES = {"**\\/*.jaxx"};
@@ -219,6 +229,7 @@
result.setTargetDirectory(outJava);
result.setVerbose(verbose);
result.setI18nable(i18nable);
+ result.setAddLogger(addLogger);
return result;
}
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-11 15:38:18 UTC (rev 903)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-13 18:11:46 UTC (rev 904)
@@ -1,31 +1,12 @@
package org.codelutin.jaxx;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import java.io.File;
-public class CompilerTest extends AbstractMojoTestCase {
+public class CompilerTest extends JaxxBaseTest {
- /** log */
- protected static final Log log = LogFactory.getLog(CompilerTest.class);
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- log.info(getName());
- }
-
- protected JaxxGeneratorMojo getMojo(String s) throws Exception {
- File testPom = new File(getBasedir(), "src/test/resources/" + s + ".xml");
- JaxxGeneratorMojo mojo = (JaxxGeneratorMojo) lookupMojo("generate", testPom);
- assertNotNull(mojo);
- return mojo;
- }
-
public void testInnerClasses() throws Exception {
JaxxGeneratorMojo mojo = getMojo("InnerClasses");
mojo.execute();
@@ -44,6 +25,40 @@
assertEquals(7, mojo.getFiles().length);
}
+ public void testWithLogTests() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("withlog");
+ mojo.execute();
+ String[] files = mojo.getFiles();
+ assertEquals(2, files.length);
+
+ String withLogFile;
+ String withnoLogFile;
+ if (files[0].endsWith("WithLog.jaxx")) {
+ withLogFile = files[0];
+ withnoLogFile = files[1];
+ } else {
+ withLogFile = files[1];
+ withnoLogFile = files[0];
+ }
+ checkPattern(mojo, "Log log = LogFactory.getLog(", true, withLogFile);
+ checkPattern(mojo, "import org.apache.commons.logging.Log;", true, withLogFile);
+ checkPattern(mojo, "import org.apache.commons.logging.LogFactory;", true, withLogFile);
+
+ checkPattern(mojo, "Log log = LogFactory.getLog(", false, withnoLogFile);
+ checkPattern(mojo, "import org.apache.commons.logging.Log;", false, withnoLogFile);
+ checkPattern(mojo, "import org.apache.commons.logging.LogFactory;", false, withnoLogFile);
+ }
+
+ public void testNoLogTests() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("nolog");
+ mojo.execute();
+ String[] files = mojo.getFiles();
+ assertEquals(2, files.length);
+ checkPattern(mojo, "Log log = LogFactory.getLog(", false, files);
+ checkPattern(mojo, "import org.apache.commons.logging.Log;", false, files);
+ checkPattern(mojo, "import org.apache.commons.logging.LogFactory;", false, files);
+ }
+
public void testErrors() throws Exception {
JaxxGeneratorMojo mojo = getMojo("errors");
// init mojo to get alls files to treate
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-11 15:38:18 UTC (rev 903)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-13 18:11:46 UTC (rev 904)
@@ -1,84 +1,43 @@
package org.codelutin.jaxx;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.codelutin.util.FileUtil;
+public class I18nTest extends JaxxBaseTest {
-import java.io.File;
-import java.io.IOException;
-public class I18nTest extends AbstractMojoTestCase {
-
- /** log */
- protected static final Log log = LogFactory.getLog(I18nTest.class);
-
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- log.info(getName());
- }
-
- protected JaxxGeneratorMojo getMojo(String s) throws Exception {
- File testPom = new File(getBasedir(), "src/test/resources/" + s + ".xml");
- JaxxGeneratorMojo mojo = (JaxxGeneratorMojo) lookupMojo("generate", testPom);
- assertNotNull(mojo);
- return mojo;
- }
-
public void testI18nText() throws Exception {
JaxxGeneratorMojo mojo = getMojo("i18n_text");
mojo.setI18nable(false);
mojo.execute();
- checkPattern(mojo, "testId.setText(_(\"test.text\"));", false);
+ checkPattern(mojo, "testId.setText(_(\"test.text\"));", false, mojo.getFiles());
mojo.setI18nable(true);
mojo.execute();
- checkPattern(mojo, "testId.setText(_(\"test.text\"));", true);
- checkPattern(mojo, "\"_(\\\"test.text\\\")\"", false);
+ checkPattern(mojo, "testId.setText(_(\"test.text\"));", true, mojo.getFiles());
+ checkPattern(mojo, "\"_(\\\"test.text\\\")\"", false, mojo.getFiles());
}
public void testI18nTitle() throws Exception {
JaxxGeneratorMojo mojo = getMojo("i18n_title");
mojo.setI18nable(false);
mojo.execute();
- checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", false);
+ checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", false, mojo.getFiles());
mojo.setI18nable(true);
mojo.execute();
- checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", true);
- checkPattern(mojo, "\"_(\\\"test.title\\\")\"", false);
+ checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", true, mojo.getFiles());
+ checkPattern(mojo, "\"_(\\\"test.title\\\")\"", false, mojo.getFiles());
}
public void testI18nToolTipText() throws Exception {
JaxxGeneratorMojo mojo = getMojo("i18n_tooltiptext");
mojo.setI18nable(false);
mojo.execute();
- checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", false);
+ checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", false, mojo.getFiles());
mojo.setI18nable(true);
mojo.execute();
- checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", true);
- checkPattern(mojo, "\"_(\\\"test.toolTipText\\\")\"", false);
+ checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", true, mojo.getFiles());
+ checkPattern(mojo, "\"_(\\\"test.toolTipText\\\")\"", false, mojo.getFiles());
}
- protected void checkPattern(JaxxGeneratorMojo mojo, String pattern, boolean required) throws IOException {
- String[] files = mojo.getFiles();
- for (String file : files) {
- // check we have a the required testId.setTitle(_("test.title"));
- File f = new File(mojo.getOutJava(), file.substring(0, file.length() - 4) + "java");
- if (mojo.isVerbose()) {
- log.info("check generated file " + f);
- }
- assertTrue("generated file " + f + " was not found...", f.exists());
- String content = FileUtil.readAsString(f);
-
- String errorMessage = required ? "could not find the pattern : " : "should not have found pattern :";
- assertEquals(errorMessage + pattern + " in file " + f, required, content.contains(pattern));
- }
- }
-
-
}
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/JaxxBaseTest.java 2008-10-13 18:11:46 UTC (rev 904)
@@ -0,0 +1,44 @@
+package org.codelutin.jaxx;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.codelutin.util.FileUtil;
+
+import java.io.File;
+import java.io.IOException;
+
+/** @author chemit */
+public abstract class JaxxBaseTest extends AbstractMojoTestCase {
+ /** log */
+ protected static final Log log = LogFactory.getLog(JaxxBaseTest.class);
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ log.info(getName());
+ }
+
+ protected JaxxGeneratorMojo getMojo(String s) throws Exception {
+ File testPom = new File(getBasedir(), "src/test/resources/" + s + ".xml");
+ JaxxGeneratorMojo mojo = (JaxxGeneratorMojo) lookupMojo("generate", testPom);
+ assertNotNull(mojo);
+ return mojo;
+ }
+
+ protected void checkPattern(JaxxGeneratorMojo mojo, String pattern, boolean required, String... files) throws IOException {
+ for (String file : files) {
+ // check we have a the required testId.setTitle(_("test.title"));
+ File f = new File(mojo.getOutJava(), file.substring(0, file.length() - 4) + "java");
+ if (mojo.isVerbose()) {
+ log.info("check generated file " + f);
+ }
+
+ assertTrue("generated file " + f + " was not found...", f.exists());
+ String content = FileUtil.readAsString(f);
+
+ String errorMessage = required ? "could not find the pattern : " : "should not have found pattern :";
+ assertEquals(errorMessage + pattern + " in file " + f, required, content.contains(pattern));
+ }
+ }
+}
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/nolog.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/nolog.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/nolog.xml 2008-10-13 18:11:46 UTC (rev 904)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <addLogger>false</addLogger>
+ <includes>
+ <value>**/log/nolog/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLog.jaxx (from rev 901, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force/JButton.jaxx)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLog.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLog.jaxx 2008-10-13 18:11:46 UTC (rev 904)
@@ -0,0 +1 @@
+<JButton id='testId' text='test.text'/>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLog.jaxx
___________________________________________________________________
Name: svn:mergeinfo
+
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLogSon.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLogSon.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/nolog/NoLogSon.jaxx 2008-10-13 18:11:46 UTC (rev 904)
@@ -0,0 +1 @@
+<NoLog id='testId' text='test.text'/>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/NoLog.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/NoLog.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/NoLog.jaxx 2008-10-13 18:11:46 UTC (rev 904)
@@ -0,0 +1 @@
+<WithLog id='testId' text='test.text'/>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/WithLog.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/WithLog.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/log/withlog/WithLog.jaxx 2008-10-13 18:11:46 UTC (rev 904)
@@ -0,0 +1 @@
+<JButton id='testId' text='test.text'/>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/withlog.xml (from rev 900, lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/force.xml)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/withlog.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/withlog.xml 2008-10-13 18:11:46 UTC (rev 904)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <addLogger>true</addLogger>
+ <includes>
+ <value>**/log/withlog/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/withlog.xml
___________________________________________________________________
Name: svn:mergeinfo
+
1
0
r903 - in lutinjaxx/trunk: maven-jaxx-plugin/src/site src/site
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 15:38:18 +0000 (Sat, 11 Oct 2008)
New Revision: 903
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml
lutinjaxx/trunk/src/site/site.xml
Log:
improve site (begin only...)
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml 2008-10-11 15:38:04 UTC (rev 902)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml 2008-10-11 15:38:18 UTC (rev 903)
@@ -1,19 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="${project.name}">
- <publishDate format="dd/MM/yyyy"/>
+ <!--publishDate format="dd/MM/yyyy"/>
<skin>
<groupId>org.codelutin</groupId>
<artifactId>maven-lutin-skin</artifactId>
<version>0.2</version>
- </skin>
+ </skin-->
<bannerLeft>
<name>${project.name}</name>
+ <src>jaxx.png</src>
+ <href>index.html</href>
</bannerLeft>
- <bannerRight>
+ <!--bannerRight>
<src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
<href>${project.organization.url}</href>
</bannerRight>
@@ -23,15 +25,16 @@
<logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/>
<logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText"
img="images/restructuredtext-logo.png"/>
- </poweredBy>
+ </poweredBy-->
<body>
- <links>
+ <!--links>
<item name="Labs" href="http://labs.libre-entreprise.org/"/>
<item name="${project.organization.name}" href="${project.organization.url}"/>
- </links>
+ </links-->
<menu ref="parent"/>
+
<menu name="Utilisateur">
<item name="Accueil" href="index.html"/>
<item name="Détail goals" href="plugin-info.html">
@@ -39,25 +42,19 @@
<item name="help" href="help-mojo.html"/>
</item>
</menu>
- <menu name="Detail goals">
- <item name="generate" href="generate-mojo.html"/>
- <item name="help" href="help-mojo.html"/>
- </menu>
-
- <menu name="Téléchargement">
+
+ <menu name="Téléchargement" inherit="top">
<item href="${labs.builder.url}/org/codelutin/${project.artifactId}/${project.version}"
name="Télécharger la dernière version"/>
<item href="${labs.builder.url}/org/codelutin/${project.artifactId}"
name="Voir toutes les versions"/>
</menu>
- <menu name="Développeur">
- <item name="A faire" href="Todo.html"/>
+ <menu name="Développeur" inherit="top">
+ <item name="A faire" href="Todo.html"/>
</menu>
<menu ref="reports"/>
-
- <menu ref="modules"/>
</body>
</project>
Modified: lutinjaxx/trunk/src/site/site.xml
===================================================================
--- lutinjaxx/trunk/src/site/site.xml 2008-10-11 15:38:04 UTC (rev 902)
+++ lutinjaxx/trunk/src/site/site.xml 2008-10-11 15:38:18 UTC (rev 903)
@@ -4,13 +4,15 @@
<publishDate format="dd/MM/yyyy"/>
<skin>
- <groupId>org.codelutin</groupId>
- <artifactId>maven-lutin-skin</artifactId>
- <version>0.2</version>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-lutin-skin</artifactId>
+ <version>0.2</version>
</skin>
<bannerLeft>
<name>${project.name}</name>
+ <src>jaxx.png</src>
+ <href>index.html</href>
</bannerLeft>
<bannerRight>
@@ -33,7 +35,7 @@
<menu ref="parent"/>
<menu name="Utilisateur">
- <item name="Accueil" href="index.html"/>
+ <item name="Accueil" href="index.html"/>
</menu>
<menu name="Téléchargement">
@@ -44,12 +46,12 @@
</menu>
<menu name="Développeur">
- <item name="A faire" href="Todo.html"/>
+ <item name="A faire" href="Todo.html"/>
</menu>
<menu ref="reports"/>
<menu ref="modules"/>
-
+
</body>
</project>
1
0
r902 - in lutinjaxx/trunk: jaxx-core jaxx-core/src/site/fr/rst jaxx-core/src/site/fr/rst/examples maven-jaxx-plugin maven-jaxx-plugin/src/site maven-jaxx-plugin/src/site/resources src/site src/site/resources
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 15:38:04 +0000 (Sat, 11 Oct 2008)
New Revision: 902
Added:
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyle-screenshot.gif
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/exemples.rst
lutinjaxx/trunk/maven-jaxx-plugin/src/site/resources/
lutinjaxx/trunk/maven-jaxx-plugin/src/site/resources/jaxx.png
lutinjaxx/trunk/src/site/resources/
lutinjaxx/trunk/src/site/resources/jaxx.png
Modified:
lutinjaxx/trunk/jaxx-core/changelog
lutinjaxx/trunk/maven-jaxx-plugin/changelog
Log:
improve site (begin only...)
Modified: lutinjaxx/trunk/jaxx-core/changelog
===================================================================
--- lutinjaxx/trunk/jaxx-core/changelog 2008-10-11 14:12:42 UTC (rev 901)
+++ lutinjaxx/trunk/jaxx-core/changelog 2008-10-11 15:38:04 UTC (rev 902)
@@ -1,4 +1,5 @@
ver-0-5 chemit 20081002
+ * 20081011 [chemit] improve site
* 20081011 [chemit] fix bug on JavaFileParser : works again
* 20081002 [chemit] Using lutinproject 3.0, changing groupId to org.codelutin
* 20081002 [chemit] use a single module jaxx-core (no more core, runtime and jaxx-swing modules)
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator-screenshot.gif
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Calculator-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components-screenshot.gif
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Components.jaxx.rst 2008-10-11 15:38:04 UTC (rev 902)
@@ -0,0 +1,39 @@
+===================
+Examples/Components
+===================
+
+The Components demo displays many different Swing components being used in a variety of ways; it is JAXX's equivalent
+of the SwingSet demo. Various pages use advanced features such as data binding, scripting, event handling, and
+CSS stylesheets.
+
+Screen shot
+-----------
+
+.. image:: Components-screenshot.gif
+
+Set it in action
+----------------
+
+To run this example in Java Web Start, click the following link: webstart.gif
+
+To compile and run it yourself, first follow the instructions for installing JAXX. Then download and save the source
+code using the link below. Once you have done that, compile and run it as follows:
+
+::
+
+ c:\jaxx\examples\Components> jaxxc Components.jaxx
+ c:\jaxx\examples\Components> java -classpath .;c:\jaxx\lib\jaxx-runtime.jar Components
+
+The first command above assumes that you are in the directory containing the Components.jaxx file. Compiling it as
+shown will produce a class file named Components.class in the current directory, and because you were in the same
+directory as the JAXX file the resulting class will not be placed in a package (its fully-qualified name is
+just Components).
+
+At this point Components is a perfectly ordinary Java class, and the only special requirement to run it is that
+jaxx-runtime.jar be in the classpath.
+
+Source code
+-----------
+
+Unlike the other examples, the source code for Components is too big to display here. You can view it yourself by
+downloading JAXX, and you can also view the source code for the individual demos by clicking the "Source" tabs.
\ No newline at end of file
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter-screenshot.gif
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/Counter-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyle-screenshot.gif
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyle-screenshot.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples/LabelStyles.jaxx.rst 2008-10-11 15:38:04 UTC (rev 902)
@@ -0,0 +1,37 @@
+====================
+Examples/LabelStyles
+====================
+
+This example program creates a number of components which are used to control the appearance of a JLabel.
+Everything is performed through data binding; there are no script tags or explicit event handlers anywhere.
+
+Screen shot
+-----------
+
+.. image:: LabelStyle-screenshot.gif
+
+Set it in action
+----------------
+
+To run this example in Java Web Start, click the following link: webstart.gif
+
+To compile and run it yourself, first follow the instructions for installing JAXX. Then download and save the
+source code using the link below. Once you have done that, compile and run it as follows:
+
+::
+
+ c:\jaxx\examples> jaxxc LabelStyle.jaxx
+ c:\jaxx\examples> java -classpath .;c:\jaxx\lib\jaxx-runtime.jar LabelStyle
+
+The first command above assumes that you are in the directory containing the LabelStyle.jaxx file. Compiling it as
+shown will produce a class file named LabelStyle.class in the current directory, and because you were in the same
+directory as the JAXX file the resulting class will not be placed in a package (its fully-qualified name is just LabelStyle).
+
+At this point LabelStyle is a perfectly ordinary Java class, and the only special requirement to run it is
+that jaxx-runtime.jar be in the classpath.
+
+
+Source code
+-----------
+
+
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/exemples.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/exemples.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/exemples.rst 2008-10-11 15:38:04 UTC (rev 902)
@@ -0,0 +1,24 @@
+========
+Exemples
+========
+
+Here are some simple example programs to give you an idea of what JAXX is all about:
+
+ * JAXXEdit - A complete application written using JAXX for the GUI.
+
+ * Components_
+ Comprehensive demo which displays most of the Swing components. Demonstrates every major feature of JAXX, including data binding, scripting, and CSS stylesheets.
+
+ * LabelStyles_ - Uses data binding to edit the appearance of a JLabel. Shows off the power and usefulness of data binding well.
+
+ * Calculator_ - Four-function calculator. Based on the XUL Grand Coding Challenge.
+
+ * Counter_ - simple data binding and scripting example. Based on the XUL Grand Coding Challenge.
+
+.. _Components: examples/Components.jaxx.html
+
+.. _LabelStyles: examples/LabelStyles.jaxx.html
+
+.. _Calculator: examples/Calculator.jaxx.html
+
+.. _Counter: examples/Counter.jaxx.html
\ No newline at end of file
Modified: lutinjaxx/trunk/maven-jaxx-plugin/changelog
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/changelog 2008-10-11 14:12:42 UTC (rev 901)
+++ lutinjaxx/trunk/maven-jaxx-plugin/changelog 2008-10-11 15:38:04 UTC (rev 902)
@@ -1,4 +1,5 @@
ver-0-5 chemit 20081002
+ * 20081011 [chemit] improve site
* 20081011 [chemit] refactor tests of the plugin using maven-plugin-testing-harness plugin
* 20081002 [chemit] Using lutinpluginproject 3.0, changing groupId to org.codelutin
* 20081002 [chemit] Make nearly all tests works again...
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/site/resources/jaxx.png
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/site/resources/jaxx.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: lutinjaxx/trunk/src/site/resources/jaxx.png
===================================================================
(Binary files differ)
Property changes on: lutinjaxx/trunk/src/site/resources/jaxx.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
1
0
r901 - in lutinjaxx/trunk/maven-jaxx-plugin/src/test: java resources resources/testcases resources/testcases/i18n/title resources/testcases/i18n/tooltiptext
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 14:12:42 +0000 (Sat, 11 Oct 2008)
New Revision: 901
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force/
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/title/JTabbedPane2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/tooltiptext/JTabbedPane3.jaxx
Removed:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/
Log:
refactor tests of the plugin using maven-plugin-testing-harness plugin
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases (from rev 884, lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases)
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/force (from rev 885, lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/force)
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/title/JTabbedPane2.jaxx (from rev 892, lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane2.jaxx)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/title/JTabbedPane2.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/title/JTabbedPane2.jaxx 2008-10-11 14:12:42 UTC (rev 901)
@@ -0,0 +1,5 @@
+<JTabbedPane>
+ <tab id="testId" title='test.title'>
+ <JLabel text='testLabel'/>
+ </tab>
+</JTabbedPane>
\ No newline at end of file
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/tooltiptext/JTabbedPane3.jaxx (from rev 892, lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane3.jaxx)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/tooltiptext/JTabbedPane3.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/testcases/i18n/tooltiptext/JTabbedPane3.jaxx 2008-10-11 14:12:42 UTC (rev 901)
@@ -0,0 +1,5 @@
+<JTabbedPane>
+ <tab id="testId" toolTipText='test.toolTipText'>
+ <JLabel text='yo'/>
+ </tab>
+</JTabbedPane>
\ No newline at end of file
1
0
r900 - in lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases: CSSTests Initializers InnerClasses OverridingDataBindings Script SpecialSubclassing errors errors/dependencies force i18n/text i18n/title i18n/tooltiptext
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 14:11:34 +0000 (Sat, 11 Oct 2008)
New Revision: 900
Removed:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/CSSTests.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/GrandChild.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/GrandChildButton.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Pseudoclasses.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/SimpleCSS.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/Initializers/Initializers.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/InnerClasses/InnerClasses.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/CurrentTime.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/OverriddenCurrentTime.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/OverridingDataBindings.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/Script/JScriptInitializer.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JComboBoxTest1.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JComboBoxTest2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JListTest1.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JListTest2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JTreeTest1.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JTreeTest2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/SpecialSubclassing.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ConflictingPackages.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ConstraintsParseError.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/DataBindingParseError.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/DuplicateIDs.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/EventHandlerParseError.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidID.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidRootTag.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidXML.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ItemDuplicateValues.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ItemNoValue.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/MixedContent.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/RowOutsideOfTable.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/RowWrongChild.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptNotFound.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptParseError.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptSourceAndInline.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleNotFound.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleParseError.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleSourceAndInline.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TabOutsideOfTabbedPane.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TabbedPaneWrongChild.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TableWrongChild.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyCellChildren.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyScrollPaneChildren.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManySplitPaneChildren.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyTabChildren.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedAttribute.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedEvent.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedPseudoclass.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/dependencies/test.css
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/dependencies/test.script
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/force/JButton.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/text/JButton.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JDialog.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JButton.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane3.jaxx
Log:
refactor tests of the plugin using maven-plugin-testing-harness plugin
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/CSSTests.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/CSSTests.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/CSSTests.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,24 +0,0 @@
-<Application title='CSSTests'>
- <style>
- Application { lookAndFeel: {lookAndFeel.getSelectedValue()}; }
- </style>
-
- <JMenuBar>
- <JMenu text='View'>
- <JMenu text='Look and Feel'>
- <JRadioButtonMenuItem text='Ocean' value='cross_platform' buttonGroup='lookAndFeel' selected='true'/>
- <JRadioButtonMenuItem text='System' value='system' buttonGroup='lookAndFeel'/>
- </JMenu>
- </JMenu>
- </JMenuBar>
-
- <JTabbedPane>
- <tab title='Simple Tests'>
- <SimpleCSS/>
- </tab>
-
- <tab title='Pseudoclasses'>
- <Pseudoclasses/>
- </tab>
- </JTabbedPane>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/GrandChild.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/GrandChild.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/GrandChild.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,28 +0,0 @@
-<JPanel layout='{new BorderLayout()}'>
- <script>
- public String getText() {
- return grandChild.getText();
- }
-
-
- public void setText(String Text) {
- grandChild.setText(Text);
- }
-
-
- public Color getForeground() {
- if (grandChild != null)
- return grandChild.getForeground();
- else
- return Color.BLACK;
- }
-
-
- public void setForeground(Color foreground) {
- if (grandChild != null)
- grandChild.setForeground(foreground);
- }
- </script>
-
- <GrandChildButton id='grandChild'/>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/GrandChildButton.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/GrandChildButton.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/GrandChildButton.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-<JButton/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Pseudoclasses.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Pseudoclasses.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Pseudoclasses.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,99 +0,0 @@
-<JPanel layout='{new GridLayout(0, 2, 6, 6)}'>
- <!-- each checkbox has both its own test and all of the ones that came before in order
- to make sure that all of the pseudoclass overrides works properly - only the last
- pair should have any effect -->
- <style>
- #test1:enabled { text: "Enabled"; }
- #test1:disabled { text: "Disabled"; }
-
- #test2:enabled { text: "Enabled"; }
- #test2:disabled { text: "Disabled"; }
- #test2:focused { text: "Focused"; }
- #test2:unfocused { text: "Unfocused"; }
-
- #test3:enabled { text: "Enabled"; }
- #test3:disabled { text: "Disabled"; }
- #test3:focused { text: "Focused"; }
- #test3:unfocused { text: "Unfocused"; }
- #test3:selected { text: "Selected"; }
- #test3:deselected { text: "Deselected"; }
-
- #test4:enabled { text: "Enabled"; }
- #test4:disabled { text: "Disabled"; }
- #test4:focused { text: "Focused"; }
- #test4:unfocused { text: "Unfocused"; }
- #test4:selected { text: "Selected"; }
- #test4:deselected { text: "Deselected"; }
- #test4:mouseover { text: "Mouseover"; }
- #test4:mouseout { text: "Mouseout"; }
-
- #test5:enabled { text: "Enabled"; }
- #test5:disabled { text: "Disabled"; }
- #test5:focused { text: "Focused"; }
- #test5:unfocused { text: "Unfocused"; }
- #test5:selected { text: "Selected"; }
- #test5:deselected { text: "Deselected"; }
- #test5:mouseover { text: "Mouseover"; }
- #test5:mouseout { text: "Mouseout"; }
- #test5:mousedown { text: "Mousedown"; }
- #test5:mouseup { text: "Mouseup"; }
-
- #test6:{object.isSelected()} { text: "Selected"; }
-
- #test7:selected { text: { "you shouldn't see this".toUpperCase() } }
- #test7:selected { text: { currentTime }; }
-
- #test8:mouseover { text: { test8Field.getText() }; }
- </style>
-
- <script>
- import java.text.*;
- import javax.swing.Timer;
-
- DateFormat dateFormat = DateFormat.getTimeInstance();
- String currentTime = dateFormat.format(new Date());
-
- Timer timer = new Timer(1000, new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- currentTime = dateFormat.format(new Date());
- }
- });
-
- timer.start();
- </script>
-
- <JPanel border='{BorderFactory.createTitledBorder("Enabled/Disabled")}'>
- <JCheckBox text="You shouldn't see this" enabled='{enabledCB.isSelected()}' id='test1'/>
- </JPanel>
-
- <JPanel border='{BorderFactory.createTitledBorder("Focused/Unfocused")}'>
- <JCheckBox text="You shouldn't see this" enabled='{enabledCB.isSelected()}' id='test2'/>
- </JPanel>
-
- <JPanel border='{BorderFactory.createTitledBorder("Selected/Deselected")}'>
- <JCheckBox text="You shouldn't see this" enabled='{enabledCB.isSelected()}' id='test3'/>
- </JPanel>
-
- <JPanel border='{BorderFactory.createTitledBorder("Mouseover/Mouseout")}'>
- <JCheckBox text="You shouldn't see this" enabled='{enabledCB.isSelected()}' id='test4'/>
- </JPanel>
-
- <JPanel border='{BorderFactory.createTitledBorder("Mouseup/Mousedown")}'>
- <JCheckBox text="You shouldn't see this" enabled='{enabledCB.isSelected()}' id='test5'/>
- </JPanel>
-
- <JPanel border='{BorderFactory.createTitledBorder("Programmatic Selected")}'>
- <JCheckBox text='Unselected' enabled='{enabledCB.isSelected()}' id='test6'/>
- </JPanel>
-
- <JPanel border='{BorderFactory.createTitledBorder("Pseudoclass Data Binding")}'>
- <JCheckBox text='Select to see current time' enabled='{enabledCB.isSelected()}' id='test7'/>
- </JPanel>
-
- <VBox border='{BorderFactory.createTitledBorder("Pseudoclass Proxy Data Binding")}'>
- <JCheckBox text='Mouse over to see the below text' enabled='{enabledCB.isSelected()}' id='test8'/>
- <JTextField id='test8Field'/>
- </VBox>
-
- <JCheckBox text='Enable checkboxes' id='enabledCB' selected='true'/>
-</JPanel>
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/SimpleCSS.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/SimpleCSS.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/SimpleCSS.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,29 +0,0 @@
-<VBox>
- <JPanel layout='{new GridLayout(0, 1, 6, 6)}'>
- <style>
- JPanel { border: {null}; font-size: 18; }
-
- JButton { foreground: red }
- JButton.green { foreground: green; }
- AbstractButton.blue { foreground: blue }
- .blue { foreground: white; }
- #B4:enabled { foreground: { Color.orange } }
- .yellow { foreground: yellow; }
- #child.idTest { foreground: white }
- #B7:{true} { foreground: cyan; }
- #B8 { foreground: black }
- #B8.yellow { foreground: { new Color(0, 0, 0) } }
- </style>
-
- <JButton id='B1' text='Red'/>
- <JButton id='B2' text='Green' styleClass='green'/>
- <JButton id='B3' text='Blue' styleClass='blue'/>
- <GrandChild id='B4' text='Orange'/>
- <Child id='B5' text='Yellow'/>
- <Child id='B6' text='White' styleClass='idTest'/>
- <Child id='B7' text='Cyan'/>
- <Child2 id='B8' text='Pink' styleClass='yellow'/>
- <Child2 id='B9' text='Purple' foreground='#aa20ff'/>
- <GrandChild text='Red'/>
- </JPanel>
-</VBox>
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/Initializers/Initializers.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/Initializers/Initializers.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/Initializers/Initializers.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,37 +0,0 @@
-<Application>
- <script>
- private static String staticInitializerText = "Static initializer FAILED";
-
- static {
- staticInitializerText = "Static initializer worked!";
- }
-
- { initializerTest.setText("Initializer worked!"); }
-
- public Initializers(String label) {
- this(1, "Custom constructor test 2 worked!");
- constructorTest1.setText(label);
- }
-
-
- public Initializers(int dummy, String label) {
- super("Test 3 worked! "+dummy);
- constructorTest2.setText(label);
- }
-
-
- public static void main(String[] arg) { // test custom main method
- Initializers test = new Initializers("Custom constructor test 1 worked!");
- test.mainTest.setText("Custom main method worked!");
- test.setVisible(true);
- }
- </script>
-
- <VBox>
- <JLabel id='mainTest' text='Custom main method FAILED'/>
- <JLabel id='constructorTest1' text='Custom constructor TEST 1 FAILED'/>
- <JLabel id='constructorTest2' text='Custom constructor TEST 2 FAILED'/>
- <JLabel id='initializerTest' text='Initializer FAILED'/>
- <JLabel id='staticInitializerTest' text='{Initializers.staticInitializerText}'/>
- </VBox>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/InnerClasses/InnerClasses.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/InnerClasses/InnerClasses.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/InnerClasses/InnerClasses.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,17 +0,0 @@
-<Application>
- <JMenuBar>
- <JMenu text='Test'>
- <JMenuItem text='1'/>
- <JPopupMenu.Separator/>
- <JMenuItem text='2'/>
- <javax.swing.JPopupMenu.Separator/>
- <JMenuItem text='3'/>
- <JPopupMenu.Separator xmlns="javax.swing.*"/>
- <JMenuItem text='4'/>
- <swing:JPopupMenu.Separator xmlns:swing="javax.swing.*"/>
- <JMenuItem text='5'/>
- <swing:javax.swing.JPopupMenu.Separator xmlns:swing="javax.swing.*"/>
- <JMenuItem text='6'/>
- </JMenu>
- </JMenuBar>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/CurrentTime.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/CurrentTime.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/CurrentTime.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,17 +0,0 @@
-<JLabel text='{currentTime}' foreground='blue'>
- <script>
- import java.text.*;
- import javax.swing.Timer;
-
- DateFormat dateFormat = DateFormat.getTimeInstance();
- String currentTime = dateFormat.format(new Date());
-
- Timer timer = new Timer(1000, new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- currentTime = dateFormat.format(new Date());
- }
- });
-
- timer.start();
- </script>
-</JLabel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/OverriddenCurrentTime.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/OverriddenCurrentTime.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/OverriddenCurrentTime.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-<CurrentTime text='Parent Working'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/OverridingDataBindings.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/OverridingDataBindings.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/OverridingDataBindings/OverridingDataBindings.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,12 +0,0 @@
-<Application>
- <VBox>
- <JLabel text='The text below should display the time'/>
- <CurrentTime/>
-
- <JLabel text='The text below should read "Child Working"'/>
- <CurrentTime text='Child Working'/>
-
- <JLabel text='The text below should read "Parent Working"'/>
- <OverriddenCurrentTime/>
- </VBox>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/Script/JScriptInitializer.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/Script/JScriptInitializer.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/Script/JScriptInitializer.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,19 +0,0 @@
-<JDialog>
- <script>
- protected boolean value
- </script>
- <script>
- value=false
- </script>
-
- <script>
- value=getOk();
-
- public boolean getOk() {
- return true;
- }
- </script>
- <VBox>
- <JButton text='close' onActionPerformed="dispose()"/>
- </VBox>
-</JDialog>
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JComboBoxTest1.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JComboBoxTest1.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JComboBoxTest1.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<JComboBox>
- <item value='Working' selected='true'/>
-</JComboBox>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JComboBoxTest2.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JComboBoxTest2.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JComboBoxTest2.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<JComboBox>
- <item value='Failed!'/>
-</JComboBox>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JListTest1.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JListTest1.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JListTest1.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<JList>
- <item value='Working' selected='true'/>
-</JList>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JListTest2.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JListTest2.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JListTest2.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<JList>
- <item value='Failed!'/>
-</JList>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JTreeTest1.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JTreeTest1.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JTreeTest1.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<JTree>
- <item value='Working' selected='true'/>
-</JTree>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JTreeTest2.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JTreeTest2.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/JTreeTest2.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<JTree>
- <item value='Failed!'/>
-</JTree>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/SpecialSubclassing.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/SpecialSubclassing.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/SpecialSubclassing/SpecialSubclassing.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,26 +0,0 @@
-<Application title='Special Subclassing'>
- <VBox>
- <JComboBoxTest1/>
- <JComboBoxTest2>
- <item value='Working' selected='true'/>
- </JComboBoxTest2>
-
- <JScrollPane>
- <JListTest1/>
- </JScrollPane>
- <JScrollPane>
- <JListTest2>
- <item value='Working' selected='true'/>
- </JListTest2>
- </JScrollPane>
-
- <JScrollPane width='80' height='80'>
- <JTreeTest1/>
- </JScrollPane>
- <JScrollPane width='80' height='80'>
- <JTreeTest2>
- <item value='Working' selected='true'/>
- </JTreeTest2>
- </JScrollPane>
- </VBox>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ConflictingPackages.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ConflictingPackages.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ConflictingPackages.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-<awt:javax.swing.JFrame xmlns:awt='java.awt.*'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ConstraintsParseError.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ConstraintsParseError.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ConstraintsParseError.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,5 +0,0 @@
-<Application>
- <JLabel constraints='BorderLayout*%NORTH'/>
- <JButton constraints='BorderLayout.SOUTH'/>
- <JTabbedPane constraints='BorderLayout(CENTER'/>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/DataBindingParseError.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/DataBindingParseError.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/DataBindingParseError.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,6 +0,0 @@
-<JPanel>
- <JButton text='{"Missing right brace"'/>
- <JLabel text='{Math.PI + Math.E ~= Math.PIE}'/>
- <JToolBar visible='{I like pie}'/>
- <JButton text='{"This should compile"}}'/>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/DuplicateIDs.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/DuplicateIDs.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/DuplicateIDs.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,4 +0,0 @@
-<JPanel id='duplicate'>
- <JPanel id='duplicate'/>
- <JColorChooser id='duplicate'/>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/EventHandlerParseError.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/EventHandlerParseError.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/EventHandlerParseError.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,4 +0,0 @@
-<JPanel>
- <JButton onActionPerformed='!*'/>
- <JPanel onMouseEntered='{System.out.println("Remember kids, only use curly braces where appropriate!")}'/>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidID.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidID.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidID.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<Application id='1'>
- <JButton id='Hello-'/>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidRootTag.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidRootTag.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidRootTag.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-<style source='test.css'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidXML.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidXML.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/InvalidXML.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,4 +0,0 @@
-<begin>
- <valid/>
- <so.is.this/>
-</end>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ItemDuplicateValues.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ItemDuplicateValues.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ItemDuplicateValues.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,8 +0,0 @@
-<JList>
- <item value='1'/>
- <item value='2'/>
- <item value='2'/>
- <item value='3'/>
- <item value='3'/>
- <item value='3'/>
-</JList>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ItemNoValue.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ItemNoValue.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ItemNoValue.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,4 +0,0 @@
-<JList>
- <item label='This item doesn&t have a value'/>
- <item label='Neither does this one'/>
-</JList>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/MixedContent.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/MixedContent.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/MixedContent.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,19 +0,0 @@
-<JPanel>
- mixed1
-
- <Table>
- <row>
- mixed2
-
- <cell>mixed3</cell>
- </row>
- </Table>
-
- <JList>
- <item>mixed4</item>
- </JList>
-
- <JTabbedPane>
- <tab>mixed5</tab>
- </JTabbedPane>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/RowOutsideOfTable.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/RowOutsideOfTable.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/RowOutsideOfTable.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,9 +0,0 @@
-<JPanel>
- <row>
- <cell><JButton/></cell>
- </row>
-
- <row>
- <cell><JLabel/></cell>
- </row>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/RowWrongChild.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/RowWrongChild.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/RowWrongChild.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,9 +0,0 @@
-<Table>
- <row>
- <JPanel/>
- </row>
-
- <row>
- <JScrollPane/>
- </row>
-</Table>
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptNotFound.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptNotFound.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptNotFound.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-<script source='notfound.script'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptParseError.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptParseError.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptParseError.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,6 +0,0 @@
-<JFileChooser>
- <script>
- System.err.println("this is a valid line");
- System.err.println("this is an unclosed string literal);
- </script>
-</JFileChooser>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptSourceAndInline.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptSourceAndInline.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ScriptSourceAndInline.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<script source='dependencies/test.script'>
- System.err.println("This should not compile");
-</script>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleNotFound.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleNotFound.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleNotFound.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-<style source='notfound.css'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleParseError.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleParseError.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleParseError.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,9 +0,0 @@
-<JFileChooser>
- <style>
- JButton {
- foreground: blue;
- label: "Parse error on next line";
- *: false;
- }
- </style>
-</JFileChooser>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleSourceAndInline.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleSourceAndInline.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/StyleSourceAndInline.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<style source='dependencies/test.css'>
- JLabel { text: "this should not compile" }
-</style>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TabOutsideOfTabbedPane.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TabOutsideOfTabbedPane.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TabOutsideOfTabbedPane.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,9 +0,0 @@
-<JPanel>
- <tab>
- <JButton/>
- </tab>
-
- <tab>
- <JLabel/>
- </tab>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TabbedPaneWrongChild.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TabbedPaneWrongChild.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TabbedPaneWrongChild.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,6 +0,0 @@
-<Application>
- <JTabbedPane>
- <JPanel/>
- <JScrollPane/>
- </JTabbedPane>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TableWrongChild.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TableWrongChild.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TableWrongChild.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,6 +0,0 @@
-<Application>
- <Table>
- <JPanel/>
- <JScrollPane/>
- </Table>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyCellChildren.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyCellChildren.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyCellChildren.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,15 +0,0 @@
-<Application>
- <Table>
- <row>
- <cell>
- <JButton/>
- <JButton/>
- </cell>
-
- <cell>
- <JPanel/>
- <JToolBar/>
- </cell>
- </row>
- </Table>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyScrollPaneChildren.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyScrollPaneChildren.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyScrollPaneChildren.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,5 +0,0 @@
-<JScrollPane>
- <JButton/>
- <JToolBar/>
- <JPanel/>
-</JScrollPane>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManySplitPaneChildren.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManySplitPaneChildren.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManySplitPaneChildren.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,7 +0,0 @@
-<Application>
- <JSplitPane>
- <JButton text='one'/>
- <JButton text='two'/>
- <JButton text='three'/>
- </JSplitPane>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyTabChildren.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyTabChildren.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/TooManyTabChildren.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,13 +0,0 @@
-<Application>
- <JTabbedPane>
- <tab>
- <JButton/>
- <JButton/>
- </tab>
-
- <tab>
- <JPanel/>
- <JToolBar/>
- </tab>
- </JTabbedPane>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedAttribute.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedAttribute.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedAttribute.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<JPanel widgetCount='7'>
- <JLabel mnemonic='A'/>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedEvent.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedEvent.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedEvent.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
-<JPanel onWink='7'>
- <JLabel onWonLottery='A'/>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedPseudoclass.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedPseudoclass.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/UnsupportedPseudoclass.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,5 +0,0 @@
-<JButton>
- <style>
- :opaque { enabled: false; }
- </style>
-</JButton>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/dependencies/test.css
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/dependencies/test.css 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/dependencies/test.css 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-JLabel { text: "This should not compile" }
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/dependencies/test.script
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/dependencies/test.script 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/dependencies/test.script 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-System.err.println("This should not compile.");
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/force/JButton.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/force/JButton.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/force/JButton.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-<JButton id='testId' text='test.text'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/text/JButton.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/text/JButton.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/text/JButton.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-<JButton id='testId' text='test.text'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JDialog.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JDialog.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JDialog.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-<JDialog id='testId' title='test.title'/>
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
- <JTabbedPane>
- <tab id="testId" title='test.title'/>
-</JTabbedPane>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane2.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane2.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane2.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,5 +0,0 @@
-<JTabbedPane>
- <tab id="testId" title='test.title'>
- <JLabel text='testLabel'/>
- </tab>
-</JTabbedPane>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JButton.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JButton.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JButton.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1 +0,0 @@
-<JButton id='testId' toolTipText='test.toolTipText'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
- <JTabbedPane id="testId" toolTipText='test.toolTipText'>
- <tab title="text"/>
-</JTabbedPane>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane2.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane2.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane2.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,3 +0,0 @@
- <JTabbedPane>
- <tab id="testId" toolTipText='test.toolTipText'/>
-</JTabbedPane>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane3.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane3.jaxx 2008-10-11 14:10:42 UTC (rev 899)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane3.jaxx 2008-10-11 14:11:34 UTC (rev 900)
@@ -1,5 +0,0 @@
-<JTabbedPane>
- <tab id="testId" toolTipText='test.toolTipText'>
- <JLabel text='yo'/>
- </tab>
-</JTabbedPane>
\ No newline at end of file
1
0
r899 - in lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases: CSSTests errors
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 14:10:42 +0000 (Sat, 11 Oct 2008)
New Revision: 899
Removed:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Child.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Child2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/AmbiguousName.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/BadTypeConversions.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/CellOutsideOfRow.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ChildrenInNonContainer.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ClassNotFound.jaxx
Log:
refactor tests of the plugin using maven-plugin-testing-harness plugin
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Child.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Child.jaxx 2008-10-11 14:10:07 UTC (rev 898)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Child.jaxx 2008-10-11 14:10:42 UTC (rev 899)
@@ -1 +0,0 @@
-<JButton styleClass='yellow' id='child'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Child2.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Child2.jaxx 2008-10-11 14:10:07 UTC (rev 898)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/CSSTests/Child2.jaxx 2008-10-11 14:10:42 UTC (rev 899)
@@ -1 +0,0 @@
-<JButton foreground='#ffcccc'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/AmbiguousName.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/AmbiguousName.jaxx 2008-10-11 14:10:07 UTC (rev 898)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/AmbiguousName.jaxx 2008-10-11 14:10:42 UTC (rev 899)
@@ -1,10 +0,0 @@
-<JPanel>
- <script>
- import java.awt.*;
- import java.sql.*;
- import java.util.*;
- </script>
-
- <List/>
- <Date/>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/BadTypeConversions.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/BadTypeConversions.jaxx 2008-10-11 14:10:07 UTC (rev 898)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/BadTypeConversions.jaxx 2008-10-11 14:10:42 UTC (rev 899)
@@ -1,4 +0,0 @@
-<JButton opaque='yellow'
- margin='42, 1, 7'
- mnemonic='AX'
- border='true'/>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/CellOutsideOfRow.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/CellOutsideOfRow.jaxx 2008-10-11 14:10:07 UTC (rev 898)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/CellOutsideOfRow.jaxx 2008-10-11 14:10:42 UTC (rev 899)
@@ -1,5 +0,0 @@
-<JPanel>
- <cell><JButton/></cell>
-
- <cell><JLabel/></cell>
-</JPanel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ChildrenInNonContainer.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ChildrenInNonContainer.jaxx 2008-10-11 14:10:07 UTC (rev 898)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ChildrenInNonContainer.jaxx 2008-10-11 14:10:42 UTC (rev 899)
@@ -1,4 +0,0 @@
-<JButton>
- <JPanel/>
- <JMenuBar/>
-</JButton>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ClassNotFound.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ClassNotFound.jaxx 2008-10-11 14:10:07 UTC (rev 898)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/errors/ClassNotFound.jaxx 2008-10-11 14:10:42 UTC (rev 899)
@@ -1,3 +0,0 @@
-<Frame>
- <Glob/>
-</Frame>
\ No newline at end of file
1
0
r898 - lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 14:10:07 +0000 (Sat, 11 Oct 2008)
New Revision: 898
Removed:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/ClassReferences.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/ConstructorReferenceTest.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JAXXReferenceTest.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JAXXTest.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JavaTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/StaticMethodTest.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/TypeReference.jaxx
Log:
refactor tests of the plugin using maven-plugin-testing-harness plugin
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/ClassReferences.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/ClassReferences.jaxx 2008-10-11 14:09:48 UTC (rev 897)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/ClassReferences.jaxx 2008-10-11 14:10:07 UTC (rev 898)
@@ -1,18 +0,0 @@
-<Application>
- <script>
- Object ref1 = new ConstructorReferenceTest();
- box.add(new JLabel(ref1.toString()));
-
- TypeReference ref2; // this line only compiles if TypeReference.jaxx gets compiled due to this reference
- box.add(new JLabel("Type reference worked"));
-
- box.add(new JLabel(StaticMethodTest.getText()));
- </script>
-
- <VBox id='box'>
- <!-- TODO Ce cas ne fonctionne plus (il faut posséder cette classe compilée ? -->
- <!--ClassTest customProperty='Compiled class file worked'/-->
- <JAXXTest customProperty='Uncompiled JAXX file worked'/>
- <JavaTest customProperty='Uncompiled Java file worked'/>
- </VBox>
-</Application>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/ConstructorReferenceTest.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/ConstructorReferenceTest.jaxx 2008-10-11 14:09:48 UTC (rev 897)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/ConstructorReferenceTest.jaxx 2008-10-11 14:10:07 UTC (rev 898)
@@ -1,7 +0,0 @@
-<Object>
- <script>
- public String toString() {
- return "Constructor reference worked";
- }
- </script>
-</Object>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JAXXReferenceTest.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JAXXReferenceTest.jaxx 2008-10-11 14:09:48 UTC (rev 897)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JAXXReferenceTest.jaxx 2008-10-11 14:10:07 UTC (rev 898)
@@ -1,7 +0,0 @@
-<JLabel>
- <script>
- public void setCustomProperty(String label) {
- setText(label);
- }
- </script>
-</JLabel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JAXXTest.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JAXXTest.jaxx 2008-10-11 14:09:48 UTC (rev 897)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JAXXTest.jaxx 2008-10-11 14:10:07 UTC (rev 898)
@@ -1,7 +0,0 @@
-<JLabel>
- <script>
- public void setCustomProperty(String label) {
- setText(label);
- }
- </script>
-</JLabel>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JavaTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JavaTest.java 2008-10-11 14:09:48 UTC (rev 897)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/JavaTest.java 2008-10-11 14:10:07 UTC (rev 898)
@@ -1,9 +0,0 @@
-package testcases.ClassReferences;
-
-import javax.swing.*;
-
-public class JavaTest extends JLabel {
- public void setCustomProperty(String label) {
- setText(label);
- }
-}
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/StaticMethodTest.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/StaticMethodTest.jaxx 2008-10-11 14:09:48 UTC (rev 897)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/StaticMethodTest.jaxx 2008-10-11 14:10:07 UTC (rev 898)
@@ -1,7 +0,0 @@
-<Object>
- <script>
- public static String getText() {
- return "Static method reference worked";
- }
- </script>
-</Object>
\ No newline at end of file
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/TypeReference.jaxx
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/TypeReference.jaxx 2008-10-11 14:09:48 UTC (rev 897)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/ClassReferences/TypeReference.jaxx 2008-10-11 14:10:07 UTC (rev 898)
@@ -1 +0,0 @@
-<Object/>
\ No newline at end of file
1
0
r897 - lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 14:09:48 +0000 (Sat, 11 Oct 2008)
New Revision: 897
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/CSSTests.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/ClassReferences.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Initializers.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/InnerClasses.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/OverridingDataBindings.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Script.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/SpecialSubclassing.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/errors.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/force.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_text.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_title.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_tooltiptext.xml
Log:
refactor tests of the plugin using maven-plugin-testing-harness plugin
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/CSSTests.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/CSSTests.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/CSSTests.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>false</i18nable>
+ <includes>
+ <value>**/CSSTests/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/ClassReferences.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/ClassReferences.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/ClassReferences.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/ClassReferences/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Initializers.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Initializers.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Initializers.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/Initializers/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/InnerClasses.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/InnerClasses.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/InnerClasses.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/InnerClasses/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/OverridingDataBindings.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/OverridingDataBindings.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/OverridingDataBindings.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/OverridingDataBindings/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Script.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Script.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/Script.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/Script/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/SpecialSubclassing.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/SpecialSubclassing.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/SpecialSubclassing.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/SpecialSubclassing/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/errors.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/errors.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/errors.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/errors/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/force.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/force.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/force.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <includes>
+ <value>**/force/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_text.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_text.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_text.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/i18n/text/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_title.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_title.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_title.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/i18n/title/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_tooltiptext.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_tooltiptext.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/resources/i18n_tooltiptext.xml 2008-10-11 14:09:48 UTC (rev 897)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${basedir}/src/test/resources</src>
+ <outJava>${basedir}/target/it-generated-source/java</outJava>
+ <outResource>${basedir}/target/it-generated-source/resources</outResource>
+ <force>true</force>
+ <i18nable>true</i18nable>
+ <includes>
+ <value>**/i18n/tooltiptext/*.jaxx</value>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
1
0
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 14:09:38 +0000 (Sat, 11 Oct 2008)
New Revision: 896
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/changelog
lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
Log:
refactor tests of the plugin using maven-plugin-testing-harness plugin
Modified: lutinjaxx/trunk/maven-jaxx-plugin/changelog
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/changelog 2008-10-11 14:09:14 UTC (rev 895)
+++ lutinjaxx/trunk/maven-jaxx-plugin/changelog 2008-10-11 14:09:38 UTC (rev 896)
@@ -1,3 +1,4 @@
ver-0-5 chemit 20081002
- * 20081002 [chemit] Using lutinproject 3.0, changing groupId to org.codelutin
+ * 20081011 [chemit] refactor tests of the plugin using maven-plugin-testing-harness plugin
+ * 20081002 [chemit] Using lutinpluginproject 3.0, changing groupId to org.codelutin
* 20081002 [chemit] Make nearly all tests works again...
Modified: lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-11 14:09:14 UTC (rev 895)
+++ lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-11 14:09:38 UTC (rev 896)
@@ -50,6 +50,12 @@
<artifactId>maven-project</artifactId>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <version>1.1</version>
+ <scope>compile</scope>
+ </dependency>
<dependency>
<groupId>org.codelutin</groupId>
1
0
r895 - lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 14:09:14 +0000 (Sat, 11 Oct 2008)
New Revision: 895
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
Log:
refactor tests of the plugin using maven-plugin-testing-harness plugin
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-11 14:08:31 UTC (rev 894)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-11 14:09:14 UTC (rev 895)
@@ -1,111 +1,132 @@
package org.codelutin.jaxx;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import java.io.File;
-public class CompilerTest extends AbstractCompilerTest {
+public class CompilerTest extends AbstractMojoTestCase {
- @CompileConfig(packageName = "InnerClasses", runJavac = true)
- public void testInnerClasses() throws MojoExecutionException, MojoFailureException {
- goal.execute();
+ /** log */
+ protected static final Log log = LogFactory.getLog(CompilerTest.class);
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ log.info(getName());
}
-
- @CompileConfig(packageName = "SpecialSubclassing", runJavac = true)
- public void testSpecialSubclassing() throws MojoExecutionException, MojoFailureException {
- try {
- goal.execute();
- } catch (Exception e) {
- // there is some inter-dependances between generated java file
- // we runJavaC on each file, but we should compile a sourcePath instead...
- assertTrue(true);
- }
- goal.execute();
+ protected JaxxGeneratorMojo getMojo(String s) throws Exception {
+ File testPom = new File(getBasedir(), "src/test/resources/" + s + ".xml");
+ JaxxGeneratorMojo mojo = (JaxxGeneratorMojo) lookupMojo("generate", testPom);
+ assertNotNull(mojo);
+ return mojo;
}
- @CompileConfig(packageName = "CSSTests", verbose = false, i18nable = false)
- public void testCssTests() throws MojoExecutionException, MojoFailureException {
- goal.execute();
+ public void testInnerClasses() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("InnerClasses");
+ mojo.execute();
+ assertEquals(1, mojo.getFiles().length);
}
- @CompileConfig(packageName = "errors", verbose = false)
- public void testErrors() throws MojoExecutionException, MojoFailureException {
- //fixme : launch a goal for each files found : since we should failed for some files...
- //goal.execute();
+ public void testSpecialSubclassing() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("SpecialSubclassing");
+ mojo.execute();
+ assertEquals(7, mojo.getFiles().length);
}
- @CompileConfig(packageName = "Initializers", runJavac = false)
- public void testInitializers() throws MojoExecutionException, MojoFailureException {
- goal.execute();
+ public void testCssTests() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("CSSTests");
+ mojo.execute();
+ assertEquals(7, mojo.getFiles().length);
}
- @CompileConfig(packageName = "Script", runJavac = false)
- public void testScript() throws MojoExecutionException, MojoFailureException {
- try {
- goal.execute();
- } catch (Exception e) {
- // there is some inter-dependances between generated java file
- // we runJavaC on each file, but we should compile a sourcePath instead...
- assertTrue(true);
+ public void testErrors() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("errors");
+ // init mojo to get alls files to treate
+ mojo.init();
+ String[] files = mojo.getFiles();
+ // execute mjo on each jaxx file to produce the error
+ for (String file : files) {
+ mojo.setFiles(new String[]{file});
+ try {
+ mojo.execute();
+ // should never pass
+ fail();
+ } catch (MojoExecutionException e) {
+ // ok jaxx compiler failed
+ assertTrue(true);
+ } catch (MojoFailureException e) {
+ // this exception should not appear
+ fail();
+ }
}
}
- @CompileConfig(packageName = "OverridingDataBindings", runJavac = false)
- public void testOverridingDataBindings() throws MojoExecutionException, MojoFailureException {
- goal.execute();
+ public void testInitializers() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("Initializers");
+ mojo.execute();
+ assertEquals(1, mojo.getFiles().length);
}
- @CompileConfig(packageName = "ClassReferences", runJavac = true)
- public void testClassReferences() throws MojoExecutionException, MojoFailureException {
- try {
- goal.execute();
- } catch (Exception e) {
- // there is some inter-dependances between generated java file
- // we runJavaC on each file, but we should compile a sourcePath instead...
- assertTrue(true);
- }
- goal.execute();
+ public void testScript() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("Script");
+ mojo.execute();
+ assertEquals(1, mojo.getFiles().length);
}
- @CompileConfig(packageName = "force", verbose = false)
- public void testForce() throws MojoExecutionException, MojoFailureException, InterruptedException {
+ public void testOverridingDataBindings() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("OverridingDataBindings");
+ mojo.execute();
+ assertEquals(3, mojo.getFiles().length);
+ }
+
+ public void testClassReferences() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("ClassReferences");
+ mojo.execute();
+ assertEquals(6, mojo.getFiles().length);
+ }
+
+ public void testForce() throws Exception {
+
+ JaxxGeneratorMojo mojo = getMojo("force");
// first round, with force option so will generate theonly JButton.jaxx file
- goal.execute();
- String[] files = goal.getFiles();
+ mojo.execute();
+ String[] files = mojo.getFiles();
assertEquals(1, files.length);
- File srcFile = new File(goal.getSrc(), files[0]);
+ File srcFile = new File(mojo.getSrc(), files[0]);
- File dstFile = goal.getUpdater().getMirrorFile(srcFile);
+ File dstFile = mojo.getUpdater().getMirrorFile(srcFile);
long oldTime = dstFile.lastModified();
// second round, no force so will not the file
- goal.setForce(false);
- goal.execute();
- files = goal.getFiles();
+ mojo.setForce(false);
+ mojo.execute();
+ files = mojo.getFiles();
assertEquals(0, files.length);
Thread.sleep(1000);
- assertEquals(oldTime, goal.getUpdater().getMirrorFile(srcFile).lastModified());
+ assertEquals(oldTime, mojo.getUpdater().getMirrorFile(srcFile).lastModified());
// three round : modify a source with no force option
srcFile.setLastModified(System.currentTimeMillis());
- goal.execute();
- files = goal.getFiles();
+ mojo.execute();
+ files = mojo.getFiles();
assertEquals(1, files.length);
- assertTrue(goal.getUpdater().getMirrorFile(srcFile).lastModified() > oldTime);
+ assertTrue(mojo.getUpdater().getMirrorFile(srcFile).lastModified() > oldTime);
// last round, reforce file generation for an no modify source
- goal.setForce(true);
- goal.execute();
- files = goal.getFiles();
+ mojo.setForce(true);
+ mojo.execute();
+ files = mojo.getFiles();
assertEquals(1, files.length);
- assertTrue(goal.getUpdater().getMirrorFile(srcFile).lastModified() > oldTime);
+ assertTrue(mojo.getUpdater().getMirrorFile(srcFile).lastModified() > oldTime);
}
-
}
\ No newline at end of file
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-11 14:08:31 UTC (rev 894)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-11 14:09:14 UTC (rev 895)
@@ -1,59 +1,76 @@
package org.codelutin.jaxx;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.codelutin.util.FileUtil;
import java.io.File;
import java.io.IOException;
-public class I18nTest extends AbstractCompilerTest {
+public class I18nTest extends AbstractMojoTestCase {
- @CompileConfig(packageName = "i18n.text", verbose = false, i18nable = false)
- public void testI18nTextNoI1_nabel() throws MojoExecutionException, MojoFailureException, IOException {
- goal.execute();
- checkPattern("testId.setText(_(\"test.text\"));", false);
- }
+ /** log */
+ protected static final Log log = LogFactory.getLog(I18nTest.class);
- @CompileConfig(packageName = "i18n.title", verbose = false, i18nable = false)
- public void testI18nTitleNoI18nable() throws MojoExecutionException, MojoFailureException, IOException {
- goal.execute();
- checkPattern("testId.setTitle(_(\"test.title\"));", false);
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ log.info(getName());
}
- @CompileConfig(packageName = "i18n.tooltiptext", verbose = false, i18nable = false)
- public void testI18nToolTipTextNoI18nable() throws MojoExecutionException, MojoFailureException, IOException {
- goal.execute();
- checkPattern("testId.setToolTipText(_(\"test.toolTipText\"));", false);
+ protected JaxxGeneratorMojo getMojo(String s) throws Exception {
+ File testPom = new File(getBasedir(), "src/test/resources/" + s + ".xml");
+ JaxxGeneratorMojo mojo = (JaxxGeneratorMojo) lookupMojo("generate", testPom);
+ assertNotNull(mojo);
+ return mojo;
}
- @CompileConfig(packageName = "i18n.text", verbose = false, i18nable = true)
- public void testI18nText() throws MojoExecutionException, MojoFailureException, IOException {
- goal.execute();
- checkPattern("testId.setText(_(\"test.text\"));", true);
- checkPattern("\"_(\\\"test.text\\\")\"", false);
+ public void testI18nText() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("i18n_text");
+ mojo.setI18nable(false);
+ mojo.execute();
+ checkPattern(mojo, "testId.setText(_(\"test.text\"));", false);
+
+ mojo.setI18nable(true);
+ mojo.execute();
+ checkPattern(mojo, "testId.setText(_(\"test.text\"));", true);
+ checkPattern(mojo, "\"_(\\\"test.text\\\")\"", false);
}
- @CompileConfig(packageName = "i18n.title", verbose = false, i18nable = true)
- public void testI18nTitle() throws MojoExecutionException, MojoFailureException, IOException {
- goal.execute();
- checkPattern("testId.setTitle(_(\"test.title\"));", true);
- checkPattern("\"_(\\\"test.title\\\")\"", false);
+ public void testI18nTitle() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("i18n_title");
+ mojo.setI18nable(false);
+ mojo.execute();
+ checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", false);
+
+ mojo.setI18nable(true);
+ mojo.execute();
+ checkPattern(mojo, "testId.setTitle(_(\"test.title\"));", true);
+ checkPattern(mojo, "\"_(\\\"test.title\\\")\"", false);
}
- @CompileConfig(packageName = "i18n.tooltiptext", verbose = false, i18nable = true)
- public void testI18nToolTipText() throws MojoExecutionException, MojoFailureException, IOException {
- goal.execute();
- checkPattern("testId.setToolTipText(_(\"test.toolTipText\"));", true);
- checkPattern("\"_(\\\"test.toolTipText\\\")\"", false);
+ public void testI18nToolTipText() throws Exception {
+ JaxxGeneratorMojo mojo = getMojo("i18n_tooltiptext");
+ mojo.setI18nable(false);
+ mojo.execute();
+ checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", false);
+
+ mojo.setI18nable(true);
+ mojo.execute();
+ checkPattern(mojo, "testId.setToolTipText(_(\"test.toolTipText\"));", true);
+ checkPattern(mojo, "\"_(\\\"test.toolTipText\\\")\"", false);
}
- protected void checkPattern(String pattern, boolean required) throws IOException {
- String[] files = goal.getFiles();
+ protected void checkPattern(JaxxGeneratorMojo mojo, String pattern, boolean required) throws IOException {
+ String[] files = mojo.getFiles();
for (String file : files) {
// check we have a the required testId.setTitle(_("test.title"));
- File f = new File(getOutDir(), file.substring(0, file.length() - 4) + "java");
- log.info("check generated file " + f);
+ File f = new File(mojo.getOutJava(), file.substring(0, file.length() - 4) + "java");
+ if (mojo.isVerbose()) {
+ log.info("check generated file " + f);
+ }
assertTrue("generated file " + f + " was not found...", f.exists());
String content = FileUtil.readAsString(f);
1
0
r894 - lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 14:08:31 +0000 (Sat, 11 Oct 2008)
New Revision: 894
Removed:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/AbstractCompilerTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompileConfig.java
Log:
refactor tests of the plugin using maven-plugin-testing-harness plugin
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/AbstractCompilerTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/AbstractCompilerTest.java 2008-10-11 14:06:12 UTC (rev 893)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/AbstractCompilerTest.java 2008-10-11 14:08:31 UTC (rev 894)
@@ -1,97 +0,0 @@
-package org.codelutin.jaxx;
-
-import junit.framework.TestCase;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/** @author chemit */
-public abstract class AbstractCompilerTest extends TestCase {
- /** log */
- protected static final Log log = LogFactory.getLog(I18nTest.class);
- /** mojo goal */
- protected JaxxGeneratorMojo goal;
-
- protected static final String PREFIX_PACKAGE = "testcases";
- protected static File basedir;
- protected static File srcDir;
- protected static File outDir;
- protected static File ClassOutDir;
- protected static File ResourcesOutDir;
-
- public static File getBasedir() {
- if (basedir == null) {
- String basedirStr = System.getProperty("basedir");
- basedir = new File(basedirStr == null ? "." : basedirStr);
- log.info("use basedir : "+basedir);
- }
- return basedir;
- }
-
- protected static File getSrcDir() {
- if (srcDir == null) {
- srcDir = new File(getBasedir(), "src" + File.separator + "test" + File.separator + "java");
- }
- return srcDir;
- }
-
- protected static File getOutDir() {
- if (outDir == null) {
- outDir = new File(getBasedir(), "target" + File.separator + "test-generated-sources" + File.separator + "java");
- outDir.mkdirs();
- }
- return outDir;
- }
-
- protected static File getClassOutDir() {
- if (ClassOutDir == null) {
- ClassOutDir = new File(getBasedir(), "target" + File.separator + "test-classes");
- ClassOutDir.mkdirs();
- }
- return ClassOutDir;
- }
-
- protected static File getResourcesOutDir() {
- if (ResourcesOutDir == null) {
- ResourcesOutDir = new File(getBasedir(), "target" + File.separator + "test-classes");
- ResourcesOutDir.mkdirs();
- }
- return ResourcesOutDir;
- }
-
- @Override
- public void setUp() throws IOException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, MojoExecutionException, MojoFailureException {
- CompileConfig anno = getClass().getMethod(getName()).getAnnotation(CompileConfig.class);
- assertNotNull("could not found " + CompileConfig.class.getSimpleName() + " annotation on test " + getClass(), anno);
- final File srcDir = getSrcDir();
- assertTrue("could not found srcDir (or not existing) : " + srcDir + " on test " + getClass(), srcDir != null && srcDir.exists());
- final File outDir = getOutDir();
- assertTrue("could not found outDir (or not existing) : " + outDir + " on test " + getClass(), outDir != null && outDir.exists());
- final File classOutDir = getClassOutDir();
- assertTrue("could not found classOutDir (or not existing) : " + classOutDir + " on test " + getClass(), classOutDir != null && classOutDir.exists());
- final File resourcesOutDir = getResourcesOutDir();
- assertTrue("could not found classOutDir (or not existing) : " + resourcesOutDir + " on test " + getClass(), resourcesOutDir != null && resourcesOutDir.exists());
- String packageName = anno.packageName();
- goal = new JaxxGeneratorMojo();
- goal.setSrc(srcDir);
- goal.setOutJava(outDir);
- goal.setOutClass(classOutDir);
- goal.setOutResource(resourcesOutDir);
- //goal.setIncludes(new String[]{"**\\/" + PREFIX_PACKAGE + "\\/" + packageName + "\\/*.jaxx"});
- String expression = packageName.replaceAll("\\.", "\\\\/");
- goal.setIncludes(new String[]{"**\\/" + PREFIX_PACKAGE + "\\/" + expression + "\\/*.jaxx"});
- goal.setOptimize(anno.optimize());
- goal.setVerbose(anno.verbose());
- goal.setForce(anno.force());
- goal.setI18nable(anno.i18nable());
- //TODO Use the maven plexus TestCase inorder to include dependencies
- goal.setJavaOpts(anno.javaOpts());
- log.info("setUp test " + getName());
- }
-}
Deleted: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompileConfig.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompileConfig.java 2008-10-11 14:06:12 UTC (rev 893)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompileConfig.java 2008-10-11 14:08:31 UTC (rev 894)
@@ -1,46 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package org.codelutin.jaxx;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Une annotation pour configurer les tests de compilation.
- *
- * @author chemit
- */
-(a)Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
-@Target(value = {java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.METHOD})
-public @interface CompileConfig {
-
- public String packageName();
-
- public boolean optimize() default true;
-
- public boolean runJavac() default false;
-
- public boolean verbose() default false;
-
- public boolean force() default true;
-
- public boolean i18nable() default false;
-
- public String javaOpts() default "";
-}
1
0
r893 - in lutinjaxx/trunk/jaxx-core: . src/main/java/jaxx/reflect src/test/java/jaxx/junit
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 11, 2008
Oct. 11, 2008
Author: tchemit
Date: 2008-10-11 14:06:12 +0000 (Sat, 11 Oct 2008)
New Revision: 893
Added:
lutinjaxx/trunk/jaxx-core/src/test/java/jaxx/junit/JavaFileParserTest.java
Modified:
lutinjaxx/trunk/jaxx-core/changelog
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/reflect/JavaFileParser.java
Log:
fix bug on JavaFileParser : works again
Modified: lutinjaxx/trunk/jaxx-core/changelog
===================================================================
--- lutinjaxx/trunk/jaxx-core/changelog 2008-10-09 11:08:39 UTC (rev 892)
+++ lutinjaxx/trunk/jaxx-core/changelog 2008-10-11 14:06:12 UTC (rev 893)
@@ -1,4 +1,5 @@
-ver-0-5 chemit 20081002
+ ver-0-5 chemit 20081002
+ * 20081011 [chemit] fix bug on JavaFileParser : works again
* 20081002 [chemit] Using lutinproject 3.0, changing groupId to org.codelutin
* 20081002 [chemit] use a single module jaxx-core (no more core, runtime and jaxx-swing modules)
* 20081002 [chemit] Introduce JAXXContext
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/reflect/JavaFileParser.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/reflect/JavaFileParser.java 2008-10-09 11:08:39 UTC (rev 892)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/reflect/JavaFileParser.java 2008-10-11 14:06:12 UTC (rev 893)
@@ -83,6 +83,7 @@
SimpleNode node = p.popNode();
if (node != null) {
scanCompilationUnit(node);
+ return;
}
throw new CompilerException("Internal error: null node parsing Java file from " + src);
}
Copied: lutinjaxx/trunk/jaxx-core/src/test/java/jaxx/junit/JavaFileParserTest.java (from rev 884, lutinjaxx/trunk/jaxx-core/src/test/java/jaxx/junit/ClassDescriptorTest.java)
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/test/java/jaxx/junit/JavaFileParserTest.java (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/test/java/jaxx/junit/JavaFileParserTest.java 2008-10-11 14:06:12 UTC (rev 893)
@@ -0,0 +1,53 @@
+package jaxx.junit;
+
+import jaxx.CompilerException;
+import jaxx.reflect.ClassDescriptor;
+import jaxx.reflect.JavaFileParser;
+import junit.framework.TestCase;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.Reader;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class JavaFileParserTest extends TestCase {
+
+
+ /** log */
+ protected static final Log log = LogFactory.getLog(JavaFileParserTest.class);
+
+ protected File getBaseDir() {
+ // get maven env basedir
+ String basedir = System.getenv("basedir");
+ if (basedir == null) {
+ basedir = new File("").getAbsolutePath();
+ }
+ return new File(basedir);
+ }
+
+ public void testParseJavaSourceFile() throws Exception {
+
+
+ File testSourceRoot = new File(getBaseDir(), "src" + File.separator + "test" + File.separator + "java");
+ assertTrue(testSourceRoot.exists());
+
+ File src = new File(testSourceRoot, getClass().getName().replaceAll("\\.", File.separator) + ".java");
+ assertTrue(src.exists());
+ log.info("trying parsing file " + src);
+ Reader reader = new FileReader(src);
+ try {
+ ClassDescriptor result = JavaFileParser.parseJavaFile("TestParserJava", reader, getClass().getClassLoader());
+ assertNotNull(result);
+
+ } catch (CompilerException e) {
+ log.error("could not parse file "+src+" for reason "+e.getMessage(),e);
+ fail(e.getMessage());
+ }
+ finally {
+ reader.close();
+ }
+ }
+
+}
Property changes on: lutinjaxx/trunk/jaxx-core/src/test/java/jaxx/junit/JavaFileParserTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
1
0
r892 - in lutinjaxx/trunk: jaxx-core/src/main/java/jaxx/tags/swing maven-jaxx-plugin/src/test/java/org/codelutin/jaxx maven-jaxx-plugin/src/test/java/testcases/i18n/title maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext
by tchemit@users.labs.libre-entreprise.org Oct. 9, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 9, 2008
Oct. 9, 2008
Author: tchemit
Date: 2008-10-09 11:08:39 +0000 (Thu, 09 Oct 2008)
New Revision: 892
Added:
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane2.jaxx
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane3.jaxx
Modified:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/swing/JTabbedPaneHandler.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
Log:
fix bug sur i18n et les JTabbedPaneHandler
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/swing/JTabbedPaneHandler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/swing/JTabbedPaneHandler.java 2008-10-08 16:01:29 UTC (rev 891)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/swing/JTabbedPaneHandler.java 2008-10-09 11:08:39 UTC (rev 892)
@@ -7,6 +7,7 @@
import jaxx.CompilerException;
import jaxx.compiler.CompiledObject;
import jaxx.compiler.JAXXCompiler;
+import jaxx.compiler.I18nHelper;
import jaxx.reflect.ClassDescriptor;
import jaxx.reflect.ClassDescriptorLoader;
import jaxx.runtime.swing.TabInfo;
@@ -56,12 +57,28 @@
String title = tabInfo.getTitle();
if (title != null) {
- appendAdditionCode(getId() + ".setTitleAt(" + tabIndex + ", " + TypeManager.getJavaCode(title) + ");");
+ if (I18nHelper.isI18nAttribute("title")) {
+ if (!title.startsWith("_(\"")) {
+ // we did not have the invocation code, add it
+ title = I18nHelper.addI18nInvocation(getId(),"title", TypeManager.getJavaCode(title),compiler);
+ }
+ } else {
+ title = TypeManager.getJavaCode(title);
+ }
+ appendAdditionCode(getId() + ".setTitleAt(" + tabIndex + ", " + title + ");");
}
String toolTipText = tabInfo.getToolTipText();
if (toolTipText != null) {
- appendAdditionCode(getId() + ".setToolTipTextAt(" + tabIndex + ", " + TypeManager.getJavaCode(toolTipText) + ");");
+ if (I18nHelper.isI18nAttribute("toolTipText")) {
+ if (!toolTipText.startsWith("_(\"")) {
+ // we did not have the invocation code, add it
+ toolTipText = I18nHelper.addI18nInvocation(getId(),"toolTipText", TypeManager.getJavaCode(toolTipText),compiler);
+ }
+ } else {
+ toolTipText = TypeManager.getJavaCode(toolTipText);
+ }
+ appendAdditionCode(getId() + ".setToolTipTextAt(" + tabIndex + ", " + toolTipText + ");");
}
boolean enabled = tabInfo.isEnabled();
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-08 16:01:29 UTC (rev 891)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-09 11:08:39 UTC (rev 892)
@@ -31,18 +31,21 @@
public void testI18nText() throws MojoExecutionException, MojoFailureException, IOException {
goal.execute();
checkPattern("testId.setText(_(\"test.text\"));", true);
+ checkPattern("\"_(\\\"test.text\\\")\"", false);
}
@CompileConfig(packageName = "i18n.title", verbose = false, i18nable = true)
public void testI18nTitle() throws MojoExecutionException, MojoFailureException, IOException {
goal.execute();
checkPattern("testId.setTitle(_(\"test.title\"));", true);
+ checkPattern("\"_(\\\"test.title\\\")\"", false);
}
@CompileConfig(packageName = "i18n.tooltiptext", verbose = false, i18nable = true)
public void testI18nToolTipText() throws MojoExecutionException, MojoFailureException, IOException {
goal.execute();
checkPattern("testId.setToolTipText(_(\"test.toolTipText\"));", true);
+ checkPattern("\"_(\\\"test.toolTipText\\\")\"", false);
}
protected void checkPattern(String pattern, boolean required) throws IOException {
@@ -54,7 +57,9 @@
assertTrue("generated file " + f + " was not found...", f.exists());
String content = FileUtil.readAsString(f);
- assertEquals("could not find the pattern : " + pattern + " in file " + f, required, content.contains(pattern));
+
+ String errorMessage = required ? "could not find the pattern : " : "should not have found pattern :";
+ assertEquals(errorMessage + pattern + " in file " + f, required, content.contains(pattern));
}
}
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane2.jaxx (from rev 884, lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane.jaxx)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane2.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane2.jaxx 2008-10-09 11:08:39 UTC (rev 892)
@@ -0,0 +1,5 @@
+<JTabbedPane>
+ <tab id="testId" title='test.title'>
+ <JLabel text='testLabel'/>
+ </tab>
+</JTabbedPane>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/title/JTabbedPane2.jaxx
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane3.jaxx (from rev 884, lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane2.jaxx)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane3.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane3.jaxx 2008-10-09 11:08:39 UTC (rev 892)
@@ -0,0 +1,5 @@
+<JTabbedPane>
+ <tab id="testId" toolTipText='test.toolTipText'>
+ <JLabel text='yo'/>
+ </tab>
+</JTabbedPane>
\ No newline at end of file
Property changes on: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/tooltiptext/JTabbedPane3.jaxx
___________________________________________________________________
Name: svn:mergeinfo
+
1
0
r891 - in lutinjaxx/trunk: jaxx-util maven-jaxx-plugin
by tchemit@users.labs.libre-entreprise.org Oct. 8, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 8, 2008
Oct. 8, 2008
Author: tchemit
Date: 2008-10-08 16:01:29 +0000 (Wed, 08 Oct 2008)
New Revision: 891
Modified:
lutinjaxx/trunk/jaxx-util/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
Log:
use plugin for plugin
Modified: lutinjaxx/trunk/jaxx-util/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-util/pom.xml 2008-10-08 16:00:46 UTC (rev 890)
+++ lutinjaxx/trunk/jaxx-util/pom.xml 2008-10-08 16:01:29 UTC (rev 891)
@@ -16,7 +16,6 @@
<packaging>jar</packaging>
<version>0.5-SNAPSHOT</version>
<description>Jaxx lutin library utility</description>
- <!--url>${site.home.url}</url-->
<build>
<plugins>
Modified: lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-08 16:00:46 UTC (rev 890)
+++ lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-08 16:01:29 UTC (rev 891)
@@ -83,6 +83,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
+ <version>2.4.3</version>
+ <executions>
+ <execution>
+ <id>helpmojo</id>
+ <goals>
+ <goal>helpmojo</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
@@ -93,6 +102,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
+ <version>2.4.3</version>
</plugin>
</plugins>
</reporting>
1
0
r890 - lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org Oct. 8, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 8, 2008
Oct. 8, 2008
Author: tchemit
Date: 2008-10-08 16:00:46 +0000 (Wed, 08 Oct 2008)
New Revision: 890
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java
Log:
remove accent
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java 2008-10-07 19:20:48 UTC (rev 889)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java 2008-10-08 16:00:46 UTC (rev 890)
@@ -60,7 +60,7 @@
protected MavenProject project;
/**
- * Répertoire de destination des fichiers java a generer.
+ * Repertoire de destination des fichiers java a generer.
*
* @parameter expression="${jaxx.outJava}" default-value="${basedir}/target/generated-sources/java"
*/
1
0
r889 - lutinjaxx/trunk/maven-jaxx-plugin/src/site
by tchemit@users.labs.libre-entreprise.org Oct. 7, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 7, 2008
Oct. 7, 2008
Author: tchemit
Date: 2008-10-07 19:20:48 +0000 (Tue, 07 Oct 2008)
New Revision: 889
Modified:
lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml
Log:
add goals in site
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml 2008-10-07 18:59:47 UTC (rev 888)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml 2008-10-07 19:20:48 UTC (rev 889)
@@ -34,8 +34,7 @@
<menu ref="parent"/>
<menu name="Utilisateur">
<item name="Accueil" href="index.html"/>
- <item name="Goals" href="plugin-info.html"/>
- <item name="Détail goals">
+ <item name="Détail goals" href="plugin-info.html">
<item name="generate" href="generate-mojo.html"/>
<item name="help" href="help-mojo.html"/>
</item>
1
0
r888 - in lutinjaxx/trunk: jaxx-core/src/main/java/jaxx/compiler maven-jaxx-plugin/src/main/java/org/codelutin/jaxx maven-jaxx-plugin/src/test/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org Oct. 7, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 7, 2008
Oct. 7, 2008
Author: tchemit
Date: 2008-10-07 18:59:47 +0000 (Tue, 07 Oct 2008)
New Revision: 888
Modified:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java
lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/AbstractCompilerTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompileConfig.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
Log:
add force and i18nable options to mojo generate
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java 2008-10-07 18:59:01 UTC (rev 887)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/CompilerOptions.java 2008-10-07 18:59:47 UTC (rev 888)
@@ -1,6 +1,7 @@
package jaxx.compiler;
import java.io.File;
+import java.util.Arrays;
/**
* Stores options which affect the jaxxc tool's operation. These options are generally specified by the
@@ -14,6 +15,8 @@
private boolean keepJavaFiles;
private boolean optimize;
private boolean verbose;
+ /** a flag to enable or disable i18n generation */
+ private boolean i18nable;
/**
* Returns the target directory, generally specified with the "-d" option on the command line.
@@ -148,4 +151,25 @@
public void setVerbose(boolean verbose) {
this.verbose = verbose;
}
+
+ public boolean isI18nable() {
+ return i18nable;
+ }
+
+ public void setI18nable(boolean i18nable) {
+ this.i18nable = i18nable;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder(super.toString());
+ sb.append("\nclassPath: ").append(getClassPath());
+ sb.append("\njavaOut : ").append(getTargetDirectory());
+ sb.append("\noutClass : ").append(getJavacTargetDirectory());
+ sb.append("\njavacOpts: ").append(getJavacOpts());
+ sb.append("\nverbose: ").append(isVerbose());
+ sb.append("\noptiomize: ").append(getOptimize());
+ sb.append("\ni18nable: ").append(isI18nable());
+ return sb.toString();
+ }
}
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java 2008-10-07 18:59:01 UTC (rev 887)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx/JaxxGeneratorMojo.java 2008-10-07 18:59:47 UTC (rev 888)
@@ -29,14 +29,18 @@
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.DirectoryScanner;
+import org.codelutin.util.FileUpdaterHelper;
+import org.codelutin.util.MirroredFileUpdater;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import java.util.Set;
-import java.util.Arrays;
/**
* Classe permettant de transformer des sources jaxx vers du source java.
@@ -111,12 +115,32 @@
*/
protected String[] includes;
+ /**
+ * to force generation of java source for any jaxx files with no timestamp checking.
+ * <p/>
+ * By default, never force generation.
+ *
+ * @parameter expression="${jaxx.force}" default-value="false"
+ */
+ protected boolean force;
+
+ /**
+ * to make compiler i18nable, says add the {@link org.codelutin.i18n.I18n#_(String, Object[])} method
+ * invocation on {@link jaxx.compiler.I18nHelper#I18N_ATTRIBUTES} attributes.
+ *
+ * @parameter expression="${jaxx.i18nable}" default-value="true"
+ * @see jaxx.compiler.I18nHelper
+ */
+ protected boolean i18nable;
+
protected String[] files;
private static final String[] INCLUDES = {"**\\/*.jaxx"};
protected CompilerOptions options;
+ protected MirroredFileUpdater updater ;
+
protected void init() {
if (!outResource.exists()) {
@@ -135,8 +159,36 @@
boolean noIncludes = includes == null || includes.length == 0;
ds.setIncludes(noIncludes ? INCLUDES : includes);
ds.scan();
- files = ds.getIncludedFiles();
- getLog().info("jaxx - found " + files.length + " file(s) to generate. ");
+ String[] files = ds.getIncludedFiles();
+ if (verbose) {
+ getLog().info("jaxx - discover " + files.length + " jaxx file(s). ");
+ }
+
+ updater = (MirroredFileUpdater) FileUpdaterHelper.newJaxxFileUpdater(src, outJava);
+
+ if (force) {
+ // we will regenerate all files
+ this.files = files;
+ } else {
+ // filter files
+ List<String> listFiles = new ArrayList<String>();
+
+ for (String file : files) {
+ if (updater.isFileUpToDate(new File(src, file))) {
+ if (verbose) {
+ getLog().info("jaxx - skip file [" + file + "].");
+ }
+ } else {
+ if (verbose) {
+ getLog().info("jaxx - will generate file [" + file + "].");
+ }
+ listFiles.add(file);
+ }
+ }
+ this.files = listFiles.toArray(new String[listFiles.size()]);
+ }
+
+
options = toCompilerOptions();
if (verbose) {
@@ -166,18 +218,15 @@
result.setJavacTargetDirectory(outClass);
result.setTargetDirectory(outJava);
result.setVerbose(verbose);
+ result.setI18nable(i18nable);
return result;
}
protected void printInit() {
- getLog().info("classPath: " + options.getClassPath());
- getLog().info("javaOut : " + options.getTargetDirectory());
- getLog().info("outClass : " + options.getJavacTargetDirectory());
- getLog().info("javacOpts: " + options.getJavacOpts());
- getLog().info("optiomize: " + options.getOptimize());
+ getLog().info(options.toString());
getLog().info("includes : " + Arrays.toString(includes));
for (String file : files) {
- getLog().info(file);
+ getLog().info("will generate "+file);
}
ClassLoader cl = Thread.currentThread().getContextClassLoader();
@@ -197,7 +246,7 @@
}
//fixme should remove this silly test when we will make real maven plugin tests :)
- if (getPluginContext()!=null) {
+ if (getPluginContext() != null) {
for (Object e : getPluginContext().keySet()) {
getLog().info("pluginContext " + e + " : " + getPluginContext().get(e));
}
@@ -208,6 +257,13 @@
init();
+ if (files.length == 0) {
+ getLog().info("jaxx - no jaxx file to treate. ");
+ return;
+ }
+
+ getLog().info("jaxx - will generate " + this.files.length + " jaxx file(s). ");
+
try {
doExecute();
@@ -227,7 +283,7 @@
protected void fixCompileSourceRoots() {
//fixme should remove this silly test when we will make real maven plugin tests :)
- if (project!=null) {
+ if (project != null) {
if (!project.getCompileSourceRoots().contains(outJava.getPath())) {
project.addCompileSourceRoot(outJava.getPath());
}
@@ -346,4 +402,23 @@
this.files = files;
}
+ public boolean isForce() {
+ return force;
+ }
+
+ public void setForce(boolean force) {
+ this.force = force;
+ }
+
+ public boolean isI18nable() {
+ return i18nable;
+ }
+
+ public void setI18nable(boolean i18nable) {
+ this.i18nable = i18nable;
+ }
+
+ public MirroredFileUpdater getUpdater() {
+ return updater;
+ }
}
\ No newline at end of file
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/AbstractCompilerTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/AbstractCompilerTest.java 2008-10-07 18:59:01 UTC (rev 887)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/AbstractCompilerTest.java 2008-10-07 18:59:47 UTC (rev 888)
@@ -88,6 +88,8 @@
goal.setIncludes(new String[]{"**\\/" + PREFIX_PACKAGE + "\\/" + expression + "\\/*.jaxx"});
goal.setOptimize(anno.optimize());
goal.setVerbose(anno.verbose());
+ goal.setForce(anno.force());
+ goal.setI18nable(anno.i18nable());
//TODO Use the maven plexus TestCase inorder to include dependencies
goal.setJavaOpts(anno.javaOpts());
log.info("setUp test " + getName());
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompileConfig.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompileConfig.java 2008-10-07 18:59:01 UTC (rev 887)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompileConfig.java 2008-10-07 18:59:47 UTC (rev 888)
@@ -38,5 +38,9 @@
public boolean verbose() default false;
+ public boolean force() default true;
+
+ public boolean i18nable() default false;
+
public String javaOpts() default "";
}
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-07 18:59:01 UTC (rev 887)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/CompilerTest.java 2008-10-07 18:59:47 UTC (rev 888)
@@ -3,6 +3,8 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
+import java.io.File;
+
public class CompilerTest extends AbstractCompilerTest {
@CompileConfig(packageName = "InnerClasses", runJavac = true)
@@ -23,7 +25,7 @@
goal.execute();
}
- @CompileConfig(packageName = "CSSTests", verbose = false)
+ @CompileConfig(packageName = "CSSTests", verbose = false, i18nable = false)
public void testCssTests() throws MojoExecutionException, MojoFailureException {
goal.execute();
}
@@ -67,5 +69,43 @@
goal.execute();
}
+ @CompileConfig(packageName = "force", verbose = false)
+ public void testForce() throws MojoExecutionException, MojoFailureException, InterruptedException {
+ // first round, with force option so will generate theonly JButton.jaxx file
+ goal.execute();
+ String[] files = goal.getFiles();
+ assertEquals(1, files.length);
+ File srcFile = new File(goal.getSrc(), files[0]);
+
+ File dstFile = goal.getUpdater().getMirrorFile(srcFile);
+
+ long oldTime = dstFile.lastModified();
+ // second round, no force so will not the file
+ goal.setForce(false);
+ goal.execute();
+ files = goal.getFiles();
+ assertEquals(0, files.length);
+
+ Thread.sleep(1000);
+
+ assertEquals(oldTime, goal.getUpdater().getMirrorFile(srcFile).lastModified());
+
+ // three round : modify a source with no force option
+ srcFile.setLastModified(System.currentTimeMillis());
+
+ goal.execute();
+ files = goal.getFiles();
+ assertEquals(1, files.length);
+
+ assertTrue(goal.getUpdater().getMirrorFile(srcFile).lastModified() > oldTime);
+
+ // last round, reforce file generation for an no modify source
+ goal.setForce(true);
+ goal.execute();
+ files = goal.getFiles();
+ assertEquals(1, files.length);
+ assertTrue(goal.getUpdater().getMirrorFile(srcFile).lastModified() > oldTime);
+ }
+
}
\ No newline at end of file
Modified: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-07 18:59:01 UTC (rev 887)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx/I18nTest.java 2008-10-07 18:59:47 UTC (rev 888)
@@ -9,28 +9,43 @@
public class I18nTest extends AbstractCompilerTest {
- @CompileConfig(packageName = "i18n.text", verbose = false)
+ @CompileConfig(packageName = "i18n.text", verbose = false, i18nable = false)
+ public void testI18nTextNoI1_nabel() throws MojoExecutionException, MojoFailureException, IOException {
+ goal.execute();
+ checkPattern("testId.setText(_(\"test.text\"));", false);
+ }
+
+ @CompileConfig(packageName = "i18n.title", verbose = false, i18nable = false)
+ public void testI18nTitleNoI18nable() throws MojoExecutionException, MojoFailureException, IOException {
+ goal.execute();
+ checkPattern("testId.setTitle(_(\"test.title\"));", false);
+ }
+
+ @CompileConfig(packageName = "i18n.tooltiptext", verbose = false, i18nable = false)
+ public void testI18nToolTipTextNoI18nable() throws MojoExecutionException, MojoFailureException, IOException {
+ goal.execute();
+ checkPattern("testId.setToolTipText(_(\"test.toolTipText\"));", false);
+ }
+
+ @CompileConfig(packageName = "i18n.text", verbose = false, i18nable = true)
public void testI18nText() throws MojoExecutionException, MojoFailureException, IOException {
goal.execute();
- assertTrue(true);
- checkPattern("testId.setText(_(\"test.text\"));");
+ checkPattern("testId.setText(_(\"test.text\"));", true);
}
- @CompileConfig(packageName = "i18n.title", verbose = false)
+ @CompileConfig(packageName = "i18n.title", verbose = false, i18nable = true)
public void testI18nTitle() throws MojoExecutionException, MojoFailureException, IOException {
goal.execute();
- assertTrue(true);
- checkPattern("testId.setTitle(_(\"test.title\"));");
+ checkPattern("testId.setTitle(_(\"test.title\"));", true);
}
- @CompileConfig(packageName = "i18n.tooltiptext", verbose = false)
+ @CompileConfig(packageName = "i18n.tooltiptext", verbose = false, i18nable = true)
public void testI18nToolTipText() throws MojoExecutionException, MojoFailureException, IOException {
goal.execute();
- assertTrue(true);
- checkPattern("testId.setToolTipText(_(\"test.toolTipText\"));");
+ checkPattern("testId.setToolTipText(_(\"test.toolTipText\"));", true);
}
- protected void checkPattern(String pattern) throws IOException {
+ protected void checkPattern(String pattern, boolean required) throws IOException {
String[] files = goal.getFiles();
for (String file : files) {
// check we have a the required testId.setTitle(_("test.title"));
@@ -39,7 +54,7 @@
assertTrue("generated file " + f + " was not found...", f.exists());
String content = FileUtil.readAsString(f);
- assertTrue("could not find the pattern : " + pattern + " in file " + f, content.contains(pattern));
+ assertEquals("could not find the pattern : " + pattern + " in file " + f, required, content.contains(pattern));
}
}
1
0
r887 - in lutinjaxx/trunk/jaxx-core/src/main/java/jaxx: compiler tags tags/swing
by tchemit@users.labs.libre-entreprise.org Oct. 7, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 7, 2008
Oct. 7, 2008
Author: tchemit
Date: 2008-10-07 18:59:01 +0000 (Tue, 07 Oct 2008)
New Revision: 887
Added:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/I18nHelper.java
Modified:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/DefaultComponentHandler.java
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/swing/TabHandler.java
Log:
improve i18n with a dedicated I18nHelper class
Added: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/I18nHelper.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/I18nHelper.java (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/I18nHelper.java 2008-10-07 18:59:01 UTC (rev 887)
@@ -0,0 +1,70 @@
+package jaxx.compiler;
+
+import jaxx.tags.DefaultComponentHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * I18n methods to add {@link org.codelutin.i18n.I18n#_(String, Object[])} method on some attributes.
+ * <p/>
+ * Make sure to set an i18nable compiler to have his {@link CompilerOptions#isI18nable()} returning true.
+ *
+ * @author chemit
+ */
+public class I18nHelper {
+
+ protected static final Log log = LogFactory.getLog(DefaultComponentHandler.class);
+
+ public static final List<String> I18N_ATTRIBUTES = Arrays.asList("text", "title", "toolTipText");
+
+ /**
+ * Test if we have an active i18n attribute (says an i18n attribute on a i18neable compiler).
+ *
+ * @param attributeName name of attribute to test
+ * @param compiler current used compiler (contains options)
+ * @return <code>true</code> if wa have an active i18n attribute, <code>false</code> otherwise.
+ */
+ public static boolean isI18nableAttribute(String attributeName, JAXXCompiler compiler) {
+ return compiler.getOptions().isI18nable() && isI18nAttribute(attributeName);
+ }
+
+ /**
+ * Test if we have an i18n attribute.
+ *
+ * @param attributeName name of attribute to test
+ * @return <code>true</code> if wa have an active i18n attribute, <code>false</code> otherwise.
+ */
+ public static boolean isI18nAttribute(String attributeName) {
+ return I18N_ATTRIBUTES.contains(attributeName);
+ }
+ /**
+ * Add the i18n on a attribute.
+ * <p/>
+ * Note: <b>Be ware : </b> no test is done here to ensure we are on a i18neable attribute for an i18nable compiler.
+ * <p/>
+ * Make sure with the method {@link jaxx.compiler.I18nHelper#isI18nableAttribute(String, JAXXCompiler)} returns
+ * <code>true</code< before using this method.
+ *
+ * @param widgetId the id of the widget
+ * @param attributeName the name of the attribute
+ * @param attributeValueCode the value code of the attribute value
+ * @param compiler the current used compile
+ * @return the surrender i18n call if attribute name is matchrf the attributeValueCode otherwise
+ */
+ public static String addI18nInvocation(String widgetId, String attributeName, String attributeValueCode, JAXXCompiler compiler) {
+
+ if (log.isDebugEnabled()) {
+ log.debug(" try i18n support for [" + widgetId + ":" + attributeName + "] : " + attributeValueCode);
+ }
+ if (attributeValueCode.contains("_(") && attributeValueCode.contains(")")) {
+ compiler.reportWarning("\n\tjaxx supports i18n, no need to add explicit call to I18n._ for attribute '" + attributeName + "' in component '" + widgetId + "' : ["+attributeValueCode+"]");
+ } else {
+ attributeValueCode = "_(" + attributeValueCode + ")";
+ }
+
+ return attributeValueCode;
+ }
+}
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/DefaultComponentHandler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/DefaultComponentHandler.java 2008-10-07 18:56:33 UTC (rev 886)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/DefaultComponentHandler.java 2008-10-07 18:59:01 UTC (rev 887)
@@ -8,6 +8,7 @@
import jaxx.UnsupportedAttributeException;
import jaxx.compiler.CompiledObject;
import jaxx.compiler.JAXXCompiler;
+import jaxx.compiler.I18nHelper;
import jaxx.reflect.ClassDescriptor;
import jaxx.reflect.ClassDescriptorLoader;
import org.apache.commons.logging.Log;
@@ -22,8 +23,6 @@
import java.beans.IntrospectionException;
import java.io.IOException;
import java.lang.reflect.Field;
-import java.util.Arrays;
-import java.util.List;
public class DefaultComponentHandler extends DefaultObjectHandler {
/** log */
@@ -31,8 +30,6 @@
private String containerDelegate;
- private static final List<String> I18N_ATTRIBUTES = Arrays.asList("text", "title", "toolTipText");
-
public DefaultComponentHandler(ClassDescriptor beanClass) {
super(beanClass);
ClassDescriptorLoader.checkSupportClass(getClass(), beanClass, Component.class);
@@ -203,34 +200,14 @@
}
}
// ajout du support i18n
- valueCode = addI18nInvocation(id, name, valueCode, compiler);
+ if (I18nHelper.isI18nableAttribute(name,compiler)) {
+ valueCode = I18nHelper.addI18nInvocation(id, name, valueCode, compiler);
+ }
return super.getSetPropertyCode(id, name, valueCode, compiler);
}
- /**
- *
- * @param widgetId the id of the widget
- * @param attributeName the name of the attribute
- * @param attributeValueCode the value code of the attribute value
- * @param compiler the current used compile
- * @return the surrender i18n call if attribute name is matchrf the attributeValueCode otherwise
- */
- public static String addI18nInvocation(String widgetId, String attributeName, String attributeValueCode, JAXXCompiler compiler) {
- if (I18N_ATTRIBUTES.contains(attributeName)) {
- if (log.isDebugEnabled()) {
- log.debug(" try i18n support for [" + widgetId + ":" + attributeName + "] : " + attributeValueCode);
- }
- if (attributeValueCode.contains("_(") || attributeValueCode.contains(")")) {
- compiler.reportWarning("\n\tjaxx supports i18n, no need to add explicit call to I18n._ for attribute '" + attributeName + "' in component '" + widgetId + "'");
- } else {
- attributeValueCode = "_(" + attributeValueCode + ")";
- }
- }
- return attributeValueCode;
- }
-
/**
* Maps string values onto integers, so that int-valued enumeration properties can be specified by strings. For
* example, when passed a key of 'alignment', this method should normally map the values 'left', 'center', and
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/swing/TabHandler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/swing/TabHandler.java 2008-10-07 18:56:33 UTC (rev 886)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/tags/swing/TabHandler.java 2008-10-07 18:59:01 UTC (rev 887)
@@ -7,10 +7,10 @@
import jaxx.CompilerException;
import jaxx.compiler.CompiledObject;
import jaxx.compiler.JAXXCompiler;
+import jaxx.compiler.I18nHelper;
import jaxx.reflect.ClassDescriptorLoader;
import jaxx.runtime.swing.TabInfo;
import jaxx.tags.TagHandler;
-import jaxx.tags.DefaultComponentHandler;
import jaxx.types.TypeManager;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
@@ -63,16 +63,20 @@
return;
}
+ String valueCode = TypeManager.getJavaCode(value);
+
// add i18n support
- String i18nvalue = DefaultComponentHandler.addI18nInvocation(id,name,TypeManager.getJavaCode(value),compiler);
+ if (I18nHelper.isI18nableAttribute(name,compiler)) {
+ value = valueCode = I18nHelper.addI18nInvocation(id,name,valueCode,compiler);
+ }
if (name.equals("title")) {
- tabInfo.setTitle(i18nvalue);
- compiledTabInfo.appendInitializationCode(id + ".setTitle(" + i18nvalue + ");");
+ tabInfo.setTitle(value);
+ compiledTabInfo.appendInitializationCode(id + ".setTitle(" + valueCode + ");");
//compiledTabInfo.appendInitializationCode(id + ".setTitle(" + TypeManager.getJavaCode(value) + ");");
} else if (name.equals("toolTipText")) {
- tabInfo.setToolTipText(i18nvalue);
- compiledTabInfo.appendInitializationCode(id + ".setToolTipText(" + i18nvalue + ");");
+ tabInfo.setToolTipText(value);
+ compiledTabInfo.appendInitializationCode(id + ".setToolTipText(" + valueCode + ");");
//compiledTabInfo.appendInitializationCode(id + ".setToolTipText(" + TypeManager.getJavaCode(value) + ");");
} else if (name.equals("icon")) {
Icon icon = (Icon) TypeManager.convertFromString(value, Icon.class);
1
0
r886 - lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler
by tchemit@users.labs.libre-entreprise.org Oct. 7, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 7, 2008
Oct. 7, 2008
Author: tchemit
Date: 2008-10-07 18:56:33 +0000 (Tue, 07 Oct 2008)
New Revision: 886
Modified:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java
Log:
explicitly modify the file lastmodified when regenerated
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java 2008-10-07 18:35:38 UTC (rev 885)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/JAXXCompiler.java 2008-10-07 18:56:33 UTC (rev 886)
@@ -389,6 +389,9 @@
} else {
dest = new File(baseDir, outputClassName.substring(outputClassName.lastIndexOf(".") + 1) + ".java");
}
+ if (dest.exists() && !dest.setLastModified(System.currentTimeMillis())) {
+ log.warn("could not touch file "+dest);
+ }
PrintWriter out = new PrintWriter(new FileWriter(dest));
createJavaSource(out);
out.close();
1
0
r885 - in lutinjaxx/trunk: . jaxx-core jaxx-core/src/site jaxx-core/src/site/fr jaxx-core/src/site/fr/rst jaxx-swing-action jaxx-swing-action/src/site jaxx-swing-action/src/site/fr jaxx-swing-action/src/site/fr/rst jaxx-util jaxx-util/src/site jaxx-util/src/site/fr jaxx-util/src/site/fr/rst maven-jaxx-plugin maven-jaxx-plugin/src/site maven-jaxx-plugin/src/site/fr maven-jaxx-plugin/src/site/fr/rst maven-jaxx-plugin/src/test/java/testcases maven-jaxx-plugin/src/test/java/testcases/force src sr
by tchemit@users.labs.libre-entreprise.org Oct. 7, 2008
by tchemit@users.labs.libre-entreprise.org Oct. 7, 2008
Oct. 7, 2008
Author: tchemit
Date: 2008-10-07 18:35:38 +0000 (Tue, 07 Oct 2008)
New Revision: 885
Added:
lutinjaxx/trunk/jaxx-core/src/site/fr/
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/Todo.rst
lutinjaxx/trunk/jaxx-core/src/site/fr/rst/index.rst
lutinjaxx/trunk/jaxx-swing-action/src/site/fr/
lutinjaxx/trunk/jaxx-swing-action/src/site/fr/rst/
lutinjaxx/trunk/jaxx-swing-action/src/site/fr/rst/Todo.rst
lutinjaxx/trunk/jaxx-swing-action/src/site/fr/rst/index.rst
lutinjaxx/trunk/jaxx-util/src/site/fr/
lutinjaxx/trunk/jaxx-util/src/site/fr/rst/
lutinjaxx/trunk/jaxx-util/src/site/fr/rst/Todo.rst
lutinjaxx/trunk/jaxx-util/src/site/fr/rst/index.rst
lutinjaxx/trunk/maven-jaxx-plugin/src/site/fr/
lutinjaxx/trunk/maven-jaxx-plugin/src/site/fr/rst/
lutinjaxx/trunk/maven-jaxx-plugin/src/site/fr/rst/Todo.rst
lutinjaxx/trunk/maven-jaxx-plugin/src/site/fr/rst/index.rst
lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/force/
lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/force/JButton.jaxx
lutinjaxx/trunk/src/
lutinjaxx/trunk/src/site/
lutinjaxx/trunk/src/site/fr/
lutinjaxx/trunk/src/site/fr/rst/
lutinjaxx/trunk/src/site/fr/rst/Todo.rst
lutinjaxx/trunk/src/site/fr/rst/index.rst
lutinjaxx/trunk/src/site/site.xml
Removed:
lutinjaxx/trunk/jaxx-core/src/site/site.xml
lutinjaxx/trunk/jaxx-swing-action/src/site/site.xml
Modified:
lutinjaxx/trunk/jaxx-core/pom.xml
lutinjaxx/trunk/jaxx-swing-action/pom.xml
lutinjaxx/trunk/jaxx-util/pom.xml
lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
lutinjaxx/trunk/pom.xml
Log:
make site works with a multi-module project
Modified: lutinjaxx/trunk/jaxx-core/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-core/pom.xml 2008-10-06 14:59:44 UTC (rev 884)
+++ lutinjaxx/trunk/jaxx-core/pom.xml 2008-10-07 18:35:38 UTC (rev 885)
@@ -44,4 +44,13 @@
</dependency>
</dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+ <scm>
+ <connection>${scm.connection.son}</connection>
+ <developerConnection>${scm.developerConnection.son}</developerConnection>
+ <url>${scm.url.son}</url>
+ </scm>
</project>
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/Todo.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/Todo.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/Todo.rst 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,4 @@
+TODO
+====
+
+a faire
\ No newline at end of file
Added: lutinjaxx/trunk/jaxx-core/src/site/fr/rst/index.rst
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/fr/rst/index.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-core/src/site/fr/rst/index.rst 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,13 @@
+jaxx-core
+=========
+
+.. contents::
+
+
+Présentation
+------------
+
+Le compilateur Jaxx TODO
+
+**Veuillez consulter la JavaDoc pour de plus ample détails sur les différentes
+librairies.**
Deleted: lutinjaxx/trunk/jaxx-core/src/site/site.xml
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/site/site.xml 2008-10-06 14:59:44 UTC (rev 884)
+++ lutinjaxx/trunk/jaxx-core/src/site/site.xml 2008-10-07 18:35:38 UTC (rev 885)
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project name="LutinUtil">
-
- <skin>
- <groupId>lutinlib</groupId>
- <artifactId>lutin-site-skin</artifactId>
- <version>0.1</version>
- </skin>
-
- <bannerLeft>
- <name>Lutin Buix Jaxx</name>
- </bannerLeft>
-
- <bannerRight>
- <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
- <href>http://www.codelutin.com</href>
- </bannerRight>
-
- <poweredBy>
- <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
- <logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/>
- <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText" img="images/restructuredtext-logo.png"/>
- </poweredBy>
-
- <body>
- <links>
- <item name="Labs" href="http://labs.libre-entreprise.org/"/>
- <item name="Code Lutin" href="http://www.codelutin.com/"/>
- </links>
-
- <menu name="Utilisateur">
- <item name="Accueil" href="index.html"/>
- <item href="http://lutinbuilder.labs.libre-entreprise.org/maven2/buix/jaxx" name="T�l�chargement"/>
- </menu>
-
- <menu name="D�veloppeur">
- <item name="A faire" href="Todo.html"/>
- </menu>
-
- ${reports}
-
- </body>
-</project>
Modified: lutinjaxx/trunk/jaxx-swing-action/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-swing-action/pom.xml 2008-10-06 14:59:44 UTC (rev 884)
+++ lutinjaxx/trunk/jaxx-swing-action/pom.xml 2008-10-07 18:35:38 UTC (rev 885)
@@ -51,4 +51,14 @@
</dependency>
</dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+ <scm>
+ <connection>${scm.connection.son}</connection>
+ <developerConnection>${scm.developerConnection.son}</developerConnection>
+ <url>${scm.url.son}</url>
+ </scm>
+
</project>
Added: lutinjaxx/trunk/jaxx-swing-action/src/site/fr/rst/Todo.rst
===================================================================
--- lutinjaxx/trunk/jaxx-swing-action/src/site/fr/rst/Todo.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-swing-action/src/site/fr/rst/Todo.rst 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,4 @@
+TODO
+====
+
+a faire
\ No newline at end of file
Added: lutinjaxx/trunk/jaxx-swing-action/src/site/fr/rst/index.rst
===================================================================
--- lutinjaxx/trunk/jaxx-swing-action/src/site/fr/rst/index.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-swing-action/src/site/fr/rst/index.rst 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,13 @@
+jaxx-swing-action
+=================
+
+.. contents::
+
+
+Présentation
+------------
+
+Framework de gestion des actions et onglets TODO
+
+**Veuillez consulter la JavaDoc pour de plus ample détails sur les différentes
+librairies.**
Deleted: lutinjaxx/trunk/jaxx-swing-action/src/site/site.xml
===================================================================
--- lutinjaxx/trunk/jaxx-swing-action/src/site/site.xml 2008-10-06 14:59:44 UTC (rev 884)
+++ lutinjaxx/trunk/jaxx-swing-action/src/site/site.xml 2008-10-07 18:35:38 UTC (rev 885)
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project name="LutinUtil">
-
- <skin>
- <groupId>lutinlib</groupId>
- <artifactId>lutin-site-skin</artifactId>
- <version>0.1</version>
- </skin>
-
- <bannerLeft>
- <name>Lutin Buix Jaxx</name>
- </bannerLeft>
-
- <bannerRight>
- <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
- <href>http://www.codelutin.com</href>
- </bannerRight>
-
- <poweredBy>
- <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
- <logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/>
- <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText"
- img="images/restructuredtext-logo.png"/>
- </poweredBy>
-
- <body>
- <links>
- <item name="Labs" href="http://labs.libre-entreprise.org/"/>
- <item name="Code Lutin" href="http://www.codelutin.com/"/>
- </links>
-
- <menu name="Utilisateur">
- <item name="Accueil" href="index.html"/>
- <item href="http://lutinbuilder.labs.libre-entreprise.org/maven2/buix/jaxx" name="T�l�chargement"/>
- </menu>
-
- <menu name="D�veloppeur">
- <item name="A faire" href="Todo.html"/>
- </menu>
-
- ${reports}
-
- </body>
-</project>
Modified: lutinjaxx/trunk/jaxx-util/pom.xml
===================================================================
--- lutinjaxx/trunk/jaxx-util/pom.xml 2008-10-06 14:59:44 UTC (rev 884)
+++ lutinjaxx/trunk/jaxx-util/pom.xml 2008-10-07 18:35:38 UTC (rev 885)
@@ -16,6 +16,7 @@
<packaging>jar</packaging>
<version>0.5-SNAPSHOT</version>
<description>Jaxx lutin library utility</description>
+ <!--url>${site.home.url}</url-->
<build>
<plugins>
@@ -26,4 +27,12 @@
</plugins>
</build>
+ <!-- ************************************************************* -->
+ <!-- *** Build Environment ************************************** -->
+ <!-- ************************************************************* -->
+ <scm>
+ <connection>${scm.connection.son}</connection>
+ <developerConnection>${scm.developerConnection.son}</developerConnection>
+ <url>${scm.url.son}</url>
+ </scm>
</project>
Added: lutinjaxx/trunk/jaxx-util/src/site/fr/rst/Todo.rst
===================================================================
--- lutinjaxx/trunk/jaxx-util/src/site/fr/rst/Todo.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-util/src/site/fr/rst/Todo.rst 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,4 @@
+TODO
+====
+
+to be done
\ No newline at end of file
Added: lutinjaxx/trunk/jaxx-util/src/site/fr/rst/index.rst
===================================================================
--- lutinjaxx/trunk/jaxx-util/src/site/fr/rst/index.rst (rev 0)
+++ lutinjaxx/trunk/jaxx-util/src/site/fr/rst/index.rst 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,13 @@
+jaxx-util
+=========
+
+.. contents::
+
+
+Présentation
+------------
+
+Ensemble de classe Java TODO
+
+**Veuillez consulter la JavaDoc pour de plus ample détails sur les différentes
+librairies.**
Modified: lutinjaxx/trunk/maven-jaxx-plugin/pom.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-06 14:59:44 UTC (rev 884)
+++ lutinjaxx/trunk/maven-jaxx-plugin/pom.xml 2008-10-07 18:35:38 UTC (rev 885)
@@ -51,6 +51,12 @@
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>lutinpluginutil</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
</dependencies>
<!-- ************************************************************* -->
@@ -84,7 +90,7 @@
<reporting>
<plugins>
- <plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
</plugin>
@@ -94,12 +100,10 @@
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
+ <scm>
+ <connection>${scm.connection.son}</connection>
+ <developerConnection>${scm.developerConnection.son}</developerConnection>
+ <url>${scm.url.son}</url>
+ </scm>
- <!-- the plugin is a module in a labs project (buix), so we have to override
- this property (see in the parent pom for more explanation)
- -->
- <!--scm>
- <url>${maven.scm.url}</url>
- </scm-->
-
</project>
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/site/fr/rst/Todo.rst
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/site/fr/rst/Todo.rst (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/site/fr/rst/Todo.rst 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,4 @@
+TODO
+====
+
+a faire
\ No newline at end of file
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/site/fr/rst/index.rst
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/site/fr/rst/index.rst (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/site/fr/rst/index.rst 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,13 @@
+maven-jaxx-plugin
+=================
+
+.. contents::
+
+
+Présentation
+------------
+
+Le plugin maven pour lancer le compilateur jaxx dans un projet maven TODO
+
+**Veuillez consulter la JavaDoc pour de plus ample détails sur les différentes
+librairies.**
Added: lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/site/site.xml 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="${project.name}">
+
+ <publishDate format="dd/MM/yyyy"/>
+
+ <skin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-lutin-skin</artifactId>
+ <version>0.2</version>
+ </skin>
+
+ <bannerLeft>
+ <name>${project.name}</name>
+ </bannerLeft>
+
+ <bannerRight>
+ <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
+ <href>${project.organization.url}</href>
+ </bannerRight>
+
+ <poweredBy>
+ <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
+ <logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/>
+ <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText"
+ img="images/restructuredtext-logo.png"/>
+ </poweredBy>
+
+ <body>
+ <links>
+ <item name="Labs" href="http://labs.libre-entreprise.org/"/>
+ <item name="${project.organization.name}" href="${project.organization.url}"/>
+ </links>
+
+ <menu ref="parent"/>
+ <menu name="Utilisateur">
+ <item name="Accueil" href="index.html"/>
+ <item name="Goals" href="plugin-info.html"/>
+ <item name="Détail goals">
+ <item name="generate" href="generate-mojo.html"/>
+ <item name="help" href="help-mojo.html"/>
+ </item>
+ </menu>
+ <menu name="Detail goals">
+ <item name="generate" href="generate-mojo.html"/>
+ <item name="help" href="help-mojo.html"/>
+ </menu>
+
+ <menu name="Téléchargement">
+ <item href="${labs.builder.url}/org/codelutin/${project.artifactId}/${project.version}"
+ name="Télécharger la dernière version"/>
+ <item href="${labs.builder.url}/org/codelutin/${project.artifactId}"
+ name="Voir toutes les versions"/>
+ </menu>
+
+ <menu name="Développeur">
+ <item name="A faire" href="Todo.html"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ <menu ref="modules"/>
+
+ </body>
+</project>
Copied: lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/force/JButton.jaxx (from rev 884, lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/i18n/text/JButton.jaxx)
===================================================================
--- lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/force/JButton.jaxx (rev 0)
+++ lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/testcases/force/JButton.jaxx 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1 @@
+<JButton id='testId' text='test.text'/>
\ No newline at end of file
Modified: lutinjaxx/trunk/pom.xml
===================================================================
--- lutinjaxx/trunk/pom.xml 2008-10-06 14:59:44 UTC (rev 884)
+++ lutinjaxx/trunk/pom.xml 2008-10-07 18:35:38 UTC (rev 885)
@@ -20,7 +20,7 @@
<modules>
<module>jaxx-util</module>
<module>jaxx-core</module>
- <module>jaxx-swing-action</module>
+ <module>jaxx-swing-action</module>
<module>maven-jaxx-plugin</module>
</modules>
@@ -56,17 +56,18 @@
<labs.project>buix</labs.project>
<!-- override this property to define scm url property -->
- <maven.scm.url>http://${labs.host}/plugins/scmsvn/viewcvs.php/${pom.artifactId}/trunk/?root=${labs.project}
- </maven.scm.url>
+ <scm.url.son>http://${labs.host}/plugins/scmsvn/viewcvs.php/lutinjaxx/trunk/${pom.artifactId}/?root=${labs.project}</scm.url.son>
- <!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance -->
- <maven.scm.developerConnection>scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/${pom.artifactId}/trunk
- </maven.scm.developerConnection>
+ <!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance -->
+ <scm.developerConnection.son>
+ scm:svn:svn+ssh://${username}@${labs.host}/svnroot/${labs.project}/lutinjaxx/trunk/${pom.artifactId}
+ </scm.developerConnection.son>
- <!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance -->
- <maven.scm.connection>scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/${pom.artifactId}/trunk</maven.scm.connection>
+ <!-- BEWARE, will be suffixed by /${pom.artifactId} by inheritance -->
+ <scm.connection.son>
+ scm:svn:svn://anonymous@${labs.host}/svnroot/${labs.project}/lutinjaxx/trunk/${pom.artifactId}
+ </scm.connection.son>
-
</properties>
<build>
@@ -93,6 +94,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+
+ <execution>
+ <phase>pre-site</phase>
+ </execution>
+ </executions>
</plugin>
</plugins>
@@ -104,7 +111,7 @@
<dependency>
<groupId>org.codelutin</groupId>
<artifactId>lutinutil</artifactId>
- <version>0.30</version>
+ <version>0.31</version>
</dependency>
<dependency>
@@ -122,7 +129,7 @@
<groupId>org.codelutin</groupId>
<artifactId>jaxx-swing-action</artifactId>
<version>${current.version}</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>com.sun</groupId>
@@ -152,13 +159,20 @@
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.codelutin</groupId>
+ <artifactId>lutinpluginutil</artifactId>
+ <version>0.2</version>
+ <scope>compile</scope>
+ </dependency>
+
</dependencies>
</dependencyManagement>
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
- <scm>
+ <scm>
<connection>${maven.scm.connection}</connection>
<developerConnection>${maven.scm.developerConnection}</developerConnection>
<url>${maven.scm.url}</url>
Added: lutinjaxx/trunk/src/site/fr/rst/Todo.rst
===================================================================
--- lutinjaxx/trunk/src/site/fr/rst/Todo.rst (rev 0)
+++ lutinjaxx/trunk/src/site/fr/rst/Todo.rst 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,4 @@
+TODO
+====
+
+a faire
\ No newline at end of file
Added: lutinjaxx/trunk/src/site/fr/rst/index.rst
===================================================================
--- lutinjaxx/trunk/src/site/fr/rst/index.rst (rev 0)
+++ lutinjaxx/trunk/src/site/fr/rst/index.rst 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,13 @@
+lutinjaxx
+=========
+
+.. contents::
+
+
+Présentation
+------------
+
+Super pom du projet jaxx.
+
+**Veuillez consulter la JavaDoc pour de plus ample détails sur les différentes
+librairies.**
Added: lutinjaxx/trunk/src/site/site.xml
===================================================================
--- lutinjaxx/trunk/src/site/site.xml (rev 0)
+++ lutinjaxx/trunk/src/site/site.xml 2008-10-07 18:35:38 UTC (rev 885)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="${project.name}">
+
+ <publishDate format="dd/MM/yyyy"/>
+
+ <skin>
+ <groupId>org.codelutin</groupId>
+ <artifactId>maven-lutin-skin</artifactId>
+ <version>0.2</version>
+ </skin>
+
+ <bannerLeft>
+ <name>${project.name}</name>
+ </bannerLeft>
+
+ <bannerRight>
+ <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
+ <href>${project.organization.url}</href>
+ </bannerRight>
+
+ <poweredBy>
+ <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
+ <logo href="http://jrst.labs.libre-entreprise.org" name="JRst" img="images/jrst-logo.png"/>
+ <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText"
+ img="images/restructuredtext-logo.png"/>
+ </poweredBy>
+
+ <body>
+ <links>
+ <item name="Labs" href="http://labs.libre-entreprise.org/"/>
+ <item name="${project.organization.name}" href="${project.organization.url}"/>
+ </links>
+
+ <menu ref="parent"/>
+ <menu name="Utilisateur">
+ <item name="Accueil" href="index.html"/>
+ </menu>
+
+ <menu name="Téléchargement">
+ <item href="${labs.builder.url}/org/codelutin/${project.artifactId}/${project.version}"
+ name="Télécharger la dernière version"/>
+ <item href="${labs.builder.url}/org/codelutin/${project.artifactId}"
+ name="Voir toutes les versions"/>
+ </menu>
+
+ <menu name="Développeur">
+ <item name="A faire" href="Todo.html"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ <menu ref="modules"/>
+
+ </body>
+</project>
1
0
r884 - lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler
by sletellier@users.labs.libre-entreprise.org Oct. 6, 2008
by sletellier@users.labs.libre-entreprise.org Oct. 6, 2008
Oct. 6, 2008
Author: sletellier
Date: 2008-10-06 14:59:44 +0000 (Mon, 06 Oct 2008)
New Revision: 884
Modified:
lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/ScriptManager.java
Log:
Correction bug constructeur
Modified: lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/ScriptManager.java
===================================================================
--- lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/ScriptManager.java 2008-10-06 14:50:36 UTC (rev 883)
+++ lutinjaxx/trunk/jaxx-core/src/main/java/jaxx/compiler/ScriptManager.java 2008-10-06 14:59:44 UTC (rev 884)
@@ -176,27 +176,28 @@
}
- private void processConstructor(String modifiers, SimpleNode node) {
- assert node.getId() == JavaParserTreeConstants.JJTCONSTRUCTORDECLARATION : "expected node to be ConstructorDeclaration, found " + JavaParserTreeConstants.jjtNodeName[node.getId()] + " instead";
- assert node.getChild(0).getId() == JavaParserTreeConstants.JJTFORMALPARAMETERS : "expected node 0 to be FormalParameters, found " + JavaParserTreeConstants.jjtNodeName[node.getChild(1).getId()] + " instead";
- if (node.getChild(0).jjtGetNumChildren() == 0) {
- compiler.reportError("The default no-argument constructor may not be redefined");
- }
- else {
- SimpleNode explicitConstructorInvocation = findExplicitConstructorInvocation(node);
- if (explicitConstructorInvocation == null || explicitConstructorInvocation.getText().trim().startsWith("super(")) {
- String code = "$initialize();" + JAXXCompiler.getLineSeparator();
- if (explicitConstructorInvocation == null) {
- node.getChild(1).firstToken.image = code + node.getChild(1).firstToken.image;
- }
- else {
- explicitConstructorInvocation.lastToken.image += code;
- }
- }
- }
-
- compiler.bodyCode.append(modifiers).append(" ").append(node.getText());
- //compiler.bodyCode.append(";\n");
+ private void processConstructor(String modifiers, SimpleNode node) {
+ assert node.getId() == JavaParserTreeConstants.JJTCONSTRUCTORDECLARATION : "expected node to be ConstructorDeclaration, found " + JavaParserTreeConstants.jjtNodeName[node.getId()] + " instead";
+ assert node.getChild(0).getId() == JavaParserTreeConstants.JJTFORMALPARAMETERS : "expected node 0 to be FormalParameters, found " + JavaParserTreeConstants.jjtNodeName[node.getChild(1).getId()] + " instead";
+ String code = "";
+ if (node.getChild(0).jjtGetNumChildren() == 0) {
+ compiler.reportError("The default no-argument constructor may not be redefined");
+ }
+ else {
+ SimpleNode explicitConstructorInvocation = findExplicitConstructorInvocation(node);
+ if (explicitConstructorInvocation == null || explicitConstructorInvocation.getText().trim().startsWith("super(")) {
+ code = "$initialize();" + JAXXCompiler.getLineSeparator();
+ if (explicitConstructorInvocation == null) {
+ node.getChild(1).firstToken.image = node.getChild(1).firstToken.image;
+ }
+ else {
+ explicitConstructorInvocation.lastToken.image += code;
+ }
+ }
+ }
+
+ compiler.bodyCode.append(modifiers).append(" ").append(node.getText().substring(0,node.getText().length()-1) + code + "}");
+ //compiler.bodyCode.append(";\n");
}
@@ -332,4 +333,4 @@
}
}
}
-}
\ No newline at end of file
+}
1
0
Oct. 6, 2008
Author: tchemit
Date: 2008-10-06 14:50:36 +0000 (Mon, 06 Oct 2008)
New Revision: 883
Modified:
lutinjaxx/trunk/jaxx-core/changelog
Log:
changelog
Modified: lutinjaxx/trunk/jaxx-core/changelog
===================================================================
--- lutinjaxx/trunk/jaxx-core/changelog 2008-10-06 14:50:20 UTC (rev 882)
+++ lutinjaxx/trunk/jaxx-core/changelog 2008-10-06 14:50:36 UTC (rev 883)
@@ -1,5 +1,6 @@
ver-0-5 chemit 20081002
* 20081002 [chemit] Using lutinproject 3.0, changing groupId to org.codelutin
* 20081002 [chemit] use a single module jaxx-core (no more core, runtime and jaxx-swing modules)
+ * 20081002 [chemit] Introduce JAXXContext
* 20081002 [chemit] Fix bug on method creation via scripting
- * 20081002 [chemit] Improvei18n integration (works now also for tabs)
+ * 20081002 [chemit] Improve i18n integration (works now also for tabs)
1
0