Revision: 1792
          
http://spring-rich-c.svn.sourceforge.net/spring-rich-c/?rev=1792&view=rev
Author:   kevinstembridge
Date:     2007-07-29 12:10:30 -0700 (Sun, 29 Jul 2007)

Log Message:
-----------
Fix for RCP-408 (OK default button), provided by Yudhi Widyatama. Also added 
javadoc.

Modified Paths:
--------------
    
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/dialog/AlertMessageAreaPane.java

Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/dialog/AlertMessageAreaPane.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/dialog/AlertMessageAreaPane.java
       2007-07-29 18:51:18 UTC (rev 1791)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/dialog/AlertMessageAreaPane.java
       2007-07-29 19:10:30 UTC (rev 1792)
@@ -38,11 +38,12 @@
 import org.springframework.util.StringUtils;
 
 /**
- * MessagePane implementation used by <code>MessageDialog</code>
+ * MessagePane implementation used by [EMAIL PROTECTED] MessageDialog}.
  * 
  * @author Peter De Bruycker
  */
 public class AlertMessageAreaPane extends AbstractControlFactory implements 
MessagePane, PropertyChangeListener {
+       
     private Icon warningIcon;
     private Icon errorIcon;
     private Icon infoIcon;
@@ -50,10 +51,18 @@
     private JLabel iconLabel;
     private DefaultMessageAreaModel messageAreaModel;
 
+    /**
+     * Creates a new uninitialized [EMAIL PROTECTED] AlertMessageAreaPane}.
+     */
     public AlertMessageAreaPane() {
         init( this );
     }
 
+    /**
+     * Creates a new [EMAIL PROTECTED] AlertMessageAreaPane} that uses the 
given delegate
+     * as a message container.
+     * @param delegate The messagable delegate.
+     */
     public AlertMessageAreaPane( Messagable delegate ) {
         init( delegate );
     }
@@ -74,10 +83,9 @@
         } catch( IOException e ) {
         }
 
-        // messageArea.setContentType("text/html");
         GuiStandardUtils.textComponentAsLabel( messageArea );
         messageArea.setFont( new JLabel().getFont() );
-        // messageArea.setVerticalAlignment(SwingConstants.TOP);
+        messageArea.setFocusable(false);
     }
 
     public int getPreferredHeight() {
@@ -151,6 +159,11 @@
         iconLabel.setIcon( getIcon( message.getSeverity() ) );
     }
 
+    /**
+     * Returns the icon for the given severity.
+     * @param severity The severity level.
+     * @return The icon for the given severity, never null.
+     */
     private Icon getIcon( Severity severity ) {
         if( severity == Severity.ERROR ) {
             return getErrorIcon();
@@ -168,6 +181,10 @@
         return errorIcon;
     }
 
+    /**
+     * Sets the icon to be shown when displaying messages with error-level 
severity.
+     * @param icon The error icon.
+     */
     public void setErrorIcon( Icon icon ) {
         errorIcon = icon;
     }
@@ -179,6 +196,10 @@
         return warningIcon;
     }
 
+    /**
+     * Sets the icon to be shown when displaying messages with warning-level 
severity.
+     * @param icon The warning icon.
+     */
     public void setWarningIcon( Icon icon ) {
         warningIcon = icon;
     }
@@ -190,7 +211,13 @@
         return infoIcon;
     }
 
+    /**
+     * The icon to be shown when dispalying messages with info-level severity.
+     * @param icon The info icon.
+     */
     public void setInfoIcon( Icon icon ) {
         infoIcon = icon;
     }
+    
 }
+


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
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