This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 157722 - Using custom adapters in Listener code generation
Summary: Using custom adapters in Listener code generation
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-01 08:28 UTC by sala
Modified: 2009-02-01 08:28 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sala 2009-02-01 08:28:08 UTC
If I'm using custom event handling (Listener, Event classes) Netbeans uses only the Listener class for code generation.
There is no way to specify the Adapter class, since it's not part of the javabeans specification. There should be a way
to specify the adapters for the Listener classes.

It seems to me, that some kind of adapter-listener connection is already hardwired, because the generated code uses
WindowAdapter instead of WindowListener:

addWindowListener(new java.awt.event.WindowAdapter() {
             public void windowClosing(java.awt.event.WindowEvent evt) {
                 formWindowClosing(evt);
             }
         });

I'd like Netbeans to generate similar code for my own custom event handling classes. So I'd like to force Netbeans to
use my own Adapter class instead of my own Listener interface in code generation.