Bean Info Event Descriptors

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Bean Info Event Descriptors

Postby munal » Thu Oct 01, 2009 2:26 am

Hi,

I have a custom button widget which is inherited from JButton. I've added a custom event in it.
I want this custom event to be default event for that button widget, and I do not want action event to be seen.

I've used beaninfo class for that widget, and I've set getDefaultEVentIndex() and getEventSetDescriptors() API.

First question: When you click add event handler, WindowBuilder shows all events. İs it possible to show
only the ones in "getEventSetDescriptors()"?

Second question: When you double click the custom button in designer, it automatically adds "action" event.
Is it possible for the designer to use the one in "getDefaultEVentIndex()"?
Or am I doing something wrong?

Thanks in advance..
Window Builder 6.9.2 for Windows (Eclipse 3.4)
munal
 
Posts: 5
Joined: Thu Oct 01, 2009 2:01 am

Re: Bean Info Event Descriptors

Postby Eric Clayberg » Sun Oct 04, 2009 4:31 pm

munal wrote:First question: When you click add event handler, WindowBuilder shows all events. İs it possible to show
only the ones in "getEventSetDescriptors()"?

No. WndowBuilder uses reflection to build the list of event handlers.

If you are using WB v7.1, you can use the WB Customization API to hide events supplied by the superclass, if you wish.

munal wrote:Second question: When you double click the custom button in designer, it automatically adds "action" event.
Is it possible for the designer to use the one in "getDefaultEVentIndex()"?

No, but you can customize this using the the WB Customization API.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest