[Schmitzm-commits] r960 - trunk/src/skrueger/swing

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 10 14:12:59 CEST 2010


Author: alfonx
Date: 2010-08-10 14:12:58 +0200 (Tue, 10 Aug 2010)
New Revision: 960

Modified:
   trunk/src/skrueger/swing/DialogManager.java
Log:
Added JavaDoc

Modified: trunk/src/skrueger/swing/DialogManager.java
===================================================================
--- trunk/src/skrueger/swing/DialogManager.java	2010-08-10 12:12:43 UTC (rev 959)
+++ trunk/src/skrueger/swing/DialogManager.java	2010-08-10 12:12:58 UTC (rev 960)
@@ -17,12 +17,14 @@
 	public abstract class FactoryInterface {
 
 		public abstract DIALOG create();
-		
+
 		/** May be overridden to add Listeners **/
-		public void afterCreation(DIALOG newInstance){};
+		public void afterCreation(DIALOG newInstance) {
+		};
 
 		/** May be overridden to remove Listeners added earlier **/
-		public void beforeDispose(DIALOG newInstance){};
+		public void beforeDispose(DIALOG newInstance) {
+		};
 
 	}
 
@@ -51,10 +53,17 @@
 	}
 
 	/**
+	 * Implementing this should have a <br/>
+	 * <code>try { ... return ... } catch (Exception e) {
+				ExceptionDialog.show(owner, e);
+				return null;
+			} </code> block.
+	 * 
 	 * @param key
 	 * @param owner
 	 * @param constArgs
-	 * @return a cached instance or creates a new instance. Instances are always retuned visible and toFront.
+	 * @return a cached instance or creates a new instance. Instances are always
+	 *         returned visible and toFront.
 	 */
 	public abstract DIALOG getInstanceFor(final KEY key, final Component owner,
 			final Object... constArgs);
@@ -130,10 +139,9 @@
 				public void windowClosing(final WindowEvent e) {
 				}
 			});
-			
+
 			factory.afterCreation(dialog);
 		}
-		
 
 		return dialog;
 	}
@@ -166,5 +174,4 @@
 		return dialogCache.values();
 	}
 
-
 }



More information about the Schmitzm-commits mailing list