Using additional components SwingX

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

Using additional components SwingX

Postby mimmoz81 » Wed Jul 07, 2010 4:37 am

Hello,

I'm using Window Builder 7.5.0 in Eclipse 3.5.1.

I'm trying to use SwingX's JXTaskPane and JXTaskPaneContainer within Window Builder.

JXTaskPane allows you to put a javax.swing.Action inside it like any other components (see image screen1.jpg) (http://developerlife.com/tutorials/?p=240)

While everything works fine at runtime (as you can see from the image) at design time Window Builder does not display the action in the JXTaskPane (even in its preview).

Is there a way to extend Window Builder Swing designer to support that JXTaskPane?
Could you address me to some document?
Thanks
Luca
Attachments
screen1.jpg
screen1.jpg (91.98 KiB) Viewed 433 times
mimmoz81
 
Posts: 12
Joined: Tue Jun 08, 2010 10:45 pm

Re: Using additional components SwingX

Postby Eric Clayberg » Tue Jul 13, 2010 11:07 am

Give this a try using the latest Swing Designer v7.6 build...
Attachments
swingx_2.jpg
swingx_2.jpg (49.47 KiB) Viewed 419 times
swingx_1.jpg
swingx_1.jpg (49.3 KiB) Viewed 419 times
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: Using additional components SwingX

Postby mimmoz81 » Wed Jul 14, 2010 5:28 am

Hello,

I've just updated my WindowBuilder to 7.6.0 release, but I have another problem now.

Instead of using an AbstractAction I actually use a SecureAction (a class of mine) which extends AbstractAction (just to add an actionId property to enable/disable it at runtime..).

Code: Select all
public class SecureAction extends AbstractAction implements Action {
   private String actionId;
   
   public SecureAction(String actionId, String name) {
      super(name);
      this.actionId = actionId;
   }

   public String getActionId() {
      return actionId;
   }
   public void setActionId(String actionId) {
      this.actionId = actionId;
   }

   public void execute() {
   }
       ....


If I put inside a JXTaskPane a new SecureAction without overriding any method, everything works fine (see screen01.jpg), instead, if I declare an anonymous inner class, overriding SecureAction.execute() method, the designer shows no more the action in panel and, badly, it does not recognize anymore the true type of the action in the property view, saying it is an AbstractAction instead of a SecureAction (WindowBuilder version 7.5.0 did this correctly) (see screen02.jpg). The same happen even if I don't override any method but if I just write this:

Code: Select all
   protected SecureAction getAction() {
      if (action == null) {
         action = new SecureAction("actionId", "action caption") {
            // No override!! Anonymous inner class only!!
         };
      }
      return action;
   }


Please help this is very important for me!!

I've even tried this with eclipse 3.6.0 and WB 7.6.0 for eclipse 3.6, with same results.

Thanks
Luca
Attachments
screen02.jpg
Using a SecureAction declaring it as an anonymous inner class
screen02.jpg (110.23 KiB) Viewed 417 times
screen01.jpg
Using a SecureAction without declaring it as an anonymous inner class
screen01.jpg (107.73 KiB) Viewed 417 times
mimmoz81
 
Posts: 12
Joined: Tue Jun 08, 2010 10:45 pm

Re: Using additional components SwingX

Postby Eric Clayberg » Tue Jul 20, 2010 11:30 am

Give this a try using the latest Swing Designer v7.6 build.
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: Using additional components SwingX

Postby mimmoz81 » Wed Jul 21, 2010 5:11 am

Great it works!!!

Thank you very much for your support!!

Luca
mimmoz81
 
Posts: 12
Joined: Tue Jun 08, 2010 10:45 pm

Re: Using additional components SwingX

Postby Eric Clayberg » Wed Jul 21, 2010 7:57 am

Glad it works 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


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest