Revision: 1296
Author:   mathiasbr
Date:     2006-08-12 06:35:30 -0700 (Sat, 12 Aug 2006)
ViewCVS:  http://svn.sourceforge.net/spring-rich-c/?rev=1296&view=rev

Log Message:
-----------
added showPage(PageDescriptor) and showPage(ApplicationPage) to 
ApplicationWindow

Modified Paths:
--------------
    
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/ApplicationWindow.java
    
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationWindow.java
Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/ApplicationWindow.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/ApplicationWindow.java
     2006-08-11 08:47:24 UTC (rev 1295)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/ApplicationWindow.java
     2006-08-12 13:35:30 UTC (rev 1296)
@@ -46,6 +46,10 @@
 
     public void showPage(String pageDescriptorId);
 
+    public void showPage(PageDescriptor pageDescriptor);
+
+    public void showPage(ApplicationPage page);
+
     public boolean close();
 
     public void setWindowManager(WindowManager windowManager);
@@ -53,4 +57,5 @@
     public void addPageListener(PageListener listener);
 
     public void removePageListener(PageListener listener);
+
 }
\ No newline at end of file

Modified: 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationWindow.java
===================================================================
--- 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationWindow.java
      2006-08-11 08:47:24 UTC (rev 1295)
+++ 
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationWindow.java
      2006-08-12 13:35:30 UTC (rev 1296)
@@ -166,6 +166,17 @@
         }
     }
 
+    public void showPage(PageDescriptor pageDescriptor) {
+        Assert.notNull(pageDescriptor, "pageDescriptor == null");
+        
+        if(getPage() == null || 
!getPage().getId().equals(pageDescriptor.getId())) {
+            showPage(createPage(pageDescriptor));
+        }
+        else {
+            // asking for the same page, so ignore
+        }
+    }
+
     /**
      * Show the given page in this window.
      *
@@ -173,7 +184,7 @@
      *
      * @throws IllegalArgumentException if page == null
      */
-    protected void showPage(ApplicationPage page) {
+    public void showPage(ApplicationPage page) {
         if (page == null) throw new IllegalArgumentException("page == null");
 
         if (this.currentPage == null) {


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