jguiraffe-developers Mailing List for JGUIraffe
Brought to you by:
oheger
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(7) |
Apr
(21) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
|
Feb
(2) |
Mar
(7) |
Apr
(8) |
May
(3) |
Jun
(7) |
Jul
(7) |
Aug
(8) |
Sep
(7) |
Oct
(4) |
Nov
(3) |
Dec
(6) |
| 2008 |
Jan
(7) |
Feb
(4) |
Mar
(1) |
Apr
(11) |
May
(4) |
Jun
(6) |
Jul
(8) |
Aug
(7) |
Sep
(13) |
Oct
(8) |
Nov
(28) |
Dec
(34) |
| 2009 |
Jan
(15) |
Feb
(15) |
Mar
(19) |
Apr
(45) |
May
(134) |
Jun
(134) |
Jul
(76) |
Aug
(29) |
Sep
(26) |
Oct
(36) |
Nov
(11) |
Dec
(18) |
| 2010 |
Jan
(11) |
Feb
(10) |
Mar
(39) |
Apr
(55) |
May
(87) |
Jun
(77) |
Jul
(40) |
Aug
(48) |
Sep
(21) |
Oct
(6) |
Nov
(2) |
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
(2) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
(5) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
|
From: <oh...@us...> - 2012-11-15 20:56:06
|
Revision: 218
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=218&view=rev
Author: oheger
Date: 2012-11-15 20:56:00 +0000 (Thu, 15 Nov 2012)
Log Message:
-----------
Updated news and preparations for next development iteration.
Modified Paths:
--------------
trunk/core/src/changes/changes.xml
trunk/examples/pom.xml
trunk/src/site/xdoc/index.xml
Modified: trunk/core/src/changes/changes.xml
===================================================================
--- trunk/core/src/changes/changes.xml 2012-11-14 20:58:20 UTC (rev 217)
+++ trunk/core/src/changes/changes.xml 2012-11-15 20:56:00 UTC (rev 218)
@@ -26,7 +26,7 @@
<author email="oh...@so...">Oliver Heger</author>
</properties>
<body>
- <release version="1.2" date="in SVN"
+ <release version="1.2" date="2012-11-15"
description="Adding OSGi support">
<action dev="oheger" issue="3535847" type="add">
Added OSGi support.
Modified: trunk/examples/pom.xml
===================================================================
--- trunk/examples/pom.xml 2012-11-14 20:58:20 UTC (rev 217)
+++ trunk/examples/pom.xml 2012-11-15 20:56:00 UTC (rev 218)
@@ -104,6 +104,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8.1</version>
</plugin>
</plugins>
</reporting>
Modified: trunk/src/site/xdoc/index.xml
===================================================================
--- trunk/src/site/xdoc/index.xml 2012-11-14 20:58:20 UTC (rev 217)
+++ trunk/src/site/xdoc/index.xml 2012-11-15 20:56:00 UTC (rev 218)
@@ -55,6 +55,15 @@
<p>
<table>
<tr>
+ <td>2012-11-15</td>
+ <td>
+ Release 1.2 of <em>JGUIraffe</em>. The library can now be used in an
+ OSGi environment. The newest artifacts can be downloaded from
+ <a href="http://sourceforge.net/projects/jguiraffe/">SourceForge</a>
+ and are also available in the Central Maven repository.
+ </td>
+ </tr>
+ <tr>
<td>2012-02-12</td>
<td>
Release 1.1 of <em>JGUIraffe</em>. This is a maintenance release which
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-11-14 20:58:26
|
Revision: 217
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=217&view=rev
Author: oheger
Date: 2012-11-14 20:58:20 +0000 (Wed, 14 Nov 2012)
Log Message:
-----------
Updated version numbers to next SNAPSHOT version.
Modified Paths:
--------------
trunk/core/pom.xml
trunk/examples/pom.xml
trunk/pom.xml
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2012-11-14 20:54:03 UTC (rev 216)
+++ trunk/core/pom.xml 2012-11-14 20:58:20 UTC (rev 217)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.2</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
Modified: trunk/examples/pom.xml
===================================================================
--- trunk/examples/pom.xml 2012-11-14 20:54:03 UTC (rev 216)
+++ trunk/examples/pom.xml 2012-11-14 20:58:20 UTC (rev 217)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.2</version>
+ <version>1.3-SNAPSHOT</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-11-14 20:54:03 UTC (rev 216)
+++ trunk/pom.xml 2012-11-14 20:58:20 UTC (rev 217)
@@ -24,7 +24,7 @@
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
<packaging>pom</packaging>
- <version>1.2</version>
+ <version>1.3-SNAPSHOT</version>
<modules>
<module>core</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-11-14 20:54:09
|
Revision: 216
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=216&view=rev
Author: oheger
Date: 2012-11-14 20:54:03 +0000 (Wed, 14 Nov 2012)
Log Message:
-----------
Tagging release 1.2
Added Paths:
-----------
tags/jguiraffe-1.2/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-11-14 20:52:49
|
Revision: 215
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=215&view=rev
Author: oheger
Date: 2012-11-14 20:52:43 +0000 (Wed, 14 Nov 2012)
Log Message:
-----------
Updated version numbers for 1.2 release.
Modified Paths:
--------------
trunk/core/pom.xml
trunk/examples/pom.xml
trunk/pom.xml
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2012-11-13 21:19:44 UTC (rev 214)
+++ trunk/core/pom.xml 2012-11-14 20:52:43 UTC (rev 215)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.2</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
Modified: trunk/examples/pom.xml
===================================================================
--- trunk/examples/pom.xml 2012-11-13 21:19:44 UTC (rev 214)
+++ trunk/examples/pom.xml 2012-11-14 20:52:43 UTC (rev 215)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.2</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-11-13 21:19:44 UTC (rev 214)
+++ trunk/pom.xml 2012-11-14 20:52:43 UTC (rev 215)
@@ -24,7 +24,7 @@
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
<packaging>pom</packaging>
- <version>1.2-SNAPSHOT</version>
+ <version>1.2</version>
<modules>
<module>core</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-11-13 21:19:51
|
Revision: 214
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=214&view=rev
Author: oheger
Date: 2012-11-13 21:19:44 +0000 (Tue, 13 Nov 2012)
Log Message:
-----------
Release preparations: Updated release notes and improved site descriptors.
Modified Paths:
--------------
trunk/RELEASE-NOTES.txt
trunk/core/src/site/site.xml
trunk/examples/src/site/site.xml
trunk/src/site/site.xml
Modified: trunk/RELEASE-NOTES.txt
===================================================================
--- trunk/RELEASE-NOTES.txt 2012-07-14 19:40:51 UTC (rev 213)
+++ trunk/RELEASE-NOTES.txt 2012-11-13 21:19:44 UTC (rev 214)
@@ -1,7 +1,7 @@
$Id$
JGUIraffe Library
- Version 1.1
+ Version 1.2
Release Notes
@@ -13,43 +13,26 @@
desktop applications using concepts like declarative UI definition, action and
command objects, and dependency injection.
-Version 1.1 is a maintenance release. It contains some bug fixes and adds a
-couple of new features. Below is the full list of changes:
+The 1.2 release stands under a single topic: OSGi support. The jar file is now
+an OSGi bundle, many classes have been updated to work properly in an OSGi
+environment, and a new chapter dealing with JGUIraffe and OSGi has been added
+to the user's guide.
-BUG FIXES
-=========
-* [3368750]
- Builders could throw an undocumented LocatorException. Such exceptions are now
- caught and re-thrown as BuilderException exceptions.
-
-* [3299754]
- Fixed a NullPointerException which can occur in the dependency injection
- framework when looking up beans by classes rather than bean names.
+Below is the full list of fixed tracker issues:
NEW FEATURES
============
-* [3368763]
- Added a transformer to StaticTextData objects which simpliefies usage of
- static text controls in forms.
+* [3535847]
+ Added OSGi support.
-* [3380233]
- SwingTableComponentHandler now ensures that a newly selected row (in
- single-selection mode) becomes visible. If necessary, it changes the
- position of the scroll pane.
-
-* [3480996]
- Improvements of the dependency injection framework related to factory beans
- and builder classes.
-
OTHER CHANGES
=============
-* Some versions of dependencies have been updated:
- Commons Configuration updated to 1.8.
- EasyMock (test dependency) updated to 3.1.
+* The dependency to Commons Configuration has been updated to version 1.9.
+ (The older version 1.8 still works.)
Comprehensive documentation about the JGUIraffe library is available on
the project's web site
http://jguiraffe.sourceforge.net/
-A user's guide can be fount at
+A user's guide can be found at
http://jguiraffe.sourceforge.net/jguiraffe/userguide/user_guide.html
Modified: trunk/core/src/site/site.xml
===================================================================
--- trunk/core/src/site/site.xml 2012-07-14 19:40:51 UTC (rev 213)
+++ trunk/core/src/site/site.xml 2012-11-13 21:19:44 UTC (rev 214)
@@ -18,23 +18,7 @@
-->
<!-- $Id$ -->
<project name="JGUIraffe">
- <bannerLeft>
- <name>JGUIraffe</name>
- <src>../images/giraffe.jpg</src>
- <href>http://jguiraffe.sourceforge.net/</href>
- </bannerLeft>
- <bannerRight>
- <name>Sourceforge.net</name>
- <src>http://sflogo.sourceforge.net/sflogo.php?group_id=162864&type=7</src>
- <href>http://www.sourceforge.net</href>
- </bannerRight>
-
<body>
- <links>
- <item name="Top" href="../index.html"/>
- <item name="SourceForge" href="http://sourceforge.net/projects/jguiraffe/"/>
- </links>
-
<menu name="JGuiraffe">
<item name="Home" href="/index.html"/>
<item name="Overview" href="/overview.html"/>
@@ -43,5 +27,6 @@
</menu>
<menu ref="reports"/>
+ <menu ref="parent"/>
</body>
</project>
Modified: trunk/examples/src/site/site.xml
===================================================================
--- trunk/examples/src/site/site.xml 2012-07-14 19:40:51 UTC (rev 213)
+++ trunk/examples/src/site/site.xml 2012-11-13 21:19:44 UTC (rev 214)
@@ -18,23 +18,7 @@
-->
<!-- $Id$ -->
<project name="JGUIraffe">
- <bannerLeft>
- <name>JGUIraffe</name>
- <src>../images/giraffe.jpg</src>
- <href>http://jguiraffe.sourceforge.net/</href>
- </bannerLeft>
- <bannerRight>
- <name>Sourceforge.net</name>
- <src>http://sflogo.sourceforge.net/sflogo.php?group_id=162864&type=7</src>
- <href>http://www.sourceforge.net</href>
- </bannerRight>
-
<body>
- <links>
- <item name="Top" href="../index.html"/>
- <item name="SourceForge" href="http://sourceforge.net/projects/jguiraffe/"/>
- </links>
-
<menu name="JGuiraffe">
<item name="Home" href="/index.html"/>
<item name="Tutorial application" href="/tutorialapp.html"/>
@@ -42,5 +26,6 @@
</menu>
<menu ref="reports"/>
+ <menu ref="parent"/>
</body>
</project>
Modified: trunk/src/site/site.xml
===================================================================
--- trunk/src/site/site.xml 2012-07-14 19:40:51 UTC (rev 213)
+++ trunk/src/site/site.xml 2012-11-13 21:19:44 UTC (rev 214)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
- Copyright 2006-2010 The JGUIraffe Team.
+ Copyright 2006-2012 The JGUIraffe Team.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-07-14 19:40:58
|
Revision: 213
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=213&view=rev
Author: oheger
Date: 2012-07-14 19:40:51 +0000 (Sat, 14 Jul 2012)
Log Message:
-----------
Improvements of build. Fixed some checkstyle warnings.
Modified Paths:
--------------
trunk/conf/checkstyle.xml
trunk/core/pom.xml
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SimpleBeanStoreImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorConverter.java
trunk/core/src/site/site.xml
trunk/examples/src/site/site.xml
trunk/pom.xml
trunk/src/site/xdoc/building.xml
Modified: trunk/conf/checkstyle.xml
===================================================================
--- trunk/conf/checkstyle.xml 2012-07-14 15:22:35 UTC (rev 212)
+++ trunk/conf/checkstyle.xml 2012-07-14 19:40:51 UTC (rev 213)
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- Copyright 2006-2010 The GUIraffe Team.
+ Copyright 2006-2012 The GUIraffe Team.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -28,7 +28,9 @@
<!-- Checks that a package.html file exists for each package. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
- <module name="PackageHtml"/>
+ <module name="JavadocPackage">
+ <property name="allowLegacy" value="true"/>
+ </module>
<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
@@ -38,6 +40,13 @@
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
<module name="Translation"/>
+ <module name="FileTabCharacter"/>
+ <module name="RegexpSingleline">
+ <!-- \s matches whitespace character, $ matches end of line. -->
+ <property name="format" value="\s+$"/>
+ <property name="message" value="Line has trailing spaces."/>
+ </module>
+ <module name="FileLength"/>
<module name="TreeWalker">
@@ -53,7 +62,6 @@
</module>
<module name="JavadocVariable"/>
-
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName"/>
@@ -66,18 +74,6 @@
<module name="StaticVariableName"/>
<module name="TypeName"/>
-
- <!-- Checks for Headers -->
- <!-- See http://checkstyle.sf.net/config_header.html -->
- <module name="Header">
- <property name="headerFile" value="conf/HEADER.txt"/>
- <property name="ignoreLines" value="2"/>
- </module>
-
- <!-- Following interprets the header file as regular expressions. -->
- <!-- <module name="RegexpHeader"/> -->
-
-
<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<module name="AvoidStarImport"/>
@@ -85,10 +81,8 @@
<module name="RedundantImport"/>
<module name="UnusedImports"/>
-
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
- <module name="FileLength"/>
<module name="LineLength">
<property name="max" value="100"/>
</module>
@@ -97,7 +91,6 @@
<property name="max" value="10"/>
</module>
-
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="EmptyForIteratorPad"/>
@@ -105,19 +98,16 @@
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
- <module name="TabCharacter"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND"/>
</module>
-
<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
-
<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
<module name="AvoidNestedBlocks"/>
@@ -130,7 +120,6 @@
<property name="option" value="alone"/>
</module>
-
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<module name="CovariantEquals"/>
@@ -165,18 +154,11 @@
<property name="protectedAllowed" value="true"/>
</module>
-
-
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<module name="ArrayTypeStyle"/>
- <module name="GenericIllegalRegexp">
- <property name="format" value="\s+$"/>
- <property name="message" value="Line has trailing spaces."/>
- </module>
<module name="TodoComment"/>
<module name="UpperEll"/>
-
</module>
</module>
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2012-07-14 15:22:35 UTC (rev 212)
+++ trunk/core/pom.xml 2012-07-14 19:40:51 UTC (rev 213)
@@ -29,7 +29,7 @@
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe</artifactId>
- <packaging>bundle</packaging>
+ <packaging>jar</packaging>
<name>JGUIraffe</name>
<description>Java GUI Resource and Application Framework with Form Extensions</description>
@@ -106,17 +106,37 @@
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<inherited>true</inherited>
- <extensions>true</extensions>
+ <executions>
+ <execution>
+ <id>bundle-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
<configuration>
<instructions>
<_nouses>true</_nouses>
<_versionpolicy>
[$(version;==;$(@)), $(version;+;$(@)))
</_versionpolicy>
+ <Built-By>${maven.user}</Built-By>
+ <Implementation-Version>${project.version}</Implementation-Version>
</instructions>
</configuration>
</plugin>
@@ -163,25 +183,29 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8.1</version>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jxr-maven-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <version>2.3</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.5.1</version>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>surefire-report-maven-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.12</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.3</version>
+ <version>2.7</version>
<configuration>
- <configLocation>../conf/checkstyle.xml</configLocation>
+ <configLocation>${basedir}/../conf/checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>
@@ -192,6 +216,14 @@
<excludeFilterFile>../conf/findbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>clirr-maven-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <minSeverity>info</minSeverity>
+ </configuration>
+ </plugin>
</plugins>
</reporting>
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SimpleBeanStoreImpl.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SimpleBeanStoreImpl.java 2012-07-14 15:22:35 UTC (rev 212)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SimpleBeanStoreImpl.java 2012-07-14 19:40:51 UTC (rev 213)
@@ -29,11 +29,11 @@
/**
* <p>
- * A helper class that simplifies implementations of the <code>BeanStore</code>
+ * A helper class that simplifies implementations of the {@code BeanStore}
* interface.
* </p>
* <p>
- * The purpose of this class is to support <code>BeanStore</code>
+ * The purpose of this class is to support {@code BeanStore}
* implementations based on classes that are not aware of {@link BeanProvider}s,
* but provide a map-like interface for accessing their data. This is achieved
* in the following ways:
@@ -41,16 +41,16 @@
* <li>Static data (in form of arbitrary objects) can directly be added to this
* class. Internally {@link ConstantBeanProvider} objects are created for the
* data objects to be managed. These providers are directly exposed through the
- * <code>BeanStore</code> methods.</li>
+ * {@code BeanStore} methods.</li>
* <li>If dynamic data is involved (i.e. objects that may change over time and
* cannot be kept in a map), components can implement the internal
- * <code>BeanContributor</code> interface and register themselves at a
- * <code>SimpleBeanStoreImpl</code> instance. The <code>BeanConstributor</code>
- * interface is much easier to implement than the <code>BeanStore</code>
- * interface. The implementations of the <code>BeanStore</code> methods provided
- * by this class take the registered <code>BeanContributor</code>s into account.
+ * {@code BeanContributor} interface and register themselves at a
+ * {@code SimpleBeanStoreImpl} instance. The {@code BeanConstributor}
+ * interface is much easier to implement than the {@code BeanStore}
+ * interface. The implementations of the {@code BeanStore} methods provided
+ * by this class take the registered {@code BeanContributor}s into account.
* </li>
- * <li>Methods of the <code>BeanStore</code> interface that do not directly deal
+ * <li>Methods of the {@code BeanStore} interface that do not directly deal
* with bean providers are already implemented by this class.</li>
* </ul>
* </p>
@@ -83,7 +83,7 @@
private ConversionHelper conversionHelper;
/**
- * Creates a new instance of <code>SimpleBeanStoreImpl</code>.
+ * Creates a new instance of {@code SimpleBeanStoreImpl}.
*/
public SimpleBeanStoreImpl()
{
@@ -92,7 +92,7 @@
}
/**
- * Creates a new instance of <code>SimpleBeanStoreImpl</code> and sets the
+ * Creates a new instance of {@code SimpleBeanStoreImpl} and sets the
* name and the reference to the parent.
*
* @param name the name of this bean store
@@ -106,7 +106,7 @@
}
/**
- * Adds a new <code>BeanContributor</code> to this object. This
+ * Adds a new {@code BeanContributor} to this object. This
* contributor will be triggered when this bean store is accessed.
*
* @param contr the contributor to be added (must not be <b>null</b>)
@@ -135,7 +135,7 @@
/**
* Adds the specified bean to this store. For the passed in bean a constant
* bean provider is created. It can then be queried through the
- * <code>getBeanProvider()</code> method.
+ * {@code getBeanProvider()} method.
*
* @param name the name of the bean (must not be <b>null</b>)
* @param bean the bean (must not be <b>null</b>)
@@ -166,14 +166,14 @@
}
/**
- * Returns a <code>BeanProvider</code> for the bean with the given name.
+ * Returns a {@code BeanProvider} for the bean with the given name.
* This implementation checks whether such a bean was directly added using
- * the <code>addBean()</code> method. If not, the registered bean
+ * the {@code addBean()} method. If not, the registered bean
* contributors are consulted. If no such bean can be found, <b>null</b> is
* returned.
*
* @param name the name of the bean in question
- * @return a <code>BeanProvider</code> for this bean
+ * @return a {@code BeanProvider} for this bean
*/
public BeanProvider getBeanProvider(String name)
{
@@ -284,7 +284,7 @@
/**
* Returns a bean provider for the specified bean. This method is called
* whenever a bean has to be wrapped by a provider. This default
- * implementation returns a <code>ConstantBeanProvider</code> for the
+ * implementation returns a {@code ConstantBeanProvider} for the
* passed in bean.
*
* @param bean the bean
@@ -298,20 +298,20 @@
/**
* <p>
* Definition of an interface for objects that can contribute beans for a
- * <code>SimpleBeanStoreImpl</code> object.
+ * {@code SimpleBeanStoreImpl} object.
* </p>
* <p>
* The methods defined in this interface allow an implementation to deliver
- * plain data objects (in contrast to <code>BeanProvider</code> objects.
- * The implementations of the <code>BeanStore</code> methods delegate to
+ * plain data objects (in contrast to {@code BeanProvider} objects.
+ * The implementations of the {@code BeanStore} methods delegate to
* these methods when the bean store is accessed.
* </p>
*/
- public static interface BeanContributor
+ public interface BeanContributor
{
/**
* Obtains the names of the beans available by this contributor. This
- * method is invoked by the <code>providerNames()</code> method.
+ * method is invoked by the {@code providerNames()} method.
*
* @param names a set, in which to store the names of the available
* beans
@@ -320,7 +320,7 @@
/**
* Returns the bean with the given name or <b>null</b> if the name is
- * unknown. When queried for a bean the <code>BeanStore</code>
+ * unknown. When queried for a bean the {@code BeanStore}
* implementation will iterate over all registered contributors and call
* this method. The first non <b>null</b> value is returned.
*
Modified: trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorConverter.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorConverter.java 2012-07-14 15:22:35 UTC (rev 212)
+++ trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorConverter.java 2012-07-14 19:40:51 UTC (rev 213)
@@ -241,6 +241,7 @@
* newly created {@code Locator}.
*
* @param data data for the locator
+ * @param clp the {@code ClassLoaderProvider}
* @return the new locator instance
*/
@Override
@@ -274,6 +275,7 @@
* as the file name.
*
* @param data data for the locator
+ * @param clp the {@code ClassLoaderProvider}
* @return the new locator instance
*/
@Override
@@ -291,6 +293,7 @@
* as the text representation of the URL.
*
* @param data data for the locator
+ * @param clp the {@code ClassLoaderProvider}
* @return the new locator instance
*/
@Override
Modified: trunk/core/src/site/site.xml
===================================================================
--- trunk/core/src/site/site.xml 2012-07-14 15:22:35 UTC (rev 212)
+++ trunk/core/src/site/site.xml 2012-07-14 19:40:51 UTC (rev 213)
@@ -42,6 +42,6 @@
<item name="User's Guide" href="/userguide/user_guide.html"/>
</menu>
- ${reports}
+ <menu ref="reports"/>
</body>
</project>
Modified: trunk/examples/src/site/site.xml
===================================================================
--- trunk/examples/src/site/site.xml 2012-07-14 15:22:35 UTC (rev 212)
+++ trunk/examples/src/site/site.xml 2012-07-14 19:40:51 UTC (rev 213)
@@ -41,6 +41,6 @@
<item name="Javadoc (latest)" href="/apidocs/index.html"/>
</menu>
- ${reports}
+ <menu ref="reports"/>
</body>
</project>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-07-14 15:22:35 UTC (rev 212)
+++ trunk/pom.xml 2012-07-14 19:40:51 UTC (rev 213)
@@ -129,7 +129,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.5.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
@@ -255,18 +255,18 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
- <version>2.1.1</version>
+ <version>3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.4</version>
<configuration>
<archive>
<manifestEntries>
<Built-By>${maven.user}</Built-By>
- <Implementation-Version>${pom.version}</Implementation-Version>
+ <Implementation-Version>${project.version}</Implementation-Version>
</manifestEntries>
</archive>
</configuration>
@@ -281,6 +281,42 @@
</site>
</distributionManagement>
+ <profiles>
+ <!--
+ Configure site plugin to support both Maven2 and Maven3, see:
+ http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Using_the_same_version_of_maven-site-plugin_for_both_Maven_2_and_Maven_3
+ -->
+ <profile>
+ <id>maven-3</id>
+ <activation>
+ <file>
+ <exists>${basedir}</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh</artifactId>
+ <version>2.2</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>attach-descriptor</id>
+ <goals>
+ <goal>attach-descriptor</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
<!--
The following profiles are used to create the artifacts required for a
release. The required commands are as follows:
@@ -288,7 +324,6 @@
mvn clean install site:site -P release,sign -Dmaven.user=user
mvn install -N -P dist,sign
-->
- <profiles>
<profile>
<id>release</id>
<activation>
Modified: trunk/src/site/xdoc/building.xml
===================================================================
--- trunk/src/site/xdoc/building.xml 2012-07-14 15:22:35 UTC (rev 212)
+++ trunk/src/site/xdoc/building.xml 2012-07-14 19:40:51 UTC (rev 213)
@@ -29,7 +29,8 @@
<section name="Building from Subversion">
<p>
<em>JGUIraffe</em> uses <a href="http://maven.apache.org">Apache Maven</a>
- as its build tool. When you check out the source code from
+ as its build tool. The build should be compatible with both Maven 2 and
+ Maven 3. When you check out the source code from
<a href="http://subversion.apache.org/">Subversion</a> using the command
</p>
<source><![CDATA[
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-07-14 15:22:41
|
Revision: 212
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=212&view=rev
Author: oheger
Date: 2012-07-14 15:22:35 +0000 (Sat, 14 Jul 2012)
Log Message:
-----------
[3535847] Added OSGi-related documentation.
Modified Paths:
--------------
trunk/core/src/changes/changes.xml
trunk/core/src/site/xdoc/userguide/application.xml
trunk/core/src/site/xdoc/userguide/user_guide.xml
Added Paths:
-----------
trunk/core/src/site/xdoc/userguide/osgi.xml
Modified: trunk/core/src/changes/changes.xml
===================================================================
--- trunk/core/src/changes/changes.xml 2012-07-10 19:49:13 UTC (rev 211)
+++ trunk/core/src/changes/changes.xml 2012-07-14 15:22:35 UTC (rev 212)
@@ -26,6 +26,13 @@
<author email="oh...@so...">Oliver Heger</author>
</properties>
<body>
+ <release version="1.2" date="in SVN"
+ description="Adding OSGi support">
+ <action dev="oheger" issue="3535847" type="add">
+ Added OSGi support.
+ </action>
+ </release>
+
<release version="1.1" date="2012-02-12"
description="First maintenance release">
<action dev="oheger" issue="3480996" type="add">
Modified: trunk/core/src/site/xdoc/userguide/application.xml
===================================================================
--- trunk/core/src/site/xdoc/userguide/application.xml 2012-07-10 19:49:13 UTC (rev 211)
+++ trunk/core/src/site/xdoc/userguide/application.xml 2012-07-14 15:22:35 UTC (rev 212)
@@ -435,6 +435,29 @@
application.
</p>
</subsection>
+
+ <subsection name="Exit handlers">
+ <p>
+ Well, in fact calling <code>System.exit()</code> is just the default
+ behavior at the end of a successful shutdown operation. There may be
+ scenarios in which it is not desired to terminate the whole Java virtual
+ machine, e.g. when the application is running in a managed environment.
+ For such cases <code>Application</code> allows setting a so-called
+ <em>exit handler</em>.
+ </p>
+ <p>
+ An exit handler simply has to implement the <code>Runnable</code>
+ interface. It can be passed to the <code>setExitHandler()</code> method of
+ <code>Application</code>. At the end of a shutdown operation - if there is
+ no veto from a shutdown listener - the exit handler is invoked. This is
+ the last operation performed by the <code>Application</code> object. It is
+ then in the responsibility of the concrete exit handler implementation to
+ actually complete the shutdown. As was already mentioned, the default exit
+ handler calls <code>System.exit()</code>. If you need other shutdown logic,
+ create a <code>Runnable</code> object implementing the desired behavior and
+ pass it to <code>Application</code>'s <code>setExitHandler()</code> method.
+ </p>
+ </subsection>
</section>
</body>
Added: trunk/core/src/site/xdoc/userguide/osgi.xml
===================================================================
--- trunk/core/src/site/xdoc/userguide/osgi.xml (rev 0)
+++ trunk/core/src/site/xdoc/userguide/osgi.xml 2012-07-14 15:22:35 UTC (rev 212)
@@ -0,0 +1,245 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright 2006-2012 The JGUIraffe Team.
+
+ Licensed under the Apache License, Version 2.0 (the "License")
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<!-- $Id$ -->
+
+<document>
+
+ <properties>
+ <title>OSGi</title>
+ <author email="oh...@us...">Oliver Heger</author>
+ </properties>
+
+<body>
+ <section name="JGUIraffe and OSGi">
+ <p>
+ OSGi is a framework focusing on modularity of Java applications. It becomes
+ more and more popular, so you may want to run your <em>JGUIraffe</em>
+ application in an OSGi container. This is possible, but there are some
+ aspects to be aware of. In this chapter these topics are discussed.
+ </p>
+
+ <subsection name="Bundles">
+ <p>
+ In order to deploy an application into an OSGi framework, it has to be
+ packaged in so-called <em>bundles</em> - jar archives containing special
+ meta data. From version 1.2 on the <em>JGUIraffe</em> jar is a valid OSGi
+ bundle. It contains the necessary meta data and thus can be directly
+ deployed into your OSGi container of choice.
+ </p>
+ <p>
+ Unfortunately, this is not true for all the libraries <em>JGUIraffe</em>
+ depends on (see <a href="../dependencies.html">Dependencies</a>). Newer releases of the
+ <a href="http://commons.apache.org">Apache Commons</a> components
+ referenced by <em>JGUIraffe</em> already contain OSGi meta data, but some of
+ the older releases do not. Especially the Commons Jelly jar is (at the time of this writing) not provided
+ as an OSGi bundle. Because these dependencies have to be satisfied when
+ installing the <em>JGUIraffe</em> bundle in an OSGi framework you have to
+ obtain OSGi-enabled versions of the affected libraries. One option could be
+ to re-package the jars as OSGi bundles yourself. Using the
+ <a href="http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html">
+ Apache felix maven bundle plug-in</a> this is not too complicated. For
+ instance,
+ <a href="http://www.sonatype.com/index.php/Support/Books/The-Maven-Cookbook">
+ The Maven Cookbook</a> contains a chapter about OSGi development which
+ also covers the creation of OSGi bundles for existing jars.
+ </p>
+ </subsection>
+
+ <subsection name="Class loading">
+ <p>
+ A major feature of OSGi is that it enforces a very strict class loading
+ architecture allowing each bundle only access to classes it explicitly
+ references in its OSGi meta data. Especially for the dependency injection
+ framework of <em>JGUIraffe</em> this has a big impact because classes have
+ to be used which are defined in client bundles unknown to <em>JGUIraffe</em>.
+ </p>
+ <p>
+ The dependency injection framework uses an object implementing the
+ <code><a href="../apidocs/net/sf/jguiraffe/di/ClassLoaderProvider.html">
+ ClassLoaderProvider</a></code> interface to resolve classes. When starting
+ up, the central
+ <code><a href="../apidocs/net/sf/jguiraffe/gui/app/Application.html">
+ Application</a></code> object creates and initializes such a
+ <code>ClassLoaderProvider</code> object. Per default, it sets the class
+ loader which loaded the custom application class as default class loader.
+ For many simple applications this is exactly what you want because this is
+ typically the class loader of the client bundle. So referenced classes can
+ directly be obtained from this bundle. If you have a more complicated
+ setup, you should override the <code>initClassLoaderProvider()</code>
+ method of your <code>Application</code> class to register all involved
+ class loaders with specific names. In your builder scripts you have to
+ make sure that the correct class loaders are referenced.
+ </p>
+ <p>
+ There is one caveat: To ensure that the current
+ <code>ClassLoaderProvider</code> is actually used in a builder script,
+ always specify class references using tag attributes ending on
+ <code>ClassName</code>. Do not use the simpler attributes with the
+ <code>Class</code> suffix. For instance, the following fragment shows a
+ <strong>wrong example</strong> of declaring a <code>FileSystemManager</code>
+ bean from the Apache Commons VFS project (using a static factory method) in
+ an OSGi environment:
+ </p>
+ <source><![CDATA[
+ <di:bean name="fileSystemManager"
+ beanClass="org.apache.commons.vfs2.FileSystemManager">
+ <di:factory>
+ <di:methodInvocation method="getManager"
+ targetClass="org.apache.commons.vfs2.VFS">
+ </di:methodInvocation>
+ </di:factory>
+ </di:bean>
+ ]]></source>
+ <p>
+ Note the usage of the <code>beanClass</code> and <code>targetClass</code>
+ attributes. The <strong>correct</strong> bean declaration is as follows:
+ </p>
+ <source><![CDATA[
+ <di:bean name="fileSystemManager"
+ beanClassName="org.apache.commons.vfs2.FileSystemManager">
+ <di:factory>
+ <di:methodInvocation method="getManager"
+ targetClassName="org.apache.commons.vfs2.VFS">
+ </di:methodInvocation>
+ </di:factory>
+ </di:bean>
+ ]]></source>
+ <p>
+ Here the problematic attributes have been replaced by variants ending on
+ <code>ClassName</code>. There are some more attributes falling into this
+ category, e.g. <code>parameterClassName</code>. The reason why the
+ attributes ending on <code>Class</code> cause problems in an OSGi container
+ is that they are directly evaluated by the Jelly engine processing the
+ builder script. This engine does not know about the
+ <code>ClassLoaderProvider</code> object and thus will probably use a wrong
+ class loader. The <code>ClassName</code> attributes in contrast are
+ processed by <em>JGUIraffe</em>; here different class loaders can be taken
+ into account. Note that for each <code>ClassName</code> attribute there is
+ a companion attribute ending on <code>Loader</code>. With this attribute a
+ special class loader can be selected. In simple applications these
+ attributes are typically not needed; if they are missing the default class
+ loader is used. However, if an application deals with multiple OSGi
+ bundles (and therefore multiple class loaders), it may be necessary to
+ specify the correct class loader explicitly. In such a case the value of
+ the <code>Loader</code> attribute must match the name of a class loader as
+ it has been registered at the <code>ClassLoaderProvider</code>.
+ </p>
+ </subsection>
+
+ <subsection name="Startup and shutdown">
+ <p>
+ The OSGi environment also affects starting and shutdown of applications.
+ Rather than providing a static <code>main()</code> method, application
+ bundles are installed in an OSGi container and are started automatically by
+ an OSGi-specific mechanism. One possibility is a <em>bundle activator</em>,
+ i.e. a class implementing the <code>org.osgi.framework.BundleActivator</code>
+ interface. The activator must be referenced from the bundle's manifest file.
+ </p>
+ <p>
+ Stand-alone <em>JGUIraffe</em> applications typically define a class
+ derived from
+ <code><a href="../apidocs/net/sf/jguiraffe/gui/app/Application.html">
+ Application</a></code> with a static <code>main()</code> method. The
+ method creates an instance of this class and invokes the static
+ <code>startup()</code> method inherited from <code>Application</code>. The
+ bundle activator has to do the same in its <code>start()</code> method.
+ Because starting up the application is an expensive operation - bean
+ declarations have to be read, the UI is constructed, etc. - this should be
+ done in a new thread, so that control can be passed back to the OSGi
+ framework immediately. Also, an alternative
+ <a href="application.html#Exit_handlers">exit handler</a> should be set to
+ prevent that the Java virtual machine is just terminated. Rather, the
+ OSGi framework should be shut down in a graceful way. This can be achieved
+ by obtaining a reference to the system bundle using the reserved bundle ID
+ 0 and calling the <code>stop()</code> method on it.
+ </p>
+ <p>
+ The following listing shows a full example of a bundle activator
+ implementation. It can serve as a basis for own implementations. It assumes
+ that there is a class called <code>Main</code> derived from
+ <code>Application</code>; this is the application class to be started.
+ </p>
+ <source><![CDATA[
+public class Activator implements BundleActivator
+{
+ /** The logger. */
+ private final Log log = LogFactory.getLog(getClass());
+
+ @Override
+ public void start(BundleContext context) throws Exception
+ {
+ log.info("Starting application bundle.");
+ final Runnable exitHandler = createExitHandler(context);
+ new Thread()
+ {
+ @Override
+ public void run()
+ {
+ Main main = new Main();
+ main.setExitHandler(exitHandler);
+ try
+ {
+ Main.startup(main, new String[0]);
+ }
+ catch (ApplicationException e)
+ {
+ log.error("Could not start application!", e);
+ }
+ }
+ }.start();
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception
+ {
+ log.info("Stopping application bundle.");
+ }
+
+ /**
+ * Creates the exit handler for the application. This handler will shutdown
+ * the OSGi framework by stopping the system bundle.
+ *
+ * @param context the bundle context
+ * @return the exit handler
+ */
+ private Runnable createExitHandler(final BundleContext context)
+ {
+ return new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ Bundle sysBundle = context.getBundle(0);
+ try
+ {
+ sysBundle.stop();
+ }
+ catch (BundleException bex)
+ {
+ log.error("Could not stop OSGi framework!", bex);
+ }
+ }
+ };
+ }
+ ]]></source>
+ </subsection>
+ </section>
+</body>
+
+</document>
Property changes on: trunk/core/src/site/xdoc/userguide/osgi.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/core/src/site/xdoc/userguide/user_guide.xml
===================================================================
--- trunk/core/src/site/xdoc/userguide/user_guide.xml 2012-07-10 19:49:13 UTC (rev 211)
+++ trunk/core/src/site/xdoc/userguide/user_guide.xml 2012-07-14 15:22:35 UTC (rev 212)
@@ -57,6 +57,7 @@
<li><a href="application.html#Initializations_at_startup">Initializations at startup</a></li>
<li><a href="application.html#Hooks">Hooks</a></li>
<li><a href="application.html#Shutdown">Shutdown</a></li>
+ <li><a href="application.html#Exit_handlers">Exit handlers</a></li>
</ul>
<li><a href="layouts.html">Layouts</a></li>
<ul>
@@ -198,6 +199,12 @@
<li><a href="builderscript.html#Action_tasks">Action tasks</a></li>
<li><a href="builderscript.html#Bringing_it_all_together">Bringing it all together</a></li>
</ul>
+ <li><a href="osgi.html">JGUIraffe and OSGi</a></li>
+ <ul>
+ <li><a href="osgi.html#Bundles">Bundles</a></li>
+ <li><a href="osgi.html#Class_loading">Class loading</a></li>
+ <li><a href="osgi.html#Startup_and_shutdown">Startup and shutdown</a></li>
+ </ul>
</ul>
</section>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-07-10 19:49:25
|
Revision: 211
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=211&view=rev
Author: oheger
Date: 2012-07-10 19:49:13 +0000 (Tue, 10 Jul 2012)
Log Message:
-----------
[3535847] Added OSGi support.
- The maven build now generates an OSGi bundle.
- Fixed various class loader problems, e.g. in ClassPathLocator or when locating resources or icons.
- Added support for exit handlers to Application.
Modified Paths:
--------------
trunk/core/pom.xml
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultClassLoaderProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/Application.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/IconTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/ClassPathLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorConverter.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/bundle/BundleResourceGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/bundle/BundleResourceLoader.java
trunk/core/src/main/resources/defaultbeans.jelly
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultClassLoaderProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultDependencyProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplication.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestDefaultBeans.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestIconTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/impl/TestJellyBuilder.java
trunk/core/src/test/java/net/sf/jguiraffe/locators/TestClassPathLocator.java
trunk/core/src/test/java/net/sf/jguiraffe/locators/TestLocatorConverter.java
trunk/core/src/test/java/net/sf/jguiraffe/locators/TestLocatorUtils.java
trunk/core/src/test/java/net/sf/jguiraffe/resources/impl/bundle/TestBundleResourceLoader.java
trunk/core/src/test/resources/jelly_scripts/icon.jelly
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2012-02-12 18:16:04 UTC (rev 210)
+++ trunk/core/pom.xml 2012-07-10 19:49:13 UTC (rev 211)
@@ -29,7 +29,7 @@
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<name>JGUIraffe</name>
<description>Java GUI Resource and Application Framework with Form Extensions</description>
@@ -104,6 +104,22 @@
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.3.7</version>
+ <inherited>true</inherited>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <_nouses>true</_nouses>
+ <_versionpolicy>
+ [$(version;==;$(@)), $(version;+;$(@)))
+ </_versionpolicy>
+ </instructions>
+ </configuration>
+ </plugin>
</plugins>
</build>
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultClassLoaderProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultClassLoaderProvider.java 2012-02-12 18:16:04 UTC (rev 210)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultClassLoaderProvider.java 2012-07-10 19:49:13 UTC (rev 211)
@@ -35,27 +35,69 @@
* can be set. If none has been set, the class loader that loaded this class is
* returned as default class loader.
* </p>
+ * <p>
+ * Per default, classes of the library (starting with the prefix
+ * {@code net.sf.jguiraffe}) are always loaded by the class loader which loaded
+ * this class. This makes sense for instance in an OSGi environment: it
+ * allows access even to internal implementation classes. This behavior can be
+ * disabled by setting the {@code handleInternalClasses} property to
+ * <b>false</b>. Then the selected class loader is used to load all classes.
+ * </p>
*
* @author Oliver Heger
* @version $Id$
*/
public class DefaultClassLoaderProvider implements ClassLoaderProvider
{
+ /** The prefix for class names which belong to this library. */
+ private static final String LIBRARY_CLASS_PREFIX = "net.sf.jguiraffe.";
+
/** A map with the class loaders registered at this object. */
private final Map<String, ClassLoader> mapLoaders;
/** Stores the default class loader name. */
private volatile String defaultLoaderName;
+ /** A flag whether internal classes should be treated in a special way. */
+ private final boolean handleInternalClasses;
+
/**
* Creates a new instance of {@code DefaultClassLoaderProvider}.
*/
public DefaultClassLoaderProvider()
{
+ this(true);
+ }
+
+ /**
+ * Creates a new instance of {@code DefaultClassLoaderProvider} and sets the
+ * flag whether internal classes should be handled in a special way.
+ *
+ * @param fHandleInternalClasses the value of the flag
+ * @since 1.2
+ */
+ public DefaultClassLoaderProvider(boolean fHandleInternalClasses)
+ {
mapLoaders = new ConcurrentHashMap<String, ClassLoader>();
+ handleInternalClasses = fHandleInternalClasses;
}
/**
+ * Returns a flag whether internal library classes are handled in a special
+ * way by this class loader provider. If this property is <b>true</b>, all
+ * classes belonging to this library are loaded by the class loader which
+ * also loaded this class.
+ *
+ * @return <b>true</b> if library classes are handled in a special way,
+ * <b>false</b> otherwise
+ * @since 1.2
+ */
+ public boolean isHandleInternalClasses()
+ {
+ return handleInternalClasses;
+ }
+
+ /**
* Returns a set with the names of the class loaders that have been
* registered at this object. All these names can be passed into the {@code
* getClassLoader()} method.
@@ -71,7 +113,7 @@
/**
* Returns the class loader specified by the given symbolic name. This
* method supports all variants: the default class loader (in this case the
- * name is <b>null</b>, the context class loader, and a registered class
+ * name is <b>null</b>), the context class loader, and a registered class
* loader.
*
* @param name the name of the class loader
@@ -122,7 +164,8 @@
*/
public Class<?> loadClass(String name, String loaderRef)
{
- return ReflectionUtils.loadClass(name, getClassLoader(loaderRef));
+ return ReflectionUtils.loadClass(name,
+ determineClassLoader(name, loaderRef));
}
/**
@@ -163,4 +206,19 @@
{
defaultLoaderName = loaderName;
}
+
+ /**
+ * Obtains the class loader for loading the specified class.
+ *
+ * @param clsName the class name
+ * @param loaderRef the reference to the class loader
+ * @return the class loader for loading this class
+ * @throws IllegalArgumentException if the class name is <b>null</b>
+ */
+ private ClassLoader determineClassLoader(String clsName, String loaderRef)
+ {
+ return (isHandleInternalClasses() && clsName != null && clsName
+ .startsWith(LIBRARY_CLASS_PREFIX)) ? getClass()
+ .getClassLoader() : getClassLoader(loaderRef);
+ }
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/app/Application.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/app/Application.java 2012-02-12 18:16:04 UTC (rev 210)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/app/Application.java 2012-07-10 19:49:13 UTC (rev 211)
@@ -19,9 +19,11 @@
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
+import java.util.concurrent.atomic.AtomicReference;
import javax.swing.event.EventListenerList;
@@ -74,7 +76,7 @@
* the application's configuration file.</li>
* <li>This configuration file is loaded using commons-configuration.</li>
* <li>From properties defined in the application's configuration the
- * <code>ApplicationContext</code> is created and initialized. This includes
+ * {@code ApplicationContext} is created and initialized. This includes
* setting up a resource manager.</li>
* <li>The name of the application's main GUI builder script is also determined
* by configuration properties. This script is executed, and the resulting main
@@ -85,15 +87,15 @@
* Per default the application's configuration file is expected to be located in
* the class path and has the name <em>config.xml</em>. This can be changed
* using system properties: The property
- * <code>net.sf.jguiraffe.configName</code> allows to change the name of the
+ * {@code net.sf.jguiraffe.configName} allows to change the name of the
* configuration file. If defined, a file with this name will be searched in the
- * class path. If the property <code>net.sf.jguiraffe.configURL</code> is
+ * class path. If the property {@code net.sf.jguiraffe.configURL} is
* provided, the class tries to load this file directly from this URL.
* </p>
* <p>
* A bunch of configuration properties is evaluated by this class to perform the
* correct setup. All of these must be placed in a section called
- * <code>framework</code>. The following table lists the available properties:
+ * {@code framework}. The following table lists the available properties:
* </p>
* <p>
* <table border="1">
@@ -106,10 +108,10 @@
* <td valign="top">appctx</td>
* <td>In this section some properties of the application context are defined:
* <dl>
- * <dt><code>locale</code></dt>
+ * <dt>{@code locale}</dt>
* <dd>Here the locale to be set at startup can be specified. If the property is
* missing, the system's default locale will be used.</dd>
- * <dt><code>defaultResourceGroup</code></dt>
+ * <dt>{@code defaultResourceGroup}</dt>
* <dd>Allows to define a default resource group that is used by the resource
* manager when no specific resource group is specified.</dd>
* </dl>
@@ -123,25 +125,25 @@
* are optional - meaningful default values are applied if a value is not set.
* The following sub elements are supported:
* <dl>
- * <dt><code>beanBuilderFactory</code></dt>
+ * <dt>{@code beanBuilderFactory}</dt>
* <dd>Specifies the full qualified name of the {@link BeanBuilderFactory}
* implementation that is used to obtain bean builder instances. Here the
* implementation class and additional initialization properties can be
* specified.</dd>
- * <dt><code>beandefinitions</code></dt>
- * <dd>In this subsection an arbitrary number of <code>beandefinition</code>
- * elements can be specified. Each <code>beandefinition</code> element points to
+ * <dt>{@code beandefinitions}</dt>
+ * <dd>In this subsection an arbitrary number of {@code beandefinition}
+ * elements can be specified. Each {@code beandefinition} element points to
* a script with bean definitions. These scripts will be processed by the
* default bean builder.</dd>
- * <dt><code>menuIcon</code></dt>
+ * <dt>{@code menuIcon}</dt>
* <dd>An optional boolean flag that determines whether menu items should be
* rendered with an icon if one is defined. Note that this may not work on all
* platforms. The default value for this flag is <b>false</b>.</dd>
- * <dt><code>toolbarText</code></dt>
+ * <dt>{@code toolbarText}</dt>
* <dd>An optional boolean flag that determines whether toolbar buttons should
* display their text. Note that this may not be supported by all platforms. The
* default value of this flag is <b>false</b>.</dd>
- * <dt><code>mainScript</code></dt>
+ * <dt>{@code mainScript}</dt>
* <dd>With this property the name of the main builder script can be specified.
* If defined, the script will be executed using the application's builder. If
* this results in a window, this window will be displayed.</dd></td>
@@ -155,13 +157,13 @@
* again on next application start. The following properties can be defined in
* this section:
* <dl>
- * <dt><code>xpos</code></dt>
+ * <dt>{@code xpos}</dt>
* <dd>Defines the x position of the main window.</dd>
- * <dt><code>ypos</code></dt>
+ * <dt>{@code ypos}</dt>
* <dd>Defines the y position of the main window.</dd>
- * <dt><code>width</code></dt>
+ * <dt>{@code width}</dt>
* <dd>Defines the width position of the main window.</dd>
- * <dt><code>height</code></dt>
+ * <dt>{@code height}</dt>
* <dd>Defines the height position of the main window.</dd></td>
* <td valign="top">Yes</td>
* </tr>
@@ -197,7 +199,7 @@
* </p>
* <p>
* To override bean definitions, use the
- * <code>framework.builder.beandefinitions</code> section in the application's
+ * {@code framework.builder.beandefinitions} section in the application's
* main configuration file (see above). In this section the names of an
* arbitrary number of bean definition files can be specified (the files will be
* loaded from the class path). Using the predefined names for the default beans
@@ -333,7 +335,17 @@
/** Constant for the name of the user configuration. */
public static final String USRCONF_NAME = "userConfig";
- /** Constant for the default beann builder factory class. */
+ /**
+ * Constant for the name of the class loader which loaded the application
+ * class. This class loader is set as the default class loader at the
+ * {@code ClassLoaderProvider} created at startup.
+ *
+ * @since 1.2
+ */
+ public static final String CLASS_LOADER = BEAN_PREFIX
+ + "Application.classLoader";
+
+ /** Constant for the default bean builder factory class. */
private static final Class<?> DEF_BEAN_BUILDER_FACTORY_CLS = JellyBeanBuilderFactory.class;
/** Constant for the script with the default bean definitions. */
@@ -365,12 +377,32 @@
private final Collection<BeanBuilderResult> beanBuilderResults;
/**
- * Creates a new instance of <code>Application</code>.
+ * The default exit handler. This instance is returned if no specific exit
+ * handler has been set. It calls {@code System.exit()} with the current exit
+ * code.
*/
+ private final Runnable defaultExitHandler = new Runnable()
+ {
+ public void run()
+ {
+ System.exit(getExitCode());
+ }
+ };
+
+ /** The current exit handler of this application. */
+ private final AtomicReference<Runnable> exitHandler;
+
+ /** The exit code of this application. */
+ private int exitCode;
+
+ /**
+ * Creates a new instance of {@code Application}.
+ */
public Application()
{
shutdownListeners = new EventListenerList();
beanBuilderResults = new ArrayList<BeanBuilderResult>();
+ exitHandler = new AtomicReference<Runnable>();
}
/**
@@ -421,7 +453,7 @@
/**
* Returns a reference to the actual application context.
*
- * @return the <code>ApplicationContext</code>
+ * @return the {@code ApplicationContext}
*/
public ApplicationContext getApplicationContext()
{
@@ -439,11 +471,11 @@
}
/**
- * Returns the <code>BeanBuilderFactory</code> for obtaining a bean
+ * Returns the {@code BeanBuilderFactory} for obtaining a bean
* builder. This method can be used when a bean definition file is to be
* processed.
*
- * @return the <code>BeanBuilderFactory</code>
+ * @return the {@code BeanBuilderFactory}
*/
public BeanBuilderFactory getBeanBuilderFactory()
{
@@ -451,11 +483,11 @@
}
/**
- * Allows to set the <code>BeanBuilderFactory</code>. Normally it is not
+ * Allows to set the {@code BeanBuilderFactory}. Normally it is not
* necessary to set this property. When the application is initialized it
* creates a default factory.
*
- * @param beanBuilderFactory the new <code>BeanBuilderFactory</code>
+ * @param beanBuilderFactory the new {@code BeanBuilderFactory}
*/
public void setBeanBuilderFactory(BeanBuilderFactory beanBuilderFactory)
{
@@ -492,16 +524,20 @@
* name of a file (either relative or absolute)
* @param name the resource name
* @return the URL to the resource or <b>null </b> if it cannot be found
+ * @deprecated This method does not make sense in the public interface of
+ * this class. It will be removed in later versions. Use corresponding
+ * functionality from the {@code LocatorUtils} class instead.
*/
+ @Deprecated
public static URL resolveResourceURL(String url, String name)
{
return LocatorUtils.locate(url, name);
}
/**
- * Tries to the set a reference to the global <code>Application</code>
+ * Tries to the set a reference to the global {@code Application}
* object in the target object. If the target object implements the
- * <code>ApplicationClient</code> interface, the reference can be set.
+ * {@code ApplicationClient} interface, the reference can be set.
*
* @param target the target object
* @param ref the application reference to set
@@ -522,7 +558,7 @@
* configuration definition file must include an entry for the user
* configuration that is identified by its name. Per default the name is
* "userConfig", but can be altered with the
- * <code>userconfigname</code> property. The following example fragment
+ * {@code userconfigname} property. The following example fragment
* from the application's configuration definition file demonstrates how the
* user configuration should be declared:
* </p>
@@ -539,20 +575,20 @@
*
* </p>
* <p>
- * In this example the attributes starting with <code>config-</code> are
- * of special importance. With <code>config-name</code> the
+ * In this example the attributes starting with {@code config-} are
+ * of special importance. With {@code config-name} the
* configuration's name is specified, which is necessary for the framework
- * to retrieve the correct user configuration. <code>config-optional</code>
+ * to retrieve the correct user configuration. {@code config-optional}
* declares this configuration source as optional. This means that it won't
* cause an error when this source cannot be loaded (which will probably be
* the case when a user starts this application for the first time). The
- * <code>config-forceCreate</code> attribute finally tells the
+ * {@code config-forceCreate} attribute finally tells the
* configuration framework to create an empty configuration when loading of
* the configuration file fails. This will cause the configuration to be
* automatically created for the new user. If the user customizes the
* application, these settings can be stored in this configuration. When the
* application terminates it checks the value of the
- * <code>storeuserconfig</code> property. If this is set to <b>true</b>,
+ * {@code storeuserconfig} property. If this is set to <b>true</b>,
* the user configuration will be stored. So the next time the application
* starts it will be found there and override the values in all other
* configuration sources.
@@ -587,9 +623,9 @@
/**
* Stores the configuration with user specific settings. This method obtains
* the user configuration by calling the
- * <code>{@link #getUserConfiguration() getUserConfiguration()}</code>
+ * {@link #getUserConfiguration()}
* method. It expects that the user configuration implements the
- * <code>FileConfiguration</code> interface. If a different configuration
+ * {@code FileConfiguration} interface. If a different configuration
* type is used as user configuration, this method should also be adapted.
*
* @throws ApplicationException if an error occurs
@@ -669,7 +705,7 @@
/**
* Returns the URL to the configuration file. This URL is determined by the
- * properties <code>configURL</code> and <code>configResourceName</code>.
+ * properties {@code configURL} and {@code configResourceName}.
*
* @return the URL to the application's main configuration file
* @throws ApplicationRuntimeException if the configuration file cannot be
@@ -677,7 +713,9 @@
*/
protected URL fetchConfigURL()
{
- URL url = resolveResourceURL(getConfigURL(), getConfigResourceName());
+ URL url =
+ LocatorUtils.locate(getConfigURL(), getConfigResourceName(),
+ getClass().getClassLoader());
if (url == null)
{
throw new ApplicationRuntimeException(
@@ -688,7 +726,7 @@
/**
* Creates the configuration for this application. This method calls
- * <code>fetchConfigURL()</code> to determine the URL to the main
+ * {@code fetchConfigURL()} to determine the URL to the main
* configuration file. Then this file is loaded with commons-configuration.
*
* @return the configuration to use
@@ -702,7 +740,7 @@
/**
* Reads the application's configuration from the specified URL. The
- * <code>DefaultConfigurationBuilder</code> of
+ * {@code DefaultConfigurationBuilder} of
* <em>Commons Configuration</em> is used for reading the configuration.
* Occurring exceptions are re-thrown as runtime exceptions.
*
@@ -753,7 +791,7 @@
* will be returned.
*
* @param config the main configuration
- * @return the <code>BeanBuilderFactory</code> to be used
+ * @return the {@code BeanBuilderFactory} to be used
*/
protected BeanBuilderFactory createBeanBuilderFactory(Configuration config)
{
@@ -767,7 +805,7 @@
/**
* Initializes the application's bean definitions. This implementation will
* first process the framework-internal bean definition file, which defines
- * the standard beans. After that <code>findBeanDefinitions()</code> is
+ * the standard beans. After that {@code findBeanDefinitions()} is
* called for obtaining a list of additional definition files to be
* evaluated. Finally a bean context is created allowing access to all beans
* defined this way. This algorithm allows concrete applications to define
@@ -800,7 +838,8 @@
}
// Now process custom bean definitions
- processBeanDefinitions(findBeanDefinitions(config), context, clpInit);
+ processBeanDefinitions(findBeanDefinitions(config, context), context,
+ clpInit);
return context;
}
@@ -814,8 +853,9 @@
* ClassLoaderProvider}. It can even create a completely new object (the
* {@code ClassLoaderProvider} returned by this method will become the
* global {@code ClassLoaderProvider}; it need not be the same object as was
- * passed to this method). This base implementation simply returns the
- * passed in argument without any modifications.
+ * passed to this method). This base implementation registers the
+ * class loader which has loaded the concrete {@code Application} sub
+ * class and makes it the default class loader.
*
* @param clp the {@code ClassLoaderProvider} as obtained from the default
* beans
@@ -825,6 +865,8 @@
protected ClassLoaderProvider initClassLoaderProvider(
ClassLoaderProvider clp)
{
+ clp.registerClassLoader(CLASS_LOADER, getClass().getClassLoader());
+ clp.setDefaultClassLoaderName(CLASS_LOADER);
return clp;
}
@@ -858,26 +900,56 @@
/**
* Returns a collection with additional bean definition files to process.
+ *
+ * @param config the main configuration source
+ * @return a list with locators to bean definition files to be processed
+ * (can be <b>null</b>)
+ * @deprecated This method is replaced by
+ * {@link #findBeanDefinitions(Configuration, BeanContext)}. It
+ * is still called during application initialization to keep
+ * backwards compatibility, but this base implementation simply
+ * returns an empty collection.
+ */
+ @Deprecated
+ protected Collection<Locator> findBeanDefinitions(Configuration config)
+ {
+ return new ArrayList<Locator>(0);
+ }
+
+ /**
+ * Returns a collection with additional bean definition files to process.
* This method is called when the application context is created. All files
* contained in the returned list will be processed by the bean builder.
* This base implementation obtains the value(s) of the
- * <code>framework.builder.beandefinitions.beandefinition</code>
- * configuration property. The values are interpreted as textual
- * representations of {@link Locator} objects which can be converted using
- * the {@link LocatorConverter} class. Strings that do not contain a locator
+ * {@code framework.builder.beandefinitions.beandefinition} configuration
+ * property. The values are interpreted as textual representations of
+ * {@link Locator} objects which can be converted using the
+ * {@link LocatorConverter} class. Strings that do not contain a locator
* type prefix (e.g. {@code classpath:} or {@code url:} are expected to be
* names of bean definition files, which can be read from the class path. If
* an application has different requirements for specifying additional bean
* definition files, this method can be overridden.
*
* @param config the main configuration source
+ * @param beanCtx the current {@code BeanContext}
* @return a list with locators to bean definition files to be processed
* (can be <b>null</b>)
+ * @since 1.2
*/
- protected Collection<Locator> findBeanDefinitions(Configuration config)
+ protected Collection<Locator> findBeanDefinitions(Configuration config,
+ BeanContext beanCtx)
{
List<?> defLocators = config.getList(PROP_BEAN_DEFS);
- Collection<Locator> result = new ArrayList<Locator>(defLocators.size());
+ // for backwards compatibility reasons call old method
+ Collection<Locator> locs = findBeanDefinitions(config);
+ if (locs == null)
+ {
+ locs = Collections.emptyList();
+ }
+
+ Collection<Locator> result =
+ new ArrayList<Locator>(defLocators.size() + locs.size());
+ result.addAll(locs);
LocatorConverter converter = null;
for (Iterator<?> it = defLocators.iterator(); it.hasNext();)
@@ -888,14 +960,16 @@
{
if (converter == null)
{
- converter = new LocatorConverter();
+ converter =
+ new LocatorConverter(
+ beanCtx.getBean(ClassLoaderProvider.class));
}
result.add((Locator) converter.convert(Locator.class,
locatorRep));
}
else
{
- result.add(ClassPathLocator.getInstance(strLocatorRep));
+ result.add(cpLocator(strLocatorRep));
}
}
return result;
@@ -999,8 +1073,7 @@
{
if (config.containsKey(PROP_BUILDER_MAIN_SCRIPT))
{
- return ClassPathLocator.getInstance(config
- .getString(PROP_BUILDER_MAIN_SCRIPT));
+ return cpLocator(config.getString(PROP_BUILDER_MAIN_SCRIPT));
}
else
{
@@ -1092,7 +1165,7 @@
}
/**
- * Returns the <code>GUISynchronizer</code> object used by this
+ * Returns the {@code GUISynchronizer} object used by this
* application. This object can be used to deal with the event dispatch
* thread.
*
@@ -1104,7 +1177,7 @@
}
/**
- * Sets the <code>GUISynchronizer</code> object to be used by this
+ * Sets the {@code GUISynchronizer} object to be used by this
* application. This object can be used for safe GUI updates that need to
* take place at the event dispatch thread. It will also set at the
* application's command queue, so that always the same synchronizer is
@@ -1120,7 +1193,7 @@
/**
* Executes the given command. The command is put into the internal command
* queue. It is then executed in another thread. If the passed in command
- * implements the <code>ApplicationClient</code> interface, a reference to
+ * implements the {@code ApplicationClient} interface, a reference to
* this application will be automatically set before execution.
*
* @param cmd the command to be executed
@@ -1138,7 +1211,7 @@
* a message is displayed (using the message output object) to the user
* asking if the application should be ended anyway. The resource for this
* message is defined by the passed in parameter, which can be a resource ID
- * or an <code>ApplicationResourceDef</code> object. Only if the user
+ * or an {@code ApplicationResourceDef} object. Only if the user
* confirms this, the application will be ended.
*
* @param msgres defines the resource of the message to be displayed
@@ -1184,14 +1257,57 @@
}
/**
+ * Returns the current <em>exit handler</em> of this application. This is
+ * the object called during a {@code shutdown()} operation. This method
+ * never returns <b>null</b>. If no exit handler has been set, a default one
+ * is returned. The default exit handler terminates this application by
+ * calling {@code System.exit()} with the current exit code.
+ *
+ * @return the exit handler of this application
+ * @since 1.2
+ */
+ public Runnable getExitHandler()
+ {
+ Runnable eh = exitHandler.get();
+ return (eh != null) ? eh : defaultExitHandler;
+ }
+
+ /**
+ * Sets the <em>exit handler</em> for this application. The exit handler is
+ * called eventually by {@code shutdown()}. Its task is to ultimately
+ * terminate this application, e.g. by calling {@code System.exit()}.
+ *
+ * @param handler the exit handler for this application (may be <b>null</b>)
+ * @since 1.2
+ */
+ public void setExitHandler(Runnable handler)
+ {
+ exitHandler.set(handler);
+ }
+
+ /**
+ * Returns the current exit code for this application. This value is only
+ * defined during a {@code shutdown()} operation. This method is intended to
+ * be called by an <em>exit handler</em> to find out the exit status of the
+ * application.
+ *
+ * @return this application's exit status
+ * @see #setExitHandler(Runnable)
+ * @since 1.2
+ */
+ public int getExitCode()
+ {
+ return exitCode;
+ }
+
+ /**
* A hook for shutdown. This method is called by the default implementation
- * of the <code>shutdown()</code> method. Here application specific
+ * of the {@code shutdown()} method. Here application specific
* cleanup can be placed. Note: if this method is overloaded in a derived
* class, the inherited method should be called. This implementation cares
* for storing the user specific configuration if the
- * <code>storeuserconfig</code> property is <b>true</b>. Before that the
- * <code>{@link #updateUserConfiguration() updateUserConfiguration()</code>
- * method is called.
+ * {@code storeuserconfig} property is <b>true</b>. Before that the
+ * {@link #updateUserConfiguration()} method is called.
*/
protected void onShutdown()
{
@@ -1212,7 +1328,7 @@
/**
* Updates the user configuration. This method is called during shutdown if
- * the <code>storeuserconfig</code> configuration property is set. Here
+ * the {@code storeuserconfig} configuration property is set. Here
* actual settings can be written in the user configuration object so that
* they can be restored the next time the application is started again. This
* implementation stores the actual bounds of the main frame in the user
@@ -1232,7 +1348,7 @@
}
/**
- * Calls the <code>canShutdown()</code> method on all registered shutdown
+ * Calls the {@code canShutdown()} method on all registered shutdown
* listeners. If one of them returns <b>false </b>, the remaining listeners
* are not invoked and shutdown process is canceled.
*
@@ -1300,16 +1416,22 @@
/**
* Terminates this application. This method is called by
- * {@link #shutdown(Object, Object)} at the very end. It simply calls
- * <code>System.exit()</code> with the passed in exit code to end this
- * application.
+ * {@link #shutdown(Object, Object)} at the very end. It calls the
+ * <em>exit handler</em>. This object is responsible for actually
+ * terminating this application.
*
* @param exitCode the exit code
+ * @see #setExitHandler(Runnable)
*/
protected void exitApplication(int exitCode)
{
- log.info("Application ends with exit code " + exitCode);
- System.exit(exitCode);
+ if (log.isInfoEnabled())
+ {
+ log.info("Application ends with exit code " + exitCode);
+ log.info("Calling exit handler.");
+ }
+
+ getExitHandler().run();
}
/**
@@ -1345,11 +1467,11 @@
/**
* Starts an application. This method performs all steps to initialize and
- * startup an <code>Application</code> object. First the system properties
+ * startup an {@code Application} object. First the system properties
* are checked if the configuration file is specified. Then the application
* is given the opportunity of processing its command line. Finally its
- * <code>run()</code> method is invoked, which starts the application. A
- * typical use case for this method is to create an <code>Application</code>
+ * {@code run()} method is invoked, which starts the application. A
+ * typical use case for this method is to create an {@code Application}
* instance (which also can be of a derived class) and pass it to this
* method together with the command line array. The rest is done by this
* method.
@@ -1387,7 +1509,7 @@
* A main method for applications based on this framework. This method tries
* to determine the name of the configuration file from system properties.
* Then it creates an instance of this class, initializes it, and calls the
- * <code>startup()</code> method.
+ * {@code startup()} method.
*
* @param args command line arguments
* @throws ApplicationException if an error occurs
@@ -1398,16 +1520,18 @@
}
/**
- * Obtains the central <code>Application</code> instance from the specified
- * <code>BeanContext</code>. This method provides an easy way for obtaining
- * the <code>Application</code> when only the
- * <code>ApplicationContext</code> is known: just call
- * <code>Application myApp = Application.getInstance(appCtx.getBeanContext());</code>
- * . If the application cannot be found in the given bean context, an
+ * Obtains the central {@code Application} instance from the specified
+ * {@code BeanContext}. This method provides an easy way for obtaining
+ * the {@code Application} when only the {@code ApplicationContext} is
+ * known: just call
+ * <pre>
+ * Application myApp = Application.getInstance(appCtx.getBeanContext());
+ * </pre>
+ * If the application cannot be found in the given bean context, an
* exception is thrown.
*
* @param context the bean context
- * @return the <code>Application</code> object defined in this bean context
+ * @return the {@code Application} object defined in this bean context
* @throws net.sf.jguiraffe.di.InjectionException if the application bean
* cannot be found
* @throws IllegalArgumentException if the passed in context is <b>null</b>
@@ -1422,6 +1546,19 @@
}
/**
+ * Helper method for creating a {@code ClassPathLocator} which is configured
+ * with this application's class loader.
+ *
+ * @param resource the name of the resource to be loaded
+ * @return the newly created {@code ClassPathLocator}
+ */
+ private ClassPathLocator cpLocator(String resource)
+ {
+ return ClassPathLocator.getInstance(resource, getClass()
+ .getClassLoader());
+ }
+
+ /**
* Adds a bean to a bean store. This implementation creates a constant bean
* provider for the specified bean.
*
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/IconTag.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/IconTag.java 2012-02-12 18:16:04 UTC (rev 210)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/IconTag.java 2012-07-10 19:49:13 UTC (rev 211)
@@ -31,27 +31,31 @@
* <p>
* This tag supports multiple ways for defining an icon:
* <ul>
- * <li>By specifying an URL using the <code>url</code> attribute.</li>
- * <li>By specifying a resource name using the <code>resource</code> attribute.
- * In this case the icon is searched on the class path.</li>
- * <li>By specifying an arbitrary <code>{@link Locator}</code> pointing to the
- * icon data using the <code>locator</code> attribute. This is actually the
- * generic form of the ways described above. The locator is looked up by its
- * name in the current bean context.</li>
- * <li>With the <code>ref</code> attribute an icon can be referenced that has
- * already been created and stored in the Jelly context (e.g by another
- * <code>icon</code> tag that had a <code>var</code> attribute (see below).</li>
+ * <li>By specifying an URL using the {@code url} attribute.</li>
+ * <li>By specifying a resource name using the {@code resource} attribute. In
+ * this case the icon is searched on the class path. Per default, the current
+ * default class loader is used for resolving the resource name. If a different
+ * class loader is desired, its name (as registered at the current
+ * {@code ClassLoaderProvider}) can be specified using the
+ * {@code resourceLoader} attribute.</li>
+ * <li>By specifying an arbitrary {@link Locator} pointing to the icon data
+ * using the {@code locator} attribute. This is actually the generic form of the
+ * ways described above. The locator is looked up by its name in the current
+ * bean context.</li>
+ * <li>With the {@code ref} attribute an icon can be referenced that has already
+ * been created and stored in the Jelly context (e.g by another {@code icon} tag
+ * that had a {@code var} attribute (see below).</li>
* </ul>
* Exactly one of these attributes must be present.
* </p>
* <p>
* The icon is created using the component manager. Then the tag searches for an
- * enclosing tag that implements the <code>{@link IconSupport}</code> interface.
- * If one is found, this tag is passed the icon. With the <code>var</code>
- * attribute the name of a variable can be specified, which is assigned the
- * icon. So it can be reused. At least one of the ways for storing an icon (the
- * <code>var</code> attribute or an <code>IconSupport</code> tag) must be
- * defined, otherwise an exception is thrown.
+ * enclosing tag that implements the {@link IconSupport} interface. If one is
+ * found, this tag is passed the icon. With the {@code var} attribute the name
+ * of a variable can be specified, which is assigned the icon. So it can be
+ * reused. At least one of the ways for storing an icon (the {@code var}
+ * attribute or an {@code IconSupport} tag) must be defined, otherwise an
+ * exception is thrown.
* </p>
*
* @author Oliver Heger
@@ -65,6 +69,9 @@
/** Stores the resource name of the icon. */
private String resource;
+ /** The name of the class loader for resolving a resource name. */
+ private String resourceLoader;
+
/** Stores the name of a variable, from which the icon should be fetched. */
private String ref;
@@ -97,6 +104,33 @@
}
/**
+ * Returns the name of the class loader for resolving the resource name.
+ *
+ * @return the name of the class loader
+ * @since 1.2
+ */
+ public String getResourceLoader()
+ {
+ return resourceLoader;
+ }
+
+ /**
+ * Setter method for the {@code resourceLoader} attribute. Here the name of
+ * a class loader for resolving the resource name can be provided. A class
+ * loader with this name is looked up using the current
+ * {@code ClassLoaderProvider}. If no class loader has been specified, the
+ * default one is used.
+ *
+ * @param resourceLoader the name of the class loader for resolving class
+ * path resources
+ * @since 1.2
+ */
+ public void setResourceLoader(String resourceLoader)
+ {
+ this.resourceLoader = resourceLoader;
+ }
+
+ /**
* Returns the URL that points to the icon.
*
* @return the URL
@@ -159,10 +193,10 @@
}
/**
- * Returns the name of the <code>Locator</code>, from which the icon should
+ * Returns the name of the {@code Locator}, from which the icon should
* be obtained.
*
- * @return the name of the <code>Locator</code>
+ * @return the name of the {@code Locator}
*/
public String getLocator()
{
@@ -170,12 +204,12 @@
}
/**
- * Setter method of the <code>locator</code> attribute. With this attribute
- * an arbitrary <code>Locator</code> can be specified, from which the icon
+ * Setter method of the {@code locator} attribute. With this attribute
+ * an arbitrary {@code Locator} can be specified, from which the icon
* data is loaded. The locator is looked up in the current bean context
* under the name specified here.
*
- * @param locator the name of <code>Locator</code> with the icon data
+ * @param locator the name of {@code Locator} with the icon data
*/
public void setLocator(String locator)
{
@@ -252,13 +286,13 @@
/**
* Fetches the locator for the icon. This method is called by
- * <code>createIcon()</code> when no reference attribute is specified, i.e.
- * the icon has to be obtained from a locator. If the <code>locator</code>
- * attribute is specified, the locator is looked up from the current bean
- * context. Otherwise a locator is created from the other convenience
- * attributes (<code>url</code> or <code>resource</code>).
+ * {@code createIcon()} when no reference attribute is specified, i.e. the
+ * icon has to be obtained from a locator. If the {@code locator} attribute
+ * is specified, the locator is looked up from the current bean context.
+ * Otherwise a locator is created from the other convenience attributes (
+ * {@code url} or {@code resource}).
*
- * @return the <code>Locator</code> that defines the icon
+ * @return the {@code Locator} that defines the icon
*/
protected Locator fetchLocator()
{
@@ -269,7 +303,10 @@
}
else if (getResource() != null)
{
- return ClassPathLocator.getInstance(getResource());
+ ClassLoader cl =
+ getBuilderData().getBeanContext().getClassLoaderProvider()
+ .getClassLoader(getResourceLoader());
+ return ClassPathLocator.getInstance(getResource(), cl);
}
else
{
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBuilder.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBuilder.java 2012-02-12 18:16:04 UTC (rev 210)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBuilder.java 2012-07-10 19:49:13 UTC (rev 211)
@@ -21,6 +21,7 @@
import net.sf.jguiraffe.di.BeanContext;
import net.sf.jguiraffe.di.BeanCreationListener;
+import net.sf.jguiraffe.di.ClassLoaderProvider;
import net.sf.jguiraffe.di.ConversionHelper;
import net.sf.jguiraffe.di.InvocationHelper;
import net.sf.jguiraffe.di.MutableBeanStore;
@@ -442,6 +443,37 @@
}
/**
+ * Adds all converters in the specified map as default base class converters
+ * to this object using the specified {@code ClassLoaderProvider} to resolve
+ * class names. This method works like the method with the same name, but
+ * converter class are specified by name and resolved dynamically.
+ *
+ * @param converters the map with the converters to be added (must not be
+ * <b>null</b>
+ * @param clp the {@code ClassLoaderProvider} (must not be <b>null</b>)
+ * @throws IllegalArgumentException if the map is <b>null</b> or contains
+ * <b>null</b> entries or the {@code ClassLoaderProvider} is
+ * <b>null</b>
+ * @since 1.2
+ */
+ public void addDefaultBaseClassConverters(
+ Map<String, ? extends Converter> converters, ClassLoaderProvider clp)
+ {
+ checkConvertersMap(converters);
+ if (clp == null)
+ {
+ throw new IllegalArgumentException(
+ "ClassLoaderProvider must not be null!");
+ }
+
+ for (Map.Entry<String, ? extends Converter> e : converters.entrySet())
+ {
+ addDefaultBaseClassConverter(e.getValue(),
+ clp.loadClass(e.getKey(), null));
+ }
+ }
+
+ /**
* Removes all base class converters that have been added to this object
* before.
*/
@@ -985,7 +1017,7 @@
* @throws IllegalArgumentException if the map is invalid
*/
private static void checkConvertersMap(
- Map<Class<?>, ? extends Converter> converters)
+ Map<?, ? extends Converter> converters)
{
if (converters == null)
{
Modified: trunk/core/src/main/java/net/sf/jguiraffe/locators/ClassPathLocator.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/locators/ClassPathLocator.java 2012-02-12 18:16:04 UTC (rev 210)
+++ trunk/core/src/main/java/net/sf/jguiraffe/locators/ClassPathLocator.java 2012-07-10 19:49:13 UTC (rev 211)
@@ -17,21 +17,24 @@
import java.net.URL;
+import org.apache.commons.lang.ObjectUtils;
+
/**
* <p>
- * A specific <code>Locator</code> implementation that can obtain resources from
+ * A specific {@code Locator} implementation that can obtain resources from
* the class path.
* </p>
* <p>
- * This class is initialized with a resource name. The <code>getURL()</code>
+ * This class is initialized with a resource name. The {@code getURL()}
* method tries to find this resource from the class path (using the
* {@link LocatorUtils} class. No caching is performed; each invocation of
- * <code>getURL()</code> will look up the resource. Because a lookup takes the
- * context class loader into account, multiple invocations of
- * <code>getURL()</code> may yield different results.
+ * {@code getURL()} will look up the resource. Because a lookup might depend
+ * on the context class loader, multiple invocations of {@code getURL()} may
+ * yield different results. In addition, it is possible to specify the
+ * class loader to be used for resource lookup.
* </p>
* <p>
- * Instances of this class are created using the <code>getInstance()</code>
+ * Instances of this class are created using the {@code getInstance()}
* factory method. They are immutable and thus can be shared between multiple
* threads.
* </p>
@@ -44,16 +47,21 @@
/** Stores the name of the resource. */
private final String resourceName;
+ /** The default class loader for the resource lookup. */
+ private final ClassLoader classLoader;
+
/**
- * Creates a new instance of <code>ClassPathLocator</code> and sets the name
+ * Creates a new instance of {@code ClassPathLocator} and sets the name
* of the represented resource. To create an instance client code can use
- * the <code>getInstance()</code> factory method.
+ * the {@code getInstance()} factory method.
*
* @param resourceName the resource name
+ * @param cl the default class loader
*/
- private ClassPathLocator(String resourceName)
+ private ClassPathLocator(String resourceName, ClassLoader cl)
{
this.resourceName = resourceName;
+ classLoader = cl;
}
/**
@@ -67,7 +75,21 @@
}
/**
- * Returns a <code>ClassPathLocator</code> instance for the specified
+ * Returns the default class loader used by this locator when looking up the
+ * resource name. This is the class loader passed to the
+ * {@code getInstance()} method. It may be <b>null</b> if no specific class
+ * loader was provided when constructing this object.
+ *
+ * @return the default class loader for resource lookup
+ * @since 1.2
+ */
+ public ClassLoader getClassLoader()
+ {
+ return classLoader;
+ }
+
+ /**
+ * Returns a {@code ClassPathLocator} instance for the specified
* resource name.
*
* @param resourceName the name of the resource (must not be <b>null</b>)
@@ -76,28 +98,46 @@
*/
public static ClassPathLocator getInstance(String resourceName)
{
+ return getInstance(resourceName, null);
+ }
+
+ /**
+ * Returns a {@code ClassPathLocator} instance which looks up the specified
+ * resource name using the given class loader. If a {@code ClassLoader}
+ * reference is provided, this class loader is tried first when resolving
+ * the resource name. Otherwise, the default order of class loaders is used
+ * as implemented in {@link LocatorUtils}.
+ *
+ * @param resourceName the name of the resource (must not be <b>null</b>)
+ * @param cl an optional class loader to be used for resource lookup
+ * @return the instance with this resource name
+ * @throws IllegalArgumentException if the resource name is <b>null</b>
+ * @since 1.2
+ */
+ public static ClassPathLocator getInstance(String resourceName,
+ ClassLoader cl)
+ {
if (resourceName == null)
{
throw new IllegalArgumentException(
"Resource name must not be null!");
}
- return new ClassPathLocator(resourceName);
+ return new ClassPathLocator(resourceName, cl);
}
/**
* Returns the URL for the represented resource. This implementation uses
- * the
- * <code>{@link LocatorUtils#locateResource(String) locateResource()}</code>
- * method of <code>{@link LocatorUtils}</code> to find the resource on the
- * class path. If this fails, an exception is thrown.
+ * the {@link LocatorUtils#locateResource(String, ClassLoader)} method to
+ * find the resource on the class path. If this fails, an exception is
+ * thrown.
*
* @return the URL to the resource
* @throws LocatorException if the resource URL cannot be obtained
*/
public URL getURL()
{
- URL result = LocatorUtils.locateResource(getResourceName());
+ URL result = LocatorUtils.locateResource(getResourceName(), getClassLoader());
if (result == null)
{
throw new LocatorException("Cannot locate resource "
@@ -109,7 +149,8 @@
/**
* Compares this object with another one. Two instances of this class are
- * equal if and only if they refer to the same resource name.
+ * equal if and only if they refer to the same resource name and use the
+ * same default class loader.
*
* @param obj the object to be compared to
* @return a flag whether the objects are equal
@@ -127,7 +168,8 @@
}
ClassPathLocator c = (ClassPathLocator) obj;
- return getResourceName().equals(c.getResourceName());
+ return getResourceName().equals(c.getResourceName())
+ && ObjectUtils.equals(getClassLoader(), c.getClassLoader());
}
/**
@@ -138,7 +180,13 @@
@Override
public int hashCode()
{
- return getResourceName().hashCode();
+ final int factor = 31;
+ int result = getResourceName().hashCode();
+ if (getClassLoader() != null)
+ {
+ result = factor * result + getClassLoader().hashCode();
+ }
+ return result;
}
/**
Modified: trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorConverter.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorConverter.java 2012-02-12 18:16:04 UTC (rev 210)
+++ trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorConverter.java 2012-07-10 19:49:13 UTC (rev 211)
@@ -17,6 +17,8 @@
import java.util.Locale;
+import net.sf.jguiraffe.di.ClassLoaderProvider;
+
import org.apache.commons.beanutils.ConversionException;
import org.apache.commons.beanutils.Converter;
@@ -47,8 +49,12 @@
* <tr>
* <td valign="top">classpath</td>
* <td>Creates a {@link ClassPathLocator} instance. The data is interpreted as a
- * resource name which is looked up on the current class path.</td>
- * <td>classpath:myresource.properties</td>
+ * resource name which is looked up on the current class path. Optionally, a
+ * class loader name can be provided separated by a semicolon. If this is used,
+ * the corresponding class loader is obtained from the
+ * {@link ClassLoaderProvider}; otherwise, the default class loader is used.</td>
+ * <td>classpath:myresource.properties<br>
+ * classpath:myresource.properties;myClassLoader</td>
* </tr>
* <tr>
* <td valign="top">file</td>
@@ -91,6 +97,54 @@
public static final char PREFIX_SEPARATOR = ':';
/**
+ * The separator for a class loader name. This character is evaluated for
+ * locator declarations of type classpath.
+ */
+ private static final char CL_SEPARATOR = ';';
+
+ /** The current class loader provider. */
+ private final ClassLoaderProvider classLoaderProvider;
+
+ /**
+ * Creates a new instance of {@code LocatorConverter} and initializes it
+ * with the given {@code ClassLoaderProvider}. Class loaders for class path
+ * locators are obtained from this provider.
+ *
+ * @param clp the {@code ClassLoaderProvider}
+ * @since 1.2
+ */
+ public LocatorConverter(ClassLoaderProvider clp)
+ {
+ classLoaderProvider = clp;
+ }
+
+ /**
+ * Creates a new instance of {@code LocatorConverter} without a class loader
+ * provider. A converter constructed this way cannot resolve any class
+ * loader names. This constructor exists for reasons of backwards
+ * compatibility. It is recommended to always provide a
+ * {@code ClassLoaderProvider}.
+ */
+ public LocatorConverter()
+ {
+ this(null);
+ }
+
+ /**
+ * Returns the {@code ClassLoaderProvider} used by this converter. This
+ * object is used to determine class loaders when locators for class path
+ * resources are to be created. Result may be <b>null</b> if no
+ * {@code ClassLoaderProvider} has been set.
+ *
+ * @return the current {@code ClassLoaderProvider}
+ * @since 1.2
+ */
+ public ClassLoaderProvider getClassLoaderProvider()
+ {
+ return classLoaderProvider;
+ }
+
+ /**
* Tries to convert the specified object to a {@link Locator}. The
* conversion is based on prefixes as described in the class comment.
*
@@ -159,7 +213,8 @@
LocatorRepresentation locRep = getRepresentation(rep.substring(0, pos));
try
{
- return locRep.createLocator(rep.substring(pos + 1));
+ return locRep.createLocator(rep.substring(pos + 1),
+ getClassLoaderProvider());
}
catch (LocatorException lex)
{
@@ -180,15 +235,34 @@
{
/**
* Creates a {@link ClassPathLocator}. The passed in data is
- * interpreted as the resource name.
+ * interpreted as the resource name. If it contains a class loader
+ * name (separated by a semicolon), this class loader is obtained
+ * from the given {@code ClassLoaderProvider} and passed to the
+ * newly created {@code Locator}.
*
* @param data data for the locator
* @return the new locator instance
*/
@Override
- public Locator createLocator(String data)
+ public Locator createLocator(String data, ClassLoaderProvider clp)
{
- return ClassPathLocator.getInstance(data);
+ String resourceName;
+ String clName;
+ int posCLName = data.indexOf(CL_SEPARATOR);
+ if (posCLName > 0)
+ {
+ resourceName = data.substring(0, posCLName);
+ clName = data.substring(posCLName + 1);
+ }
+ else
+ {
+ resourceName = data;
+ clName = null;
+ }
+ ClassLoader cl =
+ (clp != null) ? clp.getClassLoader(clName) : null;
+
+ return ClassPathLocator.getInstance(resourceName, cl);
}
},
@@ -203,7 +277,7 @@
* @return the new locator instance
*/
@Override
- public Locator createLocator(String data)
+ public Locator createLocator(String data, ClassLoaderProvider clp)
{
return FileLocator.getInstance(data);
}
@@ -220,7 +294,7 @@
* @return the new locator instance
*/
@Override
- public Locator createLocator(String data)
+ public Locator createLocator(String data, ClassLoaderProvider clp)
{
return URLLocator.getInstance(data);
}
@@ -232,8 +306,10 @@
* string. It is provided to the locator.
*
* @param data the data for the new locator
+ * @param clp the provider for class loaders
* @return the locator instance
*/
- public abstract Locator createLocator(String data);
+ public abstract Locator createLocator(String data,
+ ClassLoaderProvider clp);
}
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorUtils.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorUtils.java 2012-02-12 18:16:04 UTC (rev 210)
+++ trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorUtils.java 2012-07-10 19:49:13 UTC (rev 211)
@@ -85,14 +85,20 @@
}
/**
- * Tries to locate a resource in the class path. This method tries the
- * context, the default, and the system class loader to find the resource in
- * the class path.
+ * Tries to locate a resource in the class path using the specified class
+ * loader. If the {@code ClassLoader} parameter is not <b>null</b>, this
+ * class loader is tried first. If this fails, this method tries the
+ * context, the default, and the system class loader (in this order) to find
+ * the resource in the class path. Search stops as soon as the resource is
+ * found.
*
* @param resource the name of the resource
- * @re...
[truncated message content] |
|
From: <oh...@us...> - 2012-02-12 18:16:10
|
Revision: 210
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=210&view=rev
Author: oheger
Date: 2012-02-12 18:16:04 +0000 (Sun, 12 Feb 2012)
Log Message:
-----------
Updates after 1.1 release: Switched to next development version, added a news entry.
Modified Paths:
--------------
trunk/core/pom.xml
trunk/examples/pom.xml
trunk/pom.xml
trunk/src/assembly/bin.xml
trunk/src/assembly/src.xml
trunk/src/site/xdoc/building.xml
trunk/src/site/xdoc/index.xml
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2012-02-11 21:01:08 UTC (rev 209)
+++ trunk/core/pom.xml 2012-02-12 18:16:04 UTC (rev 210)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.1</version>
+ <version>1.2-SNAPSHOT</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
Modified: trunk/examples/pom.xml
===================================================================
--- trunk/examples/pom.xml 2012-02-11 21:01:08 UTC (rev 209)
+++ trunk/examples/pom.xml 2012-02-12 18:16:04 UTC (rev 210)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.1</version>
+ <version>1.2-SNAPSHOT</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-02-11 21:01:08 UTC (rev 209)
+++ trunk/pom.xml 2012-02-12 18:16:04 UTC (rev 210)
@@ -24,7 +24,7 @@
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
<packaging>pom</packaging>
- <version>1.1</version>
+ <version>1.2-SNAPSHOT</version>
<modules>
<module>core</module>
Modified: trunk/src/assembly/bin.xml
===================================================================
--- trunk/src/assembly/bin.xml 2012-02-11 21:01:08 UTC (rev 209)
+++ trunk/src/assembly/bin.xml 2012-02-12 18:16:04 UTC (rev 210)
@@ -1,5 +1,5 @@
<!--
- Copyright 2006-2010 The GUIraffe Team.
+ Copyright 2006-2012 The GUIraffe Team.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Modified: trunk/src/assembly/src.xml
===================================================================
--- trunk/src/assembly/src.xml 2012-02-11 21:01:08 UTC (rev 209)
+++ trunk/src/assembly/src.xml 2012-02-12 18:16:04 UTC (rev 210)
@@ -1,5 +1,5 @@
<!--
- Copyright 2006-2010 The GUIraffe Team.
+ Copyright 2006-2012 The GUIraffe Team.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Modified: trunk/src/site/xdoc/building.xml
===================================================================
--- trunk/src/site/xdoc/building.xml 2012-02-11 21:01:08 UTC (rev 209)
+++ trunk/src/site/xdoc/building.xml 2012-02-12 18:16:04 UTC (rev 210)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright 2006-2010 The JGUIraffe Team.
+ Copyright 2006-2012 The JGUIraffe Team.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
Modified: trunk/src/site/xdoc/index.xml
===================================================================
--- trunk/src/site/xdoc/index.xml 2012-02-11 21:01:08 UTC (rev 209)
+++ trunk/src/site/xdoc/index.xml 2012-02-12 18:16:04 UTC (rev 210)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright 2006-2010 The JGUIraffe Team.
+ Copyright 2006-2012 The JGUIraffe Team.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
@@ -55,6 +55,14 @@
<p>
<table>
<tr>
+ <td>2012-02-12</td>
+ <td>
+ Release 1.1 of <em>JGUIraffe</em>. This is a maintenance release which
+ contains some bug fixes and adds a couple of new features. Maven artifacts
+ have been deployed to the Central Maven repository.
+ </td>
+ </tr>
+ <tr>
<td>2010-10-31</td>
<td>
The <em>JGUIraffe</em> jar has been deployed to the
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-02-11 21:01:14
|
Revision: 209
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=209&view=rev
Author: oheger
Date: 2012-02-11 21:01:08 +0000 (Sat, 11 Feb 2012)
Log Message:
-----------
Tagging release 1.1
Added Paths:
-----------
tags/jguiraffe-1.1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-02-11 20:57:40
|
Revision: 208
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=208&view=rev
Author: oheger
Date: 2012-02-11 20:57:33 +0000 (Sat, 11 Feb 2012)
Log Message:
-----------
Preparations for 1.1 release: created release notes, checkstyle fixes, updated pom version numbers.
Modified Paths:
--------------
trunk/RELEASE-NOTES.txt
trunk/conf/checkstyle.xml
trunk/core/pom.xml
trunk/core/src/changes/changes.xml
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NullInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransformer.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestSingletonBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestBeanTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestShutdownHandlerTag.java
trunk/examples/pom.xml
trunk/pom.xml
Added Paths:
-----------
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/HelperInvocations.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestHelperInvocations.java
Removed Paths:
-------------
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/HelperInvocations.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestHelperInvocations.java
Modified: trunk/RELEASE-NOTES.txt
===================================================================
--- trunk/RELEASE-NOTES.txt 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/RELEASE-NOTES.txt 2012-02-11 20:57:33 UTC (rev 208)
@@ -1,7 +1,7 @@
$Id$
JGUIraffe Library
- Version 1.0
+ Version 1.1
Release Notes
@@ -13,8 +13,40 @@
desktop applications using concepts like declarative UI definition, action and
command objects, and dependency injection.
-This is the first release of JGUIraffe.
+Version 1.1 is a maintenance release. It contains some bug fixes and adds a
+couple of new features. Below is the full list of changes:
+BUG FIXES
+=========
+* [3368750]
+ Builders could throw an undocumented LocatorException. Such exceptions are now
+ caught and re-thrown as BuilderException exceptions.
+
+* [3299754]
+ Fixed a NullPointerException which can occur in the dependency injection
+ framework when looking up beans by classes rather than bean names.
+
+NEW FEATURES
+============
+* [3368763]
+ Added a transformer to StaticTextData objects which simpliefies usage of
+ static text controls in forms.
+
+* [3380233]
+ SwingTableComponentHandler now ensures that a newly selected row (in
+ single-selection mode) becomes visible. If necessary, it changes the
+ position of the scroll pane.
+
+* [3480996]
+ Improvements of the dependency injection framework related to factory beans
+ and builder classes.
+
+OTHER CHANGES
+=============
+* Some versions of dependencies have been updated:
+ Commons Configuration updated to 1.8.
+ EasyMock (test dependency) updated to 3.1.
+
Comprehensive documentation about the JGUIraffe library is available on
the project's web site
http://jguiraffe.sourceforge.net/
Modified: trunk/conf/checkstyle.xml
===================================================================
--- trunk/conf/checkstyle.xml 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/conf/checkstyle.xml 2012-02-11 20:57:33 UTC (rev 208)
@@ -93,7 +93,9 @@
<property name="max" value="100"/>
</module>
<module name="MethodLength"/>
- <module name="ParameterNumber"/>
+ <module name="ParameterNumber">
+ <property name="max" value="10"/>
+ </module>
<!-- Checks for whitespace -->
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/pom.xml 2012-02-11 20:57:33 UTC (rev 208)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.1-SNAPSHOT</version>
+ <version>1.1</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
@@ -55,7 +55,7 @@
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
- <version>1.7</version>
+ <version>1.8</version>
</dependency>
<dependency>
Modified: trunk/core/src/changes/changes.xml
===================================================================
--- trunk/core/src/changes/changes.xml 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/changes/changes.xml 2012-02-11 20:57:33 UTC (rev 208)
@@ -26,7 +26,8 @@
<author email="oh...@so...">Oliver Heger</author>
</properties>
<body>
- <release version="1.1" date="in SVN" description="TBD">
+ <release version="1.1" date="2012-02-12"
+ description="First maintenance release">
<action dev="oheger" issue="3480996" type="add">
Improvements of the dependency injection framework related to factory
beans and builder classes.
Copied: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/HelperInvocations.java (from rev 207, trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/HelperInvocations.java)
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/HelperInvocations.java (rev 0)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/HelperInvocations.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2006-2012 The JGUIraffe Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.jguiraffe.di.impl;
+
+import java.util.Collections;
+import java.util.List;
+
+import net.sf.jguiraffe.di.Dependency;
+import net.sf.jguiraffe.di.DependencyProvider;
+
+/**
+ * <p>
+ * An enumeration class defining some simple helper {@code Invokable}
+ * implementations.
+ * </p>
+ * <p>
+ * There are cases where an {@code Invokable} is needed, but no concrete value
+ * object is available. For instance, when creating a bean an initializer script
+ * may be supported, but it is optional. This enumeration class provides helper
+ * objects which can be used for optional invocations rather than doing
+ * <b>null</b> checks all the time. So this is an application of the <em>null
+ * object pattern</em>.
+ * </p>
+ * <p>
+ * The constants defined by this class are dummy implementations which do not
+ * actually perform any meaningful action. They differ in the values returned by
+ * their implementation of the {@code invoke()} method. Because these
+ * implementations are state-less, they can be defined as enumeration constants
+ * and shared between all interested parties.
+ * </p>
+ *
+ * @author Oliver Heger
+ * @version $Id$
+ * @since 1.1
+ */
+public enum HelperInvocations implements Invokable
+{
+ /**
+ * A specialized {@code Invokable} implementation which always returns
+ * <b>null</b> in its {@code invoke()} implementation.
+ */
+ NULL_INVOCATION
+ {
+ /**
+ * {@inheritDoc} This implementation always returns <b>null</b>.
+ */
+ public Object invoke(DependencyProvider depProvider, Object target)
+ {
+ return null;
+ }
+ },
+
+ /**
+ * An implementation of {@code Invokable} which realizes an identity
+ * invocation. It always returns the object passed in as invocation target
+ * without any further modifications.
+ */
+ IDENTITY_INVOCATION
+ {
+ /**
+ * {@inheritDoc} This implementation always returns the target object.
+ */
+ public Object invoke(DependencyProvider depProvider, Object target)
+ {
+ return target;
+ }
+ };
+
+ /**
+ * Returns the dependencies for this invocation. This implementation always
+ * returns an empty list.
+ *
+ * @return the dependencies of this {@code Invokable}
+ */
+ public List<Dependency> getParameterDependencies()
+ {
+ return Collections.emptyList();
+ }
+}
Property changes on: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/HelperInvocations.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NullInvocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NullInvocation.java 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NullInvocation.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -20,7 +20,6 @@
import net.sf.jguiraffe.di.Dependency;
import net.sf.jguiraffe.di.DependencyProvider;
-import net.sf.jguiraffe.di.impl.providers.HelperInvocations;
/**
* <p>
Deleted: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/HelperInvocations.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/HelperInvocations.java 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/HelperInvocations.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -1,87 +0,0 @@
-/*
- * Copyright 2006-2012 The JGUIraffe Team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License")
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package net.sf.jguiraffe.di.impl.providers;
-
-import java.util.Collections;
-import java.util.List;
-
-import net.sf.jguiraffe.di.Dependency;
-import net.sf.jguiraffe.di.DependencyProvider;
-import net.sf.jguiraffe.di.impl.Invokable;
-
-/**
- * <p>
- * An enumeration class defining some simple helper {@code Invokable}
- * implementations.
- * </p>
- * <p>
- * There are cases where an {@code Invokable} is needed, but no concrete value
- * object is available. For instance, when creating a bean an initializer script
- * may be supported, but it is optional. This enumeration class provides helper
- * objects which can be used for optional invocations rather than doing
- * <b>null</b> checks all the time. So this is an application of the <em>null
- * object pattern</em>.
- * </p>
- * <p>
- * The constants defined by this class are dummy implementations which do not
- * actually perform any meaningful action. They differ in the values returned by
- * their implementation of the {@code invoke()} method. Because these
- * implementations are state-less, they can be defined as enumeration constants
- * and shared between all interested parties.
- * </p>
- *
- * @author Oliver Heger
- * @version $Id$
- * @since 1.1
- */
-public enum HelperInvocations implements Invokable
-{
- /**
- * A specialized {@code Invokable} implementation which always returns
- * <b>null</b> in its {@code invoke()} implementation.
- */
- NULL_INVOCATION
- {
- public Object invoke(DependencyProvider depProvider, Object target)
- {
- return null;
- }
- },
-
- /**
- * An implementation of {@code Invokable} which realizes an identity
- * invocation. It always returns the object passed in as invocation target
- * without any further modifications.
- */
- IDENTITY_INVOCATION
- {
- public Object invoke(DependencyProvider depProvider, Object target)
- {
- return target;
- }
- };
-
- /**
- * Returns the dependencies for this invocation. This implementation always
- * returns an empty list.
- *
- * @return the dependencies of this {@code Invokable}
- */
- public List<Dependency> getParameterDependencies()
- {
- return Collections.emptyList();
- }
-}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -26,6 +26,7 @@
import net.sf.jguiraffe.di.DependencyProvider;
import net.sf.jguiraffe.di.InjectionException;
import net.sf.jguiraffe.di.InvocationHelper;
+import net.sf.jguiraffe.di.impl.HelperInvocations;
import net.sf.jguiraffe.di.impl.Invokable;
/**
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -20,6 +20,7 @@
import net.sf.jguiraffe.di.BeanProvider;
import net.sf.jguiraffe.di.Dependency;
import net.sf.jguiraffe.di.DependencyProvider;
+import net.sf.jguiraffe.di.impl.HelperInvocations;
import net.sf.jguiraffe.di.impl.Invokable;
/**
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentBuilderData.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentBuilderData.java 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentBuilderData.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -49,20 +49,20 @@
* </p>
* <p>
* Especially the components created during a builder operation must be stored
- * somewhere so that they can be combined to a resulting <code>Form</code>
+ * somewhere so that they can be combined to a resulting {@code Form}
* object. For this purpose this class provides an implementation of the
- * <code>ComponentStore</code> interface and registers it as the default
+ * {@code ComponentStore} interface and registers it as the default
* component store. To access the component store interested parties do not
- * directly invoke the methods provided by <code>ComponentStore</code>, but
- * access them through the <code>storeXXXX()</code> and <code>getXXXX()</code>
+ * directly invoke the methods provided by {@code ComponentStore}, but
+ * access them through the {@code storeXXXX()} and {@code getXXXX()}
* methods defined in this class. These methods obtain the current store and
* delegate the call to it. During the builder operation a different
- * <code>ComponentStore</code> can be temporarily set using the
- * <code>pushComponentStore()</code> and <code>popComponentStore()</code>
+ * {@code ComponentStore} can be temporarily set using the
+ * {@code pushComponentStore()} and {@code popComponentStore()}
* methods. This makes it possible for complex components to catch all the
* components created in their context; this way sub forms can be created that
* for instance represent a row in a table. With the
- * <code>pushFormContext()</code> and <code>popFormContext()</code> methods a
+ * {@code pushFormContext()} and {@code popFormContext()} methods a
* complete new form context can be created, i.e. all components will be added
* to the passed in form, and event registration can be performed on the
* components that belong to that form.
@@ -72,43 +72,43 @@
* <em>dependency injection</em> framework, this class implements the
* {@link SimpleBeanStoreImpl.BeanContributor} interface and can therefore
* collaborate with a {@link SimpleBeanStoreImpl}. There is also a
- * <code>getBeanContext()</code> method that returns a context for querying all
+ * {@code getBeanContext()} method that returns a context for querying all
* available beans. Through this context the global beans (as defined by the
* application) can be queried and the objects created during the builder
* operation as well. To access the components and their associated handler
* classes the following naming scheme is used:
* <ul>
* <li>Components (i.e. the platform specific objects created by the
- * <code>ComponentManager</code>) can be accessed using the name that is
+ * {@code ComponentManager}) can be accessed using the name that is
* specified in the Jelly builder script. For instance (if
- * <code>builderData</code> is an instance of <code>ComponentBuilderData</code>)
- * <code>builderData.getBeanContext().getBean("txtFirstName");</code> would
+ * {@code builderData} is an instance of {@code ComponentBuilderData})
+ * {@code builderData.getBeanContext().getBean("txtFirstName");} would
* return the input component associated with the name <em>txtFirstName</em>
- * (probably a <code>JTextField</code> if Swing is used).</li>
- * <li>For accessing the <code>ComponentHandler</code>s for the managed
+ * (probably a {@code JTextField} if Swing is used).</li>
+ * <li>For accessing the {@code ComponentHandler}s for the managed
* components the prefix <em>comp:</em>:
- * <code>builderData.getBeanContext().getBean("comp:txtFirstName");</code> would
- * return the <code>ComponentHandler</code> for the <em>txtFirstName</em>
+ * {@code builderData.getBeanContext().getBean("comp:txtFirstName");} would
+ * return the {@code ComponentHandler} for the <em>txtFirstName</em>
* component.</li>
- * <li><code>FieldHandler</code>s are also accessed using a special prefix:
- * <em>field:</em>. So for obtaining the <code>FieldHandler</code> for the
+ * <li>{@code FieldHandler}s are also accessed using a special prefix:
+ * <em>field:</em>. So for obtaining the {@code FieldHandler} for the
* <em>txtFirstName</em> field you would write
- * <code>builderData.getBeanContext().getBean("field:txtFirstName");</code>.</li>
- * <li>Each component is associated with a <code>WidgetHandler</code>. For
- * obtaining a component's <code>WidgetHandler</code> the prefix
+ * {@code builderData.getBeanContext().getBean("field:txtFirstName");}.</li>
+ * <li>Each component is associated with a {@code WidgetHandler}. For
+ * obtaining a component's {@code WidgetHandler} the prefix
* <em>widget:</em> is used, as in
- * <code>builderData.getBeanContext().getBean("widget:txtFirstName");</code>.</li>
- * <li>The <code>Form</code> object constructed during the current builder
+ * {@code builderData.getBeanContext().getBean("widget:txtFirstName");}.</li>
+ * <li>The {@code Form} object constructed during the current builder
* operation can also be accessed under a special reserved key:
- * <code>Form form = (Form) builderData.getBeanContext().getBean("CURRENT_FORM");</code>
+ * {@code Form form = (Form) builderData.getBeanContext().getBean("CURRENT_FORM");}
* .</li>
- * <li>The <code>BeanContext</code> maintained by this instance can also be
+ * <li>The {@code BeanContext} maintained by this instance can also be
* accessed (e.g. to be injected into a bean defined by the current builder
* script). This can be done using the key <em>CURRENT_CONTEXT</em>.</li>
* <li>The current {@link net.sf.jguiraffe.gui.builder.BuilderData BuilderData}
* object is available under the key <em>BUILDER_DATA</em>.</li>
- * <li>Finally the current <code>ComponentBuilderData</code> instance itself is
- * exposed through the <code>BeanStore</code> implementation. The corresponding
+ * <li>Finally the current {@code ComponentBuilderData} instance itself is
+ * exposed through the {@code BeanStore} implementation. The corresponding
* reserved key is named <em>COMPONENT_BUILDER_DATA</em>.</li>
* </ul>
* To avoid naming conflicts the identifiers for components in the builder
@@ -134,21 +134,21 @@
{
/**
* Constant for the prefix for accessing component handlers. This prefix has
- * to be used for obtaining the <code>ComponentHandler</code> of a
+ * to be used for obtaining the {@code ComponentHandler} of a
* component from the bean context managed by this class.
*/
public static final String KEY_COMPHANDLER_PREFIX = "comp";
/**
* Constant for the prefix for accessing field handlers. This prefix has to
- * be used for obtaining the <code>FieldHandler</code> of a component from
+ * be used for obtaining the {@code FieldHandler} of a component from
* the bean context managed by this class.
*/
public static final String KEY_FIELDHANDLER_PREFIX = "field";
/**
* Constant for the prefix for accessing widget handlers. This prefix has to
- * be used for obtaining the <code>WidgetHandler</code> of a component
+ * be used for obtaining the {@code WidgetHandler} of a component
* from the bean context managed by this class.
*/
public static final String KEY_WIDGETHANDLER_PREFIX = "widget";
@@ -173,9 +173,9 @@
public static final String KEY_CURRENT_CONTEXT = "CURRENT_CONTEXT";
/**
- * Constant for the key for accessing the current <code>BuilderData</code>
+ * Constant for the key for accessing the current {@code BuilderData}
* object from the bean context managed by this class. The
- * <code>BuilderData</code> object allows access to some important,
+ * {@code BuilderData} object allows access to some important,
* application-global objects.
*/
public static final String KEY_BUILDER_DATA = "BUILDER_DATA";
@@ -398,7 +398,7 @@
}
/**
- * Returns the <code>FormEventManager</code> used by this builder
+ * Returns the {@code FormEventManager} used by this builder
* operation. This object can be used to register event handlers at
* components created during the building process.
*
@@ -464,7 +464,7 @@
* Returns a reference to the current component store. This store will be
* used for searching and storing components.
*
- * @return the currently used <code>ComponentStore</code>
+ * @return the currently used {@code ComponentStore}
*/
public ComponentStore getComponentStore()
{
@@ -474,14 +474,14 @@
/**
* Adds a new component store to this object that will replace the current
* store. All newly created components will be added to this store. It will
- * be active until <code>popComponentStore()</code> is called, then the
+ * be active until {@code popComponentStore()} is called, then the
* replaced component store will become the current store again. The purpose
* of this method is to allow complex tags to install their own store so
* that all components created in their context are put into this store.
* Thus it is possible to create sub forms or things like that. Call backs
- * that are registered using the <code>addCallBack()</code> method will
+ * that are registered using the {@code addCallBack()} method will
* also be affected: they are always created in the context of the current
- * component store and executed when <code>popComponentStore()</code> is
+ * component store and executed when {@code popComponentStore()} is
* invoked.
*
* @param store the new store (must not be <b>null</b>)
@@ -505,7 +505,7 @@
/**
* Removes a component store from this object. This method is the counter
- * part of <code>pushComponentStore()</code>. It removes the last pushed
+ * part of {@code pushComponentStore()}. It removes the last pushed
* component store, making the store before to the current store again. If
* any call backs have been registered for the popped component store, they
* will now be invoked.
@@ -518,13 +518,13 @@
{
invokeCallBacks();
FormContextData fcd = formContextStack.pop();
- return fcd.componentStore;
+ return fcd.getComponentStore();
}
/**
* Returns the event manager for the specified form. An event manager is
- * always associated with a <code>Form</code> object; it uses the form's
- * <code>{@link ComponentStore}</code> for retrieving the components, for
+ * always associated with a {@code Form} object; it uses the form's
+ * {@link ComponentStore} for retrieving the components, for
* which event listeners are to be registered. With this method an event
* manager for a given form can be requested. If no such event manager
* exists, it will be created now. Per default there will be a single event
@@ -553,11 +553,11 @@
* called by complex components that create their own (sub) form instances.
* It has the following effect:
* <ul>
- * <li><code>pushComponentStore()</code> is called with the component
+ * <li>{@code pushComponentStore()} is called with the component
* store of the specified form. So newly created components will be added to
* this store.</li>
* <li>The event manager for this form is obtained using
- * <code>getEventManagerForForm()</code> and made to the active event
+ * {@code getEventManagerForForm()} and made to the active event
* manager. This ensures that event listener registration logic for the sub
* form is handled by the appropriate event manager.</li>
* </ul>
@@ -581,20 +581,20 @@
/**
* Removes the outer most form context. This method is the counter part of
- * <code>pushFormContext()</code>. It makes the previous form to the
+ * {@code pushFormContext()}. It makes the previous form to the
* active form again (and ensures that the correct component store and event
* manager are selected. This method must be called after processing of a
* sub form has completed. <em>Note:</em> This method calls
- * <code>popComponentStore()</code> to make the component store of the
+ * {@code popComponentStore()} to make the component store of the
* previous form to the current one. Clients must be aware that the calls to
* the push and pop methods must be symmetric and correctly nested,
* otherwise the association between the current forms and their component
* stores may get lost!
*
- * @return the <code>Form</code> instance of the removed form context
+ * @return the {@code Form} instance of the removed form context
* @throws FormBuilderException if an error occurs when closing the current
* form context
- * @throws IllegalStateException if <code>pushFormContext()</code> has not
+ * @throws IllegalStateException if {@code pushFormContext()} has not
* been called before (and the context to be removed is the root context)
* @see #pushFormContext(Form)
*/
@@ -614,9 +614,9 @@
/**
* Returns the form of the current form context. While the
- * <code>getForm()</code> method always returns the main form of this
+ * {@code getForm()} method always returns the main form of this
* builder operation, this method takes the current form context into
- * account, i.e. if <code>pushFormContext()</code> has been called before,
+ * account, i.e. if {@code pushFormContext()} has been called before,
* the form passed to this method will be returned.
*
* @return the form of the current form context
@@ -629,7 +629,7 @@
}
/**
- * Stores the specified component in the current <code>ComponentStore</code>.
+ * Stores the specified component in the current {@code ComponentStore}.
* From there it can be accessed e.g. if another component defines a
* reference to it.
*
@@ -643,7 +643,7 @@
/**
* Returns the component with the given name from the currently active
- * <code>ComponentStore</code>. If no such component can be found, the
+ * {@code ComponentStore}. If no such component can be found, the
* method tries to find a component handler with this name and extract the
* component object from this handler. If this fails, too, <b>null</b> is
* returned.
@@ -667,7 +667,7 @@
/**
* Stores the given component handler in the current
- * <code>ComponentStore</code>. From there it can later be accessed,
+ * {@code ComponentStore}. From there it can later be accessed,
* which is useful if it is referenced by other tags.
*
* @param name the name of this component handler
@@ -680,7 +680,7 @@
/**
* Returns the component handler with the specified name from the current
- * <code>ComponentStore</code>. If no such handler can be found, return
+ * {@code ComponentStore}. If no such handler can be found, return
* value is <b>null </b>.
*
* @param name the name of the desired handler
@@ -695,8 +695,8 @@
* Stores the specified field handler. This field will be added to the
* internally maintained form object. The component that is associated with
* the field handler will also be accessible by the
- * <code>{@link #getComponent(String)}</code> and
- * <code>{@link #getComponentHandler(String)}</code> methods.
+ * {@link #getComponent(String)} and
+ * {@link #getComponentHandler(String)} methods.
*
* @param name the name of the field
* @param fld the field handler
@@ -709,7 +709,7 @@
/**
* Returns the field handler with the specified name from the current
- * <code>ComponentStore</code> object. If no handler exists with this
+ * {@code ComponentStore} object. If no handler exists with this
* name, <b>null</b> is returned.
*
* @param name the name of the desired field handler
@@ -721,17 +721,17 @@
}
/**
- * Returns a <code>WidgetHandler</code> for accessing the component with
+ * Returns a {@code WidgetHandler} for accessing the component with
* the given name. A component with this name is searched in the current
- * <code>ComponentStore</code> object. If it cannot be found, <b>null</b>
- * will be returned. Otherwise the current <code>ComponentManager</code>
- * is asked to create a <code>WidgetHandler</code> object for this
- * component. A once created <code>WidgetHandler</code> object will be
+ * {@code ComponentStore} object. If it cannot be found, <b>null</b>
+ * will be returned. Otherwise the current {@code ComponentManager}
+ * is asked to create a {@code WidgetHandler} object for this
+ * component. A once created {@code WidgetHandler} object will be
* cached, so that it can be directly returned if it is queried for the
* second time.
*
* @param name the name of the component
- * @return a <code>WidgetHandler</code> object wrapping this component
+ * @return a {@code WidgetHandler} object wrapping this component
*/
public WidgetHandler getWidgetHandler(String name)
{
@@ -739,17 +739,17 @@
}
/**
- * Returns a <code>WidgetHandler</code> object for the specified
+ * Returns a {@code WidgetHandler} object for the specified
* component. This method checks whether already a
- * <code>WidgetHandler</code> for the passed in component has been created
+ * {@code WidgetHandler} for the passed in component has been created
* (by looking it up in the internal cache). If this is the case, it can be
- * directly returned. Otherwise the current <code>ComponentManager</code>
- * is asked to create a new <code>WidgetHandler</code> instance now. If
+ * directly returned. Otherwise the current {@code ComponentManager}
+ * is asked to create a new {@code WidgetHandler} instance now. If
* the passed in component is <b>null</b>, <b>null</b> will be returned.
*
- * @param component the component, for which a <code>WidgetHandler</code>
+ * @param component the component, for which a {@code WidgetHandler}
* is to be obtained
- * @return the <code>WidgetHandler</code> for this component
+ * @return the {@code WidgetHandler} for this component
*/
public WidgetHandler getWidgetHandlerForComponent(Object component)
{
@@ -823,7 +823,7 @@
*/
public void addCallBack(ComponentBuilderCallBack callBack, Object param)
{
- fetchFormContextData().callBacks.add(new CallBackData(callBack, param));
+ fetchFormContextData().getCallBacks().add(new CallBackData(callBack, param));
}
/**
@@ -835,7 +835,7 @@
*/
public void invokeCallBacks() throws FormBuilderException
{
- for (CallBackData cbd : fetchFormContextData().callBacks)
+ for (CallBackData cbd : fetchFormContextData().getCallBacks())
{
cbd.invokeCallBack(this);
}
@@ -865,8 +865,8 @@
/**
* Returns the bean with the given name. This implementation supports the
* names of the stored components. If for a component a
- * <code>ComponentHandler</code>, a <code>FieldHandler</code>, or a
- * <code>WidgetHandler</code> is available, the correspondingly prefixed
+ * {@code ComponentHandler}, a {@code FieldHandler}, or a
+ * {@code WidgetHandler} is available, the correspondingly prefixed
* name is also supported. In addition the other reserved keys as described
* in the header comment can be used.
*
@@ -915,10 +915,10 @@
/**
* Initializes the specified bean store object. This method is called by the
- * builder when the <code>BeanContext</code> used during the builder
+ * builder when the {@code BeanContext} used during the builder
* operation is constructed. This implementation will add the static beans
* to the given store and register this object as
- * <code>BeanContributor</code>.
+ * {@code BeanContributor}.
*
* @param store the store to be initialized
*/
@@ -929,7 +929,7 @@
}
/**
- * Returns the <code>BeanContext</code> managed by this instance. If not
+ * Returns the {@code BeanContext} managed by this instance. If not
* context has been set, a default context will be returned, which allows
* access only to the beans defined in this object (i.e. the components
* created during the builder operation and their handlers). Typically the
@@ -951,9 +951,9 @@
}
/**
- * Allows to set a specific <code>BeanContext</code>. This is not
+ * Allows to set a specific {@code BeanContext}. This is not
* necessary normally, because the bean context is correctly set up. The
- * preferred way is to call <code>initBeanContext()</code> and let this
+ * preferred way is to call {@code initBeanContext()} and let this
* method construct an appropriate hierarchy of contexts and bean stores.
*
* @param ctx the new bean context to be used
@@ -991,7 +991,7 @@
/**
* Stores this instance in the specified context. From there it can be
- * retrieved using the <code>get()</code> method.
+ * retrieved using the {@code get()} method.
*
* @param ctx the Jelly context (must not be <b>null</b>)
* @throws IllegalArgumentException if the context is <b>null</b>
@@ -1038,7 +1038,7 @@
/**
* Creates the event manager object. This method is called when the event
* manager is accessed for the first time. It creates a new instance of
- * <code>FormEventManager</code> and initializes it with the platform
+ * {@code FormEventManager} and initializes it with the platform
* specific event manager obtained from the component manager.
*
* @return the new event manager
@@ -1168,7 +1168,7 @@
private Object param;
/**
- * Creates a new instance of <code>CallBackData</code> and initializes
+ * Creates a new instance of {@code CallBackData} and initializes
* it.
*
* @param cb the call back
@@ -1211,7 +1211,7 @@
private final Collection<CallBackData> callBacks;
/**
- * Creates a new instance of <code>FormComponentData</code> and sets
+ * Creates a new instance of {@code FormComponentData} and sets
* the component store. An empty collection for the call backs will also
* be created.
*
@@ -1222,5 +1222,25 @@
componentStore = store;
callBacks = new LinkedList<CallBackData>();
}
+
+ /**
+ * Returns the {@code ComponentStore}.
+ *
+ * @return the {@code ComponentStore}
+ */
+ public ComponentStore getComponentStore()
+ {
+ return componentStore;
+ }
+
+ /**
+ * Returns the collection with callback objects.
+ *
+ * @return the callBacks the collection with callback objects
+ */
+ public Collection<CallBackData> getCallBacks()
+ {
+ return callBacks;
+ }
}
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransformer.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransformer.java 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransformer.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -266,6 +266,7 @@
* Helper method for obtaining a property value. If the value is defined, it
* is casted and returned. Otherwise the default value is used.
*
+ * @param <T> the type of the value
* @param value the value as object
* @param defValue the default value
* @return the final value
Copied: trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestHelperInvocations.java (from rev 207, trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestHelperInvocations.java)
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestHelperInvocations.java (rev 0)
+++ trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestHelperInvocations.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2006-2012 The JGUIraffe Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.jguiraffe.di.impl;
+
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import net.sf.jguiraffe.di.DependencyProvider;
+import net.sf.jguiraffe.di.impl.HelperInvocations;
+import net.sf.jguiraffe.di.impl.Invokable;
+
+import org.easymock.EasyMock;
+import org.junit.Test;
+
+/**
+ * Test class for {@code HelperInvocations}.
+ *
+ * @author Oliver Heger
+ * @version $Id$
+ */
+public class TestHelperInvocations
+{
+ /**
+ * Tests whether no dependencies are required by the dummy implementations.
+ */
+ @Test
+ public void testGetParameterDependencies()
+ {
+ for (Invokable inv : HelperInvocations.values())
+ {
+ assertTrue("Got dependencies for " + inv, inv
+ .getParameterDependencies().isEmpty());
+ }
+ }
+
+ /**
+ * Creates a mock for the dependency provider which does not expect any
+ * method invocations.
+ *
+ * @return the mock dependency provider
+ */
+ private static DependencyProvider setUpDependencyProvider()
+ {
+ DependencyProvider depProvider =
+ EasyMock.createMock(DependencyProvider.class);
+ EasyMock.replay(depProvider);
+ return depProvider;
+ }
+
+ /**
+ * Tests the invoke() implementation of NullInvocation.
+ */
+ @Test
+ public void testInvokeNullInvocation()
+ {
+ DependencyProvider depProvider = setUpDependencyProvider();
+ assertNull("Wrong result",
+ HelperInvocations.NULL_INVOCATION.invoke(depProvider, this));
+ }
+
+ /**
+ * Tests the invoke() implementation of IdentityInvocation.
+ */
+ @Test
+ public void testInvokeIdentityInvocation()
+ {
+ DependencyProvider depProvider = setUpDependencyProvider();
+ Object target = new Object();
+ assertSame("Wrong result", target,
+ HelperInvocations.IDENTITY_INVOCATION.invoke(depProvider,
+ target));
+ }
+}
Property changes on: trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestHelperInvocations.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestHelperInvocations.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestHelperInvocations.java 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestHelperInvocations.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -1,85 +0,0 @@
-/*
- * Copyright 2006-2012 The JGUIraffe Team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License")
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package net.sf.jguiraffe.di.impl.providers;
-
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import net.sf.jguiraffe.di.DependencyProvider;
-import net.sf.jguiraffe.di.impl.Invokable;
-
-import org.easymock.EasyMock;
-import org.junit.Test;
-
-/**
- * Test class for {@code HelperInvocations}.
- *
- * @author Oliver Heger
- * @version $Id$
- */
-public class TestHelperInvocations
-{
- /**
- * Tests whether no dependencies are required by the dummy implementations.
- */
- @Test
- public void testGetParameterDependencies()
- {
- for (Invokable inv : HelperInvocations.values())
- {
- assertTrue("Got dependencies for " + inv, inv
- .getParameterDependencies().isEmpty());
- }
- }
-
- /**
- * Creates a mock for the dependency provider which does not expect any
- * method invocations.
- *
- * @return the mock dependency provider
- */
- private static DependencyProvider setUpDependencyProvider()
- {
- DependencyProvider depProvider =
- EasyMock.createMock(DependencyProvider.class);
- EasyMock.replay(depProvider);
- return depProvider;
- }
-
- /**
- * Tests the invoke() implementation of NullInvocation.
- */
- @Test
- public void testInvokeNullInvocation()
- {
- DependencyProvider depProvider = setUpDependencyProvider();
- assertNull("Wrong result",
- HelperInvocations.NULL_INVOCATION.invoke(depProvider, this));
- }
-
- /**
- * Tests the invoke() implementation of IdentityInvocation.
- */
- @Test
- public void testInvokeIdentityInvocation()
- {
- DependencyProvider depProvider = setUpDependencyProvider();
- Object target = new Object();
- assertSame("Wrong result", target,
- HelperInvocations.IDENTITY_INVOCATION.invoke(depProvider,
- target));
- }
-}
Modified: trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestSingletonBeanProvider.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestSingletonBeanProvider.java 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestSingletonBeanProvider.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -29,6 +29,7 @@
import net.sf.jguiraffe.di.ReflectionTestClass;
import net.sf.jguiraffe.di.impl.ClassDescription;
import net.sf.jguiraffe.di.impl.ConstructorInvocation;
+import net.sf.jguiraffe.di.impl.HelperInvocations;
import net.sf.jguiraffe.di.impl.Invokable;
import net.sf.jguiraffe.di.impl.NameDependency;
Modified: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestBeanTag.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestBeanTag.java 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestBeanTag.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -29,13 +29,13 @@
import net.sf.jguiraffe.di.impl.ChainedInvocation;
import net.sf.jguiraffe.di.impl.ClassDescription;
import net.sf.jguiraffe.di.impl.ConstructorInvocation;
+import net.sf.jguiraffe.di.impl.HelperInvocations;
import net.sf.jguiraffe.di.impl.Invokable;
import net.sf.jguiraffe.di.impl.MethodInvocation;
import net.sf.jguiraffe.di.impl.SetPropertyInvocation;
import net.sf.jguiraffe.di.impl.providers.ConstantBeanProvider;
import net.sf.jguiraffe.di.impl.providers.ConstructorBeanProvider;
import net.sf.jguiraffe.di.impl.providers.FactoryBeanProvider;
-import net.sf.jguiraffe.di.impl.providers.HelperInvocations;
import net.sf.jguiraffe.di.impl.providers.SingletonBeanProvider;
import net.sf.jguiraffe.gui.builder.di.DIBuilderData;
Modified: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestShutdownHandlerTag.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestShutdownHandlerTag.java 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestShutdownHandlerTag.java 2012-02-11 20:57:33 UTC (rev 208)
@@ -18,9 +18,9 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import net.sf.jguiraffe.di.impl.ChainedInvocation;
+import net.sf.jguiraffe.di.impl.HelperInvocations;
import net.sf.jguiraffe.di.impl.SetPropertyInvocation;
import net.sf.jguiraffe.di.impl.providers.ConstantBeanProvider;
-import net.sf.jguiraffe.di.impl.providers.HelperInvocations;
import org.apache.commons.jelly.JellyContext;
import org.apache.commons.jelly.JellyTagException;
Modified: trunk/examples/pom.xml
===================================================================
--- trunk/examples/pom.xml 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/examples/pom.xml 2012-02-11 20:57:33 UTC (rev 208)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.1-SNAPSHOT</version>
+ <version>1.1</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-02-09 07:30:13 UTC (rev 207)
+++ trunk/pom.xml 2012-02-11 20:57:33 UTC (rev 208)
@@ -24,7 +24,7 @@
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
<packaging>pom</packaging>
- <version>1.1-SNAPSHOT</version>
+ <version>1.1</version>
<modules>
<module>core</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-02-09 07:30:25
|
Revision: 207
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=207&view=rev
Author: oheger
Date: 2012-02-09 07:30:13 +0000 (Thu, 09 Feb 2012)
Log Message:
-----------
[3480996] Improvements of DI framework related to builder classes and factory beans.
Modified Paths:
--------------
trunk/core/src/changes/changes.xml
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ChainedInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/MethodInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NullInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/BeanTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/DITagLibrary.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/DependencyTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/MethodInvocationTag.java
trunk/core/src/site/xdoc/userguide/dibuilder.xml
trunk/core/src/site/xdoc/userguide/user_guide.xml
trunk/core/src/test/java/net/sf/jguiraffe/di/ReflectionTestClass.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/AbstractInvocationTest.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestChainedInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestMethodInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestNullInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestBeanProviders.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestLifeCycleBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestSingletonBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestBeanTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestInvocationTags.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestShutdownHandlerTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/impl/TestJellyBeanBuilder.java
trunk/core/src/test/resources/jelly_scripts/di.jelly
Added Paths:
-----------
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/HelperInvocations.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/InvocationTargetTag.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestHelperInvocations.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestInvocationTargetTag.java
Modified: trunk/core/src/changes/changes.xml
===================================================================
--- trunk/core/src/changes/changes.xml 2012-01-29 18:39:57 UTC (rev 206)
+++ trunk/core/src/changes/changes.xml 2012-02-09 07:30:13 UTC (rev 207)
@@ -27,6 +27,10 @@
</properties>
<body>
<release version="1.1" date="in SVN" description="TBD">
+ <action dev="oheger" issue="3480996" type="add">
+ Improvements of the dependency injection framework related to factory
+ beans and builder classes.
+ </action>
<action dev="oheger" issue="3380233" type="add">
SwingTableComponentHandler now ensures that a newly selected row
(in single-selection mode) becomes visible. If necessary, it changes the
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ChainedInvocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ChainedInvocation.java 2012-01-29 18:39:57 UTC (rev 206)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ChainedInvocation.java 2012-02-09 07:30:13 UTC (rev 207)
@@ -16,6 +16,7 @@
package net.sf.jguiraffe.di.impl;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
@@ -31,28 +32,28 @@
/**
* <p>
- * A special implementation of the <code>Invokable</code> interface that
- * allows aggregating an arbitrary number of <code>Invokable</code> objects to
+ * A special implementation of the {@code Invokable} interface that
+ * allows aggregating an arbitrary number of {@code Invokable} objects to
* a kind of script.
* </p>
* <p>
* The idea behind this class is that other objects implementing the
- * <code>Invokable</code> interface can be added. They can then be executed en
+ * {@code Invokable} interface can be added. They can then be executed en
* bloc. In addition to that a rudimentary support for variables is available:
* the result of an invocation can be assigned to a named variable; later this
* variable can be accessed again using a special
* {@link Dependency}, which can be created by calling the
- * <code>getChainDependency()</code> method.
+ * {@code getChainDependency()} method.
* </p>
* <p>
* The typical life-cycle of an instance of this class is as follows:
* <ol>
* <li>An instance is created using the default constructor.</li>
- * <li>The <code>Invokable</code> objects to be executed are added using the
- * <code>addInvokable()</code> methods. Note that the order of these calls is
+ * <li>The {@code Invokable} objects to be executed are added using the
+ * {@code addInvokable()} methods. Note that the order of these calls is
* important; the added objects are invoked in exactly the same order.</li>
- * <li>After adding all <code>Invokable</code> objects the
- * <code>invoke()</code> method can be called. It triggers all contained
+ * <li>After adding all {@code Invokable} objects the
+ * {@code invoke()} method can be called. It triggers all contained
* objects.</li>
* </ol>
* By making use of different invocation implementations, indeed a kind of
@@ -88,14 +89,17 @@
/** A cache for the so far created chain dependencies. */
private final Map<String, ChainDependency> chainDependencies;
- /** Stores a list with the contained <code>Invokable</code> objects. */
+ /** Stores a list with the contained {@code Invokable} objects. */
private final List<ChainInvocationData> invokables;
+ /** The name of the result variable. */
+ private String resultVariableName;
+
/** A flag whether the variables are to be cleared before an invocation. */
private boolean clearVariables;
/**
- * Creates a new instance of <code>ChainedInvocation</code>
+ * Creates a new instance of {@code ChainedInvocation}.
*/
public ChainedInvocation()
{
@@ -106,11 +110,11 @@
}
/**
- * Adds the specified <code>Invokable</code> object to this object. It
+ * Adds the specified {@code Invokable} object to this object. It
* will become part of the invocation sequence.
*
* @param inv the object to be added (must not be <b>null</b>)
- * @throws IllegalArgumentException if the passed in <code>Invokable</code>
+ * @throws IllegalArgumentException if the passed in {@code Invokable}
* object is <b>null</b>
*/
public void addInvokable(Invokable inv)
@@ -119,14 +123,14 @@
}
/**
- * Adds the specified <code>Invokable</code> object to this object and
+ * Adds the specified {@code Invokable} object to this object and
* initializes its result variable. It will become part of the invocation
* sequence. The result of its invocation will be stored in a local variable
* with the given name.
*
* @param inv the object to be added (must not be <b>null</b>)
* @param result the name of the result variable
- * @throws IllegalArgumentException if the passed in <code>Invokable</code>
+ * @throws IllegalArgumentException if the passed in {@code Invokable}
* object is <b>null</b>
*/
public void addInvokable(Invokable inv, String result)
@@ -135,7 +139,7 @@
}
/**
- * Adds the specified <code>Invokable</code> object to this object and
+ * Adds the specified {@code Invokable} object to this object and
* initializes its result variable and its source object. It will become
* part of the invocation sequence. The result of its invocation will be
* stored in a local variable with the given name. The invocation is not
@@ -147,7 +151,7 @@
* @param result the name of the result variable
* @param source the name of the variable, which contains the target object
* for this invocation
- * @throws IllegalArgumentException if the passed in <code>Invokable</code>
+ * @throws IllegalArgumentException if the passed in {@code Invokable}
* object is <b>null</b>
*/
public void addInvokable(Invokable inv, String result, String source)
@@ -160,7 +164,7 @@
}
/**
- * Returns a list with the <code>Invokable</code> objects that have
+ * Returns a list with the {@code Invokable} objects that have
* already been added to this chain. Manipulations of this list do not
* affect this object. It is empty if nothing has been added yet.
*
@@ -177,7 +181,7 @@
}
/**
- * Returns the number of <code>Invokable</code> objects contained in this
+ * Returns the number of {@code Invokable} objects contained in this
* chain.
*
* @return the size of this chain
@@ -188,10 +192,10 @@
}
/**
- * Returns a special <code>Dependency</code> for a local variable that is
- * used during the execution of a <code>ChainedInvocation</code>. Local
+ * Returns a special {@code Dependency} for a local variable that is
+ * used during the execution of a {@code ChainedInvocation}. Local
* variables are created by specifying result names for
- * <code>Invokable</code>s when they are added to the chain: the result
+ * {@code Invokable}s when they are added to the chain: the result
* of this invocation will then be stored in a variable with this name. If
* this variable later needs to be used for another invocation (e.g. as the
* parameter of a method call), it can be accessed using such a dependency.
@@ -199,28 +203,32 @@
* @param name the name of the local variable to be accessed (must not be
* <b>null</b>)
* @return the dependency for accessing the specified local variable
- * @throws IllegalArgumentException if the name is undefined
+ * @throws IllegalArgumentException if the name is <b>null</b>
*/
public Dependency getChainDependency(String name)
{
- if (name == null)
- {
- throw new IllegalArgumentException(
- "Variable name must not be null!");
- }
+ return fetchVariableDependency(name);
+ }
- ChainDependency cd = chainDependencies.get(name);
- if (cd == null)
- {
- cd = new ChainDependency(name);
- chainDependencies.put(name, cd);
- }
- return cd;
+ /**
+ * Returns a {@code BeanProvider} for the local variable with the given
+ * name. Using this method, variables created during script execution can be
+ * accessed as beans and thus can act as providers for other tags.
+ *
+ * @param name the name of the local variable to be accessed (must not be
+ * <b>null</b>)
+ * @return a {@code BeanProvider} wrapping this local variable
+ * @throws IllegalArgumentException if the name is <b>null</b>
+ * @since 1.1
+ */
+ public BeanProvider getVariableBean(String name)
+ {
+ return fetchVariableDependency(name);
}
/**
* Returns a set with the names of the currently defined local variables.
- * These names can be passed to the <code>getVariable()</code> method for
+ * These names can be passed to the {@code getVariable()} method for
* querying the current values of these variables.
*
* @return a set with the names of the currently existing local variables
@@ -274,12 +282,12 @@
}
/**
- * Sets the value of the <code>clear variables</code> flag. If this flag
+ * Sets the value of the {@code clear variables} flag. If this flag
* is set to <b>true</b> (which is the default value), the storage for
* local variables is cleared at the beginning of an invocation. This
* ensures that values generated by earlier invocations do not affect the
* current invocation. If variables have been set manually using the
- * <code>setVariable()</code> method, it will be necessary to disable this
+ * {@code setVariable()} method, it will be necessary to disable this
* flag; otherwise these variables will also get lost.
*
* @param clearVariables the new value of the flag
@@ -290,9 +298,34 @@
}
/**
+ * Returns the name of the result variable.
+ *
+ * @return the name of the result variable
+ * @since 1.1
+ */
+ public String getResultVariableName()
+ {
+ return resultVariableName;
+ }
+
+ /**
+ * Sets the name of the result variable. If this property is set, the
+ * {@code invoke()} method will not return the passed in target object, but
+ * the object referenced by this variable. This is useful if the script
+ * generates a result.
+ *
+ * @param resultVariableName the name of the result variable
+ * @since 1.1
+ */
+ public void setResultVariableName(String resultVariableName)
+ {
+ this.resultVariableName = resultVariableName;
+ }
+
+ /**
* Returns a list of the dependencies required for this invocation. This
* implementation creates a union of the dependencies of all contained
- * <code>Invokable</code> objects.
+ * {@code Invokable} objects.
*
* @return a list with the dependencies
*/
@@ -308,7 +341,7 @@
/**
* Performs the invocation represented by this class. This implementation
- * will invoke all contained <code>Invokable</code> objects.
+ * will invoke all contained {@code Invokable} objects.
*
* @param depProvider the dependency provider
* @param target the target object
@@ -328,12 +361,12 @@
{
cid.performInvocation(depProvider, target);
}
- return target;
+ return fetchScriptResult(target);
}
/**
* Returns a string representation for this object. This implementation
- * outputs all contained <code>Invokable</code> objects.
+ * outputs all contained {@code Invokable} objects.
*
* @return a string for this object
*/
@@ -362,6 +395,45 @@
}
/**
+ * Returns the {@code ChainDependency} object for the specified variable.
+ *
+ * @param name the name of the variable (must not be <b>null</b>)
+ * @return the corresponding {@code ChainDependency} object
+ * @throws IllegalArgumentException if the variable name is <b>null</b>
+ */
+ private ChainDependency fetchVariableDependency(String name)
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException(
+ "Variable name must not be null!");
+ }
+
+ ChainDependency cd = chainDependencies.get(name);
+ if (cd == null)
+ {
+ cd = new ChainDependency(name);
+ chainDependencies.put(name, cd);
+ }
+ return cd;
+ }
+
+ /**
+ * Determines the result of a script execution. This is per default the
+ * target object. If a result variable name has been specified, the value of
+ * this variable is returned.
+ *
+ * @param target the target of the script execution
+ * @return the result of the script execution
+ * @throws InjectionException if the variable cannot be found
+ */
+ private Object fetchScriptResult(Object target)
+ {
+ return (getResultVariableName() != null) ? getVariable(getResultVariableName())
+ : target;
+ }
+
+ /**
* A data class for storing the contained invocation objects. Instances of
* this class store all information required for executing an invocation.
*/
@@ -377,9 +449,9 @@
private String targetName;
/**
- * Creates a new instance of <code>ChainInvocationData</code>.
+ * Creates a new instance of {@code ChainInvocationData}.
*
- * @param inv the wrapped <code>Invokable</code> object
+ * @param inv the wrapped {@code Invokable} object
* @param result the name of the result variable
* @param target the name of the target variable
*/
@@ -391,9 +463,9 @@
}
/**
- * Returns the managed <code>Invokable</code> object.
+ * Returns the managed {@code Invokable} object.
*
- * @return the internal <code>Invokable</code> object
+ * @return the internal {@code Invokable} object
*/
public Invokable getInvokable()
{
@@ -424,7 +496,7 @@
}
/**
- * An internally used <code>Dependency</code> implementation for accessing
+ * An internally used {@code Dependency} implementation for accessing
* local variables. Instances of this class simply store the name of the
* desired local variable. The getBean() method is implemented by querying
* the map with the local variables.
@@ -435,7 +507,7 @@
private String varName;
/**
- * Creates a new instance of <code>ChainDependency</code> for the
+ * Creates a new instance of {@code ChainDependency} for the
* specified variable.
*
* @param var the name of the variable
@@ -448,7 +520,7 @@
/**
* Resolves this dependency. This implementation ignores all parameters
* and simply returns a pointer to itself. So the
- * <code>BeanProvider</code> implementation is used for querying the
+ * {@code BeanProvider} implementation is used for querying the
* managed bean.
*
* @param store the bean store
@@ -487,13 +559,13 @@
/**
* Returns the dependencies of this bean provider. This implementation
- * returns <b>null</b> because there are no dependencies.
+ * always returns an empty set because there are no dependencies.
*
* @return a set with the dependencies
*/
public Set<Dependency> getDependencies()
{
- return null;
+ return Collections.emptySet();
}
/**
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java 2012-01-29 18:39:57 UTC (rev 206)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java 2012-02-09 07:30:13 UTC (rev 207)
@@ -30,10 +30,10 @@
* invoking a method using reflection. Especially the parameter types and the
* parameter values can be specified. The parameter values are provided as
* {@link Dependency} objects, so they can refer to other beans defined in a
- * <code>BeanStore</code>.
+ * {@code BeanStore}.
* </p>
* <p>
- * The main use case for <code>Invocation</code> objects is the creation and
+ * The main use case for {@code Invocation} objects is the creation and
* initialization of beans performed by the dependency injection framework: At
* first a bean has to be created by invoking one of its constructors. After
* that some initialization methods may be called. In both cases the parameters
@@ -64,7 +64,7 @@
private final ClassDescription targetClass;
/**
- * Creates a new instance of <code>Invocation</code> and initializes it
+ * Creates a new instance of {@code Invocation} and initializes it
* with information about the call parameters. To perform an invocation the
* class has to know the current parameter values and (at least partly) the
* data types of these values. From this information the signature of the
@@ -78,7 +78,7 @@
* invoked
* @param paramTypes an array with the parameter type descriptions
* @param paramValues the current parameter values (defined as
- * <code>Dependency</code> objects); this array must not contain <b>null</b>
+ * {@code Dependency} objects); this array must not contain <b>null</b>
* elements
* @throws IllegalArgumentException if the length of the parameter types
* array does not match the length of the parameter values array or if the
@@ -119,10 +119,10 @@
}
/**
- * Returns the <code>Dependency</code> objects defining the current
+ * Returns the {@code Dependency} objects defining the current
* parameter values.
*
- * @return a list with the <code>Dependency</code> objects for the
+ * @return a list with the {@code Dependency} objects for the
* parameter values
*/
public List<Dependency> getParameterDependencies()
@@ -154,7 +154,7 @@
/**
* Returns an array with the resolved parameters. This method iterates over
* the parameter dependencies and tries to resolve them using the specified
- * <code>DependencyProvider</code>. An array with the resulting beans is
+ * {@code DependencyProvider}. An array with the resulting beans is
* returned. If no parameters are specified (i.e. for invocations of methods
* that do not have arguments), the return value is <b>null</b>.
*
@@ -171,11 +171,7 @@
{
return null;
}
- if (depProvider == null)
- {
- throw new IllegalArgumentException(
- "Dependency provider must not be null!");
- }
+ checkDependencyProvider(depProvider);
Object[] values = new Object[parameterDependencies.size()];
int idx = 0;
@@ -188,8 +184,8 @@
/**
* Returns an array with the concrete parameter classes. This method
- * converts the internally stored <code>ClassDescription</code> objects into
- * <code>Class</code> objects.
+ * converts the internally stored {@code ClassDescription} objects into
+ * {@code Class} objects.
*
* @param depProvider the dependency provider for resolving the classes
* @return an array with the parameter classes
@@ -217,8 +213,8 @@
* target class name, the parameters, and further information provided by
* sub classes). This implementation will print the concrete class name,
* followed by an opening square bracket. Then
- * <code>invocationInfoToString()</code>, and
- * <code>parametersToString()</code> are called. Finally a closing square
+ * {@code invocationInfoToString()}, and
+ * {@code parametersToString()} are called. Finally a closing square
* bracket is output.
*
* @return a string for this object
@@ -238,7 +234,7 @@
/**
* Creates a string with additional information about this invocation. This
- * method is called by the default <code>toString()</code> implementation.
+ * method is called by the default {@code toString()} implementation.
* It adds the target class to the buffer if it is defined.
*
* @param buf the target buffer
@@ -254,8 +250,8 @@
/**
* Creates a string representation of the current parameter values. This
* implementation iterates over all parameter dependencies and invokes their
- * <code>toString()</code> method. It is called by the
- * <code>toString()</code> method.
+ * {@code toString()} method. It is called by the
+ * {@code toString()} method.
*
* @param buf the target buffer
*/
@@ -279,6 +275,23 @@
}
/**
+ * Checks whether a valid {@code DependencyProvider} has been specified.
+ *
+ * @param depProvider the provider to be checked
+ * @throws IllegalArgumentException if the {@code DependencyProvider} is
+ * undefined
+ * @since 1.1
+ */
+ protected static void checkDependencyProvider(DependencyProvider depProvider)
+ {
+ if (depProvider == null)
+ {
+ throw new IllegalArgumentException(
+ "Dependency provider must not be null!");
+ }
+ }
+
+ /**
* Initializes the array with the parameter types. <b>null</b> may have
* been passed in, which has to be converted to a valid value.
*
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/MethodInvocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/MethodInvocation.java 2012-01-29 18:39:57 UTC (rev 206)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/MethodInvocation.java 2012-02-09 07:30:13 UTC (rev 207)
@@ -15,6 +15,10 @@
*/
package net.sf.jguiraffe.di.impl;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
import net.sf.jguiraffe.di.Dependency;
import net.sf.jguiraffe.di.DependencyProvider;
import net.sf.jguiraffe.di.InjectionException;
@@ -32,7 +36,7 @@
* <p>
* Once initialized, an instance is immutable. So it can easily be shared
* between multiple components and threads without having to care about
- * synchronization issues. The <code>invoke()</code> method actually executes
+ * synchronization issues. The {@code invoke()} method actually executes
* the corresponding method.
* </p>
*
@@ -41,6 +45,9 @@
*/
public class MethodInvocation extends Invocation implements Invokable
{
+ /** Stores the target dependency for this invocation. */
+ private final Dependency targetDependency;
+
/** Stores the name of the method to invoke. */
private final String methodName;
@@ -48,7 +55,7 @@
private final boolean staticInvocation;
/**
- * Creates a new instance of <code>MethodInvocation</code> for non-static
+ * Creates a new instance of {@code MethodInvocation} for non-static
* method invocations. This constructor sets the target class to <b>null</b>,
* so that it can only be derived from the target instance (which prohibits
* static method invocations).
@@ -57,7 +64,7 @@
* <b>null</b>)
* @param paramTypes an array with the parameter types
* @param paramValues the current parameter values (defined as
- * <code>Dependency</code> objects); this array must not contain <b>null</b>
+ * {@code Dependency} objects); this array must not contain <b>null</b>
* elements
* @throws IllegalArgumentException if the length of the parameter types
* array does not match the length of the parameter values array, or if the
@@ -71,7 +78,7 @@
}
/**
- * Creates a new instance of <code>MethodInvocation</code> and initializes
+ * Creates a new instance of {@code MethodInvocation} and initializes
* it with information about the method to invoke and the target class.
*
* @param targetClass the class, on which the method is to be invoked
@@ -79,7 +86,7 @@
* <b>null</b>)
* @param paramTypes an array with the parameter types
* @param paramValues the current parameter values (defined as
- * <code>Dependency</code> objects); this array must not contain <b>null</b>
+ * {@code Dependency} objects); this array must not contain <b>null</b>
* elements
* @throws IllegalArgumentException if the length of the parameter types
* array does not match the length of the parameter values array, or if the
@@ -94,10 +101,10 @@
}
/**
- * Creates a new instance of <code>MethodInvocation</code> and fully
- * initializes it. This constructor takes all information required for
- * arbitrary method invocations. Refer to the base class for a detailed
- * explanation of the arguments.
+ * Creates a new instance of {@code MethodInvocation} and initializes most
+ * of the properties. This constructor is appropriate for static or
+ * non-static invocations which are performed on the target object passed to
+ * the {@code invoke()} method.
*
* @param targetClass the class, on which the method is to be invoked
* @param methodName the name of the method to be invoked (must not be
@@ -105,7 +112,7 @@
* @param isStatic determines whether a static method is to be invoked
* @param paramTypes an array with the parameter types
* @param paramValues the current parameter values (defined as
- * <code>Dependency</code> objects); this array must not contain <b>null</b>
+ * {@code Dependency} objects); this array must not contain <b>null</b>
* elements
* @throws IllegalArgumentException if the length of the parameter types
* array does not match the length of the parameter values array, or if the
@@ -118,6 +125,39 @@
boolean isStatic, ClassDescription[] paramTypes,
Dependency... paramValues)
{
+ this(targetClass, null, methodName, isStatic, paramTypes, paramValues);
+ }
+
+ /**
+ * Creates a new instance of {@code MethodInvocation} and fully initializes
+ * it. This constructor takes all information required for arbitrary method
+ * invocations. It is especially possible to define a dependency for the
+ * target object. If set, this dependency is resolved during invocation; a
+ * target object is then ignored. Refer to the base class for a detailed
+ * explanation of the arguments.
+ *
+ * @param targetClass the class, on which the method is to be invoked
+ * @param targetDep an optional {@code Dependency} to the target bean on
+ * which the method should be invoked
+ * @param methodName the name of the method to be invoked (must not be
+ * <b>null</b>)
+ * @param isStatic determines whether a static method is to be invoked
+ * @param paramTypes an array with the parameter types
+ * @param paramValues the current parameter values (defined as
+ * {@code Dependency} objects); this array must not contain
+ * <b>null</b> elements
+ * @throws IllegalArgumentException if the length of the parameter types
+ * array does not match the length of the parameter values array, or
+ * if the values array contains <b>null</b> elements, or if the
+ * method name is undefined, or if the static flag is <b>true</b>,
+ * but no target class is defined
+ * @see Invocation#Invocation(Class, Class[], Dependency...)
+ * @since 1.1
+ */
+ public MethodInvocation(ClassDescription targetClass, Dependency targetDep,
+ String methodName, boolean isStatic, ClassDescription[] paramTypes,
+ Dependency... paramValues)
+ {
super(targetClass, paramTypes, paramValues);
if (methodName == null)
{
@@ -129,6 +169,7 @@
"Need a target class for a static invocation!");
}
+ targetDependency = targetDep;
this.methodName = methodName;
staticInvocation = isStatic;
}
@@ -155,31 +196,66 @@
}
/**
+ * Returns the target {@code Dependency} of this {@code MethodInvocation}.
+ * This dependency defines the bean on which the method is to be invoked. If
+ * there is no target dependency, result is <b>null</b>.
+ *
+ * @return the target {@code Dependency}
+ * @since 1.1
+ */
+ public Dependency getTargetDependency()
+ {
+ return targetDependency;
+ }
+
+ /**
+ * {@inheritDoc} This implementation adds the dependency to the invocation
+ * target if it exists.
+ */
+ @Override
+ public List<Dependency> getParameterDependencies()
+ {
+ List<Dependency> deps = super.getParameterDependencies();
+ Dependency depTarget = getTargetDependency();
+ if (depTarget == null)
+ {
+ return deps;
+ }
+
+ List<Dependency> result = new ArrayList<Dependency>(deps.size() + 1);
+ result.addAll(deps);
+ result.add(depTarget);
+ return Collections.unmodifiableList(result);
+ }
+
+ /**
* Invokes the corresponding method on the specified target instance. The
* method's result is returned. The behavior of this method depends on the
- * {@link #isStaticInvocation()} flag. If it is set, a passed
- * in target object is ignored and a static method invocation on the target
- * class is performed. Otherwise, if a non <b>null</b> target object is
- * passed in, the target class is derived from this instance (an eventually
- * set target class is ignored).
+ * {@link #isStaticInvocation()} flag. If it is set, a passed in target
+ * object is ignored and a static method invocation on the target class is
+ * performed. Otherwise, if a non <b>null</b> target object is passed in,
+ * the target class is derived from this instance (an eventually set target
+ * class is ignored).
*
* @param depProvider the dependency provider for resolving the parameters
- * (must not be <b>null</b>)
+ * (must not be <b>null</b>)
* @param target the target instance, on which to invoke the method
* @return the method's return value
* @throws InjectionException in case of an error
- * @throws IllegalArgumentException if the dependency provider is <b>null</b>
+ * @throws IllegalArgumentException if the dependency provider is
+ * <b>null</b>
*/
public Object invoke(DependencyProvider depProvider, Object target)
{
- if (target == null && getTargetClass() == null)
+ Object targetObject = resolveTarget(depProvider, target);
+ if (targetObject == null && getTargetClass() == null)
{
throw new InjectionException(
"Target class and instance must not both be null!");
}
Object[] values = getResolvedParameters(depProvider);
- if (isStaticInvocation() || target == null)
+ if (isStaticInvocation() || targetObject == null)
{
return depProvider.getInvocationHelper().invokeStaticMethod(
getTargetClass().getTargetClass(depProvider),
@@ -188,8 +264,8 @@
else
{
return depProvider.getInvocationHelper().invokeInstanceMethod(
- target, getMethodName(), getParameterClasses(depProvider),
- values);
+ targetObject, getMethodName(),
+ getParameterClasses(depProvider), values);
}
}
@@ -209,4 +285,27 @@
}
buf.append(getMethodName());
}
+
+ /**
+ * Resolves the target object of this method invocation. If a target
+ * dependency is set, it is resolved, and the resulting object is used as
+ * target.
+ *
+ * @param depProvider the {@code DependencyProvider}
+ * @param target the target object passed to {@code invoke()}
+ * @return the target object of the invocation
+ * @throws IllegalArgumentException if the {@code DependencyProvider} is
+ * <b>null</b>
+ */
+ private Object resolveTarget(DependencyProvider depProvider, Object target)
+ {
+ Dependency dep = getTargetDependency();
+ if (dep == null)
+ {
+ return target;
+ }
+
+ checkDependencyProvider(depProvider);
+ return depProvider.getDependentBean(dep);
+ }
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NullInvocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NullInvocation.java 2012-01-29 18:39:57 UTC (rev 206)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NullInvocation.java 2012-02-09 07:30:13 UTC (rev 207)
@@ -20,6 +20,7 @@
import net.sf.jguiraffe.di.Dependency;
import net.sf.jguiraffe.di.DependencyProvider;
+import net.sf.jguiraffe.di.impl.providers.HelperInvocations;
/**
* <p>
@@ -36,7 +37,11 @@
*
* @author Oliver Heger
* @version $Id$
+ * @deprecated Use {@link HelperInvocations} instead; it provides some dummy
+ * implementations of the {@code Invokable} interface which are useful in some
+ * situations where a full-blown implementation is not required.
*/
+@Deprecated
public final class NullInvocation implements Invokable
{
/** The default instance of this class. */
Added: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/HelperInvocations.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/HelperInvocations.java (rev 0)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/HelperInvocations.java 2012-02-09 07:30:13 UTC (rev 207)
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2006-2012 The JGUIraffe Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.jguiraffe.di.impl.providers;
+
+import java.util.Collections;
+import java.util.List;
+
+import net.sf.jguiraffe.di.Dependency;
+import net.sf.jguiraffe.di.DependencyProvider;
+import net.sf.jguiraffe.di.impl.Invokable;
+
+/**
+ * <p>
+ * An enumeration class defining some simple helper {@code Invokable}
+ * implementations.
+ * </p>
+ * <p>
+ * There are cases where an {@code Invokable} is needed, but no concrete value
+ * object is available. For instance, when creating a bean an initializer script
+ * may be supported, but it is optional. This enumeration class provides helper
+ * objects which can be used for optional invocations rather than doing
+ * <b>null</b> checks all the time. So this is an application of the <em>null
+ * object pattern</em>.
+ * </p>
+ * <p>
+ * The constants defined by this class are dummy implementations which do not
+ * actually perform any meaningful action. They differ in the values returned by
+ * their implementation of the {@code invoke()} method. Because these
+ * implementations are state-less, they can be defined as enumeration constants
+ * and shared between all interested parties.
+ * </p>
+ *
+ * @author Oliver Heger
+ * @version $Id$
+ * @since 1.1
+ */
+public enum HelperInvocations implements Invokable
+{
+ /**
+ * A specialized {@code Invokable} implementation which always returns
+ * <b>null</b> in its {@code invoke()} implementation.
+ */
+ NULL_INVOCATION
+ {
+ public Object invoke(DependencyProvider depProvider, Object target)
+ {
+ return null;
+ }
+ },
+
+ /**
+ * An implementation of {@code Invokable} which realizes an identity
+ * invocation. It always returns the object passed in as invocation target
+ * without any further modifications.
+ */
+ IDENTITY_INVOCATION
+ {
+ public Object invoke(DependencyProvider depProvider, Object target)
+ {
+ return target;
+ }
+ };
+
+ /**
+ * Returns the dependencies for this invocation. This implementation always
+ * returns an empty list.
+ *
+ * @return the dependencies of this {@code Invokable}
+ */
+ public List<Dependency> getParameterDependencies()
+ {
+ return Collections.emptyList();
+ }
+}
Property changes on: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/HelperInvocations.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java 2012-01-29 18:39:57 UTC (rev 206)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java 2012-02-09 07:30:13 UTC (rev 207)
@@ -27,15 +27,14 @@
import net.sf.jguiraffe.di.InjectionException;
import net.sf.jguiraffe.di.InvocationHelper;
import net.sf.jguiraffe.di.impl.Invokable;
-import net.sf.jguiraffe.di.impl.NullInvocation;
/**
* <p>
- * An abstract base class for <code>BeanProvider</code> implementations with
+ * An abstract base class for {@code BeanProvider} implementations with
* life-cycle support.
* </p>
* <p>
- * A <code>LifeCycleBeanProvider</code> has the following properties:
+ * A {@code LifeCycleBeanProvider} has the following properties:
* <ul>
* <li>A (usually simple) {@link BeanProvider} for actually
* creating an instance of the managed bean.</li>
@@ -46,32 +45,32 @@
* <p>
* This base class provides basic functionality for the creation and
* initialization of beans. It also implements the methods related to life-cycle
- * support of the <code>BeanProvider</code> interface in a meaningful way.
+ * support of the {@code BeanProvider} interface in a meaningful way.
* There are two methods that are intended to be called by concrete sub classes:
- * <code>createBean()</code> and <code>fetchBean()</code>.
+ * {@code createBean()} and {@code fetchBean()}.
* </p>
* <p>
- * <code>createBean()</code>, as its name implies, creates a new instance of
+ * {@code createBean()}, as its name implies, creates a new instance of
* the managed bean class. This is done by invoking the
- * <code>BeanProvider</code> for creating new beans. After that the
- * <code>Invokable</code> object is called on the newly created bean. The
+ * {@code BeanProvider} for creating new beans. After that the
+ * {@code Invokable} object is called on the newly created bean. The
* creation of a bean through the bean provider may cause an endless loop if
* there are cyclic dependencies (e.g. bean A needs bean B as a constructor
* argument and vice verse). Such cycles are detected and lead to a
- * <code>InjectionException</code> exception being thrown.
+ * {@code InjectionException} exception being thrown.
* </p>
* <p>
- * The <code>fetchBean()</code> method checks whether a bean instance has
+ * The {@code fetchBean()} method checks whether a bean instance has
* already been created. If this is the case, it is directly returned. Otherwise
- * <code>createBean()</code> is called for creating a new instance. Depending
+ * {@code createBean()} is called for creating a new instance. Depending
* on their semantics derived classes decide, which of these methods to call.
- * This decision must be implemented in the <code>getBean()</code> method; all
- * other methods defined by the <code>BeanProvider</code> interface are
+ * This decision must be implemented in the {@code getBean()} method; all
+ * other methods defined by the {@code BeanProvider} interface are
* already implemented by this base class.
* </p>
* <p>
* Implementation note: This class is intended to be used together with a
- * correct implementation of the <code>BeanContext</code> interface. It is not
+ * correct implementation of the {@code BeanContext} interface. It is not
* thread-safe by itself, but if the bean context handles transactions properly,
* it can be used in an environment with multiple threads accessing the bean
* context concurrently.
@@ -112,9 +111,9 @@
private volatile boolean instanceCreated;
/**
- * Creates a new instance of <code>LifeCycleBeanProvider</code> and
- * initializes it with the <code>BeanProvider</code> for creating the bean
- * instance and an <code>Invokable</code> for initializing it.
+ * Creates a new instance of {@code LifeCycleBeanProvider} and
+ * initializes it with the {@code BeanProvider} for creating the bean
+ * instance and an {@code Invokable} for initializing it.
*
* @param createProvider the bean provider for creating a bean instance
* (must not be <b>null</b>)
@@ -131,12 +130,14 @@
"Creation bean provider must not be null!");
}
beanCreator = createProvider;
- beanInitializer = (initinv != null) ? initinv : NullInvocation.INSTANCE;
+ beanInitializer =
+ (initinv != null) ? initinv
+ : HelperInvocations.IDENTITY_INVOCATION;
}
/**
- * Creates a new instance of <code>LifeCycleBeanProvider</code> and
- * initializes it with the <code>BeanProvider</code> for creating the bean
+ * Creates a new instance of {@code LifeCycleBeanProvider} and
+ * initializes it with the {@code BeanProvider} for creating the bean
* instance.
*
* @param createProvider the bean provider for creating a bean instance
@@ -149,7 +150,7 @@
}
/**
- * Returns the <code>BeanProvider</code> that is responsible for creating
+ * Returns the {@code BeanProvider} that is responsible for creating
* a new bean instance.
*
* @return the bean provider for creating new bean instances
@@ -160,7 +161,7 @@
}
/**
- * Returns the <code>Invokable</code> object responsible for initializing
+ * Returns the {@code Invokable} object responsible for initializing
* the newly created bean. This method never returns <b>null</b>. If no
* initializer was set, a default initializer object (that does not have any
* effect) is returned.
@@ -174,7 +175,7 @@
/**
* Returns the class of the bean managed by this provider. This class is
- * determined by the <code>BeanProvider</code> for creating new bean
+ * determined by the {@code BeanProvider} for creating new bean
* instances.
*
* @param dependencyProvider the dependency provider
@@ -195,15 +196,21 @@
*/
public Set<Dependency> getDependencies()
{
- List<Dependency> initDeps = getBeanInitializer().getParameterDependencies();
+ List<Dependency> initDeps =
+ getBeanInitializer().getParameterDependencies();
+ Set<Dependency> creatorDeps = getBeanCreator().getDependencies();
+
if (initDeps.isEmpty())
{
- return getBeanCreator().getDependencies();
+ return creatorDeps;
}
else
{
Set<Dependency> result = new HashSet<Dependency>();
- result.addAll(getBeanCreator().getDependencies());
+ if (creatorDeps != null)
+ {
+ result.addAll(creatorDeps);
+ }
result.addAll(initDeps);
return result;
}
@@ -266,7 +273,9 @@
{
try
{
- initBean(bean, dependencyProvider);
+ Object initBean =
+ fetchInitializedBeanInstance(bean, dependencyProvider);
+ bean = initBean;
instanceCreated = true;
}
finally
@@ -328,7 +337,9 @@
canInit = canInitialize(dependencyProvider);
if (canInit)
{
- initBean(bean, dependencyProvider);
+ bean =
+ fetchInitializedBeanInstance(bean,
+ dependencyProvider);
}
else
{
@@ -356,7 +367,7 @@
/**
* Returns the bean instance created by this provider. If no instance has
- * been created yet, this is done now by invoking <code>createBean()</code>.
+ * been created yet, this is done now by invoking {@code createBean()}.
* Otherwise the bean instance is directly returned. If the dependencies
* contain cyclic references, it is possible that a bean instance is
* returned, which has not yet been fully initialized. Cycles that cannot be
@@ -412,7 +423,7 @@
/**
* Resets any so far created bean. This method can be called by derived
* classes to reset this bean provider. In a following call to
- * <code>fetchBean()</code> a completely new bean will be created.
+ * {@code fetchBean()} a completely new bean will be created.
*/
protected void resetBean()
{
@@ -422,7 +433,7 @@
/**
* Creates a new bean instance. This method is called by
- * <code>createBean()</code> for actually creating the bean.
+ * {@code createBean()} for actually creating the bean.
*
* @param dependencyProvider the dependency provider
* @return the new bean instance
@@ -443,7 +454,11 @@
* @param bean the bean to initialize
* @param dependencyProvider the dependency provider
* @throws InjectionException if an error occurs
+ * @deprecated This method is not called any more during bean creation;
+ * instead {@link #fetchInitializedBeanInstance(Object, DependencyProvider)}
+ * is invoked
*/
+ @Deprecated
protected void initBean(Object bean, DependencyProvider dependencyProvider)
{
getBeanInitializer().invoke(dependencyProvider, bean);
@@ -451,9 +466,34 @@
}
/**
+ * Returns the initialized bean instance. This method is called by
+ * {@code createBean()} for each new bean instance. Its purpose is to
+ * execute the initializer script on the bean. This implementation invokes
+ * the initializer and notifies the {@code DependencyProvider} about the
+ * creation of a new bean. Note that the bean returned by the initializer
+ * script is the result of this method. Thus it is possible that a different
+ * bean than passed to the method becomes the managed bean of this provider.
+ * However, if the initializer returns <b>null</b>, the passed in bean is
+ * returned.
+ *
+ * @param bean the bean to initialize
+ * @param dependencyProvider the dependency provider
+ * @return the bean instance
+ * @throws InjectionException if an error occurs
+ * @since 1.1
+ */
+ protected Object fetchInitializedBeanInstance(Object bean,
+ DependencyProvider dependencyProvider)
+ {
+ Object initBean = getBeanInitializer().invoke(dependencyProvider, bean);
+ dependencyProvider.beanCreated(initBean, this);
+ return (initBean != null) ? initBean : bean;
+ }
+
+ /**
* Creates a specialized dependency provider with the ability of generating
* meaningful error messages in case of cyclic dependencies. This method is
- * called by <code>createBean()</code> before the creator is invoked.
+ * called by {@code createBean()} before the creator is invoked.
*
* @param wrappedProvider the dependency provider to be wrapped
* @return the diagnostic dependency provider
@@ -465,10 +505,10 @@
}
/**
- * A specialized <code>DependencyProvider</code> implementation that is
+ * A specialized {@code DependencyProvider} implementation that is
* used for generating meaningful error messages for cyclic dependencies.
* This implementation stores the currently processed dependency in a member
- * field. If later a reentrant call to <code>createBean()</code> happens,
+ * field. If later a reentrant call to {@code createBean()} happens,
* we are able to determine, which dependency caused the problem.
*/
private class DiagnosticDependencyProvider implements DependencyProvider
@@ -477,7 +517,7 @@
private final DependencyProvider wrappedProvider;
/**
- * Creates a new instance of <code>DiagnosticDependencyProvider</code>
+ * Creates a new instance of {@code DiagnosticDependencyProvider}
* and sets the dependency provider to be wrapped.
*
* @param d the wrapped dependency provider
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java 2012-01-29 18:39:57 UTC (rev 206)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java 2012-02-09 07:30:13 UTC (rev 207)
@@ -21,7 +21,6 @@
import net.sf.jguiraffe.di.Dependency;
import net.sf.jguiraffe.di.DependencyProvider;
import net.sf.jguiraffe.di.impl.Invokable;
-import net.sf.jguiraffe.di.impl.NullInvocation;
/**
* <p>
@@ -76,7 +75,7 @@
}
/**
- * Creates a new instance of <code>SingletonBeanProvider</code> and
+ * Creates a new instance of {@code SingletonBeanProvider} and
* initializes it with the bean provider for creating a bean instance and
* the invocation object for performing initialization.
*
@@ -93,7 +92,7 @@
}
/**
- * Creates a new instance of <code>SingletonBeanProvider</code> and
+ * Creates a new instance of {@code SingletonBeanProvider} and
* initializes it with the bean provider for creating a bean instance.
*
* @param createProvider the bean provider used for creating a new bean
@@ -183,6 +182,6 @@
Invokable fetchShutdownInvokable()
{
return (getShutdownHandler() != null) ? getShutdownHandler()
- : NullInvocation.INSTANCE;
+ : HelperInvocations.NULL_INVOCATION;
}
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/BeanTag.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/BeanTag.java 2012-01-29 18:39:57 UTC (rev 206)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/BeanTag.java 2012-02-09 07:30:13 UTC (rev 207)
@@ -16,6 +16,7 @@
package net.sf.jguiraffe.gui.builder.di.tags;
import net.sf.jguiraffe.di.BeanProvider;
+import net.sf.jguiraffe.di.DependencyProvider;
import net.sf.jguiraffe.di.impl.ChainedInvocation;
import net.sf.jguiraffe.di.impl.ClassDescription;
import net.sf.jguiraffe.di.impl.ConstructorInvocation;
@@ -24,6 +25,7 @@
import net.sf.jguiraffe.di.impl.providers.ConstantBeanProvider;
import net.sf.jguiraffe.di.impl.providers.ConstructorBeanProvider;
import net.sf.jguiraffe.di.impl.providers.FactoryBeanProvider;
+import net.sf.jguiraffe.di.impl.providers.SimpleBeanProvider;
import net.sf.jguiraffe.di.impl.providers.SingletonBeanProvider;
import org.apache.commons.jelly.JellyTagException;
@@ -45,7 +47,7 @@
* </pre>
*
* </li>
- * <li>With the <code>store</code> attribute the name of the
+ * <li>With the {@code store} attribute the name of the
* {@link net.sf.jguiraffe.di.BeanStore BeanStore}, in which the constructed
* {@link BeanProvider} is stored, can be specified:
*
@@ -74,7 +76,7 @@
* </pre>
*
* </li>
- * <li>The <code>singleton</code> attribute has impact on the way the bean is
+ * <li>The {@code singleton} attribute has impact on the way the bean is
* created. If set to <b>true</b> (which is the default), only a single bean
* instance will be created on first access. Further access to this bean
* definition will always return the same bean. A value of <b>false</b> in
@@ -104,7 +106,7 @@
* for singleton beans. If each access to the bean creates a new instance, the
* caller is responsible for releasing the bean instances correspondingly.</li>
* <li>If a different constructor than the default one is to be used, a nested
- * <code>{@link ConstructorTag}</code> tag can be used. Here the parameters to
+ * {@link ConstructorTag} tag can be used. Here the parameters to
* be passed to the constructor can be defined:
*
* <pre>
@@ -120,7 +122,7 @@
*
* </li>
* <li>If the bean cannot be created directly, but a factory has to be used, a
- * nested <code>{@link FactoryTag}</code> is appropriate. This can look as
+ * nested {@link FactoryTag} is appropriate. This can look as
* follows:
*
* <pre>
@@ -138,7 +140,7 @@
* </pre>
*
* </li>
- * <li>It is also possible to use a <code><bean></code> tag everywhere a
+ * <li>It is also possible to use a {@code <bean>} tag everywhere a
* dependency is expected. This allows defining beans in-line as in the
* following example:
*
@@ -155,14 +157,14 @@
* </bean>
* </pre>
*
- * Here the value of the first <code><param></code> tag is the bean
- * defined by the nested <code><bean></code> tag. This is a bit similar to
+ * Here the value of the first {@code <param>} tag is the bean
+ * defined by the nested {@code <bean>} tag. This is a bit similar to
* anonymous inner classes in Java. The result is effectively the same as if the
* bean was defined elsewhere with a specific name and the
- * <code><param></code> tag would reference this bean.</li>
+ * {@code <param>} tag would reference this bean.</li>
* <li>No matter of how the bean is created, in the tag's body an arbitrary
* number of <em>invocation tags</em> can be placed. These are collected and
- * added to a <code>{@link ChainedInvocation}</code> object, so that they form
+ * added to a {@link ChainedInvocation} object, so that they form
* an initialization script. This script will be executed after the bean
* instance has been created:
*
@@ -213,7 +215,7 @@
* </tr>
* <tr>
* <td valign="top">valueClassName</td>
- * <td>Like <code>valueClass</code>, but the name of the property's data type
+ * <td>Like {@code valueClass}, but the name of the property's data type
* class is specified.</td>
* <td valign="top">yes</td>
* </tr>
@@ -231,7 +233,7 @@
* <td valign="top">yes</td> </tr>
* <tr>
* <td valign="top">beanClassName</td>
- * <td>Like the <code>beanClass</code> attribute, but the bean class is
+ * <td>Like the {@code beanClass} attribute, but the bean class is
* specified by its name.</td>
* <td valign="top">yes</td>
* </tr>
@@ -259,6 +261,17 @@
* the root bean store of the current builder operation is used.</td>
* <td valign="top">yes</td>
* </tr>
+ * <tr>
+ * <td valign="top">resultVar</td>
+ * <td>This attribute provides an alternative way of defining a bean: as a result
+ * variable of an initializer script. When the initializer script is executed
+ * local variables can be created. The {@code resultVar} attribute instructs
+ * the tag to use one of these variables as the bean to be returned. With this
+ * mechanism, it is possible for instance to invoke a factory bean and return
+ * the object created by it. Note that the {@code resultVar} attribute takes
+ * precedence over other mechanisms to define the resulting bean.</td>
+ * <td valign="top">yes</td>
+ * </tr>
* </table>
* </p>
*
@@ -267,6 +280,10 @@
*/
public class BeanTag extends AbstractBeanTag
{
+ /** Constant for the string pattern for the place holder bean provider. */
+ private static final String PLACE_HOLDER_PROVIDER_STR =
+ "<Place holder for bean of class %s>";
+
/** Stores the bean provider for creating the managed bean. */
private BeanProvider beanCreator;
@@ -295,12 +312,13 @@
private boolean singleton;
/**
- * Creates a new instance of <code>BeanTag</code>.
+ * Creates a new instance of {@code BeanTag}.
*/
public BeanTag()
{
valueData = new ValueData(this);
beanClassData = new ClassDescData();
+ initializerScript = new ChainedInvocation();
setSingleton(true);
}
@@ -339,7 +357,7 @@
* Sets the class description for the managed bean. Usually, this method
* will be called by the main processing method when the tag's attributes
* are evaluated. If the bean class is not defined by the tag's attributes,
- * it can be indirectly defined by the <code>BeanProvider</code> used as
+ * it can be indirectly defined by the {@code BeanProvider} used as
* creator.
*
* @param beanClass the class description for the managed bean
@@ -350,10 +368,10 @@
}
/**
- * Returns the <code>BeanProvider</code> that will be used for creating
+ * Returns the {@code BeanProvider} tha...
[truncated message content] |
|
From: <oh...@us...> - 2012-01-29 18:40:03
|
Revision: 206
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=206&view=rev
Author: oheger
Date: 2012-01-29 18:39:57 +0000 (Sun, 29 Jan 2012)
Log Message:
-----------
Updated parent pom. Changed some dependencies to libraries and plug-ins to most recent versions.
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-01-29 18:29:57 UTC (rev 205)
+++ trunk/pom.xml 2012-01-29 18:39:57 UTC (rev 206)
@@ -1,5 +1,5 @@
<!--
- Copyright 2006-2011 The GUIraffe Team.
+ Copyright 2006-2012 The GUIraffe Team.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -101,7 +101,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.4</version>
+ <version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -119,7 +119,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.6</version>
+ <version>2.11</version>
<configuration>
<forkMode>once</forkMode>
<argLine>-enableassertions</argLine>
@@ -129,7 +129,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.1</version>
+ <version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
@@ -139,6 +139,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.5.1</version>
<executions>
<execution>
<goals>
@@ -173,7 +174,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.7</version>
+ <version>2.8.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
@@ -198,7 +199,7 @@
-->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
+ <version>1.7</version>
<executions>
<execution>
<id>javadoc.resources</id>
@@ -236,7 +237,7 @@
<jelly>XML_STYLE</jelly>
</mapping>
<properties>
- <year>2011</year>
+ <year>2012</year>
</properties>
</configuration>
<executions>
@@ -260,7 +261,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.3.1</version>
+ <version>2.3.2</version>
<configuration>
<archive>
<manifestEntries>
@@ -276,7 +277,7 @@
<distributionManagement>
<site>
<id>website</id>
- <url>scp://shell.sourceforge.net/home/groups/j/jg/jguiraffe/htdocs</url>
+ <url>scp://shell.sourceforge.net/home/project-web/jguiraffe/htdocs</url>
</site>
</distributionManagement>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2012-01-29 18:30:14
|
Revision: 205
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=205&view=rev
Author: oheger
Date: 2012-01-29 18:29:57 +0000 (Sun, 29 Jan 2012)
Log Message:
-----------
Updated license headers and some dependencies.
Modified Paths:
--------------
trunk/core/pom.xml
trunk/core/src/changes/changes.xml
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanContext.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanContextClient.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanCreationEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanCreationListener.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanInitializer.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/di/ClassLoaderProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/ConversionHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/di/Dependency.java
trunk/core/src/main/java/net/sf/jguiraffe/di/DependencyProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/EnumConverter.java
trunk/core/src/main/java/net/sf/jguiraffe/di/InjectionException.java
trunk/core/src/main/java/net/sf/jguiraffe/di/InvocationHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/di/MutableBeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/di/ReflectionUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/BeanContextWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/BeanCreationListenerSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ChainedInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDependency.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDescription.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/CombinedBeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ConstructorInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultBeanContext.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultBeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultClassLoaderProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultDependencyProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invokable.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/MethodInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NameDependency.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NullInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/RestrictedDependencyProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SetPropertyInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SimpleBeanStoreImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/package.html
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/CollectionBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstantBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstructorBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/FactoryBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ListBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MapBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MethodInvocationBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/PropertiesBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SetBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SimpleBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/package.html
trunk/core/src/main/java/net/sf/jguiraffe/di/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/Application.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationClient.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationContext.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationContextImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationResources.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationRuntimeException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationShutdownActionTask.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationShutdownListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/CommandActionTask.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/OpenWindowCommand.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/AutoReleaseListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BeanBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BeanBuilderFactory.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BeanBuilderResult.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/Builder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BuilderException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/Accelerator.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionDataImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionInvoker.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManagerWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionStore.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionTask.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/FormAction.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/FormActionException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/PopupMenuBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/PopupMenuHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/SimplePopupMenuHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/AbstractActionDataTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionBuilderTagLibrary.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionContainer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionControlTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionDataTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionTaskTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/AndEventFilterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/BeanRegistrationCallBack.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ChainedEventFilterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ChangeListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ComponentRegistrationCallBack.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventFilterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventListenerTypeTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventRegistrationTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/FocusListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/FormEventListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MenuBarTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MenuItemTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MenuTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MouseListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/OrEventFilterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/PopupHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/RegistrationCallBackBase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/SeparatorTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ToolButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ToolbarTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/AbstractCompositeComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/Color.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ColorHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentBuilderCallBack.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentManagerWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/Composite.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/CompositeComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/DefaultFieldHandlerFactory.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/DefaultToolTipManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/FieldHandlerFactory.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/FormBuilderException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/FormBuilderRuntimeException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/Orientation.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ToolTipManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/WidgetHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/AbstractRadioButtonHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/DefaultRadioButtonHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/ListComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/ListModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/ProgressBarHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/StaticTextData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/StaticTextHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TableHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TextHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TextIconAlignment.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpandVetoException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpansionEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpansionListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeNodePath.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreePreExpansionListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/BorderConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/BorderLayoutTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ButtonLayoutTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/CheckboxTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ComboBoxTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ComponentBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ComponentGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ComponentHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ConditionalTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ContainerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ConverterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/DesktopPanelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FieldTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FontTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FormBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FormBuilderTagLibrary.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/IconSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/IconTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/InputComponentTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/LabelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/LayoutTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListBoxTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelItemTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/LocalizedTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PanelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PasswordFieldTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentCellConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentCellGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentColConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentColGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentLayoutTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentRowConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentRowGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ProgressBarTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PropertiesSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PropertiesTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PropertySupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PropertyTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PushButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/RadioButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/RadioGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ReferenceTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/SimpleComponentTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/SliderTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/SplitterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TabTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TabbedPaneTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextAreaTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextFieldTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextIconData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextIconTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextListModelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ToggleButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TransformerBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TransformerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TreeIconHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TreeIconTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TreeTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/UseBeanBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ValidatorBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ValidatorTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ValidatorsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnClass.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnComponentTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnEditorTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnFieldHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnRendererTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableColumnTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableColumnWidthController.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableEditorValidationHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableEditorValidationHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableSelectionHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableSelectionHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/DIBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/AbstractBeanTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/BeanStoreTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/BeanTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ClassDescData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/CollectionTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ConstantValueTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ConstructorInvocationTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ConstructorTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/DITagLibrary.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/DependencyTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ElementTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/EntryKeyTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/EntryTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/FactoryTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/InvocationData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/InvocationTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/InvokableSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ListTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/MapTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/MethodInvocationTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/NullTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ParameterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/PropertiesTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/SetPropertyTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/SetTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ShutdownHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ValueData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ValueSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ValueTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/ActionEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/ActionGroupEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/ChainElementEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/ComponentEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/ElementEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/EnablerBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/EnablerConverter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/InverseEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/NullEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/BuilderEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormActionEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormActionListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormChangeEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormChangeListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEventListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEventManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormFocusEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormFocusListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormListenerType.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormMouseEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormMouseListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/Keys.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/Modifiers.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/PlatformEventManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/AbstractEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/AndEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/ChainedEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/ClassEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/EventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/OrEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/TypeEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBeanBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBeanBuilderFactory.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyContextBeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/utils/GUIRuntimeException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/utils/GUISynchronizer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/utils/MessageOutput.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/utils/NullMessageOutput.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/utils/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/InvariantWindowClosingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/Window.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowBuilderException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowClosingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManagerWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/ColorFieldMarker.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FieldValidationStatus.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormController.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerFieldStatusEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerFieldStatusListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerFormEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerFormListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerValidationEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerValidationListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormValidationTrigger.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormValidationTriggerFocus.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormValidationTriggerNone.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/ToolTipFieldMarker.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/DialogTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/FormControllerListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/FormControllerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/FrameTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/InternalFrameTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/WindowBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/WindowBuilderTagLibrary.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/WindowControllerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/WindowListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/Command.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandBase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueue.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/ScheduleAware.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/BindingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ComponentHandlerImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ComponentStore.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ComponentStoreImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/DefaultFieldHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/DefaultFormValidatorResults.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FieldHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/Form.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FormRuntimeException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FormValidationMessageFormat.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FormValidator.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FormValidatorResults.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/TransformerWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ValidationPhase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ValidatorWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/bind/BeanBindingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/bind/DummyBindingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/bind/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/BorderLayout.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/ButtonLayout.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellAlignment.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellConstraints.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellSize.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/NumberWithUnit.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayout.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayoutBase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayoutPlatformAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/Unit.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/UnitSizeHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingActionManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingCheckedItemController.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingFormAction.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingPopupListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingPopupMenuBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingSubMenuBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingButtonHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingComboBoxHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingComponentManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingComponentUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingConfigurationTreeModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingEditableComboBoxHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingLimitedTextModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingListBoxHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingListModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingListModelHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingMultiListBoxHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingProgressBarHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingRadioGroupWidgetHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingSliderHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingStaticTextComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTabbedPaneHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTableComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTextAreaHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTextHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTreeCellRenderer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTreeComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingWidgetHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableCellEditor.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableCellRenderer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableColumnWidthListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableEditorValidationHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableSelectionHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/ActionEventAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/ChangeEventAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/ChangeListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/FocusEventAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/MouseEventAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/SwingEventAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/SwingEventConstantMapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/SwingEventManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/SwingEventSource.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/utils/SwingGUISynchronizer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/utils/SwingMessageOutput.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/utils/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/DialogAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/FrameAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/InternalFrameAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/InternalFrameListenerAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/SwingWindow.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/SwingWindowManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/WindowAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/WindowHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/WindowListenerAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/SwingPercentLayoutAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/SwingSizeHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/package.html
trunk/core/src/main/java/net/sf/jguiraffe/locators/AbstractLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/AbstractStreamLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/ByteArrayLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/ClassPathLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/FileLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/Locator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorConverter.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorException.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/URLLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/package.html
trunk/core/src/main/java/net/sf/jguiraffe/resources/Message.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/ResourceGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/ResourceLoader.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/ResourceManager.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/ResourceManagerImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/bundle/BundleResourceGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/bundle/BundleResourceLoader.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/bundle/package.html
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/package.html
trunk/core/src/main/java/net/sf/jguiraffe/resources/package.html
trunk/core/src/main/java/net/sf/jguiraffe/transform/AbstractDecimalTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/AbstractIntegerTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ChainValidator.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DateTimeTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DateTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DateTransformerBase.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DefaultValidationMessageHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DefaultValidationResult.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DoubleTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DummyTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/FloatTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/IntegerTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/LongTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/NumberTransformerBase.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/RegexValidator.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/RequiredValidator.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/TimeTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ToStringTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/Transformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/TransformerContext.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/TransformerContextPropertiesWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessage.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessageConstants.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessageHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessageLevel.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationResult.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/Validator.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/package.html
trunk/core/src/main/resources/application.properties
trunk/core/src/main/resources/application_de.properties
trunk/core/src/main/resources/defaultbeans.jelly
trunk/core/src/main/resources/validators.properties
trunk/core/src/main/resources/validators_de.properties
trunk/core/src/site/site.xml
trunk/core/src/site/xdoc/index.xml
trunk/core/src/site/xdoc/overview.xml
trunk/core/src/site/xdoc/userguide/actionbuilder.xml
trunk/core/src/site/xdoc/userguide/application.xml
trunk/core/src/site/xdoc/userguide/builders.xml
trunk/core/src/site/xdoc/userguide/builderscript.xml
trunk/core/src/site/xdoc/userguide/commands.xml
trunk/core/src/site/xdoc/userguide/dibuilder.xml
trunk/core/src/site/xdoc/userguide/formbuilder.xml
trunk/core/src/site/xdoc/userguide/formcontroller.xml
trunk/core/src/site/xdoc/userguide/forms.xml
trunk/core/src/site/xdoc/userguide/layouts.xml
trunk/core/src/site/xdoc/userguide/resources.xml
trunk/core/src/site/xdoc/userguide/user_guide.xml
trunk/core/src/site/xdoc/userguide/validators.xml
trunk/core/src/site/xdoc/userguide/windowbuilder.xml
trunk/core/src/test/java/net/sf/jguiraffe/JGuiraffeTestHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/di/ReflectionTestClass.java
trunk/core/src/test/java/net/sf/jguiraffe/di/TestConversionHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/di/TestEnumConverter.java
trunk/core/src/test/java/net/sf/jguiraffe/di/TestInvocationHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/di/TestReflectionUtils.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/AbstractDependentProviderTest.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/AbstractInvocationTest.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/BeanCreationListenerTestImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/ClassDescriptionMock.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestBeanContextWrapper.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestBeanCreationListenerSupport.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestChainedInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestClassDescription.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestCombinedBeanStore.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestConstructorInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultBeanContext.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultBeanStore.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultClassLoaderProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultDependencyProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDependencies.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestMethodInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestNullInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestRestrictedDependencyProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestSetPropertyInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestSimpleBeanStoreImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/SimpleBeanProviderTestHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestBeanProviders.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestCollectionBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestConstantBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestConstructorBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestLifeCycleBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestMapBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestMethodInvocationBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestPropertiesBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestSingletonBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplication.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplicationBuilderData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplicationContextImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplicationResources.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplicationShutdownActionTask.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestCommandActionTask.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestDefaultBeans.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestOpenWindowCommand.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/TestAutoReleaseListener.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/ActionManagerImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/FormActionImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestAccelerator.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionBuilder.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionDataImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionInvoker.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionManagerWrapper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionStore.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestSimplePopupMenuHandler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/AbstractActionTagTest.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestActionTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestActionTagDeferredTasks.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestEventFilterTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestEventListenerTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestEventListenerTypeTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestEventRegistrationTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestMenuTags.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestPopupHandlerTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestPopupHandlerTagScript.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestToolbarTags.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/ComponentManagerImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/Container.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestAbstractCompositeComponentHandler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestColor.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestColorHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentBuilderData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentGroup.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentManagerWrapper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestDefaultToolTipManager.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestOrientation.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TreeHandlerImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/WidgetHandlerImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/model/TestDefaultRadioButtonHandler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/model/TestTreeNodePath.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/AbstractTagTest.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestBorderLayoutTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestButtonLayoutTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestButtonTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestCheckboxTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestComboBoxTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestComponentGroupTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestConverterTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestConverterTagScript.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestDesktopPanelTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestFieldTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestFontTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestFormBaseTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestIconTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestInputComponentTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestLabelTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestListBoxTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestListModelUtils.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestLocalizedTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestPanelTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestPasswordFieldTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestPercentLayoutTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestProgressBarTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestPropertiesTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestPropertyTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestRadioButtonTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestRadioButtonTagScript.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestSliderTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestSplitterTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestStaticTextDataImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestStaticTextDataTransformer.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestStaticTextTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTabbedPaneTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTextAreaTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTextFieldTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTextIconData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTextListModelTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTransformerBaseTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTransformerTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTransformersWithProperties.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTreeIconTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTreeTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTreeTagScript.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestUseBeanBaseTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestValidatorTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestValidatorsTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/table/TestColumnFieldHandler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/table/TestTableColumnWidthController.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/table/TestTableTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/TestDIBuilderData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/MockClassDescData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestBeanStoreTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestBeanTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestClassDescData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestCollectionTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestConstantValueTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestConstructorTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestDependencyTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestElementTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestEntryKeyTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestEntryTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestFactoryTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestInvocationData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestInvocationTags.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestMapTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestNullTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestSetPropertyTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestShutdownHandlerTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestValueData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestValueTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/enablers/TestActionEnabler...
[truncated message content] |
|
From: <oh...@us...> - 2011-07-27 19:57:25
|
Revision: 204
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=204&view=rev
Author: oheger
Date: 2011-07-27 19:57:18 +0000 (Wed, 27 Jul 2011)
Log Message:
-----------
[3380233] SwingTableComponentHandler ensures that a newly selected row (in single-selection mode) is visible.
Modified Paths:
--------------
trunk/core/src/changes/changes.xml
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTableComponentHandler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/components/TestSwingTableComponentHandler.java
Modified: trunk/core/src/changes/changes.xml
===================================================================
--- trunk/core/src/changes/changes.xml 2011-07-27 19:38:57 UTC (rev 203)
+++ trunk/core/src/changes/changes.xml 2011-07-27 19:57:18 UTC (rev 204)
@@ -27,6 +27,11 @@
</properties>
<body>
<release version="1.1" date="in SVN" description="TBD">
+ <action dev="oheger" issue="3380233" type="add">
+ SwingTableComponentHandler now ensures that a newly selected row
+ (in single-selection mode) becomes visible. If necessary, it changes the
+ position of the scroll pane.
+ </action>
<action dev="oheger" issue="3380231" type="update">
Updated test dependency to EasyMock to the most recent version 3.0.
</action>
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTableComponentHandler.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTableComponentHandler.java 2011-07-27 19:38:57 UTC (rev 203)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTableComponentHandler.java 2011-07-27 19:57:18 UTC (rev 204)
@@ -15,10 +15,13 @@
*/
package net.sf.jguiraffe.gui.platform.swing.builder.components;
+import java.awt.Point;
+import java.awt.Rectangle;
import java.util.List;
import javax.swing.JScrollPane;
import javax.swing.JTable;
+import javax.swing.JViewport;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
@@ -186,7 +189,11 @@
public void setSelectedIndex(int rowIdx)
{
clearSelection();
- getTable().addRowSelectionInterval(rowIdx, rowIdx);
+ if (rowIdx >= 0)
+ {
+ getTable().addRowSelectionInterval(rowIdx, rowIdx);
+ handleScrolling(scrollPane.getViewport(), rowIdx);
+ }
}
/**
@@ -375,4 +382,38 @@
{
getTable().getSelectionModel().removeListSelectionListener(this);
}
+
+ /**
+ * Handles scrolling when a row is selected. This method ensures that the
+ * newly selected row becomes visible. However, the horizontal scrolling
+ * position should not be changed.
+ *
+ * @param vp the view port
+ * @param rowIdx the index of the row to be made visible
+ */
+ void handleScrolling(JViewport vp, int rowIdx)
+ {
+ Point orgPos = vp.getViewPosition();
+ Rectangle rect = getTable().getCellRect(rowIdx, 0, true);
+ getTable().scrollRectToVisible(rect);
+ updateViewport(vp, orgPos);
+ }
+
+ /**
+ * Updates the scroll position of the view port. This method is called when
+ * a row is selected. In this case the row should be made visible, but the
+ * horizontal position should not be changed. This method ensures that the X
+ * offset is restored if it was changed.
+ *
+ * @param vp the {@code JViewport}
+ * @param orgPos the original position of the {@code JViewport}
+ */
+ void updateViewport(JViewport vp, Point orgPos)
+ {
+ Point newPos = vp.getViewPosition();
+ if (orgPos.x != newPos.x)
+ {
+ vp.setViewPosition(new Point(orgPos.x, newPos.y));
+ }
+ }
}
Modified: trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/components/TestSwingTableComponentHandler.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/components/TestSwingTableComponentHandler.java 2011-07-27 19:38:57 UTC (rev 203)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/components/TestSwingTableComponentHandler.java 2011-07-27 19:57:18 UTC (rev 204)
@@ -21,12 +21,15 @@
import static org.junit.Assert.assertTrue;
import java.awt.Color;
+import java.awt.Point;
+import java.awt.Rectangle;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import javax.swing.JScrollPane;
import javax.swing.JTable;
+import javax.swing.JViewport;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.table.TableModel;
@@ -36,6 +39,7 @@
import net.sf.jguiraffe.gui.platform.swing.builder.components.table.SwingTableModel;
import net.sf.jguiraffe.gui.platform.swing.builder.event.ChangeListener;
+import org.apache.commons.lang.mutable.MutableObject;
import org.easymock.EasyMock;
import org.junit.Before;
import org.junit.Test;
@@ -84,7 +88,7 @@
private JTable table;
/** Stores the handler under test. */
- private SwingTableComponentHandler handler;
+ private SwingTableComponentHandlerTestImpl handler;
@Before
public void setUp() throws Exception
@@ -98,7 +102,7 @@
return MODEL_LIST;
}
}, table));
- handler = new SwingTableComponentHandler(table, 0, 0);
+ handler = new SwingTableComponentHandlerTestImpl(table, 0, 0);
}
/**
@@ -338,8 +342,10 @@
public void testSetSelectedIndex()
{
initSingleSel();
- handler.setSelectedIndex(2);
- assertEquals("Selected index was not set", 2, table.getSelectedRow());
+ final int index = 2;
+ handler.setSelectedIndex(index);
+ assertEquals("Selected index was not set", index, table.getSelectedRow());
+ assertEquals("Not scrolled", index, handler.getScrollingIndex());
}
/**
@@ -357,6 +363,72 @@
}
/**
+ * Tries to set an invalid table index.
+ */
+ @Test
+ public void testSetSelectedIndexInvalid()
+ {
+ initSingleSel();
+ handler.setSelectedIndex(-1);
+ assertEquals("Wrong number of selected rows", 0, table.getSelectedRowCount());
+ }
+
+ /**
+ * Tests whether the handler makes the newly selected row visible.
+ */
+ @Test
+ public void testHandleScrolling()
+ {
+ JViewport vp = EasyMock.createMock(JViewport.class);
+ final Rectangle rect = EasyMock.createMock(Rectangle.class);
+ EasyMock.expect(vp.getViewPosition()).andReturn(new Point(10, 111));
+ EasyMock.expect(vp.getViewPosition()).andReturn(new Point(0, 100));
+ vp.setViewPosition(new Point(10, 100));
+ EasyMock.replay(rect, vp);
+ final int index = 5;
+ final MutableObject scrolledRect = new MutableObject();
+ JTable tab = new JTable(table.getModel())
+ {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Rectangle getCellRect(int row, int column,
+ boolean includeSpacing)
+ {
+ assertEquals("Wrong row", index, row);
+ assertEquals("Wrong column", 0, column);
+ assertTrue("Wrong spacing flag", includeSpacing);
+ return rect;
+ }
+
+ @Override
+ public void scrollRectToVisible(Rectangle aRect)
+ {
+ scrolledRect.setValue(aRect);
+ }
+ };
+ handler = new SwingTableComponentHandlerTestImpl(tab, 0, 0);
+ handler.setMockScrollingToSelectedRow(false);
+ handler.handleScrolling(vp, index);
+ assertSame("Wrong rectangle", rect, scrolledRect.getValue());
+ EasyMock.verify(rect, vp);
+ }
+
+ /**
+ * Tests whether the view port is not modified if the x position did not
+ * change when a cell was made visible.
+ */
+ @Test
+ public void testUpdateViewportNoXChange()
+ {
+ JViewport vp = EasyMock.createMock(JViewport.class);
+ EasyMock.expect(vp.getViewPosition()).andReturn(new Point(10, 100));
+ EasyMock.replay(vp);
+ handler.updateViewport(vp, new Point(10, 50));
+ EasyMock.verify(vp);
+ }
+
+ /**
* Tests querying the selected index.
*/
@Test
@@ -594,10 +666,85 @@
}
/**
+ * A test implementation of the table handler with some mocing facilities.
+ */
+ private static class SwingTableComponentHandlerTestImpl extends
+ SwingTableComponentHandler
+ {
+ /**
+ * A flag whether scrolling to the selected row should be mocked. This
+ * is true per default!
+ */
+ private boolean mockScrollingToSelectedRow;
+
+ /** Stores the index passed to handleScrolling(). */
+ private int scrollingIndex;
+
+ public SwingTableComponentHandlerTestImpl(JTable table,
+ int scrollWidth, int scrollHeight)
+ {
+ super(table, scrollWidth, scrollHeight);
+ mockScrollingToSelectedRow = true;
+ scrollingIndex = -1;
+ }
+
+ /**
+ * Returns a flag whether scrolling to the selected row should be
+ * mocked.
+ *
+ * @return the mocking flag
+ */
+ public boolean isMockScrollingToSelectedRow()
+ {
+ return mockScrollingToSelectedRow;
+ }
+
+ /**
+ * Sets a flag whether scrolling to the selected should be mocked.
+ *
+ * @param mockScrollingToSelectedRow the flag
+ */
+ public void setMockScrollingToSelectedRow(
+ boolean mockScrollingToSelectedRow)
+ {
+ this.mockScrollingToSelectedRow = mockScrollingToSelectedRow;
+ }
+
+ /**
+ * Returns the index passed to handleScrolling().
+ *
+ * @return the scrolling index
+ */
+ public int getScrollingIndex()
+ {
+ return scrollingIndex;
+ }
+
+ /**
+ * Checks the parameters, records this invocation. Optionally this
+ * method is mocked.
+ */
+ @Override
+ void handleScrolling(JViewport vp, int rowIdx)
+ {
+ if (isMockScrollingToSelectedRow())
+ {
+ assertSame("Wrong viewport",
+ ((JScrollPane) getOuterComponent()).getViewport(), vp);
+ scrollingIndex = rowIdx;
+ }
+ else
+ {
+ super.handleScrolling(vp, rowIdx);
+ }
+ }
+ }
+
+ /**
* A table model implementation used for testing. The test table will have a
* model of this type.
*/
- static class TableModelImpl extends SwingTableModel
+ private static class TableModelImpl extends SwingTableModel
{
private static final long serialVersionUID = 8768314516739492104L;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2011-07-27 19:39:04
|
Revision: 203
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=203&view=rev
Author: oheger
Date: 2011-07-27 19:38:57 +0000 (Wed, 27 Jul 2011)
Log Message:
-----------
[3380231] Switched to EasyMock 3.0.
Modified Paths:
--------------
trunk/core/pom.xml
trunk/core/src/changes/changes.xml
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultBeanContext.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/forms/TestComponentStoreImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/TestSwingTableModel.java
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2011-07-16 20:22:27 UTC (rev 202)
+++ trunk/core/pom.xml 2011-07-27 19:38:57 UTC (rev 203)
@@ -72,7 +72,7 @@
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
- <version>2.3</version>
+ <version>3.0</version>
<scope>test</scope>
</dependency>
Modified: trunk/core/src/changes/changes.xml
===================================================================
--- trunk/core/src/changes/changes.xml 2011-07-16 20:22:27 UTC (rev 202)
+++ trunk/core/src/changes/changes.xml 2011-07-27 19:38:57 UTC (rev 203)
@@ -27,7 +27,10 @@
</properties>
<body>
<release version="1.1" date="in SVN" description="TBD">
- <action dev="oheger" issue="3368763" type="fix">
+ <action dev="oheger" issue="3380231" type="update">
+ Updated test dependency to EasyMock to the most recent version 3.0.
+ </action>
+ <action dev="oheger" issue="3368763" type="add">
Added a transformer to StaticTextData objects which simpliefies usage
of static text controls in forms.
</action>
Modified: trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultBeanContext.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultBeanContext.java 2011-07-16 20:22:27 UTC (rev 202)
+++ trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultBeanContext.java 2011-07-27 19:38:57 UTC (rev 203)
@@ -174,9 +174,8 @@
private int addClassProvider(Class<?> c, DefaultBeanStore store)
{
BeanProvider p = createProviderMock();
- EasyMock.expect(
- p.getBeanClass(context.getInternalDependencyProvider()))
- .andStubReturn(c);
+ p.getBeanClass(context.getInternalDependencyProvider());
+ EasyMock.expectLastCall().andStubReturn(c);
int idx = nextIndex();
store.addBeanProvider(getProviderName(idx), p);
return idx;
@@ -396,10 +395,9 @@
int i = 0;
for (BeanProvider p : getProviders(idx, idx + count - 1))
{
+ p.getBeanClass((DependencyProvider) EasyMock.anyObject());
+ EasyMock.expectLastCall().andStubReturn(TEST_CLASSES[i]);
EasyMock.expect(
- p.getBeanClass((DependencyProvider) EasyMock.anyObject()))
- .andStubReturn(TEST_CLASSES[i]);
- EasyMock.expect(
p.getBean((DependencyProvider) EasyMock.anyObject()))
.andReturn(TEST_OBJECTS[i]).times(0, count + 1);
p.setLockID(LOCK_ID);
Modified: trunk/core/src/test/java/net/sf/jguiraffe/gui/forms/TestComponentStoreImpl.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/forms/TestComponentStoreImpl.java 2011-07-16 20:22:27 UTC (rev 202)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/forms/TestComponentStoreImpl.java 2011-07-27 19:38:57 UTC (rev 203)
@@ -19,10 +19,10 @@
import java.util.List;
import java.util.Set;
+import junit.framework.TestCase;
+
import org.easymock.EasyMock;
-import junit.framework.TestCase;
-
/**
* Test class for ComponentStoreImpl.
*
@@ -113,7 +113,8 @@
private FieldHandler createMockFieldHandler(int idx)
{
FieldHandler mock = EasyMock.createMock(FieldHandler.class);
- EasyMock.expect(mock.getComponentHandler()).andStubReturn(
+ mock.getComponentHandler();
+ EasyMock.expectLastCall().andStubReturn(
createMockComponentHandler(PRE_FIELDHANDLERS + idx));
EasyMock.replay(mock);
return mock;
Modified: trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/TestSwingTableModel.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/TestSwingTableModel.java 2011-07-16 20:22:27 UTC (rev 202)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/TestSwingTableModel.java 2011-07-27 19:38:57 UTC (rev 203)
@@ -397,11 +397,11 @@
ComponentHandler<?> cmpHandler)
{
FieldHandler fldHandler = EasyMock.createMock(FieldHandler.class);
- EasyMock.expect(fldHandler.getComponentHandler()).andStubReturn(
- cmpHandler);
+ fldHandler.getComponentHandler();
+ EasyMock.expectLastCall().andStubReturn(cmpHandler);
EasyMock.expect(fldHandler.getPropertyName()).andStubReturn(null);
- EasyMock.expect(fldHandler.getType())
- .andStubReturn(COLUMN_TYPES[index]);
+ fldHandler.getType();
+ EasyMock.expectLastCall().andStubReturn(COLUMN_TYPES[index]);
return fldHandler;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2011-07-16 20:22:33
|
Revision: 202
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=202&view=rev
Author: oheger
Date: 2011-07-16 20:22:27 +0000 (Sat, 16 Jul 2011)
Log Message:
-----------
[3368763] Added a new transformer which creates StaticTextData objects.
Modified Paths:
--------------
trunk/core/src/changes/changes.xml
trunk/core/src/site/xdoc/userguide/formbuilder.xml
Added Paths:
-----------
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransformer.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestStaticTextDataTransformer.java
Modified: trunk/core/src/changes/changes.xml
===================================================================
--- trunk/core/src/changes/changes.xml 2011-07-16 14:52:47 UTC (rev 201)
+++ trunk/core/src/changes/changes.xml 2011-07-16 20:22:27 UTC (rev 202)
@@ -27,6 +27,10 @@
</properties>
<body>
<release version="1.1" date="in SVN" description="TBD">
+ <action dev="oheger" issue="3368763" type="fix">
+ Added a transformer to StaticTextData objects which simpliefies usage
+ of static text controls in forms.
+ </action>
<action dev="oheger" issue="3368750" type="fix">
Builders could throw an undocumented LocatorException. Such exceptions
are now caught and re-thrown as BuilderException exceptions.
Added: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransformer.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransformer.java (rev 0)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransformer.java 2011-07-16 20:22:27 UTC (rev 202)
@@ -0,0 +1,277 @@
+/*
+ * Copyright 2006-2011 The JGUIraffe Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.jguiraffe.gui.builder.components.tags;
+
+import java.util.Locale;
+import java.util.Map;
+
+import net.sf.jguiraffe.gui.builder.components.model.StaticTextData;
+import net.sf.jguiraffe.gui.builder.components.model.TextIconAlignment;
+import net.sf.jguiraffe.transform.Transformer;
+import net.sf.jguiraffe.transform.TransformerContext;
+
+/**
+ * <p>
+ * A special implementation of the {@code Transformer} interface for converting
+ * data to {@code StaticTextData} objects.
+ * </p>
+ * <p>
+ * This transformer class is useful if {@link StaticTextTag} is used to produce
+ * labels in forms which should display some data. The data is to be provided as
+ * part of the form's model. If only textual data is involved, it is pretty
+ * inconvenient to expose properties of type {@code StaticTextData} in the model
+ * bean. Rather, this class can be assigned as {@code Transformer} to the static
+ * text fields. It creates {@code StaticTextData} objects and populates them
+ * from the object passed to the {@link #transform(Object, TransformerContext)}
+ * method. The following objects can be handled:
+ * <ul>
+ * <li>Objects implementing the {@code CharSequence} interface become the text
+ * of the {@code StaticTextData} object.</li>
+ * <li>Objects of type {@link TextIconAlignment} are passed to the
+ * {@code alignment} property.</li>
+ * <li>If the object passed to {@code transform()} is already of type
+ * {@code StaticTextData}, it is returned without changes.</li>
+ * <li>Other objects are interpreted as icons and stored in the {@code icon}
+ * property.</li>
+ * </ul>
+ * </p>
+ * <p>
+ * An instance defines properties for all elements of a {@code StaticTextData}
+ * object. If set, the corresponding values are written in the newly created
+ * objects. For instance, if the {@code icon} property is set and a
+ * {@code CharSequence} object is passed to {@code transform()}, the resulting
+ * object will have this icon and the text of the {@code CharSequence}. These
+ * properties can be overridden by properties in the {@code TransformerContext}.
+ * Here the following properties are supported:
+ * <table border="1">
+ * <tr>
+ * <th>Property</th>
+ * <th>Description</th>
+ * <th>Default</th>
+ * </tr>
+ * <tr>
+ * <td valign="top">text</td>
+ * <td>The text to be written into the {@code StaticTextData} object.</td>
+ * <td valign="top">undefined</td>
+ * </tr>
+ * <tr>
+ * <td valign="top">icon</td>
+ * <td>The icon to be written into the {@code StaticTextData} object.</td>
+ * <td valign="top">undefined</td>
+ * </tr>
+ * <tr>
+ * <td valign="top">alignment</td>
+ * <td>The alignment for the {@code StaticTextData} object.</td>
+ * <td valign="top">undefined</td>
+ * </tr>
+ * </table>
+ * </p>
+ *
+ * @author Oliver Heger
+ * @version $Id$
+ */
+public class StaticTextDataTransformer implements Transformer
+{
+ /** Constant for the name of the property with the default text. */
+ private static final String PROP_TEXT = "text";
+
+ /** Constant for the name of the property with the default icon. */
+ private static final String PROP_ICON = "icon";
+
+ /** Constant for the name of the property with the default alignment. */
+ private static final String PROP_ALIGNMENT = "alignment";
+
+ /** The default text. */
+ private String text;
+
+ /** The default icon. */
+ private Object icon;
+
+ /** The default alignment. */
+ private TextIconAlignment alignment;
+
+ /**
+ * Returns the default text for the newly created {@code StaticTextData}
+ * objects.
+ *
+ * @return the default text
+ */
+ public String getText()
+ {
+ return text;
+ }
+
+ /**
+ * Sets the default text for the newly created {@code StaticTextData}
+ * objects.
+ *
+ * @param text the default text
+ */
+ public void setText(String text)
+ {
+ this.text = text;
+ }
+
+ /**
+ * Returns the default icon for the newly created {@code StaticTextData}
+ * objects.
+ *
+ * @return the default icon
+ */
+ public Object getIcon()
+ {
+ return icon;
+ }
+
+ /**
+ * Sets the default icon for the newly created {@code StaticTextData}
+ * objects.
+ *
+ * @param icon the default icon
+ */
+ public void setIcon(Object icon)
+ {
+ this.icon = icon;
+ }
+
+ /**
+ * Returns the default {@code TextIconAlignment}.
+ *
+ * @return the default alignment
+ */
+ public TextIconAlignment getAlignment()
+ {
+ return alignment;
+ }
+
+ /**
+ * Sets the default {@code TextIconAlignment}.
+ *
+ * @param alignment the default alignment
+ */
+ public void setAlignment(TextIconAlignment alignment)
+ {
+ this.alignment = alignment;
+ }
+
+ /**
+ * {@inheritDoc} Performs the transformation as described in the class
+ * comment.
+ */
+ public Object transform(Object o, TransformerContext ctx) throws Exception
+ {
+ if (o == null)
+ {
+ return null;
+ }
+ if (o instanceof StaticTextData)
+ {
+ return o;
+ }
+
+ StaticTextDataImpl result = new StaticTextDataImpl();
+ populate(result, ctx);
+ convertProperty(o, result, ctx);
+ return result;
+ }
+
+ /**
+ * Fills the specified data object with default values. This method is
+ * called by {@code transform()} to write default values into the result
+ * object. It evaluates the properties in the context and the member fields
+ * of this instance.
+ *
+ * @param data the data object to be filled
+ * @param ctx the {@code TransformerContext}
+ */
+ protected void populate(StaticTextDataImpl data, TransformerContext ctx)
+ {
+ Map<String, Object> props = ctx.properties();
+ data.setText(fetchValue((String) props.get(PROP_TEXT), getText()));
+ data.setIcon(fetchValue(props.get(PROP_ICON), getIcon()));
+ TextIconAlignment align =
+ fetchValue(convertAlignment(props.get(PROP_ALIGNMENT)),
+ getAlignment());
+ if (align != null)
+ {
+ data.setAlignment(align);
+ }
+ }
+
+ /**
+ * Performs the transformation if the object to be converted must be set as
+ * a property of a {@code StaticTextData} object. This method is called by
+ * {@code transform()} if the passed in object is not <b>null</b> and not a
+ * {@code StaticTextData} object. The base implementation sets the
+ * corresponding property in the passed in data object based on the class of
+ * the object to be converted.
+ *
+ * @param o the object to be converted
+ * @param data the data object to be filled
+ * @param ctx the {@code TransformerContext}
+ * @throws Exception if an error occurs
+ */
+ protected void convertProperty(Object o, StaticTextDataImpl data,
+ TransformerContext ctx) throws Exception
+ {
+ if (o instanceof CharSequence)
+ {
+ data.setText(((CharSequence) o).toString());
+ }
+ else if (o instanceof TextIconAlignment)
+ {
+ data.setAlignment((TextIconAlignment) o);
+ }
+ else
+ {
+ data.setIcon(o);
+ }
+ }
+
+ /**
+ * Helper method for converting an alignment value. This method can handle
+ * strings which are converted to alignment constants.
+ *
+ * @param value the value to be converted
+ * @return the converted value (can be <b>null</b>)
+ */
+ private static TextIconAlignment convertAlignment(Object value)
+ {
+ if (value instanceof TextIconAlignment)
+ {
+ return (TextIconAlignment) value;
+ }
+ if (value == null)
+ {
+ return null;
+ }
+ return TextIconAlignment.valueOf(value.toString().toUpperCase(
+ Locale.ENGLISH));
+ }
+
+ /**
+ * Helper method for obtaining a property value. If the value is defined, it
+ * is casted and returned. Otherwise the default value is used.
+ *
+ * @param value the value as object
+ * @param defValue the default value
+ * @return the final value
+ */
+ private static <T> T fetchValue(T value, T defValue)
+ {
+ return (value != null) ? value : defValue;
+ }
+}
Property changes on: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransformer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/core/src/site/xdoc/userguide/formbuilder.xml
===================================================================
--- trunk/core/src/site/xdoc/userguide/formbuilder.xml 2011-07-16 14:52:47 UTC (rev 201)
+++ trunk/core/src/site/xdoc/userguide/formbuilder.xml 2011-07-16 20:22:27 UTC (rev 202)
@@ -995,10 +995,40 @@
<p>
The following rule of thumb can be used to determine whether a plain label
or a static text element should be used: If the element is not changed
- during the runtime of the application, use a label. Otherwise take a static
+ during the life time of the application, use a label. Otherwise take a static
text and manipulate it accordingly.
</p>
<p>
+ Although there exists a <code>ComponentHandler</code> for each static text
+ element, the handlers are not added to the form object constructed for the
+ UI per default. This is typically not desired because these elements are not
+ used to gather user input and therefore do not need a corresponding
+ property in the model object of the form. However, the default behavior can
+ be changed by setting the <code>noField</code> attribute of the
+ <code><statictext></code> tag to <strong>false</strong>. The tag
+ should then also be given a name. Then it is possible to write data from
+ the model object of the form into the UI elements.
+ </p>
+ <p>
+ There is one problem however:
+ <code><a href="../apidocs/net/sf/jguiraffe/gui/builder/components/model/StaticTextHandler.html">
+ StaticTextHandler</a></code> expects that it is passed data as
+ <code><a href="../apidocs/net/sf/jguiraffe/gui/builder/components/model/StaticTextData.html">
+ StaticTextData</a></code> objects; therefore the properties of the form's
+ model bound to static text elements must be of this type. This is
+ inconvenient for instance if the elements are used to display mutable text
+ only. In order to simplify this use case, <em>JGUIraffe</em> provides a
+ special <a href="validators.html">transformer</a> implementation which can
+ convert data to <code>StaticTextData</code> objects:
+ <code><a href="../apidocs/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataTransromer.html">
+ StaticTextDataTransromer</a></code>. Among other things, this class is able
+ to transform a plain text string into a <code>StaticTextData</code> object
+ which can then be used to initialize the static text element. So if this
+ transformer is applied, properties of the form's model object can be
+ simple types. We will see in a moment how transformers are assigned to UI
+ elements.
+ </p>
+ <p>
<a name="transformers"/><strong>Transformers</strong>
</p>
<p>
Added: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestStaticTextDataTransformer.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestStaticTextDataTransformer.java (rev 0)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestStaticTextDataTransformer.java 2011-07-16 20:22:27 UTC (rev 202)
@@ -0,0 +1,283 @@
+/*
+ * Copyright 2006-2011 The JGUIraffe Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.jguiraffe.gui.builder.components.tags;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import net.sf.jguiraffe.gui.builder.components.model.StaticTextData;
+import net.sf.jguiraffe.gui.builder.components.model.TextIconAlignment;
+import net.sf.jguiraffe.transform.TransformerContext;
+
+import org.easymock.EasyMock;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test class for {@code StaticTextDataTransformer}.
+ *
+ * @author Oliver Heger
+ * @version $Id$
+ */
+public class TestStaticTextDataTransformer
+{
+ /** A mock for the transformer context. */
+ private TransformerContext ctx;
+
+ /** The transformer to be tested. */
+ private StaticTextDataTransformerTestImpl transformer;
+
+ @Before
+ public void setUp() throws Exception
+ {
+ ctx = EasyMock.createMock(TransformerContext.class);
+ transformer = new StaticTextDataTransformerTestImpl();
+ }
+
+ /**
+ * Tests a newly created instance.
+ */
+ @Test
+ public void testInit()
+ {
+ assertNull("Got a default text", transformer.getText());
+ assertNull("Got a default icon", transformer.getIcon());
+ assertNull("Got a default alignment", transformer.getAlignment());
+ }
+
+ /**
+ * Tests whether null objects are handled.
+ */
+ @Test
+ public void testTransformNull() throws Exception
+ {
+ EasyMock.replay(ctx);
+ assertNull("Wrong result", transformer.transform(null, ctx));
+ EasyMock.verify(ctx);
+ }
+
+ /**
+ * Tests transform() if a static text data object is passed in.
+ */
+ @Test
+ public void testTransformStaticTextData() throws Exception
+ {
+ StaticTextData data = EasyMock.createMock(StaticTextData.class);
+ EasyMock.replay(ctx, data);
+ assertSame("Wrong result", data, transformer.transform(data, ctx));
+ EasyMock.verify(ctx, data);
+ }
+
+ /**
+ * Tests populate() if there are no default properties.
+ */
+ @Test
+ public void testPopulateNoProperties()
+ {
+ EasyMock.expect(ctx.properties()).andReturn(
+ new HashMap<String, Object>());
+ EasyMock.replay(ctx);
+ StaticTextDataImpl data = new StaticTextDataImpl();
+ transformer.populate(data, ctx);
+ assertNull("Got a text", data.getText());
+ assertNull("Got an icon", data.getIcon());
+ assertEquals("No default alginment",
+ new StaticTextDataImpl().getAlignment(), data.getAlignment());
+ EasyMock.verify(ctx);
+ }
+
+ /**
+ * Tests whether properties of the context are used for populating the data
+ * object.
+ */
+ @Test
+ public void testPopulateFromContext()
+ {
+ Map<String, Object> props = new HashMap<String, Object>();
+ props.put("text", "MyText");
+ props.put("icon", this);
+ props.put("alignment", TextIconAlignment.RIGHT);
+ transformer.setText("other Text");
+ transformer.setIcon(new Object());
+ transformer.setAlignment(TextIconAlignment.CENTER);
+ EasyMock.expect(ctx.properties()).andReturn(
+ Collections.unmodifiableMap(props));
+ EasyMock.replay(ctx);
+ StaticTextDataImpl data = new StaticTextDataImpl();
+ transformer.populate(data, ctx);
+ assertEquals("Wrong text", props.get("text"), data.getText());
+ assertEquals("Wrong icon", this, data.getIcon());
+ assertEquals("Wrong alignment", TextIconAlignment.RIGHT,
+ data.getAlignment());
+ EasyMock.verify(ctx);
+ }
+
+ /**
+ * Tests whether the alignment enumeration is converted when data from the
+ * context is read.
+ */
+ @Test
+ public void testPopulateFromContextConvertEnum()
+ {
+ Map<String, Object> props = new HashMap<String, Object>();
+ props.put("alignment", "right");
+ EasyMock.expect(ctx.properties()).andReturn(
+ Collections.unmodifiableMap(props));
+ EasyMock.replay(ctx);
+ StaticTextDataImpl data = new StaticTextDataImpl();
+ transformer.populate(data, ctx);
+ assertEquals("Wrong alignment", TextIconAlignment.RIGHT,
+ data.getAlignment());
+ EasyMock.verify(ctx);
+ }
+
+ /**
+ * Tests whether properties of the transformer are used to populate the data
+ * object.
+ */
+ @Test
+ public void testPopulateFromProperties()
+ {
+ Map<String, Object> props = Collections.emptyMap();
+ EasyMock.expect(ctx.properties()).andReturn(props);
+ EasyMock.replay(ctx);
+ transformer.setText("text");
+ transformer.setIcon(this);
+ transformer.setAlignment(TextIconAlignment.CENTER);
+ StaticTextDataImpl data = new StaticTextDataImpl();
+ transformer.populate(data, ctx);
+ assertEquals("Wrong text", "text", data.getText());
+ assertEquals("Wrong icon", this, data.getIcon());
+ assertEquals("Wrong alignment", TextIconAlignment.CENTER,
+ data.getAlignment());
+ EasyMock.verify(ctx);
+ }
+
+ /**
+ * Tests whether a text object is correctly handled by transform().
+ */
+ @Test
+ public void testTransformCharSequence() throws Exception
+ {
+ transformer.setMockPopulate(true);
+ final String text = "This is a test text!";
+ StaticTextData data =
+ (StaticTextData) transformer.transform(new StringBuilder(text),
+ ctx);
+ assertEquals("Wrong text", text, data.getText());
+ transformer.verify(data);
+ }
+
+ /**
+ * Tests whether an icon object is correctly handled by transform().
+ */
+ @Test
+ public void testTransformIcon() throws Exception
+ {
+ transformer.setMockPopulate(true);
+ final Object icon = new Object();
+ StaticTextData data = (StaticTextData) transformer.transform(icon, ctx);
+ assertEquals("Wrong icon", icon, data.getIcon());
+ transformer.verify(data);
+ }
+
+ /**
+ * Tests whether an alignment object is correctly handled by transform().
+ */
+ @Test
+ public void testTransformAlignment() throws Exception
+ {
+ transformer.setMockPopulate(true);
+ StaticTextData data =
+ (StaticTextData) transformer.transform(TextIconAlignment.LEFT,
+ ctx);
+ assertEquals("Wrong alignment", TextIconAlignment.LEFT,
+ data.getAlignment());
+ transformer.verify(data);
+ }
+
+ /**
+ * A special transformer implementation which allows mocking the population
+ * of the data object.
+ */
+ private class StaticTextDataTransformerTestImpl extends
+ StaticTextDataTransformer
+ {
+ /** The number of invocations of populate(). */
+ private int populateCount;
+
+ /** The data object passed to populate(). */
+ private StaticTextDataImpl populateData;
+
+ /** A flag whether the populate() method is to be mocked. */
+ private boolean mockPopulate;
+
+ /**
+ * Returns a flag whether populate() is to be mocked.
+ *
+ * @return the mock populate() flag
+ */
+ public boolean isMockPopulate()
+ {
+ return mockPopulate;
+ }
+
+ /**
+ * Sets a flag whether populate() is to be mocked.
+ *
+ * @param mockPopulate the mock flag
+ */
+ public void setMockPopulate(boolean mockPopulate)
+ {
+ this.mockPopulate = mockPopulate;
+ }
+
+ /**
+ * Verifies whether a transformation was done correctly.
+ *
+ * @param data the data object returned by transform()
+ */
+ public void verify(StaticTextData data)
+ {
+ assertEquals("Wrong number of populate() calls", 1, populateCount);
+ assertSame("Wrong data object", populateData, data);
+ }
+
+ /**
+ * Either mocks this method and records the invocation or calls the
+ * super method.
+ */
+ @Override
+ protected void populate(StaticTextDataImpl data, TransformerContext tctx)
+ {
+ if (isMockPopulate())
+ {
+ populateCount++;
+ populateData = data;
+ assertSame("Wrong context", ctx, tctx);
+ }
+ else
+ {
+ super.populate(data, tctx);
+ }
+ }
+ }
+}
Property changes on: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestStaticTextDataTransformer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2011-07-16 14:52:54
|
Revision: 201
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=201&view=rev
Author: oheger
Date: 2011-07-16 14:52:47 +0000 (Sat, 16 Jul 2011)
Log Message:
-----------
[3368750] Prevent that builders throw an undocumented LocatorException.
Modified Paths:
--------------
trunk/core/src/changes/changes.xml
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBeanBuilder.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/impl/TestJellyBeanBuilder.java
Modified: trunk/core/src/changes/changes.xml
===================================================================
--- trunk/core/src/changes/changes.xml 2011-07-02 15:32:19 UTC (rev 200)
+++ trunk/core/src/changes/changes.xml 2011-07-16 14:52:47 UTC (rev 201)
@@ -27,6 +27,10 @@
</properties>
<body>
<release version="1.1" date="in SVN" description="TBD">
+ <action dev="oheger" issue="3368750" type="fix">
+ Builders could throw an undocumented LocatorException. Such exceptions
+ are now caught and re-thrown as BuilderException exceptions.
+ </action>
<action dev="oheger" issue="3299754" type="fix">
Fixed a NullPointerException which can occur in the dependency injection
framework when looking up beans by classes rather than bean names.
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBeanBuilder.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBeanBuilder.java 2011-07-02 15:32:19 UTC (rev 200)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBeanBuilder.java 2011-07-16 14:52:47 UTC (rev 201)
@@ -33,6 +33,7 @@
import net.sf.jguiraffe.gui.builder.di.DIBuilderData;
import net.sf.jguiraffe.gui.builder.di.tags.DITagLibrary;
import net.sf.jguiraffe.locators.Locator;
+import net.sf.jguiraffe.locators.LocatorException;
import net.sf.jguiraffe.locators.LocatorUtils;
import org.apache.commons.jelly.JellyContext;
@@ -182,14 +183,19 @@
}
catch (JellyException jex)
{
- throw new BuilderException(script.getURL(),
+ throw new BuilderException(extractScriptURL(script),
"Error when executing builder script", jex);
}
catch (IOException ioex)
{
- throw new BuilderException(script.getURL(),
+ throw new BuilderException(extractScriptURL(script),
"IO error when executing builder script", ioex);
}
+ catch (LocatorException locex)
+ {
+ throw new BuilderException(extractScriptURL(script),
+ "Locator threw an exception", locex);
+ }
}
/**
@@ -356,7 +362,28 @@
}
/**
- * An implementation of the <code>BeanBuilderResult</code> interface
+ * Extracts the script URL from the given {@code Locator}. Occurring
+ * exceptions are caught; in this case result is <b>null</b>. (This method
+ * is just to provide details for exception messages; therefore it is not
+ * necessary to handle exceptions more gracefully.)
+ *
+ * @param script the {@code Locator}
+ * @return the URL of this {@code Locator} or <b>null</b>
+ */
+ private static URL extractScriptURL(Locator script)
+ {
+ try
+ {
+ return script.getURL();
+ }
+ catch (LocatorException locex)
+ {
+ return null;
+ }
+ }
+
+ /**
+ * An implementation of the {@code BeanBuilderResult} interface
* specific for this builder implementation. This class delegates to a
* {@link DIBuilderData} object, which holds the actual data.
*/
Modified: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/impl/TestJellyBeanBuilder.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/impl/TestJellyBeanBuilder.java 2011-07-02 15:32:19 UTC (rev 200)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/impl/TestJellyBeanBuilder.java 2011-07-16 14:52:47 UTC (rev 201)
@@ -26,6 +26,7 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -59,6 +60,7 @@
import net.sf.jguiraffe.locators.ClassPathLocator;
import net.sf.jguiraffe.locators.FileLocator;
import net.sf.jguiraffe.locators.Locator;
+import net.sf.jguiraffe.locators.LocatorException;
import net.sf.jguiraffe.locators.LocatorUtils;
import org.apache.commons.jelly.JellyContext;
@@ -409,6 +411,62 @@
}
/**
+ * Tests whether an exception thrown by the locator is wrapped by a builder
+ * exception.
+ */
+ @Test
+ public void testBuildLocatorException() throws IOException,
+ BuilderException
+ {
+ Locator locator = EasyMock.createMock(Locator.class);
+ LocatorException locex = new LocatorException("Test exception!");
+ URL url = new URL("http://jguiraffe.sf.net");
+ EasyMock.expect(locator.getInputStream()).andThrow(locex);
+ EasyMock.expect(locator.getURL()).andReturn(url);
+ EasyMock.replay(locator);
+ builder = setUpBuilder();
+ try
+ {
+ builder.build(locator, null, null);
+ fail("Locator exception not detected!");
+ }
+ catch (BuilderException bex)
+ {
+ assertEquals("Wrong cause", locex, bex.getCause());
+ assertSame("Wrong URL", url, bex.getScriptURL());
+ }
+ EasyMock.verify(locator);
+ }
+
+ /**
+ * Tests whether a locator exception is handled by the build() method if
+ * querying the script URL causes an exception, too.
+ */
+ @Test
+ public void testBuildLocatorExceptionURLEx() throws IOException,
+ BuilderException
+ {
+ Locator locator = EasyMock.createMock(Locator.class);
+ LocatorException locex = new LocatorException("Test exception!");
+ EasyMock.expect(locator.getInputStream()).andThrow(locex);
+ EasyMock.expect(locator.getURL()).andThrow(new LocatorException());
+ EasyMock.replay(locator);
+ builder = setUpBuilder();
+ try
+ {
+ builder.build(locator, null, null);
+ fail("Locator exception not detected!");
+ }
+ catch (BuilderException bex)
+ {
+ assertEquals("Wrong cause", locex, bex.getCause());
+ assertNull("Got a URL", bex.getScriptURL());
+ }
+ EasyMock.verify(locator);
+
+ }
+
+ /**
* Creates an in-memory locator pointing to the test Jelly script.
*
* @return the in-memory locator
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2011-07-02 15:32:26
|
Revision: 200
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=200&view=rev
Author: oheger
Date: 2011-07-02 15:32:19 +0000 (Sat, 02 Jul 2011)
Log Message:
-----------
[3299754] Fixed a NPE in the dependency injection framework when looking up beans by class.
Modified Paths:
--------------
trunk/core/src/changes/changes.xml
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowBuilderData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/window/TestWindowBuilderData.java
Modified: trunk/core/src/changes/changes.xml
===================================================================
--- trunk/core/src/changes/changes.xml 2011-07-01 20:18:25 UTC (rev 199)
+++ trunk/core/src/changes/changes.xml 2011-07-02 15:32:19 UTC (rev 200)
@@ -1,3 +1,23 @@
+<!--
+
+ Copyright 2006-2011 The JGUIraffe Team.
+
+ Licensed under the Apache License, Version 2.0 (the "License")
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<!-- ===================================================================== -->
+<!-- $Id$ -->
+<!-- ===================================================================== -->
<document xmlns="http://maven.apache.org/changes/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/xsd/changes-1.0.0.xsd">
@@ -7,6 +27,10 @@
</properties>
<body>
<release version="1.1" date="in SVN" description="TBD">
+ <action dev="oheger" issue="3299754" type="fix">
+ Fixed a NullPointerException which can occur in the dependency injection
+ framework when looking up beans by classes rather than bean names.
+ </action>
</release>
<release version="1.0" date="2010-09-03" description="First release">
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowBuilderData.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowBuilderData.java 2011-07-01 20:18:25 UTC (rev 199)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowBuilderData.java 2011-07-02 15:32:19 UTC (rev 200)
@@ -15,6 +15,7 @@
*/
package net.sf.jguiraffe.gui.builder.window;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@@ -260,9 +261,9 @@
*/
public void beanNames(Set<String> names)
{
- names.add(KEY_CURRENT_WINDOW);
- names.add(KEY_FORM_BEAN);
- names.add(KEY_PARENT_WINDOW);
+ addBeanName(names, KEY_CURRENT_WINDOW, getResultWindow());
+ addBeanName(names, KEY_FORM_BEAN, getFormBean());
+ addBeanName(names, KEY_PARENT_WINDOW, getParentWindow());
for (String name : windows.keySet())
{
@@ -342,4 +343,21 @@
return (context != null) ? (WindowBuilderData) context
.findVariable(CTX_KEY) : null;
}
+
+ /**
+ * Helper method for adding a bean name to a collection only if the bean is
+ * not <b>null</b>.
+ *
+ * @param col the collection
+ * @param name the name
+ * @param bean the bean
+ */
+ private static void addBeanName(Collection<String> col, String name,
+ Object bean)
+ {
+ if (bean != null)
+ {
+ col.add(name);
+ }
+ }
}
Modified: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/window/TestWindowBuilderData.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/window/TestWindowBuilderData.java 2011-07-01 20:18:25 UTC (rev 199)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/window/TestWindowBuilderData.java 2011-07-02 15:32:19 UTC (rev 200)
@@ -115,17 +115,40 @@
}
/**
- * Tests querying the names of the supported beans.
+ * Initializes the properties of the test object with object references.
*/
+ private void initAssociatedObjects()
+ {
+ data.setFormBean(new Object());
+ data.setParentWindow(EasyMock.createNiceMock(Window.class));
+ data.setResultWindow(EasyMock.createNiceMock(Window.class));
+ }
+
+ /**
+ * Tests whether the correct bean names are returned if all involved objects
+ * are present.
+ */
@Test
- public void testBeanNames()
+ public void testBeanNamesWithObjectRefs()
{
+ initAssociatedObjects();
Set<String> names = new HashSet<String>();
data.beanNames(names);
checkBeanNames(names);
}
/**
+ * Tests beanNames() if object references are not set.
+ */
+ @Test
+ public void testBeanNamesNoObjectRefs()
+ {
+ Set<String> names = new HashSet<String>();
+ data.beanNames(names);
+ assertTrue("Got bean names", names.isEmpty());
+ }
+
+ /**
* Helper method for creating and initializing a bean store with data from
* the window builder data object.
*
@@ -159,6 +182,7 @@
@Test
public void testInitBeanStoreProviderNames()
{
+ initAssociatedObjects();
SimpleBeanStoreImpl store = setUpStore();
checkBeanNames(store.providerNames());
assertTrue("Instance key not found", store.providerNames().contains(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2011-07-01 20:18:43
|
Revision: 199
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=199&view=rev
Author: oheger
Date: 2011-07-01 20:18:25 +0000 (Fri, 01 Jul 2011)
Log Message:
-----------
Changed copyright year in license headers. Added an initial changes.xml.
Modified Paths:
--------------
trunk/core/pom.xml
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanContext.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanContextClient.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanCreationEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanCreationListener.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanInitializer.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/di/ClassLoaderProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/ConversionHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/di/Dependency.java
trunk/core/src/main/java/net/sf/jguiraffe/di/DependencyProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/EnumConverter.java
trunk/core/src/main/java/net/sf/jguiraffe/di/InjectionException.java
trunk/core/src/main/java/net/sf/jguiraffe/di/InvocationHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/di/MutableBeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/di/ReflectionUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/BeanContextWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/BeanCreationListenerSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ChainedInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDependency.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDescription.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/CombinedBeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ConstructorInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultBeanContext.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultBeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultClassLoaderProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultDependencyProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invokable.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/MethodInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NameDependency.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NullInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/RestrictedDependencyProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SetPropertyInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SimpleBeanStoreImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/package.html
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/CollectionBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstantBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstructorBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/FactoryBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ListBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MapBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MethodInvocationBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/PropertiesBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SetBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SimpleBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/package.html
trunk/core/src/main/java/net/sf/jguiraffe/di/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/Application.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationClient.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationContext.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationContextImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationResources.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationRuntimeException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationShutdownActionTask.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationShutdownListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/CommandActionTask.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/OpenWindowCommand.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/AutoReleaseListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BeanBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BeanBuilderFactory.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BeanBuilderResult.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/Builder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BuilderException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/Accelerator.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionDataImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionInvoker.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManagerWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionStore.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionTask.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/FormAction.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/FormActionException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/PopupMenuBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/PopupMenuHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/SimplePopupMenuHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/AbstractActionDataTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionBuilderTagLibrary.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionContainer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionControlTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionDataTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionTaskTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/AndEventFilterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/BeanRegistrationCallBack.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ChainedEventFilterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ChangeListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ComponentRegistrationCallBack.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventFilterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventListenerTypeTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventRegistrationTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/FocusListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/FormEventListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MenuBarTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MenuItemTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MenuTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MouseListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/OrEventFilterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/PopupHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/RegistrationCallBackBase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/SeparatorTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ToolButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ToolbarTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/AbstractCompositeComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/Color.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ColorHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentBuilderCallBack.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentManagerWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/Composite.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/CompositeComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/DefaultFieldHandlerFactory.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/DefaultToolTipManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/FieldHandlerFactory.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/FormBuilderException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/FormBuilderRuntimeException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/Orientation.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ToolTipManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/WidgetHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/AbstractRadioButtonHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/DefaultRadioButtonHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/ListComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/ListModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/ProgressBarHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/StaticTextData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/StaticTextHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TableHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TextHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TextIconAlignment.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpandVetoException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpansionEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpansionListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeNodePath.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreePreExpansionListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/BorderConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/BorderLayoutTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ButtonLayoutTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/CheckboxTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ComboBoxTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ComponentBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ComponentGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ComponentHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ConditionalTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ContainerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ConverterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/DesktopPanelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FieldTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FontTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FormBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FormBuilderTagLibrary.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/IconSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/IconTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/InputComponentTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/LabelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/LayoutTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListBoxTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelItemTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/LocalizedTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PanelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PasswordFieldTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentCellConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentCellGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentColConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentColGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentLayoutTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentRowConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentRowGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ProgressBarTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PropertiesSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PropertiesTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PropertySupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PropertyTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PushButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/RadioButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/RadioGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ReferenceTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/SimpleComponentTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/SliderTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/SplitterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TabTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TabbedPaneTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextAreaTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextFieldTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextIconData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextIconTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextListModelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ToggleButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TransformerBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TransformerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TreeIconHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TreeIconTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TreeTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/UseBeanBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ValidatorBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ValidatorTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ValidatorsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnClass.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnComponentTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnEditorTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnFieldHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnRendererTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableColumnTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableColumnWidthController.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableEditorValidationHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableEditorValidationHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableSelectionHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableSelectionHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/DIBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/AbstractBeanTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/BeanStoreTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/BeanTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ClassDescData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/CollectionTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ConstantValueTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ConstructorInvocationTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ConstructorTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/DITagLibrary.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/DependencyTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ElementTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/EntryKeyTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/EntryTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/FactoryTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/InvocationData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/InvocationTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/InvokableSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ListTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/MapTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/MethodInvocationTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/NullTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ParameterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/PropertiesTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/SetPropertyTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/SetTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ShutdownHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ValueData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ValueSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ValueTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/ActionEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/ActionGroupEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/ChainElementEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/ComponentEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/ElementEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/EnablerBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/EnablerConverter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/InverseEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/NullEnabler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/enablers/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/BuilderEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormActionEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormActionListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormChangeEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormChangeListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEventListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEventManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormFocusEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormFocusListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormListenerType.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormMouseEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormMouseListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/Keys.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/Modifiers.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/PlatformEventManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/AbstractEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/AndEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/ChainedEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/ClassEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/EventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/OrEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/TypeEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBeanBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBeanBuilderFactory.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyContextBeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/utils/GUIRuntimeException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/utils/GUISynchronizer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/utils/MessageOutput.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/utils/NullMessageOutput.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/utils/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/InvariantWindowClosingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/Window.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowBuilderException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowClosingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManagerWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/ColorFieldMarker.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FieldValidationStatus.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormController.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerFieldStatusEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerFieldStatusListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerFormEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerFormListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerValidationEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerValidationListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormValidationTrigger.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormValidationTriggerFocus.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormValidationTriggerNone.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/ToolTipFieldMarker.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/DialogTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/FormControllerListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/FormControllerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/FrameTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/InternalFrameTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/WindowBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/WindowBuilderTagLibrary.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/WindowControllerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/WindowListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/Command.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandBase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueue.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/ScheduleAware.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/BindingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ComponentHandlerImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ComponentStore.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ComponentStoreImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/DefaultFieldHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/DefaultFormValidatorResults.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FieldHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/Form.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FormRuntimeException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FormValidationMessageFormat.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FormValidator.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FormValidatorResults.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/TransformerWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ValidationPhase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ValidatorWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/bind/BeanBindingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/bind/DummyBindingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/bind/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/BorderLayout.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/ButtonLayout.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellAlignment.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellConstraints.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellSize.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/NumberWithUnit.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayout.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayoutBase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayoutPlatformAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/Unit.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/UnitSizeHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingActionManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingCheckedItemController.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingFormAction.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingPopupListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingPopupMenuBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingSubMenuBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingButtonHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingComboBoxHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingComponentManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingComponentUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingConfigurationTreeModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingEditableComboBoxHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingLimitedTextModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingListBoxHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingListModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingListModelHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingMultiListBoxHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingProgressBarHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingRadioGroupWidgetHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingSliderHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingStaticTextComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTabbedPaneHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTableComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTextAreaHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTextHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTreeCellRenderer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTreeComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingWidgetHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableCellEditor.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableCellRenderer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableColumnWidthListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableEditorValidationHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableSelectionHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/ActionEventAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/ChangeEventAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/ChangeListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/FocusEventAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/MouseEventAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/SwingEventAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/SwingEventConstantMapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/SwingEventManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/SwingEventSource.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/utils/SwingGUISynchronizer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/utils/SwingMessageOutput.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/utils/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/DialogAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/FrameAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/InternalFrameAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/InternalFrameListenerAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/SwingWindow.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/SwingWindowManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/WindowAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/WindowHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/WindowListenerAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/package.html
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/SwingPercentLayoutAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/SwingSizeHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/package.html
trunk/core/src/main/java/net/sf/jguiraffe/locators/AbstractLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/AbstractStreamLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/ByteArrayLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/ClassPathLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/FileLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/Locator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorConverter.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorException.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/URLLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/package.html
trunk/core/src/main/java/net/sf/jguiraffe/resources/Message.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/ResourceGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/ResourceLoader.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/ResourceManager.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/ResourceManagerImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/bundle/BundleResourceGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/bundle/BundleResourceLoader.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/bundle/package.html
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/package.html
trunk/core/src/main/java/net/sf/jguiraffe/resources/package.html
trunk/core/src/main/java/net/sf/jguiraffe/transform/AbstractDecimalTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/AbstractIntegerTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ChainValidator.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DateTimeTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DateTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DateTransformerBase.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DefaultValidationMessageHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DefaultValidationResult.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DoubleTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DummyTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/FloatTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/IntegerTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/LongTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/NumberTransformerBase.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/RegexValidator.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/RequiredValidator.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/TimeTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ToStringTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/Transformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/TransformerContext.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/TransformerContextPropertiesWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessage.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessageConstants.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessageHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessageLevel.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationResult.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/Validator.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/package.html
trunk/core/src/main/resources/application.properties
trunk/core/src/main/resources/application_de.properties
trunk/core/src/main/resources/defaultbeans.jelly
trunk/core/src/main/resources/validators.properties
trunk/core/src/main/resources/validators_de.properties
trunk/core/src/site/site.xml
trunk/core/src/site/xdoc/index.xml
trunk/core/src/site/xdoc/overview.xml
trunk/core/src/site/xdoc/userguide/actionbuilder.xml
trunk/core/src/site/xdoc/userguide/application.xml
trunk/core/src/site/xdoc/userguide/builders.xml
trunk/core/src/site/xdoc/userguide/builderscript.xml
trunk/core/src/site/xdoc/userguide/commands.xml
trunk/core/src/site/xdoc/userguide/dibuilder.xml
trunk/core/src/site/xdoc/userguide/formbuilder.xml
trunk/core/src/site/xdoc/userguide/formcontroller.xml
trunk/core/src/site/xdoc/userguide/forms.xml
trunk/core/src/site/xdoc/userguide/layouts.xml
trunk/core/src/site/xdoc/userguide/resources.xml
trunk/core/src/site/xdoc/userguide/user_guide.xml
trunk/core/src/site/xdoc/userguide/validators.xml
trunk/core/src/site/xdoc/userguide/windowbuilder.xml
trunk/core/src/test/java/net/sf/jguiraffe/JGuiraffeTestHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/di/ReflectionTestClass.java
trunk/core/src/test/java/net/sf/jguiraffe/di/TestConversionHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/di/TestEnumConverter.java
trunk/core/src/test/java/net/sf/jguiraffe/di/TestInvocationHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/di/TestReflectionUtils.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/AbstractDependentProviderTest.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/AbstractInvocationTest.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/BeanCreationListenerTestImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/ClassDescriptionMock.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestBeanContextWrapper.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestBeanCreationListenerSupport.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestChainedInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestClassDescription.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestCombinedBeanStore.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestConstructorInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultBeanContext.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultBeanStore.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultClassLoaderProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDefaultDependencyProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestDependencies.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestMethodInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestNullInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestRestrictedDependencyProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestSetPropertyInvocation.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/TestSimpleBeanStoreImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/SimpleBeanProviderTestHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestBeanProviders.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestCollectionBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestConstantBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestConstructorBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestLifeCycleBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestMapBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestMethodInvocationBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestPropertiesBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/providers/TestSingletonBeanProvider.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplication.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplicationBuilderData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplicationContextImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplicationResources.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestApplicationShutdownActionTask.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestCommandActionTask.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestDefaultBeans.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/app/TestOpenWindowCommand.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/TestAutoReleaseListener.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/ActionManagerImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/FormActionImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestAccelerator.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionBuilder.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionDataImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionInvoker.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionManagerWrapper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionStore.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestSimplePopupMenuHandler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/AbstractActionTagTest.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestActionTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestActionTagDeferredTasks.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestEventFilterTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestEventListenerTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestEventListenerTypeTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestEventRegistrationTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestMenuTags.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestPopupHandlerTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestPopupHandlerTagScript.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/tags/TestToolbarTags.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/ComponentManagerImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/Container.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestAbstractCompositeComponentHandler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestColor.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestColorHelper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentBuilderData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentGroup.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentManagerWrapper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestDefaultToolTipManager.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestOrientation.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TreeHandlerImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/WidgetHandlerImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/model/TestDefaultRadioButtonHandler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/model/TestTreeNodePath.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/AbstractTagTest.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestBorderLayoutTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestButtonLayoutTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestButtonTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestCheckboxTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestComboBoxTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestComponentGroupTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestConverterTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestConverterTagScript.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestDesktopPanelTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestFieldTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestFontTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestFormBaseTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestIconTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestInputComponentTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestLabelTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestListBoxTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestListModelUtils.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestLocalizedTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestPanelTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestPasswordFieldTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestPercentLayoutTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestProgressBarTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestPropertiesTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestPropertyTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestRadioButtonTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestRadioButtonTagScript.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestSliderTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestSplitterTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestStaticTextDataImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestStaticTextTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTabbedPaneTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTextAreaTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTextFieldTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTextIconData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTextListModelTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTransformerBaseTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTransformerTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTransformersWithProperties.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTreeIconTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTreeTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestTreeTagScript.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestUseBeanBaseTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestValidatorTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/TestValidatorsTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/table/TestColumnFieldHandler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/table/TestTableColumnWidthController.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/tags/table/TestTableTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/TestDIBuilderData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/MockClassDescData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestBeanStoreTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestBeanTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestClassDescData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestCollectionTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestConstantValueTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestConstructorTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestDependencyTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestElementTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestEntryKeyTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestEntryTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestFactoryTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestInvocationData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestInvocationTags.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestMapTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestNullTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestSetPropertyTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestShutdownHandlerTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestValueData.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/di/tags/TestValueTag.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/enablers/TestActionEnabler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/enablers/TestActionGroupEnabler.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/enablers/TestChainElementEnabler.java
trunk/core/src/test/java/...
[truncated message content] |
|
From: <oh...@us...> - 2010-10-31 19:35:19
|
Revision: 198
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=198&view=rev
Author: oheger
Date: 2010-10-31 19:35:13 +0000 (Sun, 31 Oct 2010)
Log Message:
-----------
Minor tweaks and preparations for next development iteration.
Modified Paths:
--------------
trunk/core/pom.xml
trunk/examples/pom.xml
trunk/pom.xml
trunk/src/site/xdoc/index.xml
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2010-09-03 17:30:15 UTC (rev 197)
+++ trunk/core/pom.xml 2010-10-31 19:35:13 UTC (rev 198)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.0</version>
+ <version>1.1-SNAPSHOT</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
Modified: trunk/examples/pom.xml
===================================================================
--- trunk/examples/pom.xml 2010-09-03 17:30:15 UTC (rev 197)
+++ trunk/examples/pom.xml 2010-10-31 19:35:13 UTC (rev 198)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.0</version>
+ <version>1.1-SNAPSHOT</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-09-03 17:30:15 UTC (rev 197)
+++ trunk/pom.xml 2010-10-31 19:35:13 UTC (rev 198)
@@ -24,7 +24,7 @@
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
<packaging>pom</packaging>
- <version>1.0</version>
+ <version>1.1-SNAPSHOT</version>
<modules>
<module>core</module>
@@ -36,6 +36,9 @@
<organization>
<name>The JGUIraffe Team</name>
</organization>
+ <description>
+ The parent pom of the JGUIraffe project.
+ </description>
<issueManagement>
<url>https://sourceforge.net/tracker/?func=add&group_id=162864&atid=825469</url>
</issueManagement>
@@ -67,7 +70,7 @@
<licenses>
<license>
<name>Apache License, Version 2.0</name>
- <url>../LICENSE.txt</url>
+ <url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
Modified: trunk/src/site/xdoc/index.xml
===================================================================
--- trunk/src/site/xdoc/index.xml 2010-09-03 17:30:15 UTC (rev 197)
+++ trunk/src/site/xdoc/index.xml 2010-10-31 19:35:13 UTC (rev 198)
@@ -55,6 +55,24 @@
<p>
<table>
<tr>
+ <td>2010-10-31</td>
+ <td>
+ The <em>JGUIraffe</em> jar has been deployed to the
+ <a href="http://repo1.maven.org/maven2">Central Maven repository</a>.
+ Projects using <a href="http://maven.apache.org/">Maven</a> as their build
+ tool can now declare the <em>JGUIraffe</em> dependency as follows:
+ <pre>
+ <![CDATA[
+ <dependency>
+ <groupId>net.sf.jguiraffe</groupId>
+ <artifactId>jguiraffe</artifactId>
+ <version>1.0</version>
+ </dependency>
+ ]]>
+ </pre>
+ </td>
+ </tr>
+ <tr>
<td>2010-09-03</td>
<td>
Release 1.0 of <em>JGUIraffe</em>.
@@ -90,7 +108,7 @@
site.</a>. To ensure integrity the artifacts have been signed. Please make
sure that you verify the signature after downloading. A file with the keys
used for signing can be found
- <a href="https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/conf/KEYS">
+ <a href="https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/trunk/conf/KEYS">
here</a>.
</p>
</subsection>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2010-09-03 17:30:21
|
Revision: 197
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=197&view=rev
Author: oheger
Date: 2010-09-03 17:30:15 +0000 (Fri, 03 Sep 2010)
Log Message:
-----------
Tagging release 1.0
Added Paths:
-----------
tags/jguiraffe-1.0/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <oh...@us...> - 2010-09-03 17:28:48
|
Revision: 196
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=196&view=rev
Author: oheger
Date: 2010-09-03 17:28:38 +0000 (Fri, 03 Sep 2010)
Log Message:
-----------
Fixed findbugs errors. Further wrapper implementations. Site improvements and release preparations.
Modified Paths:
--------------
trunk/core/pom.xml
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanCreationEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/WidgetHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpansionEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ProgressBarTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormListenerType.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerValidationEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/NumberWithUnit.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayoutBase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingActionManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingProgressBarHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTabbedPaneHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/SwingSizeHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/URLLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessageConstants.java
trunk/core/src/site/site.xml
trunk/core/src/test/java/net/sf/jguiraffe/di/impl/AbstractInvocationTest.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentManagerWrapper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/impl/TestJellyBeanBuilder.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/layout/TestPercentLayout.java
trunk/core/src/test/java/net/sf/jguiraffe/locators/TestURLLocator.java
trunk/examples/pom.xml
trunk/examples/src/site/site.xml
trunk/pom.xml
trunk/src/site/site.xml
trunk/src/site/xdoc/index.xml
Added Paths:
-----------
trunk/RELEASE-NOTES.txt
trunk/conf/KEYS
trunk/conf/findbugs-exclude.xml
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManagerWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManagerWrapper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionManagerWrapper.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/window/TestWindowManagerWrapper.java
trunk/src/assembly/
trunk/src/assembly/bin.xml
trunk/src/assembly/src.xml
Added: trunk/RELEASE-NOTES.txt
===================================================================
--- trunk/RELEASE-NOTES.txt (rev 0)
+++ trunk/RELEASE-NOTES.txt 2010-09-03 17:28:38 UTC (rev 196)
@@ -0,0 +1,23 @@
+$Id$
+
+ JGUIraffe Library
+ Version 1.0
+ Release Notes
+
+
+INTRODUCTION
+============
+
+This document contains the release notes for this version of the JGUIraffe
+library. JGUIraffe is a framework supporting the implementation of Java
+desktop applications using concepts like declarative UI definition, action and
+command objects, and dependency injection.
+
+This is the first release of JGUIraffe.
+
+Comprehensive documentation about the JGUIraffe library is available on
+the project's web site
+ http://jguiraffe.sourceforge.net/
+
+A user's guide can be fount at
+ http://jguiraffe.sourceforge.net/jguiraffe/userguide/user_guide.html
Property changes on: trunk/RELEASE-NOTES.txt
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/conf/KEYS
===================================================================
--- trunk/conf/KEYS (rev 0)
+++ trunk/conf/KEYS 2010-09-03 17:28:38 UTC (rev 196)
@@ -0,0 +1,42 @@
+This file contains the keys used for signing JGUIraffe artifacts.
+Import the keys using one of the following commands:
+ pgp < KEYS
+ gpg --import KEYS
+
+After that pgp or gpg can be used to verify the signatures of downloaded
+JGUIraffe artifacts.
+
+pub 1024D/D75CF3DC 2005-02-09
+uid Oliver Heger (CODE SIGNING KEY) <oh...@ap...>
+sig 3 D75CF3DC 2005-02-09 Oliver Heger (CODE SIGNING KEY) <oh...@ap...>
+sig 3 D75CF3DC 2005-02-09 Oliver Heger (CODE SIGNING KEY) <oh...@ap...>
+sub 1024g/E5A7764F 2005-02-09
+sig D75CF3DC 2005-02-09 Oliver Heger (CODE SIGNING KEY) <oh...@ap...>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.10 (MingW32)
+
+mQGiBEIKY9oRBACP354Cc/RrUGb19JCaNTpnJi/QlOVGg9VMcumnVf+/NPKEwm8x
+rAGFkL/OpDXYbMPP0yEZ9W1ABaor5azA0U3C6QhQrf4wHcGAUmfytcu5AcdJQEAB
+iIn+R9hlsWm4X7yOokHiEF0x35YZW1dFJA14RERalrdMd0ynkfSX3uT+swCgsfKb
+4pena5krbWZQE+cVMkQC7T0D/RThlQHlePkpmV/GBi7wahJBUOTRj4oRPkcJJq0N
+Ov3RrG70gJXsaZOTFgSZNrXY2y/1imn/ijnMtZx/fC/+ILol5FnkvIqWjLD6wg7k
+Q5c5JysTjlBLNf29/uzoHDMHGzFTU6xrB/hdVXG6vjUtd5bZ6NNVMbepNocWo19s
+LEjAA/4nOTD5BOto6CYbvQqvYkxdTGUw520sx101bDnITA5Wuooa4yoi5VtWxD4B
+b9lZWtA43WPS/cmTYq2PVlMK1ckAMc+5CvI4EKuRQbK3V6PvDMSHqCG/QCtJ5SQr
+dTh3o9eIP0AcTdy63Bui6/omQ+JIYhs7M+BH/D2XVorHqmfU4LQzT2xpdmVyIEhl
+Z2VyIChDT0RFIFNJR05JTkcgS0VZKSA8b2hlZ2VyQGFwYWNoZS5vcmc+iF4EExEC
+AB4FAkIKY9oCGwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQfEUEpNdc89yaEQCc
+CK8LVZ6Thm4ovu7klWWDTSEQElsAoKCL8z3AHK/gSfRypEPum4z3LfnFiF4EExEC
+AB4FAkIKY9oCGwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQfEUEpNdc89yaEQCb
+BlRHNMtpv4SoV3ZE4Lk4QVqECqYAoJxZ7kNpGRXpHNmgRLqAWYXRbbQHuQENBEIK
+Y98QBADvq3R8EJ7idASVqvvQaxbD13WAGdGV+eAQA8Y0jJy2b1jIvNNk1AT6wcDh
+CQcByLpVlfK+4lJ3HY8jr481qYhzRzq+yVRXy3asd5lgCEWpEf/4eQDsYkAyU0/q
+hu3ZoyihzaRdREzVMh8miXdVs09iPo5uBvmk5dpAIlLHiZHf4wADBgQA4Umfa+Ao
+Xjqtsmeao67GIZIDtaBCFztaIHPSrqASLgdWMjIRJ/92xEXRyqeiAy/oxUado1No
+S+kJ9qY+21O0FXPkIt8CvH4Mh0HZDMyS6W3O4w/9hDSploj9wmHNMkEON4uYMgMn
+8+I4wCrPkEJMyaWuV1iTB+SxkdOI0UbKGpmISAQYEQIACQUCQgpj3wIbDAAKCRB8
+RQSk11zz3LAMAJICwier2ykv/kNdQLFoEjhZS/vdAJ9zWXBgSKARkMcT3OdjwoOv
+1sGStw==
+=xKwh
+-----END PGP PUBLIC KEY BLOCK-----
Added: trunk/conf/findbugs-exclude.xml
===================================================================
--- trunk/conf/findbugs-exclude.xml (rev 0)
+++ trunk/conf/findbugs-exclude.xml 2010-09-03 17:28:38 UTC (rev 196)
@@ -0,0 +1,30 @@
+<!--
+ Copyright 2006-2010 The GUIraffe Team.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- ===================================================================== -->
+<!-- $Id$ -->
+<!-- ===================================================================== -->
+<FindBugsFilter>
+ <Match>
+ <Class name="net.sf.jguiraffe.di.impl.DefaultBeanContext"/>
+ <Bug code="Wa"/>
+ </Match>
+
+ <Match>
+ <Class name="net.sf.jguiraffe.gui.builder.event.filter.TypeEventFilter"/>
+ <Bug code="REC"/>
+ </Match>
+</FindBugsFilter>
\ No newline at end of file
Property changes on: trunk/conf/findbugs-exclude.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/pom.xml 2010-09-03 17:28:38 UTC (rev 196)
@@ -24,7 +24,7 @@
<parent>
<groupId>net.sf.jguiraffe</groupId>
<artifactId>jguiraffe-parent</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
</parent>
<groupId>net.sf.jguiraffe</groupId>
@@ -117,20 +117,20 @@
<webAccessUrl>http://jguiraffe.svn.sourceforge.net/viewvc/jguiraffe/trunk</webAccessUrl>
<anonymousConnection>scm:svn:https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/trunk</anonymousConnection>
<developerConnection>scm:svn:https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/trunk</developerConnection>
- <reportSets>
- <reportSet>
- <reports>
- <report>index</report>
- <report>dependencies</report>
- <report>project-team</report>
- <report>mailing-list</report>
- <report>issue-tracking</report>
- <report>license</report>
- <report>scm</report>
- </reports>
- </reportSet>
- </reportSets>
</configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>index</report>
+ <report>dependencies</report>
+ <report>project-team</report>
+ <report>mailing-list</report>
+ <report>issue-tracking</report>
+ <report>license</report>
+ <report>scm</report>
+ </reports>
+ </reportSet>
+ </reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -151,14 +151,18 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.3</version>
<configuration>
- <configLocation>${basedir}/../conf/checkstyle.xml</configLocation>
+ <configLocation>../conf/checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.3.1</version>
+ <configuration>
+ <excludeFilterFile>../conf/findbugs-exclude.xml</excludeFilterFile>
+ </configuration>
</plugin>
</plugins>
</reporting>
@@ -178,6 +182,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
</plugins>
</build>
</profile>
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/BeanCreationEvent.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/BeanCreationEvent.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/BeanCreationEvent.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -42,13 +42,13 @@
private static final long serialVersionUID = 3858761676828030611L;
/** Stores the bean provider responsible for the creation. */
- private final BeanProvider beanProvider;
+ private final transient BeanProvider beanProvider;
/** The bean that was newly created. */
private final Object bean;
/** The dependency provider involved in the creation process. */
- private final DependencyProvider dependencyProvider;
+ private final transient DependencyProvider dependencyProvider;
/**
* Creates a new instance of {@code BeanCreationEvent} and initializes it.
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -116,7 +116,7 @@
*/
public ClassDescription[] getParameterTypes()
{
- return parameterTypes;
+ return parameterTypes.clone();
}
/**
@@ -199,7 +199,7 @@
*/
public Class<?>[] getParameterClasses(DependencyProvider depProvider)
{
- ClassDescription[] descs = getParameterTypes();
+ ClassDescription[] descs = parameterTypes;
Class<?>[] result = new Class<?>[descs.length];
for (int i = 0; i < descs.length; i++)
{
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManager.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManager.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManager.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -27,7 +27,7 @@
* </p>
* <p>
* This interface plays a similar role for the action builder as the
- * <code>{@link net.sf.jguiraffe.gui.forms.components.ComponentManager ComponentManager}</code>
+ * {@link net.sf.jguiraffe.gui.forms.components.ComponentManager ComponentManager}
* interface for the form builder: It hides the details of creating GUI library
* specific objects. Instead of form elements this interface deals with objects
* like actions, menus, and toolbar buttons.
@@ -39,6 +39,14 @@
* the objects they represent. With the objects created by this implementation
* the action related components of an application can be constructed.
* </p>
+ * <p>
+ * <strong>Note:</strong> This interface is not intended to be directly
+ * implemented by client code. It is subject to change even in minor releases as
+ * new features are made available. Therefore if an application needs to provide
+ * a custom implementation of this interface, it should extend an existing
+ * implementation. For instance, the {@link ActionManagerWrapper} class is a
+ * good candidate if only a subset of methods is to be modified.
+ * </p>
*
* @author Oliver Heger
* @version $Id$
Added: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManagerWrapper.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManagerWrapper.java (rev 0)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManagerWrapper.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -0,0 +1,183 @@
+/*
+ * Copyright 2006-2010 The JGUIraffe Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.jguiraffe.gui.builder.action;
+
+import net.sf.jguiraffe.gui.builder.components.ComponentBuilderData;
+import net.sf.jguiraffe.gui.builder.components.tags.TextIconData;
+import net.sf.jguiraffe.gui.forms.ComponentHandler;
+
+/**
+ * <p>
+ * A base class for wrapper implementations of the {@link ActionManager}
+ * interface.
+ * </p>
+ * <p>
+ * An instance of this class is initialized with a reference to an
+ * {@link ActionManager} object. All methods simply delegate to this object.
+ * </p>
+ * <p>
+ * This class is especially useful if a custom implementation of
+ * {@link ActionManager} is to be created based on an existing implementation.
+ * Then only the methods to be customized have to be implemented. All other
+ * methods can still delegate to the existing implementation.
+ * </p>
+ *
+ * @author Oliver Heger
+ * @version $Id$
+ */
+public abstract class ActionManagerWrapper implements ActionManager
+{
+ /** Stores the wrapped action manager. */
+ private final ActionManager wrappedManager;
+
+ /**
+ * Creates a new instance of {@code ActionManagerWrapper} and initializes it
+ * with the wrapped {@code ActionManager}. Note: This method does not check
+ * whether the passed in {@code ActionManager} object is <b>null</b> because
+ * we do not want to enforce this restriction on all subclasses. The passed
+ * in wrapped action manager is stored in an internal field and can be
+ * accessed using the {@link #getWrappedActionManager()} method. If a
+ * subclass needs another mechanism to access the wrapped manager, it has to
+ * override the {@link #getWrappedActionManager()} method.
+ *
+ * @param wrapped the wrapped {@code ActionManager}
+ */
+ protected ActionManagerWrapper(ActionManager wrapped)
+ {
+ wrappedManager = wrapped;
+ }
+
+ /**
+ * Returns a reference to the wrapped {@code ActionManager} object.
+ *
+ * @return the wrapped {@code ActionManager}
+ */
+ public ActionManager getWrappedActionManager()
+ {
+ return wrappedManager;
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public FormAction createAction(ActionBuilder actionBuilder,
+ ActionData actionData) throws FormActionException
+ {
+ return getWrappedActionManager()
+ .createAction(actionBuilder, actionData);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public Object createMenuItem(ActionBuilder actionBuilder,
+ FormAction action, boolean checked, Object parent)
+ throws FormActionException
+ {
+ return getWrappedActionManager().createMenuItem(actionBuilder, action,
+ checked, parent);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public ComponentHandler<?> createMenuItem(ActionBuilder actionBuilder,
+ ActionData actionData, boolean checked, Object parent)
+ throws FormActionException
+ {
+ return getWrappedActionManager().createMenuItem(actionBuilder,
+ actionData, checked, parent);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public Object createMenuBar(ActionBuilder actionBuilder)
+ throws FormActionException
+ {
+ return getWrappedActionManager().createMenuBar(actionBuilder);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public Object createMenu(ActionBuilder actionBuilder, Object menu,
+ TextIconData data, Object parent) throws FormActionException
+ {
+ return getWrappedActionManager().createMenu(actionBuilder, menu, data,
+ parent);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public Object createToolbar(ActionBuilder actionBuilder)
+ throws FormActionException
+ {
+ return getWrappedActionManager().createToolbar(actionBuilder);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public Object createToolbarButton(ActionBuilder actionBuilder,
+ FormAction action, boolean checked, Object parent)
+ throws FormActionException
+ {
+ return getWrappedActionManager().createToolbarButton(actionBuilder,
+ action, checked, parent);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public ComponentHandler<?> createToolbarButton(ActionBuilder actionBuilder,
+ ActionData data, boolean checked, Object parent)
+ throws FormActionException
+ {
+ return getWrappedActionManager().createToolbarButton(actionBuilder,
+ data, checked, parent);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public void addMenuSeparator(ActionBuilder actionBuilder, Object menu)
+ throws FormActionException
+ {
+ getWrappedActionManager().addMenuSeparator(actionBuilder, menu);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public void addToolBarSeparator(ActionBuilder actionBuilder, Object toolBar)
+ throws FormActionException
+ {
+ getWrappedActionManager().addToolBarSeparator(actionBuilder, toolBar);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code ActionManager} object.
+ */
+ public void registerPopupMenuHandler(Object component,
+ PopupMenuHandler handler, ComponentBuilderData compData)
+ throws FormActionException
+ {
+ getWrappedActionManager().registerPopupMenuHandler(component, handler,
+ compData);
+ }
+}
Property changes on: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionManagerWrapper.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/WidgetHandler.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/WidgetHandler.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/WidgetHandler.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -28,11 +28,16 @@
* colors can be changed. This way it is possible to change the GUI dynamically.
* </p>
* <p>
- * <code>{@link ComponentBuilderData}</code> provides methods for obtaining
+ * {@link ComponentBuilderData} provides methods for obtaining
* the widgets created during the latest builder operation by name. After a
* <code>WidgetHandler</code> has been obtained this way, it can be used for
* doing something with the corresponding widget.
* </p>
+ * <p>
+ * <strong>Note:</strong> This interface is not intended to be directly
+ * implemented by client code. It is subject to change even in minor releases as
+ * new features are made available.
+ * </p>
*
* @author Oliver Heger
* @version $Id$
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpansionEvent.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpansionEvent.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpansionEvent.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -39,7 +39,7 @@
private static final long serialVersionUID = 1078903161051276615L;
/** Stores the path to the modified node. */
- private final TreeNodePath path;
+ private final transient TreeNodePath path;
/** The type of this event. */
private final Type type;
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelUtils.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelUtils.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelUtils.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -70,7 +70,7 @@
Object result = listModel.getValueObject(index);
if (result == null)
{
- result = new Integer(index);
+ result = Integer.valueOf(index);
}
return result;
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ProgressBarTag.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ProgressBarTag.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ProgressBarTag.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -110,10 +110,10 @@
public class ProgressBarTag extends InputComponentTag
{
/** Constant for the default minimum value. */
- private static final Integer DEF_MINIMUM = new Integer(0);
+ private static final Integer DEF_MINIMUM = 0;
/** Constant for the default maximum value. */
- private static final Integer DEF_MAXIMUM = new Integer(100);
+ private static final Integer DEF_MAXIMUM = 100;
/** A helper object for defining the progress text. */
private TextData textData;
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEvent.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEvent.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEvent.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -24,12 +24,11 @@
* information related to form elements (controls or input components).
* </p>
* <p>
- * All input components in a
- * <code>{@link net.sf.jguiraffe.gui.forms.Form Form}</code> object (i.e. form
- * elements with an associated
- * <code>{@link net.sf.jguiraffe.gui.forms.ComponentHandler ComponentHandler}</code>
- * can act as event sources. Therefore all event objects contain a reference to
- * the component handler of the event source and the name under which the
+ * All input components in a {@link net.sf.jguiraffe.gui.forms.Form Form} object
+ * (i.e. form elements with an associated
+ * {@link net.sf.jguiraffe.gui.forms.ComponentHandler ComponentHandler} can act
+ * as event sources. Therefore all event objects contain a reference to the
+ * component handler of the event source and the name under which the
* corresponding component was registered at the form. These properties can be
* used by custom event listener implementations to find out, which component
* has caused the event and to access the component's current input data.
@@ -49,7 +48,7 @@
* Stores a reference to the component handler of the component that caused
* this event.
*/
- private final ComponentHandler<?> handler;
+ private final transient ComponentHandler<?> handler;
/** Stores the name of the component that caused this event. */
private final String name;
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormListenerType.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormListenerType.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormListenerType.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -224,6 +224,8 @@
*
* @param l the event listener
* @param event the event
+ * @throws ClassCastException if the listener object or the event are
+ * incompatible with the listener type
*/
public abstract void callListener(FormEventListener l, FormEvent event);
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManager.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManager.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManager.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -35,6 +35,14 @@
* their arguments to determine whether they are in the creation or the
* initialization phase.
* </p>
+ * <p>
+ * <strong>Note:</strong> This interface is not intended to be directly
+ * implemented by client code. It is subject to change even in minor releases as
+ * new features are made available. Therefore if an application needs to provide
+ * a custom implementation of this interface, it should extend an existing
+ * implementation. For instance, the {@link WindowManagerWrapper} class is a
+ * good candidate if only a subset of methods is to be modified.
+ * </p>
*
* @author Oliver Heger
* @version $Id$
Added: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManagerWrapper.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManagerWrapper.java (rev 0)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManagerWrapper.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2006-2010 The JGUIraffe Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.jguiraffe.gui.builder.window;
+
+/**
+ * <p>
+ * A base class for wrapper implementations of the {@link WindowManager}
+ * interface.
+ * </p>
+ * <p>
+ * An instance of this class is initialized with a reference to a
+ * {@link WindowManager} object. All methods simply delegate to this object.
+ * </p>
+ * <p>
+ * This class is especially useful if a custom implementation of
+ * {@link WindowManager} is to be created based on an existing implementation.
+ * Then only the methods to be customized have to be implemented. All other
+ * methods can still delegate to the existing implementation.
+ * </p>
+ *
+ * @author Oliver Heger
+ * @version $Id$
+ */
+public abstract class WindowManagerWrapper implements WindowManager
+{
+ /** The wrapped window manager. */
+ private final WindowManager wrappedManager;
+
+ /**
+ * Creates a new instance of {@code WindowManagerWrapper} and initializes it
+ * with the wrapped {@code WindowManager}. Note: This method does not check
+ * whether the passed in {@code WindowManager} object is <b>null</b> because
+ * we do not want to enforce this restriction on all subclasses. The passed
+ * in wrapped window manager is stored in an internal field and can be
+ * accessed using the {@link #getWrappedWindowManager()} method. If a
+ * subclass needs another mechanism to access the wrapped manager, it has to
+ * override the {@link #getWrappedWindowManager()} method.
+ *
+ * @param wrapped the wrapped {@code WindowManager}
+ */
+ protected WindowManagerWrapper(WindowManager wrapped)
+ {
+ wrappedManager = wrapped;
+ }
+
+ /**
+ * Returns a reference to the wrapped {@code WindowManager}.
+ *
+ * @return the wrapped {@code WindowManager}
+ */
+ public WindowManager getWrappedWindowManager()
+ {
+ return wrappedManager;
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code WindowManager} object.
+ */
+ public Window createFrame(WindowBuilderData builderData, WindowData data,
+ Window wnd) throws WindowBuilderException
+ {
+ return getWrappedWindowManager().createFrame(builderData, data, wnd);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code WindowManager} object.
+ */
+ public Window createInternalFrame(WindowBuilderData builderData,
+ WindowData data, Window wnd) throws WindowBuilderException
+ {
+ return getWrappedWindowManager().createInternalFrame(builderData, data,
+ wnd);
+ }
+
+ /**
+ * {@inheritDoc} Just delegates to the wrapped {@code WindowManager} object.
+ */
+ public Window createDialog(WindowBuilderData builderData, WindowData data,
+ boolean modal, Window wnd) throws WindowBuilderException
+ {
+ return getWrappedWindowManager().createDialog(builderData, data, modal,
+ wnd);
+ }
+}
Property changes on: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowManagerWrapper.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerValidationEvent.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerValidationEvent.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormControllerValidationEvent.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -40,7 +40,7 @@
private static final long serialVersionUID = 20091209L;
/** The validation results. */
- private final FormValidatorResults validationResults;
+ private final transient FormValidatorResults validationResults;
/**
* Creates a new instance of {@code FormControllerValidationEvent} and
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueEvent.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueEvent.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueEvent.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -41,7 +41,7 @@
private static final long serialVersionUID = 7434520871707897320L;
/** Stores the <code>Command</code> object affected by this event. */
- private final Command command;
+ private final transient Command command;
/** Stores the event's type. */
private final Type type;
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/NumberWithUnit.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/NumberWithUnit.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/NumberWithUnit.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -43,7 +43,7 @@
public class NumberWithUnit implements Serializable
{
/** Constant for the special value zero. */
- public static final NumberWithUnit ZERO = new NumberWithUnit();
+ public static final NumberWithUnit ZERO;
/**
* The serial version UID.
@@ -297,4 +297,9 @@
{
return (n != null) ? n : ZERO;
}
+
+ static
+ {
+ ZERO = new NumberWithUnit();
+ }
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayoutBase.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayoutBase.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayoutBase.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -264,7 +264,7 @@
*/
public CellConstraints getColumnConstraints(int idx)
{
- return getAllColumnConstraints()[idx];
+ return getInternalAllColumnConstraints()[idx];
}
/**
@@ -286,8 +286,7 @@
*/
public CellConstraints[] getAllColumnConstraints()
{
- ensureInit();
- return columnConstraints;
+ return getInternalAllColumnConstraints().clone();
}
/**
@@ -298,7 +297,7 @@
*/
public CellConstraints getRowConstraints(int idx)
{
- return getAllRowConstraints()[idx];
+ return getInternalAllRowConstraints()[idx];
}
/**
@@ -320,8 +319,7 @@
*/
public CellConstraints[] getAllRowConstraints()
{
- ensureInit();
- return rowConstraints;
+ return getInternalAllRowConstraints().clone();
}
/**
@@ -492,6 +490,38 @@
}
/**
+ * Returns the internal array of all cell constraints objects for the
+ * layout's column. This method can be used by subclasses for direct
+ * read-only access to the layout's column constraints. The public
+ * {@link #getAllColumnConstraints()} method returns a defensive copy of
+ * this array. So for performance reasons this method should be used by
+ * subclasses.
+ *
+ * @return the array with the layout's column constraints objects
+ */
+ protected final CellConstraints[] getInternalAllColumnConstraints()
+ {
+ ensureInit();
+ return columnConstraints;
+ }
+
+ /**
+ * Returns the internal array of all cell constraints objects for the
+ * layout's rows. This method can be used by subclasses for direct read-only
+ * access to the layout's row constraints. The public
+ * {@link #getAllRowConstraints()} method returns a defensive copy of this
+ * array. So for performance reasons this method should be used by
+ * subclasses.
+ *
+ * @return the array with the layout's row constraints objects
+ */
+ protected final CellConstraints[] getInternalAllRowConstraints()
+ {
+ ensureInit();
+ return rowConstraints;
+ }
+
+ /**
* Returns the component at the specified position of this layout.
*
* @param col the column
@@ -723,9 +753,9 @@
*/
private Dimension calcLayoutSize(Object container, boolean minimum)
{
- int[] colSizes = calcCellSizesWithGroups(getAllColumnConstraints(),
+ int[] colSizes = calcCellSizesWithGroups(getInternalAllColumnConstraints(),
getRowCount(), getColumnGroups(), container, minimum, false);
- int[] rowSizes = calcCellSizesWithGroups(getAllRowConstraints(),
+ int[] rowSizes = calcCellSizesWithGroups(getInternalAllRowConstraints(),
getColumnCount(), getRowGroups(), container, minimum, true);
return new Dimension(sumUpSizes(colSizes), sumUpSizes(rowSizes));
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingActionManager.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingActionManager.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingActionManager.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -80,7 +80,7 @@
initActionProperty(action, Action.SMALL_ICON, actionData.getIcon());
if (actionData.getMnemonicKey() > 0)
{
- initActionProperty(action, Action.MNEMONIC_KEY, new Integer(
+ initActionProperty(action, Action.MNEMONIC_KEY, Integer.valueOf(
actionData.getMnemonicKey()));
}
initActionProperty(action, Action.ACCELERATOR_KEY,
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingProgressBarHandler.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingProgressBarHandler.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingProgressBarHandler.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -112,7 +112,7 @@
*/
public Integer getData()
{
- return new Integer(getValue());
+ return Integer.valueOf(getValue());
}
/**
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTabbedPaneHandler.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTabbedPaneHandler.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTabbedPaneHandler.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -78,7 +78,7 @@
*/
public Integer getData()
{
- return new Integer(getTabbedPane().getSelectedIndex());
+ return Integer.valueOf(getTabbedPane().getSelectedIndex());
}
/**
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableModel.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableModel.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableModel.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -85,10 +85,10 @@
private final JTable table;
/** Holds a reference to the associated custom renderer implementation. */
- private TableCellRenderer customRenderer;
+ private transient TableCellRenderer customRenderer;
/** Holds a reference to the associated custom editor implementation. */
- private TableCellEditor customEditor;
+ private transient TableCellEditor customEditor;
/** Stores the index of the currently rendered row. */
private int renderedRowIndex;
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/SwingSizeHandler.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/SwingSizeHandler.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/SwingSizeHandler.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -127,7 +127,8 @@
{
double[] result = new double[2];
FontMetrics fm = comp.getFontMetrics(font);
- result[IDX_FONTX] = fm.stringWidth(WIDTH_STRING) / WIDTH_STRING_LEN;
+ result[IDX_FONTX] =
+ (double) fm.stringWidth(WIDTH_STRING) / WIDTH_STRING_LEN;
result[IDX_FONTY] = fm.getHeight();
return result;
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/locators/URLLocator.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/locators/URLLocator.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/locators/URLLocator.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -131,7 +131,7 @@
}
URLLocator c = (URLLocator) obj;
- return getURL().equals(c.getURL());
+ return getURL().toExternalForm().equals(c.getURL().toExternalForm());
}
/**
@@ -142,7 +142,7 @@
@Override
public int hashCode()
{
- return getURL().hashCode();
+ return getURL().toExternalForm().hashCode();
}
/**
Modified: trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessageConstants.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessageConstants.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/main/java/net/sf/jguiraffe/transform/ValidationMessageConstants.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -28,7 +28,7 @@
* @author Oliver Heger
* @version $Id$
*/
-public class ValidationMessageConstants
+public final class ValidationMessageConstants
{
/**
* The default caption of a message box for displaying validation messages.
@@ -122,4 +122,11 @@
* The input does not match the specified pattern.
*/
public static final String ERR_PATTERN = "ERR_PATTERN";
+
+ /**
+ * Private constructor so that no instances can be created.
+ */
+ private ValidationMessageConstants()
+ {
+ }
}
Modified: trunk/core/src/site/site.xml
===================================================================
--- trunk/core/src/site/site.xml 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/site/site.xml 2010-09-03 17:28:38 UTC (rev 196)
@@ -33,7 +33,7 @@
<body>
<links>
<item name="Top" href="../index.html"/>
- <item name="SourceForge" href="http://www.sourceforge.org/"/>
+ <item name="SourceForge" href="http://sourceforge.net/projects/jguiraffe/"/>
</links>
<menu name="JGuiraffe">
Modified: trunk/core/src/test/java/net/sf/jguiraffe/di/impl/AbstractInvocationTest.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/di/impl/AbstractInvocationTest.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/test/java/net/sf/jguiraffe/di/impl/AbstractInvocationTest.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -183,6 +183,20 @@
}
/**
+ * Tests that the parameter types cannot be manipulated.
+ */
+ @Test
+ public void testGetParameterTypesModify()
+ {
+ Invocation inv = createInvocation(TARGET_CLASS, PARAM_TYPES, paramDeps);
+ ClassDescription[] types = inv.getParameterTypes();
+ ClassDescription cd = types[0];
+ types[0] = null;
+ ClassDescription[] types2 = inv.getParameterTypes();
+ assertEquals("Description was changed", cd, types2[0]);
+ }
+
+ /**
* Tests the constructor when an invalid number of parameter types is
* passed. This should cause an exception.
*/
@@ -240,6 +254,18 @@
}
/**
+ * Tests that the list of parameter dependencies cannot be modified.
+ */
+ @Test(expected = UnsupportedOperationException.class)
+ public void testGetParameterDependenciesModify()
+ {
+ Invocation inv = createInvocation(TARGET_CLASS, PARAM_TYPES, paramDeps);
+ Iterator<Dependency> it = inv.getParameterDependencies().iterator();
+ it.next();
+ it.remove();
+ }
+
+ /**
* Tests the isTypeInfoComplete() method if the type info is complete.
*/
@Test
Added: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionManagerWrapper.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionManagerWrapper.java (rev 0)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionManagerWrapper.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -0,0 +1,267 @@
+/*
+ * Copyright 2006-2010 The JGUIraffe Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.jguiraffe.gui.builder.action;
+
+import static org.junit.Assert.assertSame;
+import net.sf.jguiraffe.gui.builder.components.ComponentBuilderData;
+import net.sf.jguiraffe.gui.builder.components.tags.LabelTag;
+import net.sf.jguiraffe.gui.builder.components.tags.TextIconData;
+import net.sf.jguiraffe.gui.forms.ComponentHandler;
+
+import org.easymock.EasyMock;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Test class for {@code ActionManagerWrapper}.
+ *
+ * @author Oliver Heger
+ * @version $Id$
+ */
+public class TestActionManagerWrapper
+{
+ /** The mock for the wrapped action manager. */
+ private ActionManager wrappedManager;
+
+ /** The wrapper to be tested. */
+ private ActionManagerWrapper wrapper;
+
+ @Before
+ public void setUp() throws Exception
+ {
+ wrappedManager = EasyMock.createMock(ActionManager.class);
+ wrapper = new ActionManagerWrapper(wrappedManager)
+ {
+ };
+ }
+
+ /**
+ * Replays the specified mock objects including the mock for the wrapped
+ * manager.
+ *
+ * @param mocks the mocks to be replayed
+ */
+ private void replay(Object... mocks)
+ {
+ EasyMock.replay(mocks);
+ EasyMock.replay(wrappedManager);
+ }
+
+ /**
+ * Verifies the specified mock objects including the mock for the wrapped
+ * manager.
+ *
+ * @param mocks the mocks to be verified
+ */
+ private void verify(Object... mocks)
+ {
+ EasyMock.verify(mocks);
+ EasyMock.verify(wrappedManager);
+ }
+
+ /**
+ * Tests whether the correct manager is returned.
+ */
+ @Test
+ public void testGetWrappedActionManager()
+ {
+ assertSame("Wrong wrapped manager", wrappedManager,
+ wrapper.getWrappedActionManager());
+ }
+
+ /**
+ * Tests the createAction() implementation.
+ */
+ @Test
+ public void testCreateAction() throws FormActionException
+ {
+ FormAction action = EasyMock.createMock(FormAction.class);
+ ActionData data = EasyMock.createMock(ActionData.class);
+ ActionBuilder builder = new ActionBuilder();
+ EasyMock.expect(wrappedManager.createAction(builder, data)).andReturn(
+ action);
+ replay(action, data);
+ assertSame("Wrong action", action, wrapper.createAction(builder, data));
+ verify(action, data);
+ }
+
+ /**
+ * Tests the createMenuItem() implementation which expects an action.
+ */
+ @Test
+ public void testCreateMenuItemFromAction() throws FormActionException
+ {
+ FormAction action = EasyMock.createMock(FormAction.class);
+ final Object parent = new Object();
+ final Object item = new Object();
+ ActionBuilder builder = new ActionBuilder();
+ EasyMock.expect(
+ wrappedManager.createMenuItem(builder, action, true, parent))
+ .andReturn(item);
+ replay(action);
+ assertSame("Wrong item", item,
+ wrapper.createMenuItem(builder, action, true, parent));
+ verify(action);
+ }
+
+ /**
+ * Tests the createMenuItem() implementation which expects a data object.
+ */
+ @Test
+ public void testCreateMenuItemFromData() throws FormActionException
+ {
+ ActionData data = EasyMock.createMock(ActionData.class);
+ ComponentHandler<?> ch = EasyMock.createMock(ComponentHandler.class);
+ ActionBuilder builder = new ActionBuilder();
+ final Object parent = new Object();
+ wrappedManager.createMenuItem(builder, data, false, parent);
+ EasyMock.expectLastCall().andReturn(ch);
+ replay(data, ch);
+ assertSame("Wrong component handler", ch,
+ wrapper.createMenuItem(builder, data, false, parent));
+ verify(data, ch);
+ }
+
+ /**
+ * Tests the createMenuBar() implementation.
+ */
+ @Test
+ public void testCreateMenuBar() throws FormActionException
+ {
+ ActionBuilder builder = new ActionBuilder();
+ final Object bar = new Object();
+ EasyMock.expect(wrappedManager.createMenuBar(builder)).andReturn(bar);
+ replay();
+ assertSame("Wrong menu bar", bar, wrapper.createMenuBar(builder));
+ verify();
+ }
+
+ /**
+ * Tests the createMenu() implementation.
+ */
+ @Test
+ public void testCreateMenu() throws FormActionException
+ {
+ ActionBuilder builder = new ActionBuilder();
+ final Object menu = new Object();
+ final Object newMenu = new Object();
+ final Object parent = new Object();
+ final TextIconData tiData = new TextIconData(new LabelTag());
+ EasyMock.expect(
+ wrappedManager.createMenu(builder, menu, tiData, parent))
+ .andReturn(newMenu);
+ replay();
+ assertSame("Wrong menu", newMenu,
+ wrapper.createMenu(builder, menu, tiData, parent));
+ verify();
+ }
+
+ /**
+ * Tests the createToolbar() implementation.
+ */
+ @Test
+ public void testCreateToolbar() throws FormActionException
+ {
+ ActionBuilder builder = new ActionBuilder();
+ final Object toolbar = new Object();
+ EasyMock.expect(wrappedManager.createToolbar(builder)).andReturn(
+ toolbar);
+ replay();
+ assertSame("Wrong tool bar", toolbar, wrapper.createToolbar(builder));
+ verify();
+ }
+
+ /**
+ * Tests the createToolbarButton() implementation which expects an action.
+ */
+ @Test
+ public void testCreateToolbarButtonFromAction() throws FormActionException
+ {
+ FormAction action = EasyMock.createMock(FormAction.class);
+ ActionBuilder builder = new ActionBuilder();
+ final Object parent = new Object();
+ final Object button = new Object();
+ EasyMock.expect(
+ wrappedManager.createToolbarButton(builder, action, true,
+ parent)).andReturn(button);
+ replay(action);
+ assertSame("Wrong button", button,
+ wrapper.createToolbarButton(builder, action, true, parent));
+ verify(action);
+ }
+
+ /**
+ * Tests the createToolbarButton() implementation which expects a data
+ * object.
+ */
+ @Test
+ public void testCreateToolbarButtonFromData() throws FormActionException
+ {
+ ActionData data = EasyMock.createMock(ActionData.class);
+ ComponentHandler<?> ch = EasyMock.createMock(ComponentHandler.class);
+ ActionBuilder builder = new ActionBuilder();
+ final Object parent = new Object();
+ wrappedManager.createToolbarButton(builder, data, false, parent);
+ EasyMock.expectLastCall().andReturn(ch);
+ replay(data, ch);
+ assertSame("Wrong component handler", ch,
+ wrapper.createToolbarButton(builder, data, false, parent));
+ verify(data, ch);
+ }
+
+ /**
+ * Tests the addMenuSeparator() implementation.
+ */
+ @Test
+ public void testAddMenuSeparator() throws FormActionException
+ {
+ ActionBuilder builder = new ActionBuilder();
+ final Object menu = new Object();
+ wrappedManager.addMenuSeparator(builder, menu);
+ replay();
+ wrapper.addMenuSeparator(builder, menu);
+ verify();
+ }
+
+ /**
+ * Tests the addToolbarSeparator() implementation.
+ */
+ @Test
+ public void testAddToolbarSeparator() throws FormActionException
+ {
+ ActionBuilder builder = new ActionBuilder();
+ final Object toolbar = new Object();
+ wrappedManager.addToolBarSeparator(builder, toolbar);
+ replay();
+ wrapper.addToolBarSeparator(builder, toolbar);
+ verify();
+ }
+
+ /**
+ * Tests the registerPopupMenuHandler() implementation.
+ */
+ @Test
+ public void testRegisterPopupMenuHandler() throws FormActionException
+ {
+ PopupMenuHandler ph = EasyMock.createMock(PopupMenuHandler.class);
+ ComponentBuilderData compData = new ComponentBuilderData();
+ final Object comp = new Object();
+ wrappedManager.registerPopupMenuHandler(comp, ph, compData);
+ replay(ph);
+ wrapper.registerPopupMenuHandler(comp, ph, compData);
+ verify(ph);
+ }
+}
Property changes on: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/action/TestActionManagerWrapper.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentManagerWrapper.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentManagerWrapper.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentManagerWrapper.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -61,7 +61,7 @@
public class TestComponentManagerWrapper
{
/** The mock object for the wrapped manager. */
- ComponentManager wrappedManager;
+ private ComponentManager wrappedManager;
/** The wrapper to be tested. */
private ComponentManagerWrapper wrapper;
Modified: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/impl/TestJellyBeanBuilder.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/impl/TestJellyBeanBuilder.java 2010-08-30 19:54:41 UTC (rev 195)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/impl/TestJellyBeanBuilder.java 2010-09-03 17:28:38 UTC (rev 196)
@@ -79,8 +79,9 @@
public class TestJellyBeanBuilder
{
/** An array with the names of the stores defined by the test script. */
- private static final String[] STORE_NAMES =
- { "beans", "const", "special" };
+ private static final String[] STORE_NAMES = {
+ "beans", "const", "special"
+ };
/** An array with the elements produced by collection tags. */
private static final Object[] COL_ELEMENTS = {
@@ -104,6 +105,15 @@
/** Constant for the the value of the string property. */
private static final String STR_PROP = "Test";
+ /** Constant for the windows-style line endings. */
+ private static final String WND_LF = "\r\n";
+
+ /** Constant for the CR character. */
+ private static final char CR = '\r';
+
+ /** Constant for the LF character. */
+ private static final char LF = '\n';
+
/** Constant for the value of the int property. */
private static final int INT_PROP = 42;
@@ -1008,16 +1018,30 @@
@Test
public void testBuildValueTag() throws BuilderException
{
- final String newLine = System.getProperty("line.separator");
final String beanName = "valueTest";
BeanContext context = setUpContext();
- ReflectionTestClass bean = (ReflectionTestClass) context
- .getBean(beanName);
- assertEquals("Wrong value", "Line 1" + newLine + "Line 2" + newLine
- + "Line 3", bean.getStringProp());
+ ReflectionTestClass bean =
+ (ReflectionTestClass) context.getBean(beanName);
+ assertEquals("Wrong value", "Line 1" + LF + "Line 2" + LF + "Line 3",
+ fixCR(bean.getStringProp()));
}
/**
+ * Normalizes the line endings in the specified string. This is needed on
+ * operating systems with different conventions for line endings. The
+ * resulting string contains only the LF character for line endings.
+ *
+ * @param s the string to be processed
+ * @return the string with normalized line endings
+ */
+ private static String fixCR(String s)
+ {
+ String result = s.replace(WND_LF, String.valueOf(LF));
+ result = result.replace(CR, LF);
+ return result;
+ }
+
+ /**
* Tests whether the value tag does not escape its body.
*/
@Test
Added: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/window/TestWindowManagerWrapper.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/window/TestWindowManagerWrapp...
[truncated message content] |
|
From: <oh...@us...> - 2010-08-30 19:54:52
|
Revision: 195
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=195&view=rev
Author: oheger
Date: 2010-08-30 19:54:41 +0000 (Mon, 30 Aug 2010)
Log Message:
-----------
Improvements of the site. Fixed numerous checkstyle errors. Added ComponentManagerWrapper class.
Modified Paths:
--------------
trunk/conf/checkstyle.xml
trunk/core/pom.xml
trunk/core/src/main/java/net/sf/jguiraffe/di/BeanContext.java
trunk/core/src/main/java/net/sf/jguiraffe/di/EnumConverter.java
trunk/core/src/main/java/net/sf/jguiraffe/di/MutableBeanStore.java
trunk/core/src/main/java/net/sf/jguiraffe/di/ReflectionUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/BeanContextWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ChainedInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDependency.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDescription.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ConstructorInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultBeanContext.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultClassLoaderProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultDependencyProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/MethodInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NameDependency.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SetPropertyInvocation.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstantBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstructorBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MapBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MethodInvocationBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/Application.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationContext.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationContextImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationResources.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/ApplicationShutdownListener.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/CommandActionTask.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/app/OpenWindowCommand.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BeanBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/BeanBuilderResult.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/Accelerator.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionInvoker.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/ActionStore.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ActionTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventFilterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/EventRegistrationTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/FormEventListenerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MenuBarTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MenuItemTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/MenuTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/SeparatorTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/action/tags/ToolButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/Color.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ColorHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentBuilderCallBack.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/Composite.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/DefaultToolTipManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/FormBuilderRuntimeException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ToolTipManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/ProgressBarHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/StaticTextData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeExpansionEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/CheckboxTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ComboBoxTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ComponentHandlerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ConditionalTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ContainerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ConverterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/DesktopPanelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FieldTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FontTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/FormBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/IconSupport.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/IconTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/InputComponentTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/LabelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListBoxTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ListModelUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/LocalizedTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PanelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentCellConstraintsTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentCellGroupTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/PercentLayoutTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ProgressBarTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/RadioButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ReferenceTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/SimpleComponentTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/SliderTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/SplitterTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextDataImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/StaticTextTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TabbedPaneTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextIconData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TextListModelTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ToggleButtonTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TransformerBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TransformerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/TreeTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/UseBeanBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/ValidatorBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnClass.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/ColumnComponentTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableColumnTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableColumnWidthController.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/tags/table/TableTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/DIBuilderData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/BeanStoreTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/BeanTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ConstantValueTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ElementTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/EntryKeyTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/EntryTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/FactoryTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/InvocationData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ListTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/MapTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/SetTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/di/tags/ValueData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormEventManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormFocusEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormListenerType.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/FormMouseEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/event/filter/ChainedEventFilter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/impl/JellyBeanBuilder.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/InvariantWindowClosingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/WindowEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/ctrl/FormController.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/FormControllerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/FrameTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/WindowBaseTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/window/tags/WindowControllerTag.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueEvent.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/cmd/CommandQueueImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ComponentHandlerImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/DefaultFieldHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/DefaultFormValidatorResults.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FormRuntimeException.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/FormValidatorResults.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/ValidationPhase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/forms/bind/DummyBindingStrategy.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/BorderLayout.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/ButtonLayout.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellAlignment.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellConstraints.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/CellSize.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/NumberWithUnit.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentData.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayout.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/PercentLayoutBase.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/layout/Unit.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingActionManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/action/SwingFormAction.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingComponentManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingComponentUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingListModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingProgressBarHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingStaticTextComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTabbedPaneHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTableComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTreeCellRenderer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingTreeComponentHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableCellRenderer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/SwingTableModel.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/SwingEventConstantMapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/event/SwingEventManager.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/utils/SwingGUISynchronizer.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/utils/SwingMessageOutput.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/window/WindowHelper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/SwingPercentLayoutAdapter.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/layout/SwingSizeHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/ByteArrayLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/ClassPathLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/FileLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/LocatorUtils.java
trunk/core/src/main/java/net/sf/jguiraffe/locators/URLLocator.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/Message.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/ResourceManager.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/ResourceManagerImpl.java
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/bundle/BundleResourceGroup.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/AbstractDecimalTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/AbstractIntegerTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/ChainValidator.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DateTimeTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DateTransformerBase.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DefaultValidationMessageHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DefaultValidationResult.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/DummyTransformer.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/NumberTransformerBase.java
trunk/core/src/main/java/net/sf/jguiraffe/transform/Validator.java
trunk/core/src/site/site.xml
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/ComponentManagerImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/cmd/TestCommandQueueImpl.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/components/TestSwingComponentManager.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/components/table/AbstractTableModelTest.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/event/TestSwingEventManager.java
trunk/core/src/test/java/net/sf/jguiraffe/gui/platform/swing/builder/utils/TestSwingMessageOutput.java
trunk/examples/pom.xml
trunk/examples/src/main/resources/main.jelly
trunk/pom.xml
Added Paths:
-----------
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/ComponentManagerWrapper.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/utils/package.html
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/bundle/package.html
trunk/core/src/main/java/net/sf/jguiraffe/resources/impl/package.html
trunk/core/src/main/java/net/sf/jguiraffe/resources/package.html
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/TestComponentManagerWrapper.java
trunk/examples/src/site/
trunk/examples/src/site/resources/
trunk/examples/src/site/resources/images/
trunk/examples/src/site/resources/images/tutorial_main.png
trunk/examples/src/site/resources/images/tutorial_viewsettings.png
trunk/examples/src/site/site.xml
trunk/examples/src/site/xdoc/
trunk/examples/src/site/xdoc/index.xml
trunk/examples/src/site/xdoc/tutorialapp.xml
trunk/src/
trunk/src/site/
trunk/src/site/resources/
trunk/src/site/resources/images/
trunk/src/site/resources/images/giraffe.jpg
trunk/src/site/site.xml
trunk/src/site/xdoc/
trunk/src/site/xdoc/building.xml
trunk/src/site/xdoc/index.xml
Removed Paths:
-------------
trunk/core/src/site/resources/images/giraffe.jpg
trunk/core/src/site/resources/images/tutorial_main.png
trunk/core/src/site/resources/images/tutorial_viewsettings.png
trunk/core/src/site/xdoc/building.xml
trunk/core/src/site/xdoc/tutorialapp.xml
Property Changed:
----------------
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/ProgressBarHandler.java
trunk/core/src/main/java/net/sf/jguiraffe/gui/platform/swing/builder/components/SwingProgressBarHandler.java
Modified: trunk/conf/checkstyle.xml
===================================================================
--- trunk/conf/checkstyle.xml 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/conf/checkstyle.xml 2010-08-30 19:54:41 UTC (rev 195)
@@ -1,9 +1,27 @@
<?xml version="1.0"?>
+<!--
+ Copyright 2006-2010 The GUIraffe Team.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.1//EN"
"http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
-<!-- Checkstyle configuration that checks the JGUIraffe coding conventions -->
+<!--
+ Checkstyle configuration that checks the JGUIraffe coding conventions
+ $Id$
+-->
<module name="Checker">
<property name="localeLanguage" value="en"/>
@@ -129,7 +147,6 @@
<module name="StringLiteralEquality"/>
<module name="SuperClone"/>
<module name="SuperFinalize"/>
- <module name="IllegalType"/>
<module name="DeclarationOrder"/>
<module name="ExplicitInitialization"/>
<module name="DefaultComesLast"/>
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/pom.xml 2010-08-30 19:54:41 UTC (rev 195)
@@ -117,6 +117,19 @@
<webAccessUrl>http://jguiraffe.svn.sourceforge.net/viewvc/jguiraffe/trunk</webAccessUrl>
<anonymousConnection>scm:svn:https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/trunk</anonymousConnection>
<developerConnection>scm:svn:https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/trunk</developerConnection>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>index</report>
+ <report>dependencies</report>
+ <report>project-team</report>
+ <report>mailing-list</report>
+ <report>issue-tracking</report>
+ <report>license</report>
+ <report>scm</report>
+ </reports>
+ </reportSet>
+ </reportSets>
</configuration>
</plugin>
<plugin>
@@ -142,6 +155,11 @@
<configLocation>${basedir}/../conf/checkstyle.xml</configLocation>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>2.3.1</version>
+ </plugin>
</plugins>
</reporting>
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/BeanContext.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/BeanContext.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/BeanContext.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -80,6 +80,7 @@
* abstract from the concrete naming of beans and focuses more on the beans'
* semantics.
*
+ * @param <T> the type of the bean to be fetched
* @param beanCls the class of the bean to be fetched
* @return the bean with this class
* @throws InjectionException if the bean cannot be resolved or its creation
@@ -92,6 +93,7 @@
* <code>BeanStore</code>. Works like the overloaded method, but operates
* on the given bean store.
*
+ * @param <T> the type of the bean to be fetched
* @param beanCls the class of the bean to be fetched
* @param store the <code>BeanStore</code> to use
* @return the bean with this class
@@ -254,7 +256,7 @@
/**
* Returns the {@code ClassLoaderProvider} used by this context.
- *
+ *
* @return the {@code ClassLoaderProvider}
*/
ClassLoaderProvider getClassLoaderProvider();
@@ -262,7 +264,7 @@
/**
* Sets the {@code ClassLoaderProvider} to be used by this context. This
* object is needed when classes have to be loaded through reflection.
- *
+ *
* @param clp the {@code ClassLoaderProvider}
*/
void setClassLoaderProvider(ClassLoaderProvider clp);
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/EnumConverter.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/EnumConverter.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/EnumConverter.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -42,10 +42,10 @@
* @author Oliver Heger
* @version $Id$
*/
-public class EnumConverter implements Converter
+public final class EnumConverter implements Converter
{
/** Constant for the single shared instance of this class. */
- private static EnumConverter INSTANCE = new EnumConverter();
+ private static final EnumConverter INSTANCE = new EnumConverter();
/**
* Private constructor so that no new instances can be created.
@@ -74,6 +74,7 @@
*
* @param type the class to convert to
* @param value the object to be converted
+ * @return the result of the conversion
*/
public Object convert(@SuppressWarnings("rawtypes") Class type, Object value)
{
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/MutableBeanStore.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/MutableBeanStore.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/MutableBeanStore.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -93,5 +93,5 @@
*
* @param p the parent
*/
- public void setParent(BeanStore p);
+ void setParent(BeanStore p);
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/ReflectionUtils.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/ReflectionUtils.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/ReflectionUtils.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -43,7 +43,7 @@
* @author Oliver Heger
* @version $Id$
*/
-public class ReflectionUtils
+public final class ReflectionUtils
{
/**
* A private constructor, so that no instances can be created.
@@ -80,7 +80,6 @@
try
{
return ClassUtils.getClass(loader, className);
-// return Class.forName(className, true, loader);
}
catch (ClassNotFoundException cnfex)
{
@@ -126,6 +125,7 @@
* that deals with all possible exceptions and redirects them as
* <code>InjectionException</code>s.
*
+ * @param <T> the type of the constructor
* @param ctor the constructor to be invoked (must not be <b>null</b>)
* @param args the arguments to be passed to the constructor
* @return the newly created instance
@@ -396,7 +396,8 @@
static boolean matchParameterTypes(Class<?>[] parameterTypes,
Class<?>[] definedTypes, Object[] values)
{
- assert parameterTypes != null && definedTypes != null && values != null : "Input parameters are null";
+ assert parameterTypes != null && definedTypes != null && values != null
+ : "Input parameters are null";
assert definedTypes.length == values.length : "Invalid array lengths";
if (parameterTypes.length != values.length)
@@ -578,7 +579,9 @@
public int hashCode()
{
final int factor = 31;
- int result = 17;
+ final int seed = 17;
+
+ int result = seed;
result = result * factor + methodName.hashCode();
result = result * factor + Arrays.hashCode(parameterTypes);
return result;
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/BeanContextWrapper.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/BeanContextWrapper.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/BeanContextWrapper.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -231,6 +231,7 @@
* Returns the bean with the given class starting the search with the
* default bean store. This implementation delegates to the wrapped context.
*
+ * @param <T> the type of the bean
* @param beanCls the class of the desired bean
* @return the bean
*/
@@ -244,6 +245,7 @@
* specified bean store. This implementation delegates to the wrapped
* context.
*
+ * @param <T> the type of the bean
* @param beanCls the class of the desired bean
* @param store the store to start with
* @return the bean
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ChainedInvocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ChainedInvocation.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ChainedInvocation.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -42,7 +42,7 @@
* bloc. In addition to that a rudimentary support for variables is available:
* the result of an invocation can be assigned to a named variable; later this
* variable can be accessed again using a special
- * <code>{@link Dependency}</code>, which can be created by calling the
+ * {@link Dependency}, which can be created by calling the
* <code>getChainDependency()</code> method.
* </p>
* <p>
@@ -313,6 +313,7 @@
*
* @param depProvider the dependency provider
* @param target the target object
+ * @return the result of the invocation
* @throws InjectionException if an error occurs
* @throws IllegalArgumentException if the dependency provider is <b>null</b>
* or a required target object is undefined
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDependency.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDependency.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDependency.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -31,7 +31,7 @@
* @author Oliver Heger
* @version $Id$
*/
-public class ClassDependency implements Dependency
+public final class ClassDependency implements Dependency
{
/** Stores the class description of this dependency. */
private ClassDescription dependentClass;
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDescription.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDescription.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ClassDescription.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -16,9 +16,7 @@
package net.sf.jguiraffe.di.impl;
-import net.sf.jguiraffe.di.BeanContext;
import net.sf.jguiraffe.di.ClassLoaderProvider;
-import net.sf.jguiraffe.di.InjectionException;
/**
* <p>
@@ -35,7 +33,7 @@
* a default class loader</li>
* <li>by providing a class name and a symbolic name for a class loader; this
* works together with the class loader registration mechanism supported by
- * {@link BeanContext}</li>
+ * {@link net.sf.jguiraffe.di.BeanContext BeanContext}</li>
* </ul>
* </p>
* <p>
@@ -77,14 +75,15 @@
}
/**
- * Returns the target class of this description. The passed in {@code
- * ClassLoaderProvider} is used for resolving the class if necessary. This
- * implementation will cache the <code>Class</code> objects when they have
- * been resolved.
+ * Returns the target class of this description. The passed in
+ * {@code ClassLoaderProvider} is used for resolving the class if necessary.
+ * This implementation will cache the <code>Class</code> objects when they
+ * have been resolved.
*
* @param clProvider the {@code ClassLoaderProvider}
* @return the target class of this description instance
- * @throws InjectionException if the class cannot be resolved
+ * @throws net.sf.jguiraffe.di.InjectionException if the class cannot be
+ * resolved
* @throws IllegalArgumentException if the {@code ClassLoaderProvider} is
* needed, but is <b>null</b>
*/
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ConstructorInvocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ConstructorInvocation.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/ConstructorInvocation.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -18,8 +18,6 @@
import net.sf.jguiraffe.di.Dependency;
import net.sf.jguiraffe.di.DependencyProvider;
-import net.sf.jguiraffe.di.InjectionException;
-import net.sf.jguiraffe.di.InvocationHelper;
/**
* <p>
@@ -34,8 +32,9 @@
* can contain constant values that will be directly passed to the constructor.
* If the constructor's signature is known, the types of its arguments can be
* defined. If this is not the case, the parameter types will be derived from
- * the current parameter values. The {@link InvocationHelper} class is used to
- * find the correct constructor to be invoked.
+ * the current parameter values. The
+ * {@link net.sf.jguiraffe.di.InvocationHelper InvocationHelper} class is used
+ * to find the correct constructor to be invoked.
* </p>
* <p>
* Objects of this class cannot be changed after they have been created. So they
@@ -87,7 +86,7 @@
*
* @param depProvider the dependency provider (must not be <b>null</b>)
* @return the newly created instance of the target class
- * @throws InjectionException if an error occurs
+ * @throws net.sf.jguiraffe.di.InjectionException if an error occurs
* @throws IllegalArgumentException if the dependency provider is <b>null</b>
*/
public Object invoke(DependencyProvider depProvider)
@@ -107,7 +106,7 @@
* @param depProvider the dependency provider (must not be <b>null</b>)
* @param target the target of the invocation
* @return the result of the invocation
- * @throws InjectionException if an error occurs
+ * @throws net.sf.jguiraffe.di.InjectionException if an error occurs
* @throws IllegalArgumentException if the dependency provider is
* <b>null</b>
*/
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultBeanContext.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultBeanContext.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultBeanContext.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -54,7 +54,7 @@
public class DefaultBeanContext implements BeanContext
{
/** A counter for generating transaction IDs. */
- private static final AtomicLong txCounter = new AtomicLong();
+ private static final AtomicLong TX_COUNTER = new AtomicLong();
/** Stores the default bean store. */
private volatile BeanStore defaultBeanStore;
@@ -183,7 +183,7 @@
* Tests whether a bean with the given name can be found in the default
* store.
*
- * @param the name of the bean
+ * @param name the name of the bean
* @return a flag whether this bean can be found
*/
public boolean containsBean(String name)
@@ -265,6 +265,7 @@
/**
* Returns the bean with the specified class from the default bean store.
*
+ * @param <T> the type of the bean to be retrieved
* @param beanCls the class of the bean to be retrieved
* @return the bean with this class
* @throws InjectionException if an error occurs
@@ -277,6 +278,7 @@
/**
* Returns the bean with the specified class from the given bean store.
*
+ * @param <T> the type of the bean to be retrieved
* @param beanCls the class of the bean to be retrieved
* @param store the bean store
* @return the bean with this class
@@ -469,7 +471,7 @@
*/
static Long nextTxID()
{
- return txCounter.incrementAndGet();
+ return TX_COUNTER.incrementAndGet();
}
/**
@@ -478,7 +480,7 @@
*/
static void resetTxID()
{
- txCounter.set(0);
+ TX_COUNTER.set(0);
}
/**
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultClassLoaderProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultClassLoaderProvider.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultClassLoaderProvider.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -75,7 +75,7 @@
* name is <b>null</b>, the context class loader, and a registered class
* loader.
*
- * @param loaderRef the name of the class loader
+ * @param name the name of the class loader
* @return the corresponding class loader
* @throws InjectionException if the class loader cannot be resolved
*/
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultDependencyProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultDependencyProvider.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/DefaultDependencyProvider.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -206,8 +206,8 @@
if (result == null)
{
throw new InjectionException(
- "Invalid dependency! This dependency does not belong to the current transaction: "
- + dependency);
+ "Invalid dependency! This dependency does not belong to "
+ + "the current transaction: " + dependency);
}
return result;
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/Invocation.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -21,7 +21,6 @@
import net.sf.jguiraffe.di.Dependency;
import net.sf.jguiraffe.di.DependencyProvider;
-import net.sf.jguiraffe.di.InjectionException;
/**
* <p>
@@ -31,8 +30,8 @@
* This class allows the definition of important data that is required for
* invoking a method using reflection. Especially the parameter types and the
* parameter values can be specified. The parameter values are provided as
- * <code>{@link Dependency}</code> objects, so they can refer to other beans
- * defined in a <code>BeanStore</code>.
+ * {@link Dependency} objects, so they can refer to other beans defined in a
+ * <code>BeanStore</code>.
* </p>
* <p>
* The main use case for <code>Invocation</code> objects is the creation and
@@ -162,9 +161,10 @@
*
* @param depProvider the dependency provider (must not be <b>null</b>)
* @return an array with the resolved parameter values (can be <b>null</b>)
- * @throws InjectionException if a dependency cannot be resolved
+ * @throws net.sf.jguiraffe.di.InjectionException if a dependency cannot be
+ * resolved
* @throws IllegalArgumentException if the passed in dependency provider is
- * <b>null</b>
+ * <b>null</b>
*/
public Object[] getResolvedParameters(DependencyProvider depProvider)
{
@@ -189,12 +189,13 @@
/**
* Returns an array with the concrete parameter classes. This method
- * converts the internally stored <code>ClassDescription</code> objects
- * into <code>Class</code> objects.
+ * converts the internally stored <code>ClassDescription</code> objects into
+ * <code>Class</code> objects.
*
* @param depProvider the dependency provider for resolving the classes
* @return an array with the parameter classes
- * @throws InjectionException if a class cannot be resolved
+ * @throws net.sf.jguiraffe.di.InjectionException if a class cannot be
+ * resolved
*/
public Class<?>[] getParameterClasses(DependencyProvider depProvider)
{
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/MethodInvocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/MethodInvocation.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/MethodInvocation.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -180,13 +180,17 @@
}
Object[] values = getResolvedParameters(depProvider);
- if(isStaticInvocation() || target == null)
+ if (isStaticInvocation() || target == null)
{
- return depProvider.getInvocationHelper().invokeStaticMethod(getTargetClass().getTargetClass(depProvider), getMethodName(), getParameterClasses(depProvider), values);
+ return depProvider.getInvocationHelper().invokeStaticMethod(
+ getTargetClass().getTargetClass(depProvider),
+ getMethodName(), getParameterClasses(depProvider), values);
}
else
{
- return depProvider.getInvocationHelper().invokeInstanceMethod(target, getMethodName(), getParameterClasses(depProvider), values);
+ return depProvider.getInvocationHelper().invokeInstanceMethod(
+ target, getMethodName(), getParameterClasses(depProvider),
+ values);
}
}
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NameDependency.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NameDependency.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/NameDependency.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -31,7 +31,7 @@
* @author Oliver Heger
* @version $Id$
*/
-public class NameDependency implements Dependency
+public final class NameDependency implements Dependency
{
/** Stores the name of the dependent bean. */
private String name;
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SetPropertyInvocation.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SetPropertyInvocation.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/SetPropertyInvocation.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -19,7 +19,6 @@
import net.sf.jguiraffe.di.Dependency;
import net.sf.jguiraffe.di.DependencyProvider;
import net.sf.jguiraffe.di.InjectionException;
-import net.sf.jguiraffe.di.InvocationHelper;
/**
* <p>
@@ -27,17 +26,17 @@
* </p>
* <p>
* This <code>Invocation</code> implementation is initialized with a property
- * name and value (the latter one is provided as a
- * {@link Dependency} object. In its <code>invoke()</code>
- * method it will set this property on the target object.
+ * name and value (the latter one is provided as a {@link Dependency} object. In
+ * its <code>invoke()</code> method it will set this property on the target
+ * object.
* </p>
* <p>
* This is more or less a convenience class because similar results could be
- * achieved by using {@link MethodInvocation} and specifying the
- * name of the set method corresponding to the property and the property value
- * as parameter dependency. Setting the property is done using the
- * {@link InvocationHelper} class. This ensures that required type conversions
- * are done automatically.
+ * achieved by using {@link MethodInvocation} and specifying the name of the set
+ * method corresponding to the property and the property value as parameter
+ * dependency. Setting the property is done using the
+ * {@link net.sf.jguiraffe.di.InvocationHelper InvocationHelper} class. This
+ * ensures that required type conversions are done automatically.
* </p>
* <p>
* Once initialized, an instance is immutable. So it can easily be shared
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstantBeanProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstantBeanProvider.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstantBeanProvider.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -59,7 +59,7 @@
* @author Oliver Heger
* @version $Id$
*/
-public class ConstantBeanProvider extends SimpleBeanProvider implements
+public final class ConstantBeanProvider extends SimpleBeanProvider implements
BeanProvider, Dependency
{
/** Constant for a dependency that will be resolved to <b>null</b>. */
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstructorBeanProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstructorBeanProvider.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/ConstructorBeanProvider.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -21,7 +21,6 @@
import net.sf.jguiraffe.di.Dependency;
import net.sf.jguiraffe.di.DependencyProvider;
-import net.sf.jguiraffe.di.InjectionException;
import net.sf.jguiraffe.di.impl.ConstructorInvocation;
/**
@@ -31,7 +30,7 @@
* </p>
* <p>
* This <code>BeanProvider</code> class is initialized with a
- * <code>{@link ConstructorInvocation}</code> object. The
+ * {@link ConstructorInvocation} object. The
* <code>getBean()</code> method will trigger this invocation object and
* return the newly created instance.
* </p>
@@ -92,7 +91,8 @@
*
* @param dependencyProvider the dependency provider
* @return the newly created bean instance
- * @throws InjectionException if an error occurs when creating the bean
+ * @throws net.sf.jguiraffe.di.InjectionException if an error occurs when
+ * creating the bean
*/
public Object getBean(DependencyProvider dependencyProvider)
{
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/LifeCycleBeanProvider.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -317,7 +317,8 @@
if (!initializing)
{
// no reentrant call
- creating = initializing = true;
+ creating = true;
+ initializing = true;
boolean canInit = true;
try
{
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MapBeanProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MapBeanProvider.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MapBeanProvider.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -38,8 +38,8 @@
* With this bean provider implementation either a
* <code>java.util.HashMap</code> or a <code>java.util.LinkedHashMap</code> can
* be created and populated. The mechanisms used here are very similar to the
- * ones used by <code>{@link CollectionBeanProvider}</code>: an instance is
- * initialized with two lists of <code>{@link Dependency}</code> objects - one
+ * ones used by {@link CollectionBeanProvider}: an instance is
+ * initialized with two lists of {@link Dependency} objects - one
* list represents the key, the other list represents the values of the map. The
* <code>getDependencies()</code> method returns a union of all these
* dependencies. When the <code>Map</code> bean is to be created, a new instance
@@ -49,7 +49,7 @@
* </p>
* <p>
* Bean providers of this type are intended to be used together with a
- * <code>{@link LifeCycleBeanProvider}</code> that controls the creation of new
+ * {@link LifeCycleBeanProvider} that controls the creation of new
* instances.
* </p>
* <p>
@@ -146,6 +146,7 @@
* keys and values are resolved and added to the map.
*
* @param dependencyProvider the dependency provider
+ * @return the managed bean
*/
public Object getBean(DependencyProvider dependencyProvider)
{
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MethodInvocationBeanProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MethodInvocationBeanProvider.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/MethodInvocationBeanProvider.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -31,11 +31,10 @@
* </p>
* <p>
* This <code>BeanProvider</code> implementation is initialized with a
- * <code>{@link MethodInvocation}</code> object describing the method to be
- * invoked. Optional a <code>{@link Dependency}</code> can be provided for the
- * instance, on which the method is to be invoked (if no such dependency is
- * specified, the method to be invoked must be static). This class is intended
- * for the following use cases:
+ * {@link MethodInvocation} object describing the method to be invoked. Optional
+ * a {@link Dependency} can be provided for the instance, on which the method is
+ * to be invoked (if no such dependency is specified, the method to be invoked
+ * must be static). This class is intended for the following use cases:
* <ul>
* <li>It can be used for obtaining instances that are not created using a
* constructor, but by invoking a static factory method. In this case the passed
@@ -44,8 +43,8 @@
* <li>Another use case is the handling of <em>factory classes</em>: Some
* objects are not directly created, but a method on a specific factory class is
* used for this purpose. An example could be a <code>Connection</code> object
- * that is obtained from a <code>DataSource</code>. In this case the factory
- * is defined as a separate bean, and a dependency to this bean is specified to
+ * that is obtained from a <code>DataSource</code>. In this case the factory is
+ * defined as a separate bean, and a dependency to this bean is specified to
* this bean provider class. The <code>MethodInvocation</code> defines the
* method of this factory bean that has to be called for obtaining an instance.</li>
* </ul>
@@ -53,8 +52,8 @@
* <p>
* As is true for other <code>SimpleBeanProvider</code>s, this provider is
* intended to be used together with a life-cycle-aware
- * <code>BeanProvider</code>. It does not provide any life-cycle support on
- * its own.
+ * <code>BeanProvider</code>. It does not provide any life-cycle support on its
+ * own.
* </p>
*
* @author Oliver Heger
@@ -158,14 +157,13 @@
* Returns the description of the class of the managed bean. If a class
* description was explicitly set in the constructor, this description is
* returned. Otherwise this implementation tries to obtain the bean class
- * from the <code>{@link MethodInvocation}</code> object owned by this
- * provider. Because a class is optional for a method invocation, result can
- * be <b>null</b>. To avoid this, a valid
- * <code>{@link ClassDescription}</code> should always be set either on
- * the <code>MethodInvocation</code> or when an instance of this class is
- * constructed.
+ * from the {@link MethodInvocation} object owned by this provider. Because
+ * a class is optional for a method invocation, result can be <b>null</b>.
+ * To avoid this, a valid {@link ClassDescription} should always be set
+ * either on the <code>MethodInvocation</code> or when an instance of this
+ * class is constructed.
*
- * @return
+ * @return a class description of the managed bean
*/
public ClassDescription getBeanClassDescription()
{
Modified: trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/di/impl/providers/SingletonBeanProvider.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -21,7 +21,6 @@
import net.sf.jguiraffe.di.BeanProvider;
import net.sf.jguiraffe.di.Dependency;
import net.sf.jguiraffe.di.DependencyProvider;
-import net.sf.jguiraffe.di.InjectionException;
import net.sf.jguiraffe.di.impl.Invokable;
import net.sf.jguiraffe.di.impl.NullInvocation;
@@ -64,7 +63,7 @@
*
* @param createProvider the bean provider used for creating a new bean
* instance (must not be <b>null</b>)
- * @param initinv the (optional) invocation object for performing
+ * @param initInv the (optional) invocation object for performing
* initialization
* @param shutdownInv the (optional) {@code Invokable} object to be called
* on shutdown
@@ -125,7 +124,7 @@
*
* @param dependencyProvider the dependency provider
* @return the bean managed by this provider
- * @throws InjectionException if an error occurs
+ * @throws net.sf.jguiraffe.di.InjectionException if an error occurs
*/
public Object getBean(DependencyProvider dependencyProvider)
{
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/app/Application.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/app/Application.java 2010-08-26 18:43:51 UTC (rev 194)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/app/Application.java 2010-08-30 19:54:41 UTC (rev 195)
@@ -28,7 +28,6 @@
import net.sf.jguiraffe.di.BeanContext;
import net.sf.jguiraffe.di.ClassLoaderProvider;
-import net.sf.jguiraffe.di.InjectionException;
import net.sf.jguiraffe.di.MutableBeanStore;
import net.sf.jguiraffe.di.impl.DefaultBeanContext;
import net.sf.jguiraffe.di.impl.DefaultBeanStore;
@@ -95,8 +94,7 @@
* <p>
* A bunch of configuration properties is evaluated by this class to perform the
* correct setup. All of these must be placed in a section called
- * <code>framework</code>. The following table lists the available
- * properties:
+ * <code>framework</code>. The following table lists the available properties:
* </p>
* <p>
* <table border="1">
@@ -110,8 +108,8 @@
* <td>In this section some properties of the application context are defined:
* <dl>
* <dt><code>locale</code></dt>
- * <dd>Here the locale to be set at startup can be specified. If the property
- * is missing, the system's default locale will be used.</dd>
+ * <dd>Here the locale to be set at startup can be specified. If the property is
+ * missing, the system's default locale will be used.</dd>
* <dt><code>defaultResourceGroup</code></dt>
* <dd>Allows to define a default resource group that is used by the resource
* manager when no specific resource group is specified.</dd>
@@ -127,14 +125,14 @@
* The following sub elements are supported:
* <dl>
* <dt><code>beanBuilderFactory</code></dt>
- * <dd>Specifies the full qualified name of the
- * <code>{@link BeanBuilderFactory}</code> implementation that is used to
- * obtain bean builder instances. Here the implementation class and additional
- * initialization properties can be specified.</dd>
+ * <dd>Specifies the full qualified name of the {@link BeanBuilderFactory}
+ * implementation that is used to obtain bean builder instances. Here the
+ * implementation class and additional initialization properties can be
+ * specified.</dd>
* <dt><code>beandefinitions</code></dt>
* <dd>In this subsection an arbitrary number of <code>beandefinition</code>
- * elements can be specified. Each <code>beandefinition</code> element points
- * to a script with bean definitions. These scripts will be processed by the
+ * elements can be specified. Each <code>beandefinition</code> element points to
+ * a script with bean definitions. These scripts will be processed by the
* default bean builder.</dd>
* <dt><code>menuIcon</code></dt>
* <dd>An optional boolean flag that determines whether menu items should be
@@ -147,8 +145,7 @@
* <dt><code>mainScript</code></dt>
* <dd>With this property the name of the main builder script can be specified.
* If defined, the script will be executed using the application's builder. If
- * this results in a window, this window will be displayed.</dd>
- * </td>
+ * this results in a window, this window will be displayed.</dd></td>
* <td valign="top">Yes</td>
* </tr>
* <tr>
@@ -166,8 +163,7 @@
* <dt><code>width</code></dt>
* <dd>Defines the width position of the main window.</dd>
* <dt><code>height</code></dt>
- * <dd>Defines the height position of the main window.</dd>
- * </td>
+ * <dd>Defines the height position of the main window.</dd></td>
* <td valign="top">Yes</td>
* </tr>
* <tr>
@@ -193,11 +189,12 @@
* bean definitions. Here many helper classes used by the application are
* defined (e.g. the resource manager, the message output object, the GUI
* builder, and many more). At start up, the application creates a
- * <code>{@link BeanContext}</code> that provides access to these beans and
- * creates the required instances. There is a default bean definition file (<em>defaultbeans.jelly</em>)
- * with default bean definitions for all available helper classes. It is loaded
- * first. Concrete applications can override some or all of these beans. This is
- * a powerful means of customizing the application.
+ * {@link BeanContext} that provides access to these beans and creates the
+ * required instances. There is a default bean definition file (
+ * <em>defaultbeans.jelly</em>) with default bean definitions for all available
+ * helper classes. It is loaded first. Concrete applications can override some
+ * or all of these beans. This is a powerful means of customizing the
+ * application.
* </p>
* <p>
* To override bean definitions, use the
@@ -206,9 +203,8 @@
* arbitrary number of bean definition files can be specified (the files will be
* loaded from the class path). Using the predefined names for the default beans
* in these scripts causes the beans to be replaced by the custom ones. Have a
- * look at the <em>defaultbeans.jelly</em> script for more information; in
- * this file all available default beans are listed with a documentation for
- * each.
+ * look at the <em>defaultbeans.jelly</em> script for more information; in this
+ * file all available default beans are listed with a documentation for each.
* </p>
*
* @author Oliver Heger
@@ -697,10 +693,10 @@
* configuration file. Then this file is loaded with commons-configuration.
*
* @return the configuration to use
- * @throws ApplicationException if the configuration file cannot be located
+ * @throws ApplicationRuntimeException if the configuration file cannot be
+ * located
*/
protected HierarchicalConfiguration createConfiguration()
- throws ApplicationRuntimeException
{
return createConfiguration(fetchConfigURL());
}
@@ -1059,7 +1055,8 @@
*
* @param appCtx the application context
* @return the new command queue
- * @throws InjectionException if the command queue cannot be created
+ * @throws net.sf.jguiraffe.di.InjectionException if the command queue
+ * cannot be created
*/
protected CommandQueue createCommandQueue(ApplicationContext appCtx)
{
@@ -1154,7 +1151,8 @@
if (titleres != null && getCommandQueue().isPending())
{
if (getApplicationContext().messageBox(msgres, titleres,
- MessageOutput.MESSAGE_QUESTION, MessageOutput.BTN_YES_NO) != MessageOutput.RET_YE...
[truncated message content] |
|
From: <oh...@us...> - 2010-08-26 18:43:59
|
Revision: 194
http://jguiraffe.svn.sourceforge.net/jguiraffe/?rev=194&view=rev
Author: oheger
Date: 2010-08-26 18:43:51 +0000 (Thu, 26 Aug 2010)
Log Message:
-----------
Some improvements of the tutorial application. Added more documentation.
Modified Paths:
--------------
trunk/core/pom.xml
trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeNodePath.java
trunk/core/src/site/site.xml
trunk/core/src/site/xdoc/overview.xml
trunk/core/src/site/xdoc/userguide/user_guide.xml
trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/model/TestTreeNodePath.java
trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/FileSizeTransformer.java
trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/MainWndController.java
trunk/examples/src/main/resources/config.xml
trunk/examples/src/main/resources/main.jelly
trunk/examples/src/main/resources/tutorial-resources.properties
trunk/pom.xml
Added Paths:
-----------
trunk/core/src/site/resources/images/tutorial_main.png
trunk/core/src/site/resources/images/tutorial_viewsettings.png
trunk/core/src/site/xdoc/building.xml
trunk/core/src/site/xdoc/tutorialapp.xml
trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/AbstractDesktopTask.java
trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/EditDesktopTask.java
trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/OpenDesktopTask.java
trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/PrintDesktopTask.java
trunk/examples/src/main/resources/tutorial-resources_de.properties
Property Changed:
----------------
trunk/core/
trunk/examples/
Property changes on: trunk/core
___________________________________________________________________
Added: svn:ignore
+ .externalToolBuilders
.settings
target
.classpath
.project
maven-eclipse.xml
Modified: trunk/core/pom.xml
===================================================================
--- trunk/core/pom.xml 2010-08-22 16:30:32 UTC (rev 193)
+++ trunk/core/pom.xml 2010-08-26 18:43:51 UTC (rev 194)
@@ -101,11 +101,6 @@
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- </plugin>
-
- <plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
</plugin>
@@ -117,6 +112,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <webAccessUrl>http://jguiraffe.svn.sourceforge.net/viewvc/jguiraffe/trunk</webAccessUrl>
+ <anonymousConnection>scm:svn:https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/trunk</anonymousConnection>
+ <developerConnection>scm:svn:https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/trunk</developerConnection>
+ </configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -143,4 +144,24 @@
</plugin>
</plugins>
</reporting>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified: trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeNodePath.java
===================================================================
--- trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeNodePath.java 2010-08-22 16:30:32 UTC (rev 193)
+++ trunk/core/src/main/java/net/sf/jguiraffe/gui/builder/components/model/TreeNodePath.java 2010-08-26 18:43:51 UTC (rev 194)
@@ -252,6 +252,81 @@
}
/**
+ * Returns a {@code TreeNodePath} object that was created by appending the
+ * specified {@code ConfigurationNode} to this path. The new node becomes
+ * the target node of the new {@code TreeNodePath} object. This method is
+ * useful when navigating through a tree structure. The passed in node must
+ * be a child node of the current target node.
+ *
+ * @param node the node to be appended to the path
+ * @return the new {@code TreeNodePath} extended by the node
+ * @throws IllegalArgumentException if the passed in node is <b>null</b> or
+ * not a child node of the target node
+ */
+ public TreeNodePath append(ConfigurationNode node)
+ {
+ if (node == null)
+ {
+ throw new IllegalArgumentException("Node must not be null!");
+ }
+ if (node.getParentNode() != getTargetNode())
+ {
+ throw new IllegalArgumentException(
+ "Node is not a child of the target node!");
+ }
+
+ List<ConfigurationNode> newNodes =
+ new ArrayList<ConfigurationNode>(size() + 1);
+ newNodes.addAll(nodes);
+ newNodes.add(node);
+ return new TreeNodePath(newNodes);
+ }
+
+ /**
+ * Returns a {@code TreeNodePath} object that was created by appending the
+ * specified child node of the current target node to this path. This method
+ * determines the child node with the given name and index. It then creates
+ * a new {@code TreeNodePath} object with this node as target node.
+ *
+ * @param childName the name of the child node to be appended
+ * @param index the index of the node (in case there are multiple children
+ * with the same name)
+ * @return the new {@code TreeNodePath} extended by the child node
+ * @throws IllegalArgumentException if no child node with this name can be
+ * found
+ * @throws IndexOutOfBoundsException if the index is invalid
+ */
+ public TreeNodePath append(String childName, int index)
+ {
+ if (childName == null)
+ {
+ throw new IllegalArgumentException(
+ "Name of child node must not be null!");
+ }
+ if (getTargetNode().getChildrenCount(childName) < 1)
+ {
+ throw new IllegalArgumentException("Cannot find child with name "
+ + childName);
+ }
+
+ return append((ConfigurationNode) getTargetNode()
+ .getChildren(childName).get(index));
+ }
+
+ /**
+ * Returns a {@code TreeNodePath} object that was created by appending the
+ * first child node of the current target node with the given name to this path.
+ * This is a short cut of {@code append(childName, 0)}.
+ * @param childName the name of the child node to be appended
+ * @return the new {@code TreeNodePath} extended by the child node
+ * @throws IllegalArgumentException if no child node with this name can be found
+ */
+ public TreeNodePath append(String childName)
+ {
+ return append(childName, 0);
+ }
+
+ /**
* Tests whether two objects are equal. Two path objects are considered
* equal if and only if they refer to the same target node.
*
Added: trunk/core/src/site/resources/images/tutorial_main.png
===================================================================
(Binary files differ)
Property changes on: trunk/core/src/site/resources/images/tutorial_main.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/core/src/site/resources/images/tutorial_viewsettings.png
===================================================================
(Binary files differ)
Property changes on: trunk/core/src/site/resources/images/tutorial_viewsettings.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Modified: trunk/core/src/site/site.xml
===================================================================
--- trunk/core/src/site/site.xml 2010-08-22 16:30:32 UTC (rev 193)
+++ trunk/core/src/site/site.xml 2010-08-26 18:43:51 UTC (rev 194)
@@ -39,8 +39,10 @@
<item name="Home" href="/index.html"/>
<item name="Overview" href="/overview.html"/>
<item name="Javadoc (latest)" href="/apidocs/index.html"/>
+ <item name="User's Guide" href="/userguide/user_guide.html"/>
+ <item name="Tutorial application" href="/tutorialapp.html"/>
<item name="SVN" href="http://jguiraffe.svn.sourceforge.net/viewvc/jguiraffe/"/>
- <item name="User's Guide" href="/userguide/user_guide.html"/>
+ <item name="Building from SVN" href="/building.html"/>
</menu>
${reports}
Added: trunk/core/src/site/xdoc/building.xml
===================================================================
--- trunk/core/src/site/xdoc/building.xml (rev 0)
+++ trunk/core/src/site/xdoc/building.xml 2010-08-26 18:43:51 UTC (rev 194)
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright 2006-2010 The JGUIraffe Team.
+
+ Licensed under the Apache License, Version 2.0 (the "License")
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<!-- $Id$ -->
+<document>
+
+ <properties>
+ <author email="oh...@us...">Oliver Heger</author>
+ <title>Building from SVN</title>
+ </properties>
+
+<body>
+ <section name="Building from Subversion">
+ <p>
+ <em>JGUIraffe</em> uses <a href="http://maven.apache.org">Apache Maven</a>
+ as its build tool. When you check out the source code from
+ <a href="http://subversion.apache.org/">Subversion</a> using the command
+ </p>
+ <source><![CDATA[
+svn co https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/trunk jguiraffe
+ ]]></source>
+ <p>
+ you get a maven aggregator project with the following modules:
+ <ul>
+ <li><code>core</code> is the actual library. The jar file created when
+ building this project is the one which needs to be present in the class
+ path of your application.</li>
+ <li><code>examples</code> contains some sample code and also the complete
+ tutorial application.</li>
+ </ul>
+ </p>
+ <p>
+ For convenience the top-level directory contains a <code>pom.xml</code> for
+ building the whole project including all its modules. Just execute the
+ following command in this directory:
+ </p>
+ <source><![CDATA[
+mvn clean install
+ ]]></source>
+ <p>
+ This requires a JDK 1.6 because the <code>examples</code> module uses some
+ 1.6 features. The <code>core</code> is compatible with JDK 1.5. It can be
+ built with a 1.5 compiler by issuing the same command in the <code>core</code>
+ subdirectory. The resulting jar file containing all classes of the
+ <em>JGUIraffe</em> library can be found in the <code>core/target</code>
+ folder.
+ </p>
+ <p>
+ <em>Note:</em> If you get an <code>OutOfMemoryError</code>, you have to
+ increase the heap size for the Maven build. This can be achieved by setting
+ the <em>MAVEN_OPTS</em> environment variable correspondingly, e.g.
+ <code>MAVEN_OPTS=-Xmx256m</code> would increase the size of the heap space
+ to 256 M.
+ </p>
+ <p>
+ The pom defines a profile named <em>release</em> which creates some
+ additional artifacts. If it is activated, jars with Javadocs and the
+ project's sources are produced. These jars can be integrated in typical IDEs.
+ To activate this profile and generate the additional artifacts enter the
+ following command (either in the top-level or in the <code>core</code>
+ directory):
+ </p>
+ <source><![CDATA[
+mvn clean install -P release
+ ]]></source>
+ </section>
+</body>
+
+</document>
Property changes on: trunk/core/src/site/xdoc/building.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/core/src/site/xdoc/overview.xml
===================================================================
--- trunk/core/src/site/xdoc/overview.xml 2010-08-22 16:30:32 UTC (rev 193)
+++ trunk/core/src/site/xdoc/overview.xml 2010-08-26 18:43:51 UTC (rev 194)
@@ -17,6 +17,7 @@
-->
+<!-- $Id$ -->
<document>
<properties>
Added: trunk/core/src/site/xdoc/tutorialapp.xml
===================================================================
--- trunk/core/src/site/xdoc/tutorialapp.xml (rev 0)
+++ trunk/core/src/site/xdoc/tutorialapp.xml 2010-08-26 18:43:51 UTC (rev 194)
@@ -0,0 +1,525 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright 2006-2010 The JGUIraffe Team.
+
+ Licensed under the Apache License, Version 2.0 (the "License")
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+
+<!-- $Id$ -->
+<document>
+
+ <properties>
+ <author email="oh...@us...">Oliver Heger</author>
+ <title>The tutorial application</title>
+ </properties>
+
+<body>
+ <section name="The tutorial application">
+ <p>
+ In the source code repository, next to the code of the actual library, there
+ is a module with sample code. It is named <em>examples</em>. The major part
+ of this module consists of an example application demonstrating many of the
+ features offered by the <em>JGUIraffe</em> library. This section describes
+ the tutorial application. It is intended to be an extension of the
+ <a href="userguide/user_guide.html">user's guide</a>. While the user's guide
+ provides a whole lot of background information, this document is more
+ focused on practical things. It can also be used to get a quick jump start
+ into development with the <em>JGUIraffe</em> library.
+ </p>
+
+ <subsection name="Features of the tutorial application">
+ <p>
+ The tutorial application is not designed to be used as a productive tool.
+ Rather, its goal is to demonstrate typical programming practices working well
+ with the <em>JGUIraffe</em> library. This manifests itself in the fact that
+ many features - especially "dangerous" operations like removing
+ files - have not been implemented. As problem domain a file system browser
+ application was chosen. The following screenshot shows the main window of
+ the application:
+ </p>
+ <img src="images/tutorial_main.png"
+ alt="Main window of the tutorial application"/>
+ <p>
+ The application follows typical UI conventions of directory browsing tools.
+ The main panel (below the menu and the tool bar) is split into two areas.
+ On the left hand site there is a combo box allowing the user to select a
+ root file system. On Windows systems it contains the drive letters
+ available. Below the combo box there is a tree view component displaying
+ the directory structure of the file system currently selected. On the right
+ hand site there is a table showing the content (the sub directories and
+ files) of the directory selected in the tree view on the left.
+ </p>
+ <p>
+ From the tool bar or the main menu some operations can be triggered to do
+ something with the file(s) selected. The availability of these operations
+ depends on the current selection. For instance, a group of actions is active
+ only if a single file is selected. When selecting the <em>View settings...</em>
+ menu item from the <em>Extras</em> menu a dialog window pops up allowing the
+ definition of view-related properties for the current directory:
+ </p>
+ <img src="images/tutorial_viewsettings.png"
+ alt="Dialog window with view settings"/>
+ <p>
+ Using this dialog window many details of the display of the current directory
+ can be specified, for instance colors, the sorting of the files and sub
+ directories, and filter conditions. The settings entered in this dialog
+ window are saved in a file in the directory so that they can be applied
+ whenever the user navigates to this directory.
+ </p>
+ <p>
+ An action <em>File new</em> available from both the main menu and the tool
+ bar allows the creation of a new file. It displays a dialog window in which
+ the user can enter a file name and text content of the file. Closing this
+ window with the OK button creates such a file in the current directory. This
+ dialog window and the builder script which defines it is also subject of the
+ chapter <a href="userguide/builderscript.html">A complete builder script</a>
+ of the user's guide.
+ </p>
+ <p>
+ There is another action which demonstrates dealing with long-running
+ operations: If <em>Extras / Long operation</em> is selected, a dialog window
+ appears which allows the configuration of a dummy background task - mainly
+ the duration of the task in seconds can be entered using a slider control.
+ When the dialog window is closed the task runs in the background (it does
+ nothing useful), and another window is displayed showing the progress of the
+ task.
+ </p>
+ </subsection>
+
+ <subsection name="Quick start">
+ <p>
+ A <em>JGUIraffe</em> application requires a minimum set of files in order to
+ successfully launch it and to configure the framework. Of course, these
+ files are present for the tutorial application, too. We provide an overview
+ over these files here. This is especially useful for the impatient readers,
+ so they can start with their own experiments.
+ </p>
+ <p>
+ Each Java application needs a startup class, i.e. a class containing a
+ <code>main()</code> method. A <em>JGUIraffe</em> application does not
+ strictly require a custom startup class because the
+ <code><a href="apidocs/net/sf/jguiraffe/gui/app/Application.html">
+ Application</a></code> class comes with a <code>main()</code> method which can
+ be used out of the box. However, providing an application-specific startup
+ class can simplify some things, e.g. the definition of launch configurations
+ in an IDE. If the application supports command line arguments, a custom
+ startup class is also required. For these reasons the tutorial application
+ comes with its own startup class, but with a very simple one. It is derived
+ from <code>Application</code> and just calls the corresponding method to get
+ the framework running:
+ </p>
+ <source><![CDATA[
+package net.sf.jguiraffe.examples.tutorial;
+
+import net.sf.jguiraffe.gui.app.Application;
+import net.sf.jguiraffe.gui.app.ApplicationException;
+
+public class Main extends Application
+{
+ /**
+ * The main method of the application. Starts the whole application.
+ * @param args command line arguments
+ */
+ public static void main(String[] args) throws ApplicationException
+ {
+ startup(new Main(), args);
+ }
+}
+ ]]></source>
+ <p>
+ You may wonder how the framework knows which main window to display. The
+ startup class does not contain any information about this. The answer is
+ that this information is obtained from the application's configuration.
+ <em>JGUIraffe</em> uses <a href="http://commons.apache.org/configuration">
+ Apache Commons Configuration</a> to manage configuration data. So a
+ configuration file compatible with this library has to be created. Actually,
+ two configuration files are needed: One file is a description file listing
+ several configuration sources. This file is named <em>config.xml</em> per
+ default and is searched in the class path. The other file contains the
+ actual configuration of the <em>JGUIraffe</em> framework; it is referenced
+ from the first file. The <em>config.xml</em> file looks as follows for the
+ tutorial application:
+ </p>
+ <source><![CDATA[
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<configuration>
+ <system config-name="system-config"/>
+ <xml config-name="userConfig" fileName="${user.home}/.jguiraffe-testappconfig.xml"
+ config-optional="true" config-forceCreate="true"/>
+ <additional>
+ <xml fileName="framework-config.xml"/>
+ </additional>
+</configuration>
+ ]]></source>
+ <p>
+ Here, in the section wrapped by the <code><additional></code> tags
+ the actual configuration file for the framework - in this case named
+ <em>framework-config.xml</em> - is defined. The other elements integrate
+ some other configuration sources (which are useful, but not required for an
+ application):
+ <ul>
+ <li>The <code><system></code> element makes Java system properties
+ available to the configuration system.</li>
+ <li>This is used by the following <code><xml></code> tag which defines
+ an XML configuration file named <em>.jguiraffe-testappconfig.xml</em>
+ located in the home directory of the current user. In this file data
+ specific to a user can be stored; for instance, the framework stores here
+ the position and the size of the main window, so on the next start of the
+ application these properties can be restored.</li>
+ </ul>
+ The configuration of the framework is stored in the
+ <em>framework-config.xml</em> file. Here also a minimum set of properties
+ must be defined so that the framework knows what to do:
+ </p>
+ <source><![CDATA[
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<config>
+ <framework>
+ <builder>
+ <mainScript>main.jelly</mainScript>
+ <beandefinitions>
+ <beandefinition>tutorial-beans.jelly</beandefinition>
+ </beandefinitions>
+ </builder>
+ <appctx>
+ <defaultResourceGroup>tutorial-resources</defaultResourceGroup>
+ </appctx>
+
+ <storeuserconfig>true</storeuserconfig>
+ <userconfigname>userConfig</userconfigname>
+ </framework>
+</config>
+ ]]></source>
+ <p>
+ The most important piece of information is the name of the builder script
+ defining the application's main window. It is defined by the
+ <code><mainScript></code> element. The other elements configure some
+ useful but optional functionality of the framework. We give a short overview
+ over these elements:
+ <ul>
+ <li>When starting an application an arbitrary number of files with bean
+ definitions can be read. The beans defined in these files can then be
+ queried from the application's global <code>BeanContext</code>. This is
+ useful for instance for central services. For each bean definition file to
+ be read a <code><beandefinition></code> element has to be added.</li>
+ <li>If an application uses localized strings, it can define the default
+ resource group using the <code><defaultResourceGroup></code>
+ element. The default resource group is used for each resource lookup if
+ no specific group is provided.</li>
+ <li>The remaining elements define the so-called <em>user configuration</em>.
+ This is the already mentioned configuration source in which user-specific
+ data is stored. Here we specify that this mechanism should be enabled
+ (<code><storeuserconfig>true</storeuserconfig></code>) and
+ which configuration source to use for this purpose. The name of the
+ configuration source is passed to the <code><userconfigname></code>
+ element and must match a configuration source which was defined in the
+ main configuration description file <em>config.xml</em>.</li>
+ </ul>
+ </p>
+ <p>
+ This is basically all what is needed for a working <em>JGUIraffe</em>
+ application. Well, of course, the main builder script referenced by the
+ framework configuration file must also exist; this is highly specific to a
+ concrete application.
+ </p>
+ <p>
+ Applications that use resources to translate texts will also ship with a set
+ of resource properties files (provided that the default resource manager
+ implementation is used which obtains resource texts from properties files).
+ The tutorial application belongs to this group of applications. Its base
+ resource bundle is named <em>tutorial-resources.properties</em>. (Note that
+ the name matches the default resource group specified in the framework
+ configuration. In the case of the default resource manager a resource group
+ corresponds to a resource properties file. The properties file for the
+ default language does not have an extension; the file with the German
+ translations is named <em>tutorial-resources_de.properties</em>.)
+ </p>
+ </subsection>
+
+ <subsection name="Packaging">
+ <p>
+ Before we start with the actual exploration of the tutorial application we
+ will have to say some words about its package structure. There are multiple
+ reasonable ways of packaging a UI application. For instance, classes could
+ be grouped together in packages by their type. So you would end up with
+ packages for model classes, controller classes, view classes, helper classes,
+ etc. This is a valid packaging scheme, and it can be applied to
+ <em>JGUIraffe</em> applications.
+ </p>
+ <p>
+ The tutorial application uses a different approach. It groups its classes by
+ functionality. This means that there are packages related to the main UI
+ elements (the main frame and the dialog windows) used by the application.
+ (There is also a package with shared classes used by multiple windows.)
+ This way of packaging is also suitable for <em>JGUIraffe</em> applications.
+ The programming model of this framework typically leads to multiple small
+ classes implementing specific functionality like event handling or task
+ execution. View classes are not needed because views are defined in builder
+ scripts. In many cases you do not even have a controller class because the
+ default implementation of the framework is sufficient. So it makes sense to
+ bundle the classes that implement logic for a specific window in a common
+ package. By the way, these small and focused classes are much easier to
+ unit test than large, monolitic view classes with lots of nested anonymous
+ event listener classes.
+ </p>
+ </subsection>
+
+ <subsection name="The main frame">
+ <p>
+ The classes related to the application's main frame are all located in the
+ <code>net.sf.jguiraffe.examples.tutorial.mainwnd</code> package. In addition
+ to the main controller class, <code>MainWndController</code>, the package
+ contains a bunch of helper classes, e.g. for processing events or for
+ serving as model objects for UI elements. The frame window itself is
+ constructed from the builder script <code>main.jelly</code> which can be
+ found in the <code>src/main/resources</code> directory. (This is the maven
+ default directory for non-Java files which have to be added to the generated
+ jar. Here all builder scripts, configuration files and resource bundles are
+ stored.)
+ </p>
+ <p>
+ <code>MainWndController</code> is responsible for most of the logic of the
+ main frame window. This is different from typical controller implementations
+ for dialog windows: a dialog window is mainly concerned with gathering data
+ from the user and processing the results. The application's main frame
+ window serves a different purpose. Therefore the controller class is very
+ specific to the logic of the application. It is not associated with the
+ frame in the usual way, and it does not extend the controller base class
+ defined by the <em>JGUIraffe</em> framework (which is focused on dialog
+ windows). The association between the controller object and the UI is done
+ by the dependency injection framework. The controller is passed references
+ to all UI elements it has to interact with. Analogously, all helper objects
+ (e.g. event listeners) which have to call back the controller are passed a
+ reference to it. The helper objects are very simple: they store a reference
+ to the controller and call a corresponding method when they are triggered.
+ Thus the view logic for handling the interaction between the UI elements can
+ be implemented centrally in the <code>MainWndController</code> class.
+ </p>
+ <p>
+ The <code>main.jelly</code> builder script is a bit more complex than scripts
+ defining dialog windows because it is also responsible for the application's
+ main menu, its tool bar, and the actions representing menu items and/or
+ tool bar buttons. These action declarations make up a large section in the
+ builder script. Another big part defines the UI of the window: the combo
+ box for the file system, the tree view with the directory tree, and the
+ table with the current directory's content. The remaining parts define
+ helper objects and plug them together.
+ </p>
+ <p>
+ <code>MainWndController</code> is notified when the selection of the combo
+ box with the root file systems changes. This is done by the
+ <code>FileSystemChangeListener</code> class. In response of this event the
+ controller has to update the tree view so that it shows the content of the
+ newly selected file system. As the tree view's model a
+ <code>HierarchicalConfiguration</code> object from the
+ <a href="http://commons.apache.org/configuration">Apache Commons
+ Configuration</a> library is used. A configuration node in this model object
+ represents a node that is displayed by the tree view. The controller stores
+ the configuration nodes associated with root file elements. So it can
+ detect whether it already has loaded data for a file system or whether it
+ has to load this data now. In any case the model of the tree view is
+ manipulated so that it points to the data of the newly selected file system.
+ </p>
+ <p>
+ The controller also has to be notified about changes in the selection of
+ the tree view. When the user navigates the tree the corresponding directory
+ has to be displayed in the table. Because a whole file system can become
+ pretty huge, the controller does not load it at once. Rather, only a single
+ layer (a directory with its files and subdirectories) is loaded. If a
+ directory is selected whose content has not yet been loaded, the controller
+ executes a command of type <code>ReadDirectoryCommand</code> in the
+ background. The command reads the content of the directory and performs the
+ corresponding sort and filter operations. On completion of the command the
+ model of the tree view is updated. The configuration nodes forming the tree's
+ model are associated with objects of type <code>DirectoryData</code> from
+ the <code>model</code> package. They contain the data required for the
+ display of a directory. Such an object is determined during the processing
+ of the selection changed event of the tree view - either it has already been
+ present in the model or it has just been created by a
+ <code>ReadDirectoryCommand</code>. It is then used to populate the table.
+ </p>
+ <p>
+ The data model of the table is a plain <code>java.util.ArrayList</code>. It
+ is filled from the data of the <code>DirectoryData</code> object obtained
+ from the tree view's model. Actually, the list contains objects of type
+ <code>net.sf.jguiraffe.examples.tutorial.model.FileData</code>, a simple
+ wrapper around a <code>java.io.File</code> object. The table is configured
+ to display the single properties of such <code>FileData</code> objects.
+ With the <code>FileSizeTransformer</code> class there is a special
+ transformer implementation applied to the column with the file size: it
+ displays the size in kilo bytes.
+ </p>
+ </subsection>
+
+ <subsection name="The view settings dialog">
+ <p>
+ The classes implementing the view settings dialog are located in the
+ <code>net.sf.jguiraffe.examples.tutorial.viewset</code> package; the
+ builder script defining the dialog window is named
+ <em>viewsettings.jelly</em>. While the main frame demonstrates usage of some
+ of the advanced UI elements like trees and tables, the view settings dialog
+ contains various types of simple controls, e.g. radio buttons, checkboxes,
+ or input elements for other data types like numbers or dates.
+ </p>
+ <p>
+ The view settings dialog is a typical dialog window whose purpose is to
+ enter data. Therefore the base classes provided by the <em>JGUIraffe</em>
+ library for forms and controllers can be used. Because the UI has some
+ dynamic aspects, there is a custom controller implementation named
+ <code>ViewSettingsFormController</code> derived from the base class
+ <code>FormController</code>. This controller class has the task to control
+ the enabled state of some input elements which depent on the state of other
+ elements. This is achieved by registering the controller object as listener
+ for change events at the checkbox elements defined in the UI (registration
+ is performed in a declarative way by tags in the builder script). These
+ checkboxes are connected to input elements; the input elements are only
+ enabled if the checkbox is selected. Therefore, when a change event is
+ received, the controller determines the affected checkbox from the event's
+ properties and obtains its selection state. It then maps the name of the
+ checkbox to a component group and sets the enabled state of this group
+ accordingly. The UI has been defined in a way that there are component
+ groups for the elements which depend on checkboxes. So it is easy to find
+ the elements affected by a change of a checkbox and to manipulate their
+ state.
+ </p>
+ <p>
+ When the user closes the view settings dialog by clicking the OK button a
+ command of type <code>CreateViewSettingsCommand</code> is executed. It
+ creates a file in the current directory and stores the settings the user has
+ entered in the dialog window in it. To do this the command needs some data:
+ <ul>
+ <li>The data model of the form - an object of type
+ <code>ViewSettings</code> lives in the current bean context. It has been
+ stored there by the command which opened the view settings dialog.
+ <code>ViewSettings</code> is a pretty simple data class. It has methods
+ for loading and storing instances using standard Java serialization
+ facilities.</li>
+ <li>The current directory must be known because in this directory the
+ <code>ViewSettings</code> instance has to be stored. It is obtained from
+ the central <code>ApplicationContext</code> object. The application context
+ allows access to so-called typed properties which are intended to be used
+ for managing central data required by multiple parts of the application.
+ The controller of the main window sets this property whenever the user
+ selects a new directory in the tree view.</li>
+ </ul>
+ After the command has written the file with the view settings it executes
+ the <em>Refresh</em> action. This basically simulates a click on the
+ corresponding tool bar icon. It causes another <code>ReadDirectoryCommand</code>
+ to be executed so that the content of the current directory is read again.
+ The <code>ReadDirectoryCommand</code> class is able to interprete the view
+ settings for the current directory and apply filters and sort order
+ accordingly.
+ </p>
+ </subsection>
+
+ <subsection name="A long-running operation">
+ <p>
+ Applications sometimes have the requirement to execute a task which may take
+ a while. In such cases it is good practice to give the user some feedback
+ about what is going on. A good choice for this purpose is a dialog window
+ with a progress indicator. If possible, a cancel button can be provided
+ which allows the user to cancel the operation.
+ </p>
+ <p>
+ The tutorial application defines an action that simulates such a long-running
+ task. The implementation demonstrates how standard means provided by
+ <em>JGUIraffe</em> can be used to implement a dialog window for visual
+ feedback. The corresponding classes can be found in the
+ <code>net.sf.jguiraffe.examples.tutorial.bgtask</code> package, there is
+ also builder script named <em>bgtask.jelly</em>.
+ </p>
+ <p>
+ The builder script is a little bit special because it defines two dialog
+ windows at once. The main dialog window is directly opened when the user
+ selects the action for the long-running task. It presents some options for
+ the configuration of the task - mainly the user can specify the duration
+ using a slider control. (<em>Note:</em> There is also a checkbox which
+ controls whether visual feedback is enabled, but this is only for testing
+ purposes. A real application should probably always provide feedback.
+ Actually, disabling visual feedback is used to test the behavior of the
+ application if it is to be terminated and there is still a background task
+ running. You can try what happens then.)
+ </p>
+ <p>
+ When closing the configuration dialog with OK an instance of the
+ <code>BgTaskCommand</code> class is executed. This object is passed some
+ references to helper and data objects via dependency injection:
+ <ul>
+ <li>The <code><a href="apidocs/net/sf/jguiraffe/gui/builder/utils/GUISynchronizer.html">
+ GUISynchronizer</a></code> object is required for accessing UI elements
+ from a different thread than the event dispatch thread. The command object
+ is executed in a background thread, so it has to use the synchronizer when
+ it needs to manipulate the UI.</li>
+ <li>A reference to the second dialog window defined by the builder script.
+ This is the dialog for giving feedback about the progress of the
+ operation.</li>
+ <li>The data model of the first dialog window. This is a bean storing the
+ data entered by the user in the configuration dialog.</li>
+ <li>A reference to the progress bar control contained in the feedback
+ dialog. The command object uses this reference to increase the progress
+ indicator.</li>
+ </ul>
+ </p>
+ <p>
+ At the beginning of its <code>execute()</code> method the command class
+ opens the dialog window for the feedback of the operation. Then it simulates
+ a long-running operation. This is done in a loop which sleeps for one
+ second until the duration specified by the user is reached. In each iteration
+ the current progress rate is calculated, and the progress indicator is
+ updated correspondingly. Because the command runs in a background thread
+ the <code>GUISynchronizer</code> has to be used for this purpose.
+ </p>
+ <p>
+ After completion of the <code>execute()</code> method the
+ <code>performGUIUpdate()</code> method is called automatically in the event
+ dispatch thread. Here the feedback dialog window is closed.
+ </p>
+ <p>
+ The command class also implements the <code>FormActionListener</code>
+ interface and is registered as action listener at the <em>Cancel</em>
+ button of the feedback dialog (via an <code><a:eventListener></code>
+ tag in the builder script). So it gets notified when the user wishes to
+ cancel the operation. In this case the <em>Cancel</em> button is disabled -
+ to show the user that the click was recognized -, and a flag is set which
+ causes the main loop of the command to terminate.
+ </p>
+ <p>
+ What is only simulated by the <code>BgTaskCommand</code> class can be
+ transferred to real world use cases. The handling of the dialog window for
+ the feedback of the operation can be done in a similar way. Then the task
+ to be performed has to be broken down into several steps so that the
+ progress indicator can be updated in a meaningful way. Listening to a cancel
+ button and terminating the operation on demand is probably desired in most
+ cases, too.
+ </p>
+ <p>
+ Note that for this kind of operations the feedback dialog is an essential
+ implementation element. It does not only show the progress of the operation
+ but also blocks the UI (it is a modal dialog) and prevents the user to
+ trigger further actions. This is desired because in many use cases the user
+ should not be allowed to start multiple background tasks in parallel which
+ may conflict with each other. In <em>JGUIraffe</em> applications it is per
+ default not possible to start multiple background tasks at once anyway
+ because the command queue is only associated with a single worker thread. So
+ tasks are executed one by one in isolation. If an application really needs a
+ task that should run in the background independent from all other tasks of
+ the application, it has to start a separate thread manually.
+ </p>
+ </subsection>
+ </section>
+</body>
+
+</document>
Property changes on: trunk/core/src/site/xdoc/tutorialapp.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/core/src/site/xdoc/userguide/user_guide.xml
===================================================================
--- trunk/core/src/site/xdoc/userguide/user_guide.xml 2010-08-22 16:30:32 UTC (rev 193)
+++ trunk/core/src/site/xdoc/userguide/user_guide.xml 2010-08-26 18:43:51 UTC (rev 194)
@@ -30,12 +30,25 @@
<section name="About this document">
<p>
- This document contains user documentation about the JGUIraffe library.
+ This document contains user documentation about the <em>JGUIraffe</em>
+ library. It covers all important features of the library and provides
+ many usage examples.
</p>
<p>
- <em>Note: This is work in progress. This guide is currently incomplete.
- New documentation will be added when it becomes available.</em>
+ In most cases the single chapters of this user's guide are self contained.
+ We tried to arrange them in a meaningful order, but forward references
+ could not always be avoided. The sections about builders (starting from
+ the chapter <a href="builders.html">Introducing builders</a>) build upon
+ each other, so they should be read in sequence best.
</p>
+ <p>
+ In addition to this guide <em>JGUIraffe</em> ships with a tutorial
+ application. The associated <a href="../tutorialapp.html">documentation</a>
+ is a good extension of the documentation provided here. Especially the
+ <a href="../tutorialapp.html#Quick_start">Quick start</a> sub section is a
+ good starting point for the impatient readers. It describes the minimum
+ artifacts required to get a <em>JGUIraffe</em> application up and running.
+ </p>
</section>
<section name="Table of contents">
Modified: trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/model/TestTreeNodePath.java
===================================================================
--- trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/model/TestTreeNodePath.java 2010-08-22 16:30:32 UTC (rev 193)
+++ trunk/core/src/test/java/net/sf/jguiraffe/gui/builder/components/model/TestTreeNodePath.java 2010-08-26 18:43:51 UTC (rev 194)
@@ -58,8 +58,15 @@
}
};
+ /** Constant for the prefix path of the test key. */
+ private static final String PATH_PREFIX = "tables(0).table(1)";
+
+ /** Constant for the name of a child node. */
+ private static final String CHILD_NAME = "field";
+
/** Constant for the test key. */
- private static final String TEST_KEY = "tables(0).table(1).field(2)";
+ private static final String TEST_KEY = PATH_PREFIX + "." + CHILD_NAME
+ + "(2)";
/** Stores the root of the test node hierarchy. */
private static ConfigurationNode root;
@@ -81,7 +88,7 @@
for (int j = 0; j < TABLE_FIELDS[i].length; j++)
{
ConfigurationNode ndField = new DefaultConfigurationNode(
- "field", TABLE_FIELDS[i][j]);
+ CHILD_NAME, TABLE_FIELDS[i][j]);
ndTab.addChild(ndField);
}
}
@@ -298,6 +305,24 @@
}
/**
+ * Helper method for testing whether a path object contains the expected
+ * nodes.
+ *
+ * @param expected a list with the expected nodes
+ * @param path the path to check
+ */
+ private void checkPathNodes(List<ConfigurationNode> expected,
+ TreeNodePath path)
+ {
+ List<ConfigurationNode> actual = path.getNodes();
+ assertEquals("Wrong size of path", expected.size(), actual.size());
+ for (int i = 0; i < expected.size(); i++)
+ {
+ assertSame("Wrong node at " + i, expected.get(i), actual.get(i));
+ }
+ }
+
+ /**
* Tests whether the parent path can be obtained.
*/
@Test
@@ -305,14 +330,8 @@
{
TreeNodePath path = new TreeNodePath(nodeForKey(TEST_KEY));
TreeNodePath parent = path.parentPath();
- assertEquals("Wrong size of parent path", path.size() - 1, parent
- .size());
List<ConfigurationNode> nodes1 = path.getNodes();
- List<ConfigurationNode> nodes2 = parent.getNodes();
- for (int i = 0; i < parent.size(); i++)
- {
- assertSame("Wrong node at " + i, nodes1.get(i), nodes2.get(i));
- }
+ checkPathNodes(nodes1.subList(0, nodes1.size() - 1), parent);
assertSame("Wrong parent node", path.getNodes().get(path.size() - 2),
parent.getTargetNode());
}
@@ -327,4 +346,99 @@
TreeNodePath path = new TreeNodePath(root);
path.parentPath();
}
+
+ /**
+ * Tests whether a node can be appended to a path.
+ */
+ @Test
+ public void testAppendNode()
+ {
+ TreeNodePath path = new TreeNodePath(nodeForKey(PATH_PREFIX));
+ ConfigurationNode child =
+ (ConfigurationNode) path.getTargetNode().getChildren().get(0);
+ TreeNodePath path2 = path.append(child);
+ assertSame("Wrong target node", child, path2.getTargetNode());
+ List<ConfigurationNode> nodes =
+ new ArrayList<ConfigurationNode>(path.getNodes());
+ nodes.add(child);
+ checkPathNodes(nodes, path2);
+ }
+
+ /**
+ * Tries to append a null node to a path.
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testAppendNodeNull()
+ {
+ TreeNodePath path = new TreeNodePath(nodeForKey(PATH_PREFIX));
+ path.append((ConfigurationNode) null);
+ }
+
+ /**
+ * Tries to append a configuration node to a path which is not a child node
+ * of the current target node.
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testAppendNodeNoChild()
+ {
+ TreeNodePath path = new TreeNodePath(nodeForKey(PATH_PREFIX));
+ path.append(new DefaultConfigurationNode());
+ }
+
+ /**
+ * Tests whether a child node can be appended to a path.
+ */
+ @Test
+ public void testAppendChild()
+ {
+ TreeNodePath path = new TreeNodePath(nodeForKey(PATH_PREFIX));
+ TreeNodePath path2 = path.append(CHILD_NAME, 1);
+ List<ConfigurationNode> nodes =
+ new ArrayList<ConfigurationNode>(path.getNodes());
+ ConfigurationNode nd = nodeForKey(PATH_PREFIX);
+ nodes.add((ConfigurationNode) nd.getChildren(CHILD_NAME).get(1));
+ checkPathNodes(nodes, path2);
+ }
+
+ /**
+ * Tests whether the first child node is used if no index is provided.
+ */
+ @Test
+ public void testAppendChildDefaultIdx()
+ {
+ TreeNodePath path = new TreeNodePath(nodeForKey(PATH_PREFIX));
+ TreeNodePath path2 = path.append(CHILD_NAME);
+ assertEquals("Wrong node added", TABLE_FIELDS[1][0], path2
+ .getTargetNode().getValue());
+ }
+
+ /**
+ * Tries to add a null child to a path.
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testAppendChildNull()
+ {
+ TreeNodePath path = new TreeNodePath(nodeForKey(PATH_PREFIX));
+ path.append((String) null);
+ }
+
+ /**
+ * Tries to add an unknown child node to a path.
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testAppendChildUnknown()
+ {
+ TreeNodePath path = new TreeNodePath(nodeForKey(PATH_PREFIX));
+ path.append("an unknown child!");
+ }
+
+ /**
+ * Tries to add a child with an invalid index to a path.
+ */
+ @Test(expected = IndexOutOfBoundsException.class)
+ public void testAppendChildInvalidIndex()
+ {
+ TreeNodePath path = new TreeNodePath(nodeForKey(PATH_PREFIX));
+ path.append(CHILD_NAME, TABLE_FIELDS[1].length + 1);
+ }
}
Property changes on: trunk/examples
___________________________________________________________________
Added: svn:ignore
+ .externalToolBuilders
.settings
target
.classpath
.project
maven-eclipse.xml
Added: trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/AbstractDesktopTask.java
===================================================================
--- trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/AbstractDesktopTask.java (rev 0)
+++ trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/AbstractDesktopTask.java 2010-08-26 18:43:51 UTC (rev 194)
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2006-2010 The JGUIraffe Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.jguiraffe.examples.tutorial.mainwnd;
+
+import java.awt.Desktop;
+import java.io.File;
+import java.util.List;
+
+import net.sf.jguiraffe.gui.builder.utils.MessageOutput;
+import net.sf.jguiraffe.gui.cmd.CommandBase;
+import net.sf.jguiraffe.resources.Message;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * <p>
+ * An abstract base class for action tasks that perform a desktop operation with
+ * the currently selected file.
+ * </p>
+ * <p>
+ * The tutorial application defines some actions for doing something with files
+ * which is implemented by the {@code Desktop} class new in Java 1.6 (e.g.
+ * opening a file or printing it). This abstract base class provides basic
+ * functionality for implementing such functionality. It is initialized with a
+ * reference to the main controller from which the currently selected file can
+ * be obtained. It also takes care for exception handling. A concrete subclass
+ * only has to implement the desired {@code Desktop} operation.
+ * </p>
+ *
+ * @author Oliver Heger
+ * @version $Id$
+ */
+public abstract class AbstractDesktopTask implements Runnable
+{
+ /** The resource ID of the title of the error message box. */
+ private static final String RESID_ERR_TITLE = "task_errdesktop_title";
+
+ /** The resource ID of the text of the error message box. */
+ private static final String RESID_ERR_TEXT = "task_errdesktop_msg";
+
+ /** The logger. */
+ protected final Log log = LogFactory.getLog(getClass());
+
+ /** A reference to the main controller. */
+ private final MainWndController controller;
+
+ /**
+ * Creates a new instance of {@code AbstractDesktopTask} and sets the
+ * reference to the main controller.
+ *
+ * @param ctrl the main controller reference
+ */
+ protected AbstractDesktopTask(MainWndController ctrl)
+ {
+ controller = ctrl;
+ }
+
+ /**
+ * Returns a reference to the main controller.
+ *
+ * @return the main controller
+ */
+ public MainWndController getController()
+ {
+ return controller;
+ }
+
+ /**
+ * Returns the selected file.
+ *
+ * @return the selected file
+ */
+ public File getSelectedFile()
+ {
+ List<File> selection = controller.getSelectedFiles();
+ assert selection.size() == 1 : "Wrong number of selected files!";
+ return selection.get(0);
+ }
+
+ /**
+ * Executes this task. This implementation creates a new command for
+ * executing the desktop operation.
+ */
+ @Override
+ public void run()
+ {
+ getController().getApplication().execute(new DesktopCommand());
+ }
+
+ /**
+ * Performs the desired operation with the selected file. This method has to
+ * be implemented by concrete subclasses.
+ *
+ * @param desktop the {@code Desktop} instance
+ * @throws Exception if an error occurs
+ */
+ protected abstract void performDesktopOperation(Desktop desktop)
+ throws Exception;
+
+ /**
+ * A specialized command implementation for executing the desktop operation
+ * in a background thread.
+ */
+ private class DesktopCommand extends CommandBase
+ {
+ /**
+ * Executes this command. This implementation calls the
+ * {@code performDesktopOperation()} method.
+ */
+ @Override
+ public void execute() throws Exception
+ {
+ performDesktopOperation(Desktop.getDesktop());
+ }
+
+ /**
+ * Performs UI updates after executing the command. This implementation
+ * checks whether an error occurred. If this is the case, an exception
+ * message is displayed to the user.
+ */
+ @Override
+ protected void performGUIUpdate()
+ {
+ if (getException() != null)
+ {
+ log.error("Error on Desktop operation", getException());
+ getController()
+ .getApplication()
+ .getApplicationContext()
+ .messageBox(
+ new Message(null, RESID_ERR_TEXT,
+ getSelectedFile().getName()),
+ RESID_ERR_TITLE, MessageOutput.MESSAGE_ERROR,
+ MessageOutput.BTN_OK);
+ }
+ }
+ }
+}
Property changes on: trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/AbstractDesktopTask.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/EditDesktopTask.java
===================================================================
--- trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/EditDesktopTask.java (rev 0)
+++ trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/EditDesktopTask.java 2010-08-26 18:43:51 UTC (rev 194)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2006-2010 The JGUIraffe Team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.sf.jguiraffe.examples.tutorial.mainwnd;
+
+import java.awt.Desktop;
+
+/**
+ * <p>
+ * A specialized action task for editing a selected file.
+ * </p>
+ *
+ * @author Oliver Heger
+ * @version $Id$
+ */
+public class EditDesktopTask extends AbstractDesktopTask
+{
+ /**
+ * Creates a new instance of {@code EditDesktopTask} and sets the main
+ * controller.
+ *
+ * @param ctrl the main controller
+ */
+ public EditDesktopTask(MainWndController ctrl)
+ {
+ super(ctrl);
+ }
+
+ /**
+ * Performs the desktop operation. This implementation asks the
+ * {@code Desktop} object to edit the selected file.
+ */
+ @Override
+ protected void performDesktopOperation(Desktop desktop) throws Exception
+ {
+ desktop.edit(getSelectedFile());
+ }
+}
Property changes on: trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/EditDesktopTask.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Author Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/FileSizeTransformer.java
===================================================================
--- trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/FileSizeTransformer.java 2010-08-22 16:30:32 UTC (rev 193)
+++ trunk/examples/src/main/java/net/sf/jguiraffe/examples/tutorial/mainwnd/FileSizeTransformer.java 2010-08-26 18:43:51 UTC (rev 194)
@@ -22,22 +22,27 @@
import net.sf.jguiraffe.transform.TransformerContext;
/**
- * <p>A specialized transformer for formatting file sizes.</p>
- * <p>This transformer obtains the size of a file in kilobytes.</p>
+ * <p>
+ * A specialized transformer for formatting file sizes.
+ * </p>
+ * <p>
+ * This transformer obtains the size of a file in kilobytes.
+ * </p>
*
* @author Oliver Heger
* @version $Id$
*/
public class FileSizeTransformer implements Transformer
{
- /** Constant for the resource ID for the KB constant.*/
+ /** Constant for the resource ID for the KB constant. */
private static final String RES_KB = "trans_kb";
- /** The size of a kilobyte.*/
+ /** The size of a kilobyte. */
private static final long KB_SIZE = 1024;
/**
* Performs the transformation.
+ *
* @param o the object to transform
* @param ctx the transformer context
* @throws Exception if an error occurs
@@ -48,6 +53,8 @@
NumberFormat fmt = NumberFormat.getIntegerInstance(ctx.getLocale());
fmt.setGroupingUsed(true);
long sizeKb = (((Number) o).longValue() + KB_SIZE - 1) / KB_SIZE;
- return fmt.format(sizeKb) + ctx.getResourceManager().getText(ctx.getLocale(), null, RES_KB);
+ return fmt.format(sizeKb)
+ + ctx.getRes...
[truncated message content] |