r1889 - in trunk: . jaxx-tutorial-helloworld jaxx-tutorial-helloworld/src jaxx-tutorial-helloworld/src/main jaxx-tutorial-helloworld/src/main/java jaxx-tutorial-helloworld/src/main/java/org jaxx-tutorial-helloworld/src/main/java/org/nuiton jaxx-tutorial-helloworld/src/main/java/org/nuiton/jaxx jaxx-tutorial-helloworld/src/main/java/org/nuiton/jaxx/tutorials jaxx-tutorial-helloworld/src/main/java/org/nuiton/jaxx/tutorials/helloworld jaxx-tutorial-helloworld2 jaxx-tutorial-helloworld2/src jaxx-
Author: jcouteau Date: 2010-05-10 18:07:29 +0200 (Mon, 10 May 2010) New Revision: 1889 Url: http://nuiton.org/repositories/revision/jaxx/1889 Log: Add second helloworld Create 2 modules for helloworld and helloworld2 tutorial following config tutorial Added: trunk/jaxx-tutorial-helloworld/ trunk/jaxx-tutorial-helloworld/LICENSE.txt trunk/jaxx-tutorial-helloworld/README.txt trunk/jaxx-tutorial-helloworld/changelog.txt trunk/jaxx-tutorial-helloworld/pom.xml trunk/jaxx-tutorial-helloworld/src/ trunk/jaxx-tutorial-helloworld/src/main/ trunk/jaxx-tutorial-helloworld/src/main/java/ trunk/jaxx-tutorial-helloworld/src/main/java/org/ trunk/jaxx-tutorial-helloworld/src/main/java/org/nuiton/ trunk/jaxx-tutorial-helloworld/src/main/java/org/nuiton/jaxx/ trunk/jaxx-tutorial-helloworld/src/main/java/org/nuiton/jaxx/tutorials/ trunk/jaxx-tutorial-helloworld/src/main/java/org/nuiton/jaxx/tutorials/helloworld/ trunk/jaxx-tutorial-helloworld/src/main/java/org/nuiton/jaxx/tutorials/helloworld/helloworld.jaxx trunk/jaxx-tutorial-helloworld2/ trunk/jaxx-tutorial-helloworld2/LICENSE.txt trunk/jaxx-tutorial-helloworld2/README.txt trunk/jaxx-tutorial-helloworld2/changelog.txt trunk/jaxx-tutorial-helloworld2/pom.xml trunk/jaxx-tutorial-helloworld2/src/ trunk/jaxx-tutorial-helloworld2/src/main/ trunk/jaxx-tutorial-helloworld2/src/main/java/ trunk/jaxx-tutorial-helloworld2/src/main/java/org/ trunk/jaxx-tutorial-helloworld2/src/main/java/org/nuiton/ trunk/jaxx-tutorial-helloworld2/src/main/java/org/nuiton/jaxx/ trunk/jaxx-tutorial-helloworld2/src/main/java/org/nuiton/jaxx/tutorials/ trunk/jaxx-tutorial-helloworld2/src/main/java/org/nuiton/jaxx/tutorials/helloworld/ trunk/jaxx-tutorial-helloworld2/src/main/java/org/nuiton/jaxx/tutorials/helloworld/helloworld.jaxx trunk/src/site/resources/tutos/helloworld2-red-big-button.png trunk/src/site/resources/tutos/helloworld2-red-big.png trunk/src/site/resources/tutos/helloworld2-red.png trunk/src/site/resources/tutos/helloworld2.zip trunk/src/site/rst/tutos/helloworld2.rst Modified: trunk/src/site/site_fr.xml Property changes on: trunk/jaxx-tutorial-helloworld ___________________________________________________________________ Added: svn:ignore + target Copied: trunk/jaxx-tutorial-helloworld/LICENSE.txt (from rev 1887, trunk/jaxx-tutorial-config/LICENSE.txt) =================================================================== --- trunk/jaxx-tutorial-helloworld/LICENSE.txt (rev 0) +++ trunk/jaxx-tutorial-helloworld/LICENSE.txt 2010-05-10 16:07:29 UTC (rev 1889) @@ -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: trunk/jaxx-tutorial-helloworld/README.txt (from rev 1887, trunk/jaxx-tutorial-config/README.txt) =================================================================== --- trunk/jaxx-tutorial-helloworld/README.txt (rev 0) +++ trunk/jaxx-tutorial-helloworld/README.txt 2010-05-10 16:07:29 UTC (rev 1889) @@ -0,0 +1,2 @@ +To deploy new version of pom: mvn deploy +To install localy: mvn install Copied: trunk/jaxx-tutorial-helloworld/changelog.txt (from rev 1887, trunk/jaxx-tutorial-config/changelog.txt) =================================================================== --- trunk/jaxx-tutorial-helloworld/changelog.txt (rev 0) +++ trunk/jaxx-tutorial-helloworld/changelog.txt 2010-05-10 16:07:29 UTC (rev 1889) @@ -0,0 +1,2 @@ +2.1.4 + * 20100510 [couteau] - tutorial initialisation \ No newline at end of file Added: trunk/jaxx-tutorial-helloworld/pom.xml =================================================================== --- trunk/jaxx-tutorial-helloworld/pom.xml (rev 0) +++ trunk/jaxx-tutorial-helloworld/pom.xml 2010-05-10 16:07:29 UTC (rev 1889) @@ -0,0 +1,155 @@ +<?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/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + + <parent> + <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-tutorial</artifactId> + <version>2.0.2-SNAPSHOT</version> + <relativePath>../jaxx-tutorial</relativePath> + </parent> + + <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-tutorial-helloworld</artifactId> + + <dependencies> + + <!-- librairie Jaxx --> + <!-- using properties from parent for tutorial deployment. Replace + ${project.groupId} by org.nuiton.jaxx and ${project.version} by the Jaxx + version if needed--> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jaxx-runtime</artifactId> + <version>${project.version}</version> + </dependency> + + </dependencies> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + + <name>${project.artifactId}</name> + + <organization> + <name>Nuiton</name> + <url>http://www.nuiton.org/</url> + </organization> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <build> + <plugins> + + <plugin> + <groupId>org.nuiton.jaxx</groupId> + <artifactId>maven-jaxx-plugin</artifactId> + <version>2.0.1</version> + <executions> + <execution> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.3</version> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.3</version> + <configuration> + <archive> + <manifest> + <addClasspath>true</addClasspath> + <classpathPrefix>./lib/</classpathPrefix> + <mainClass>org.nuiton.jaxx.tutorials.helloworld.helloworld</mainClass> + + </manifest> + </archive> + </configuration> + + </plugin> + + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-dependencies</id> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory>target/lib</outputDirectory> + <silent>true</silent> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + + </build> + + <!-- ************************************************************* --> + <!-- *** Build Environment ************************************** --> + <!-- ************************************************************* --> + + <repositories> + + <!-- nuiton releases repository, needed to get jaxx --> + + <repository> + <id>nuiton.release</id> + <name>NuitonReleaseRepository</name> + <url>http://maven.nuiton.org/release</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + <checksumPolicy>warn</checksumPolicy> + </releases> + </repository> + + </repositories> + + <pluginRepositories> + + <!-- nuiton plugin releases repository, needed to get jaxx plugin --> + + <pluginRepository> + + <id>nuiton.release</id> + <name>NuitonReleaseRepository</name> + <url>http://maven.nuiton.org/release</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + <checksumPolicy>warn</checksumPolicy> + </releases> + </pluginRepository> + + </pluginRepositories> + +</project> Added: trunk/jaxx-tutorial-helloworld/src/main/java/org/nuiton/jaxx/tutorials/helloworld/helloworld.jaxx =================================================================== --- trunk/jaxx-tutorial-helloworld/src/main/java/org/nuiton/jaxx/tutorials/helloworld/helloworld.jaxx (rev 0) +++ trunk/jaxx-tutorial-helloworld/src/main/java/org/nuiton/jaxx/tutorials/helloworld/helloworld.jaxx 2010-05-10 16:07:29 UTC (rev 1889) @@ -0,0 +1,3 @@ + <Application title='Hello World'> + <JLabel text='Hello World'/> + </Application> Property changes on: trunk/jaxx-tutorial-helloworld2 ___________________________________________________________________ Added: svn:ignore + *.iws *.ipr *.iml target Copied: trunk/jaxx-tutorial-helloworld2/LICENSE.txt (from rev 1887, trunk/jaxx-tutorial-config/LICENSE.txt) =================================================================== --- trunk/jaxx-tutorial-helloworld2/LICENSE.txt (rev 0) +++ trunk/jaxx-tutorial-helloworld2/LICENSE.txt 2010-05-10 16:07:29 UTC (rev 1889) @@ -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: trunk/jaxx-tutorial-helloworld2/README.txt (from rev 1887, trunk/jaxx-tutorial-config/README.txt) =================================================================== --- trunk/jaxx-tutorial-helloworld2/README.txt (rev 0) +++ trunk/jaxx-tutorial-helloworld2/README.txt 2010-05-10 16:07:29 UTC (rev 1889) @@ -0,0 +1,2 @@ +To deploy new version of pom: mvn deploy +To install localy: mvn install Copied: trunk/jaxx-tutorial-helloworld2/changelog.txt (from rev 1887, trunk/jaxx-tutorial-config/changelog.txt) =================================================================== --- trunk/jaxx-tutorial-helloworld2/changelog.txt (rev 0) +++ trunk/jaxx-tutorial-helloworld2/changelog.txt 2010-05-10 16:07:29 UTC (rev 1889) @@ -0,0 +1,2 @@ +2.1.4 + * 20100510 [couteau] - tutorial initialisation \ No newline at end of file Added: trunk/jaxx-tutorial-helloworld2/pom.xml =================================================================== --- trunk/jaxx-tutorial-helloworld2/pom.xml (rev 0) +++ trunk/jaxx-tutorial-helloworld2/pom.xml 2010-05-10 16:07:29 UTC (rev 1889) @@ -0,0 +1,155 @@ +<?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/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + + <parent> + <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-tutorial</artifactId> + <version>2.0.2-SNAPSHOT</version> + <relativePath>../jaxx-tutorial</relativePath> + </parent> + + <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-tutorial-helloworld2</artifactId> + + <dependencies> + + <!-- librairie Jaxx --> + <!-- using properties from parent for tutorial deployment. Replace + ${project.groupId} by org.nuiton.jaxx and ${project.version} by the Jaxx + version if needed--> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jaxx-runtime</artifactId> + <version>${project.version}</version> + </dependency> + + </dependencies> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + + <name>${project.artifactId}</name> + + <organization> + <name>Nuiton</name> + <url>http://www.nuiton.org/</url> + </organization> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <build> + <plugins> + + <plugin> + <groupId>org.nuiton.jaxx</groupId> + <artifactId>maven-jaxx-plugin</artifactId> + <version>2.0.1</version> + <executions> + <execution> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.3</version> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.3</version> + <configuration> + <archive> + <manifest> + <addClasspath>true</addClasspath> + <classpathPrefix>./lib/</classpathPrefix> + <mainClass>org.nuiton.jaxx.tutorials.helloworld.helloworld</mainClass> + + </manifest> + </archive> + </configuration> + + </plugin> + + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>copy-dependencies</id> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory>target/lib</outputDirectory> + <silent>true</silent> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + + </build> + + <!-- ************************************************************* --> + <!-- *** Build Environment ************************************** --> + <!-- ************************************************************* --> + + <repositories> + + <!-- nuiton releases repository, needed to get jaxx --> + + <repository> + <id>nuiton.release</id> + <name>NuitonReleaseRepository</name> + <url>http://maven.nuiton.org/release</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + <checksumPolicy>warn</checksumPolicy> + </releases> + </repository> + + </repositories> + + <pluginRepositories> + + <!-- nuiton plugin releases repository, needed to get jaxx plugin --> + + <pluginRepository> + + <id>nuiton.release</id> + <name>NuitonReleaseRepository</name> + <url>http://maven.nuiton.org/release</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <enabled>true</enabled> + <checksumPolicy>warn</checksumPolicy> + </releases> + </pluginRepository> + + </pluginRepositories> + +</project> Added: trunk/jaxx-tutorial-helloworld2/src/main/java/org/nuiton/jaxx/tutorials/helloworld/helloworld.jaxx =================================================================== --- trunk/jaxx-tutorial-helloworld2/src/main/java/org/nuiton/jaxx/tutorials/helloworld/helloworld.jaxx (rev 0) +++ trunk/jaxx-tutorial-helloworld2/src/main/java/org/nuiton/jaxx/tutorials/helloworld/helloworld.jaxx 2010-05-10 16:07:29 UTC (rev 1889) @@ -0,0 +1,12 @@ + <Application title='Hello World'> + + <JLabel text='Hello World' + foreground='red' + font-size='24' + constraints='BorderLayout.NORTH'/> + + <JButton text='Close' + constraints='BorderLayout.SOUTH' + onActionPerformed='dispose()'/> + + </Application> Added: trunk/src/site/resources/tutos/helloworld2-red-big-button.png =================================================================== (Binary files differ) Property changes on: trunk/src/site/resources/tutos/helloworld2-red-big-button.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/site/resources/tutos/helloworld2-red-big.png =================================================================== (Binary files differ) Property changes on: trunk/src/site/resources/tutos/helloworld2-red-big.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/site/resources/tutos/helloworld2-red.png =================================================================== (Binary files differ) Property changes on: trunk/src/site/resources/tutos/helloworld2-red.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/site/resources/tutos/helloworld2.zip =================================================================== (Binary files differ) Property changes on: trunk/src/site/resources/tutos/helloworld2.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/site/rst/tutos/helloworld2.rst =================================================================== --- trunk/src/site/rst/tutos/helloworld2.rst (rev 0) +++ trunk/src/site/rst/tutos/helloworld2.rst 2010-05-10 16:07:29 UTC (rev 1889) @@ -0,0 +1,99 @@ +Hello World 2 +============= + +Dans ce deuxième tutoriel, nous allons un petit peu complexifier les choses et +améliorer l'application réalisée dans le premier Hello World. Nous allons +ajouter un peu de style à notre exemple et ajouter un bouton pour fermer la +fénêtre. + +Donner du style à notre texte +----------------------------- + +Dans le premier tutoriel, le texte était déclaré comme ceci:: + + <JLabel text='Hello World'/> + +Quand l'interface utilisateur est créée, la méthode setText() du JLabel est +appelée avec l'attribut "Hello World". Nous souhaitons maintenant mettre ce +texte en rouge. La méthode correspondant, sur on objet JLabel, est +setForeground(). Donc nous allons ajouter un attribut foreground à notre JLabel +et il aura la valeur red (toutes les couleurs basiques sont implémentées):: + + <JLabel text='Hello World' + foreground='red'/> + +Si nous compilons et exécutons le code, on obtient : + +.. image::helloworld2-red.png + +Si vous souhaitez utiliser une couleur spécifique, vous pouvez aussi très bien +utiliser le code couleur HTML. Par example, en remplaçant red par #FF0000 vous +obtiendrez le même résultat. + +Maintenant, cherchons à augmenter la taille de la police. Nous allons utiliser +l'attribut font-size (ce n'est pas un attribut standard de JLabel) et lui +donner, par example, l'attribut '24':: + + <JLabel text='Hello World' + foreground='red' + font-size='24'/> + +Si nous compilons et exécutons le code, on obtient : + +.. image::helloworld2-red-big.png + +Ajouter un bouton qui ferme la fenêtre +-------------------------------------- + +Nous allons ajouter un bouton avec le texte "Close". Notre code devient:: + + <Application title='Hello World'> + + <JLabel text='Hello World' + foreground='red' + font-size='24' + constraints='BorderLayout.NORTH'/> + + <JButton text='Close' + constraints='BorderLayout.SOUTH'/> + + </Application> + +Si nous compilons et exécutons le code, on obtient : + +.. image::helloworld2-red-big-button.png + +Mais le bouton ne fait rien, il faut appeler la méthode dispose() quand une +action est réalisée sur le bouton pour fermer la fenêtre. Pour le réaliser, +nous allons donner la valeur dispose() à l'attribut onActionPerformed de notre +bouton. :: + + <JButton text='Close' + constraints='BorderLayout.SOUTH' + onActionPerformed='dispose()'/> + +Les attributs commençant par on sont en fait des callbacks qui sont appelés +quand un évènement est lancé par l'objet en question. Ainsi dans notre exemple +la méthode dispose() est appelée quand un évènement ActionPerformed est lancé. + +Nous allons revenir sur l'attribut constraints que l'on a passé à nos JLabel et +JButton. L'attribut constraints spécifie les contraintes de layout à utiliser +quand un composant est ajouté à son parent. Ici, nous utilisons le BorderLayout +pour placer les éléments les uns en dessous des autres. A noter que l'attribut +constraints n'est applicable que sur les composants descendants de la classe +Component. La valeur prise pas l'attribut constraints est forcément du code +Java qui doit retourner un Object ou null. + +Conclusion +---------- + +Dans ce tutoriel vous avez vu comment mettre du style sur vos composants et +créer un bouton qui lance une méthode. Vous avez également vu comment placer +(très rapidement, il est vrai) des éléments dans un conteneur. + +Sources de ce tutoriel +---------------------- + +Les sources de ce tutoriel sont disponibles au `telechargement ici`_. + +.. _telechargement ici::helloworld2.zip Modified: trunk/src/site/site_fr.xml =================================================================== --- trunk/src/site/site_fr.xml 2010-05-10 16:06:33 UTC (rev 1888) +++ trunk/src/site/site_fr.xml 2010-05-10 16:07:29 UTC (rev 1889) @@ -59,7 +59,8 @@ </item> <item name="Démo" href="demo.html"/> <item name="Tutoriels"> - <item name="Hello World" href="tutos/helloWorld.html"/> + <item name="Hello World" href="tutos/helloworld.html"/> + <item name="Hello World 2" href="tutos/helloworld2.html"/> </item> </menu>
participants (1)
-
jcouteau@users.nuiton.org