SwingActions and actionPerformed

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

SwingActions and actionPerformed

Postby mkornatzki » Mon Jun 14, 2010 1:50 am

Hi,

is there a reason why i can't with the SwingDesigner add an actionPerformed to an action?
There is only the possibility to create a propertyChange.

cheers, michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: SwingActions and actionPerformed

Postby Eric Clayberg » Mon Jun 14, 2010 4:19 am

I'm not sure what you mean. Have you looked at the code for Action classes generated by Swing Designer?

The actionPerformed() method is part of the basic definition of an Action (ActionListener), so it is already created for you.
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

Re: SwingActions and actionPerformed

Postby mkornatzki » Mon Jun 14, 2010 9:49 am

yep, i forgot something to say.

i have a factoryMethod which returns a configured instance of abstractAction with text, icon and so on.
But this is only one part.
The other part should be to immplement the actionPerformed and i hoped that in the property editor showing properties i can make a double click on an entry for actionPerformed. But there is only an entry for propertyChange.

cheers, michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: SwingActions and actionPerformed

Postby Eric Clayberg » Tue Jun 15, 2010 4:55 am

Please provide a test case showing exactly what you are trying to do.

When Swing Designer creates an Action, the actionPerformed() method is automatically created as it is always required.

If you are referencing a preexisting Action, it should already have an actionPerformed() method defined.
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