🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17379

Re: Button + Checkbox + CheckboxGroup == loads of fun

#17379
From: Paul Furbacher
Date: Mon, 16 Nov 1998 00:00
26 lines
1884 bytes
William Yu wrote:
> 
> Here's the setup.  I'm working on creating a few variations of the List
> component -- specifically, a Checkbox List and a Button List.  The
> Checkbox List component is up and running so I was thinking about how to
> reuse my Checkbox List component for the Button List.  My thought was to
> extend the Button class to act like a Checkbox. 
> [...]
> The idea was that my CheckboxButtons would create phantom Checkboxes to
> link to a CheckboxGroup.  And when the state changed due to a selection,
> the state change listener would notify CheckboxButton.  Unfortunately, [...]

If I understand this correctly, you want to fill a listbox
with buttons, and have those buttons belong to some group manager.
What about "com.sun.java.swing.ButtonGroup"?   

Or, why not model your approach after that of the JBCL "CheckboxPanel" 
which essentially adds the "itemMulticaster" to each of the elements 
in the panel?  The "CheckboxPanel.addItemListener()" method adds
a listener to the "itemMulticaster".  The effect is that when 
the item state is altered, the item multicaster is notified and
it in turn notifies the component that was registered as a listener, 
e.g., your frame.


Paul Furbacher
Technical Details
Message-ID: <36506AD9.5B65D538@bilbo.bio.purdue.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <364ED33A.4C99CE@Bigfoot.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,ad23d109ed8251a3
X-Google-Attributes: gidf74b3,public
From: Paul Furbacher <pf@bilbo.bio.purdue.edu>
Subject: Re: Button + Checkbox + CheckboxGroup == loads of fun
Date: 1998/11/16
Message-ID: <36506AD9.5B65D538@bilbo.bio.purdue.edu>
X-Deja-AN: 412464517
Content-Transfer-Encoding: 7bit
References: <364ED33A.4C99CE@Bigfoot.com>
To: William Yu <William_Yu@Bigfoot.com>
Content-Type: text/plain; charset=us-ascii
Organization: Biological Sciences, Purdue Univ.
Mime-Version: 1.0
Reply-To: pf@bilbo.bio.purdue.edu
Newsgroups: borland.public.jbuilder.java.language