Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1158

Re: GUI structure

From "tar" <tar@THRWHITE.remove-dii-this>
Subject Re: GUI structure
Message-ID <ymir6ru4aa4.fsf@sevak.isi.edu> (permalink)
Newsgroups comp.lang.java.gui
References <1173688886.417133.85500@s48g2000cws.googlegroups.com>
Date 2011-04-27 15:31 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
"dwj" <danielwatkinslearn@hotmail.com> 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

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

GUI structure "dwj" <dwj@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000
  Re: GUI structure "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:31 +0000

csiph-web