Custom SWT widgets in the Designer...

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Custom SWT widgets in the Designer...

Postby FarzadMahjobi » Thu Jul 08, 2004 10:15 am

I think someone may have similar question before, but here it is:

I would like to create a custom widget that derivs from Composite and be able to use it from within the Designer tool. But what happens is that the designer does not understand all of the properties of the custom widget, and it would partially show up in the designer (for example a Check box is missing it's label).

Is there support in the designer to build Custom Widgets so that they could be reused in the designer...perhabs implement an interface that the designer could understand (JBuilder does this with the beaninfo).

Thanks,
Farzad
FarzadMahjobi
 
Posts: 1
Joined: Thu Jul 08, 2004 9:48 am

Re: Custom SWT widgets in the Designer...

Postby Eric Clayberg » Thu Jul 08, 2004 7:48 pm

FarzadMahjobi wrote:I would like to create a custom widget that derivs from Composite and be able to use it from within the Designer tool. But what happens is that the designer does not understand all of the properties of the custom widget, and it would partially show up in the designer (for example a Check box is missing it's label).

How is the label defined? Designer should list any custom properties that have a matching get and set method. If all you want to do is set the label on a widget that is part of a custom composite, all you need to do is make that widget a public field of the composite class.

FarzadMahjobi wrote:Is there support in the designer to build Custom Widgets so that they could be reused in the designer...perhabs implement an interface that the designer could understand

You can easily create custom composites that can be reused in Designer. That capability has been there for many months. Here is a flash movie that demos this capability.
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 SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest