Swing Application Framework Resource Injection

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

Swing Application Framework Resource Injection

Postby petertseng » Fri Nov 07, 2008 3:54 pm

I'm trying to inject resources into my component using the Swing Application Framework (JSR 296). I have a component called QuickConnectPanel, and a corresponding .properties file in resources/QuickConnectPanel.properties, which contains some text for labels and such.

In my constructor, I have the following code:
Code: Select all
org.jdesktop.application.Application.getInstance().getContext().getResourceMap(QuickConnectPanel.class).injectComponents(this);


If I run the program, everything looks good, but my resources don't show up in the Designer. I noticed that resource injection seems to show up for my class that subclasses SingleFrameApplication, but I don't have to call injectComponents explicitly there.

Is there a way to get resource injection to show up in the Designer? Or am I doing something wrong?
petertseng
 
Posts: 4
Joined: Fri Nov 07, 2008 3:41 pm

Re: Swing Application Framework Resource Injection

Postby Eric Clayberg » Sat Nov 08, 2008 9:35 am

We will be adding support for that over the next few months.
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: Swing Application Framework Resource Injection

Postby petertseng » Mon Nov 10, 2008 6:32 pm

Thanks, That would be great :)
petertseng
 
Posts: 4
Joined: Fri Nov 07, 2008 3:41 pm

Re: Swing Application Framework Resource Injection

Postby Eric Clayberg » Tue Nov 11, 2008 10:58 am

petertseng wrote:Thanks, That would be great :)

We'll let you know here.
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: Google [Bot] and 1 guest