Revision: 1364
          http://svn.sourceforge.net/spring-rich-c/?rev=1364&view=rev
Author:   peterdb
Date:     2006-09-04 00:33:53 -0700 (Mon, 04 Sep 2006)

Log Message:
-----------
Fix for RCP-375 : Changes in a ConfirmationDialog's message do not propagate to 
the widget if it has already been created

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

Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/dialog/ConfirmationDialog.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/dialog/ConfirmationDialog.java
 2006-09-04 06:51:21 UTC (rev 1363)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/dialog/ConfirmationDialog.java
 2006-09-04 07:33:53 UTC (rev 1364)
@@ -16,6 +16,7 @@
 package org.springframework.richclient.dialog;
 
 import java.awt.Window;
+import java.beans.PropertyChangeSupport;
 
 import javax.swing.Icon;
 import javax.swing.JComponent;
@@ -40,6 +41,8 @@
     private DefaultMessageAreaPane messageAreaPane;
 
     private String confirmationMessage;
+    
+    private PropertyChangeSupport propertyChangeSupport = new 
PropertyChangeSupport(this);
 
     public ConfirmationDialog() {
         this("Confirmation Required", null, "Are you sure you wish to perform 
this action?");
@@ -57,6 +60,9 @@
     public void setConfirmationMessage(String message) {
         Assert.hasText(message, "The confirmation message is required");
         this.confirmationMessage = message;
+        if(this.messageAreaPane != null) {
+            messageAreaPane.setMessage(new Message(message));
+        }
     }
 
     protected String getFinishCommandId() {

Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/dialog/DefaultMessageAreaPane.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/dialog/DefaultMessageAreaPane.java
     2006-09-04 06:51:21 UTC (rev 1363)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/dialog/DefaultMessageAreaPane.java
     2006-09-04 07:33:53 UTC (rev 1364)
@@ -104,6 +104,7 @@
         messageAreaModel.setMessage(message);
         if (messageLabel != null) {
             messageAreaModel.renderMessage(messageLabel);
+            messageLabel.setIcon(getDefaultIcon());
         }
     }
 


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

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
spring-rich-c-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs

Reply via email to