Jaxx-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- 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
October 2008
- 2 participants
- 150 discussions
[Buix-commits] 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 15 Oct '08
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
15 Oct '08
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
15 Oct '08
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
[Buix-commits] r915 - lutinjaxx/trunk/jaxx-core/src/site/fr/rst/examples
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
15 Oct '08
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
[Buix-commits] r914 - lutinjaxx/trunk/maven-jaxx-plugin/src/main/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
15 Oct '08
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
[Buix-commits] r913 - lutinjaxx/trunk/maven-jaxx-plugin
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
15 Oct '08
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
[Buix-commits] 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 15 Oct '08
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
15 Oct '08
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
[Buix-commits] r911 - lutinjaxx/trunk/maven-jaxx-plugin/src/test/java/org/codelutin/jaxx
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
15 Oct '08
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
15 Oct '08
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
[Buix-commits] r909 - in lutinjaxx/trunk/jaxx-core/src/site: . fr/rst/examples fr/rst/examples/images resources
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
by tchemit@users.labs.libre-entreprise.org 15 Oct '08
15 Oct '08
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
[Buix-commits] r908 - lutinjaxx/trunk/maven-jaxx-plugin
by tchemit@users.labs.libre-entreprise.org 14 Oct '08
by tchemit@users.labs.libre-entreprise.org 14 Oct '08
14 Oct '08
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