Specifying a ne GUI root class

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

Specifying a ne GUI root class

Postby tonny.madsen » Thu Jun 26, 2008 2:49 am

As part of our work with the framework for a banking application we would like the developers to implement certain aspects of the application by implementing the following interface:

Code: Select all
public interface IFlowPage {
   ...
   
   /**
    * Creates the content of the page. Invoked when the page is shown the first
    * time - if ever.
    * <p>
    * The given parent <code>Composite</code> will have a {@link FillLayout}
    * and can have at most one child.
    *
    * @param parent
    *            the parent {@link Composite}
    */
   public void createContent(Composite parent);
}


It would be so very nice, if this could be done with SWT Designer, but... how do we get SWT Designer to recognize a class (implementing the interface above) as something to show in the designer?
--
Tonny Madsen
CEO, The RCP Company
Phone: +45 70 22 25 92
Fax: +45 69 80 29 09
tonny.madsen@rcp-company.com
http://www.rcp-company.com
tonny.madsen
 
Posts: 4
Joined: Thu Jun 26, 2008 2:37 am

Re: Specifying a ne GUI root class

Postby Eric Clayberg » Thu Jun 26, 2008 4:29 am

tonny.madsen wrote:It would be so very nice, if this could be done with SWT Designer, but... how do we get SWT Designer to recognize a class (implementing the interface above) as something to show in the designer?

Make the class a subclass of Composite or some other known GUI type.
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: Specifying a ne GUI root class

Postby tonny.madsen » Mon Jun 30, 2008 4:40 am

Sorry Eric,

I'm not sure I have made myself clear...

I would like to implement my interface IFlowPage in a new class (say PageA) and when use SWT Designer to edit PageA.java and implement createContent(Composite) just like it can be used to implement the same method in wizard pages and preference pages.

Do you have any extension point that can be used to configure SWT Designer to do this?

Regards,
Tonny
--
Tonny Madsen
CEO, The RCP Company
Phone: +45 70 22 25 92
Fax: +45 69 80 29 09
tonny.madsen@rcp-company.com
http://www.rcp-company.com
tonny.madsen
 
Posts: 4
Joined: Thu Jun 26, 2008 2:37 am

Re: Specifying a ne GUI root class

Postby Eric Clayberg » Mon Jun 30, 2008 6:21 am

tonny.madsen wrote:I would like to implement my interface IFlowPage in a new class (say PageA) and when use SWT Designer to edit PageA.java and implement createContent(Composite)

The only way to do that would be to make PageA a subclass of Composite (in addition to extending IFlowPage).

tonny.madsen wrote:just like it can be used to implement the same method in wizard pages and preference pages.

Designer has built-in, hard-coded knowledge of the various special page types supported by SWT, JFace and RCP. If PageA were a subclass of any of those known types, it would also work.

tonny.madsen wrote:Do you have any extension point that can be used to configure SWT Designer to do this?

There is no extension point like that in the current product. We could potential add something like that in the future.

Alternatively, we could customize SWT Designer and teach it how to edit IFlowPage specifically. I suspect that would take about a day of engineering and testing time on our end.
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: Specifying a ne GUI root class

Postby tonny.madsen » Tue Jul 01, 2008 1:07 am

Eric Clayberg wrote:
tonny.madsen wrote:just like it can be used to implement the same method in wizard pages and preference pages.

Designer has built-in, hard-coded knowledge of the various special page types supported by SWT, JFace and RCP. If PageA were a subclass of any of those known types, it would also work.


I have been experimenting a little and I can get it to work by sub-classing WizardPage. But... where can I find a compete list of the classes Designer can handle?
--
Tonny Madsen
CEO, The RCP Company
Phone: +45 70 22 25 92
Fax: +45 69 80 29 09
tonny.madsen@rcp-company.com
http://www.rcp-company.com
tonny.madsen
 
Posts: 4
Joined: Thu Jun 26, 2008 2:37 am

Re: Specifying a ne GUI root class

Postby Eric Clayberg » Tue Jul 01, 2008 4:32 am

tonny.madsen wrote:I have been experimenting a little and I can get it to work by sub-classing WizardPage. But... where can I find a compete list of the classes Designer can handle?

The list is Designer Wizards would be a good place to start.

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

Re: Specifying a ne GUI root class

Postby tonny.madsen » Tue Jul 01, 2008 5:20 am

Eric Clayberg wrote:The list is Designer Wizards would be a good place to start.


Of cause... It does not seem to be part of the documentation :-)

Best regards,
Tonny
--
Tonny Madsen
CEO, The RCP Company
Phone: +45 70 22 25 92
Fax: +45 69 80 29 09
tonny.madsen@rcp-company.com
http://www.rcp-company.com
tonny.madsen
 
Posts: 4
Joined: Thu Jun 26, 2008 2:37 am

Re: Specifying a ne GUI root class

Postby Eric Clayberg » Tue Jul 01, 2008 1:40 pm

tonny.madsen wrote:It does not seem to be part of the documentation :-)

I don't follow. The link and screen shot I provided were from the docs.
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 2 guests