BUG: WB assumes implementation of javax.swing.Action

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

BUG: WB assumes implementation of javax.swing.Action

Postby Andrei.Pozolotin » Wed Oct 13, 2010 5:04 pm

BUG: WB assumes implementation of javax.swing.Action

when I create default button and associate with new defasult swing action,
WB generates something like this:

Code: Select all
    private class SwingAction extends AbstractAction {
        public SwingAction() //
        {
            putValue(NAME, "Login");
        }
        @Override
        public void actionPerformed(ActionEvent e) {
        }
    }


wich is rendered OK as shown in attach #1

if however I provide the same code, but hide the constructor from WB:

Code: Select all
    private class SwingAction extends AbstractAction {
        // HIDDEN FROM WB: public SwingAction() //
        {
            putValue(NAME, "Login");
        }
        @Override
        public void actionPerformed(ActionEvent e) {
        }
    }


now WB can not render it any more as shown in attach #2

the real problem is not with this toy examle but when I substitute
more complex implementations of javax.swing.Action

thank you;
Attachments
snapshot20.png
snapshot20.png (106.47 KiB) Viewed 104 times
snapshot21.png
snapshot21.png (106.29 KiB) Viewed 104 times
Andrei.Pozolotin
 
Posts: 55
Joined: Wed Sep 22, 2010 5:35 am

Re: BUG: WB assumes implementation of javax.swing.Action

Postby Eric Clayberg » Fri Oct 15, 2010 7:15 pm

This is not really a bug. It is more a lack of a feature since we don't (and can't) guarantee to handle all hand-written code.

We have added support for this specific pattern in the latest WindowBuilder build...

http://code.google.com/webtoolkit/tools ... -beta.html
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

cron