[PATCH] fixes to swing button implementation

2004-01-06 Thread graydon hoare
hi, this patch implements JButton as near as I can tell "correctly" -- that is, moving full responsibility for event handling and painting into the plaf, teaching the model about properties and listeners, delegating state from the component to the model, following the spec for state transition

Re: [PATCH] fixes to swing button implementation

2004-01-06 Thread Sascha Brawer
graydon hoare <[EMAIL PROTECTED]> wrote on Tue, 6 Jan 2004 15:05:53 -0500: >+ // ChangeEvents are not AWTEvents, can't use multicaster >+ Vector changeListeners = new Vector (); Using Vector means a lot of synchronization operations. java.util.ArrayList/LinkedList are not synchronized, which ma

Re: [PATCH] fixes to swing button implementation

2004-01-06 Thread Michael Koch
On Tue, Jan 06, 2004 at 10:17:04PM +0100, Sascha Brawer wrote: > graydon hoare <[EMAIL PROTECTED]> wrote on Tue, 6 Jan 2004 15:05:53 -0500: > > >+ // ChangeEvents are not AWTEvents, can't use multicaster > >+ Vector changeListeners = new Vector (); > > Using Vector means a lot of synchronizatio

Re: [PATCH] fixes to swing button implementation

2004-01-07 Thread Sascha Brawer
Michael Koch <[EMAIL PROTECTED]> wrote on Tue, 6 Jan 2004 22:27:25 +0100: graydon>+ // ChangeEvents are not AWTEvents, can't use multicaster graydon>+ Vector changeListeners = new Vector (); Sascha> it probably would be advisable to use Sascha> javax.swing.event.EventListenerList instead of Vec

Re: [PATCH] fixes to swing button implementation

2004-01-07 Thread Michael Koch
On Wed, Jan 07, 2004 at 08:04:22AM +0100, Sascha Brawer wrote: > Michael Koch <[EMAIL PROTECTED]> wrote on Tue, 6 Jan 2004 22:27:25 +0100: > > graydon>+ // ChangeEvents are not AWTEvents, can't use multicaster > graydon>+ Vector changeListeners = new Vector (); > > Sascha> it probably would be

Re: [PATCH] fixes to swing button implementation

2004-01-27 Thread graydon hoare
Sascha Brawer wrote: > But probably, it would best tp use javax.swing.event.EventListenerList here (which, by coincidence, became functional this afternoon...). I'm using this now. Weird. From looking at the J2SE 1.4.2 API specification, I would expect: protected int stateMask; // e.g. ARMED