Article View: borland.public.jbuilder.java.swing
Article #1790Multi-document GUI desing
From: Alexei Akimov
Date: Wed, 23 Jul 2003 14:19
Date: Wed, 23 Jul 2003 14:19
31 lines
2773 bytes
2773 bytes
Dear expert, Would you please, tell me if there is some wellknown desing strategy for implementiing multi-document application. I have tried and obtained the follwing problems. 1. How to use menus? The main frame has it's own menu with common items such "New","Open", "Exit", "About the program" and so on. When a document is opened the this menu must be extended by document-specific items such as "Edit" menu items. But it is impossible to merge menus in Swing as I used to do in Delphi. So the possible solutions are to construct the exdended menubar in the document frame (or panel) and set it as JMenuBar for the mainframe at the runtime or to create already extended menubar in the main frame which includes menu items for all possible actions for all documents (documens obviously could support different sets of actions and I mostly interested in this situation). The first approach requiers to import common actions into the document frame which is not flexible. Using the second approach we have to query each document if it supports an action or not to organize automatic updates of the actions. 2. The same design problem appears with the toolbars. 3. I wrote a sample test for the first approach, though it is not very elegant it works but JBuilder does not support features called in Delphi world as "visual inheritance". I do not know how to incapsulate menu and toolbar and the mangement code in base classes and use them in descendant classes via visal designer. Of course any design strategy will be interesting but the most valuable are those of then which are JBuilder IDE compatible. 4. By the way, how is JBuilder IDE designed? It is a very good working example of the multi-document interface implementation. Best regards, Alexei Akimov
Technical Details
Message-ID:
<3f1e99c7@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!xmission!news-out.spamkiller.net!propagator2-maxim!news-in.superfeed.net!newsfeed01.tsnz.net!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,f8b5398c8575d9e2,start X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2003-07-23 07:31:31 PST From: "Alexei Akimov" <a_p_akimov@mtu-net.ru> Newsgroups: borland.public.jbuilder.java.swing Subject: Multi-document GUI desing Date: Wed, 23 Jul 2003 18:19:49 +0400 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 212.188.97.209 Message-ID: <3f1e99c7@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1058970055 212.188.97.209 (23 Jul 2003 07:20:55 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!xmission!news-out.spamkiller.net!propagator2-maxim!news-in.superfeed.net!newsfeed01.tsnz.net!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail