Revision: 1665
          http://svn.sourceforge.net/spring-rich-c/?rev=1665&view=rev
Author:   kevinstembridge
Date:     2007-01-15 12:33:53 -0800 (Mon, 15 Jan 2007)

Log Message:
-----------
Added javadoc

Modified Paths:
--------------
    
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/config/ApplicationWindowSetter.java

Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/config/ApplicationWindowSetter.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/config/ApplicationWindowSetter.java
        2007-01-15 16:41:06 UTC (rev 1664)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/config/ApplicationWindowSetter.java
        2007-01-15 20:33:53 UTC (rev 1665)
@@ -18,22 +18,51 @@
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.config.BeanPostProcessor;
 import org.springframework.richclient.application.ApplicationWindow;
+import org.springframework.richclient.util.Assert;
 
+/**
+ * A bean post processor that will set the [EMAIL PROTECTED] 
ApplicationWindow} of any beans implementing the
+ * [EMAIL PROTECTED] ApplicationWindowAware} interface. 
+ *
+ * @author Keith Donald
+ * 
+ * @see BeanPostProcessor
+ *
+ */
 class ApplicationWindowSetter implements BeanPostProcessor {
-    private ApplicationWindow window;
+    
+    private final ApplicationWindow window;
 
+    /**
+     * Creates a new [EMAIL PROTECTED] ApplicationWindowSetter} that will set 
the given application window
+     * on any beans processed if they implement the [EMAIL PROTECTED] 
ApplicationWindowAware} interface.
+     *
+     * @param window The application window to be set on the beans being 
processed. Must not be null.
+     * 
+     * @throws IllegalArgumentException if [EMAIL PROTECTED] window} is null.
+     */
     public ApplicationWindowSetter(ApplicationWindow window) {
+        Assert.required(window, "window");
         this.window = window;
     }
 
+    /**
+     * Default implementation, performs no action on the given bean.
+     */
     public Object postProcessAfterInitialization(Object bean, String beanName) 
throws BeansException {
         return bean;
     }
 
+    /**
+     * If the given bean is an implementation of [EMAIL PROTECTED] 
ApplicationWindowAware}, it will have its
+     * application window set to the window provided to this instance at 
construction time.
+     * 
+     */
     public Object postProcessBeforeInitialization(Object bean, String 
beanName) throws BeansException {
         if (bean instanceof ApplicationWindowAware) {
             ((ApplicationWindowAware)bean).setApplicationWindow(window);
         }
         return bean;
     }
-}
\ No newline at end of file
+    
+}


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
spring-rich-c-cvs mailing list
spring-rich-c-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs

Reply via email to