[Jguiraffe-developers] SF.net SVN: jguiraffe:[208] trunk
Brought to you by:
oheger
|
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.
|