Local variables vs. members

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

Local variables vs. members

Postby fredatwork » Wed Oct 20, 2004 12:13 am

Hello,

Is there a way to have the Swing Designer generate certain components as local variables, and others as members of class (private or protected), the ones that are generated as members being chosen specifically by the user ?

Thanks in advance for your help.
Fred
fredatwork
 
Posts: 13
Joined: Mon Sep 20, 2004 1:59 pm
Location: France

Re: Local variables vs. members

Postby Eric Clayberg » Wed Oct 20, 2004 3:42 am

fredatwork wrote:Is there a way to have the Swing Designer generate certain components as local variables, and others as members of class (private or protected), the ones that are generated as members being chosen specifically by the user ?

Yes. See the Designer > Code Generation > Type Specific preferences...

Image
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

Postby fredatwork » Wed Oct 20, 2004 3:46 am

Eric,

Thanks for this answer.

I was more thinking about a way to control the component declaration on a component-per-component basis.

It would be nice to have such a feature. The preferences could be used as defaults.
Fred
fredatwork
 
Posts: 13
Joined: Mon Sep 20, 2004 1:59 pm
Location: France

Postby Eric Clayberg » Wed Oct 20, 2004 4:43 am

fredatwork wrote:I was more thinking about a way to control the component declaration on a component-per-component basis.

You can control the declaration status (field or local variable) of any component using the Convert Local to Field Image or Convert Field to Local Image buttons.

Image
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

Postby fredatwork » Wed Oct 20, 2004 5:01 am

Thanks.

That's exactly what I expected.
Fred
fredatwork
 
Posts: 13
Joined: Mon Sep 20, 2004 1:59 pm
Location: France


Return to Swing Designer

Who is online

Users browsing this forum: Google [Bot] and 1 guest