Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "tar" Subject: Re: GUI structure Message-ID: X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui In-Reply-To: <1173688886.417133.85500@s48g2000cws.googlegroups.com> References: <1173688886.417133.85500@s48g2000cws.googlegroups.com> Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 33 Date: Wed, 27 Apr 2011 15:31:41 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303918301 96.60.20.240 (Wed, 27 Apr 2011 10:31:41 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:31:41 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:1158 To: comp.lang.java.gui "dwj" writes: > My problem... Each of the image processing filters has its own set of > bespoke attributes (such as threshold) that I want the user to be able > to view and set. When these are set, I then want them to be updated > in the filter object which the values apply to. I was thinking of > creating a different form for each filter to set and view the > attributes but I am unsure how I should link the forms to the filter > classes. An instance of each filter class won't always exist. One approach would be to have your filter classes implement a method that either returns a dialog item to set its options, or else invokes a dialog and sets its options. That provides a link between the option form and the class, and doesn't involve any instance at all. This will solve the problem for the case where you want to set an individual filter's options or parameters. It doesn't solve the case of having a general default set of attributes available that can be set and persist independent of any particular filter instance. That would be a bit more complicated, and would involve having some data structure that holds the option information. (Perhaps this data structure could be a dialog object itself?) and the use of static storage and methods in the filter classes. -- Thomas A. Russ, USC/Information Sciences Institute --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24