JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Software Design  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 關於Observe Pattern, 要如何讓兩個畫面互相變動
velvetslash





發文: 7
積分: 0
於 2006-04-18 21:07 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
假如有個Panel_A, 上面有很多筆資料,
當隨便按下一筆資料,
Panel_B 會更新畫面, 更新成Panel_A選擇的資料,
當修改完Panel_B之後, 如何讓Panel_A也立即更新畫面???

因為註冊方式是 a丟給b的constructor,
那我就沒辦法再把b丟給a
如下
Panel_A a = new Panel_A();
Panel_B b = new Panel_B( a);

請問有什麼解決辦法嗎???
thanks~~~~


reply to postreply to post
作者 Re:關於Observe Pattern, 要如何讓兩個畫面互相變動 [Re:velvetslash]
ezway





發文: 61
積分: 0
於 2006-04-19 12:57 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
一定得用observer嗎? 感覺上Mediator比較恰當
http://caterpillar.onlyfun.net/Gossip/DesignPattern/MediatorPattern.htm


reply to postreply to post
作者 Re:關於Observe Pattern, 要如何讓兩個畫面互相變動 [Re:velvetslash]
velvetslash





發文: 7
積分: 0
於 2006-04-22 15:42 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
謝謝你喔
好像真的比較適合XD
我在研究看看~^^
thank you


reply to postreply to post
» JWorld@TW »  Software Design

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8