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
by kames » Tue Oct 21, 2008 3:00 am
Hi
I have a following question: is it possible to make SWT Designer use custom creation method? For example, instead of:
- Code: Select all
txtBezeichnung = new StyledText(this, SWT.NONE);
txtBezeichnung.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 3, 1));
txtBezeichnung.setWidth(TextWidth.WIDTH_480);
txtBezeichnung.setLayout(new GridLayout());
I would like to have:
- Code: Select all
txtBezeihnung = toolkit.createText(this, SWT.NONE, gridData, width);
Is it possible to make SWT Designer do it automatically?
-
kames
-
- Posts: 6
- Joined: Thu Aug 21, 2008 4:46 am
by Eric Clayberg » Tue Oct 21, 2008 4:11 am
SWT Designer does have limited support for custom factory methods (like the ones used by the Eclipse forms API), and we are planning to add comprehensive factory support later in the year.
That factory support, however, is limited to factories that create widgets and set their properties independent of any layout manager.
In your example, you would need to drop the gridData paramter as that would not be supported.
-
Eric Clayberg
- Moderator
-
- Posts: 4503
- Joined: Tue Sep 30, 2003 6:39 am
- Location: Boston, MA USA
-
by kames » Tue Oct 21, 2008 6:09 am
Hi
And how can I do this? I've browsed through all preferences but missed it somehow...
KameS
-
kames
-
- Posts: 6
- Joined: Thu Aug 21, 2008 4:46 am
by Eric Clayberg » Tue Oct 21, 2008 10:41 am
You can read about our planned factory support
here. It is currently in beta test in our
eRCP Designer product.
-
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