Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Window Builder Custom Toolkit(Creating a new toolkit for Window Builder)
Window Builder Custom Toolkit [message #758184] Tue, 22 November 2011 04:37 Go to next message
rony.zoghby is currently offline rony.zoghby
Messages: 1
Registered: November 2011
Junior Member
Hi,

I'm in the process of creating a new window builder UI toolkit for a custom ui library i wrote (My UI Toolkit should use the XML window builder model so equivalent to the UiBinder GWT plugin)

So i created a new eclipse plugin extending the main wb extension points and provided the following sample model and corresponding edit parts:

1- PanelInfo, PanelEditPart and PanelFigure for a panel object
2- ButtonInfo, ButtonEditPart and ButtonFigure for a button object

In these classes, i've implemented all the necessary methods (createFigure, getModelChildren, refreshVisuals, etc ...)

Then in my design page parser class, i built a PanelInfo object and added to it two ButtonInfo objects using the addChild method:

PanelInfo panelInfo = new PanelInfo(editorContext, panelInfo.createComponentDescription(editorContext), PanelInfo.createCreationSupport());

ButtonInfo buttonInfo = new ButtonInfo(editorContext, ButtonInfo.createComponentDescription(editorContext), ButtonInfo.createCreationSupport());

ButtonInfo buttonInfo1 = new ButtonInfo(editorContext, ButtonInfo.createComponentDescription(editorContext), ButtonInfo.createCreationSupport());

panelInfo.addChild(buttonInfo);

panelInfo.addChild(buttonInfo1);

return panelInfo;

The problem i'm having is that only the panel object is being correctly displayed and not the buttons (The buttons appear as a black very small square on the panel top left edge).

If in my parser class, i only return a ButtonInfo object, that button is correctly displayed.

Could you tell me please what's wrong and how to fix this?

Thank you.
Re: Window Builder Custom Toolkit [message #758551 is a reply to message #758184] Wed, 23 November 2011 11:11 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
Most probably your Button models don't have any bounds.
See
org.eclipse.wb.internal.core.xml.model.AbstractComponentInfo.setModelBounds(Rectangle)
org.eclipse.wb.internal.core.xml.model.AbstractComponentInfo.setBounds(Rectangle)


Konstantin Scheglov,
Google, Inc.
Re: Window Builder Custom Toolkit [message #855210 is a reply to message #758184] Tue, 24 April 2012 12:00 Go to previous messageGo to next message
user Kyle is currently offline user Kyle
Messages: 19
Registered: April 2012
Junior Member
Hi,

I want to use my own UI Toolkit with window builder too, but I don't handerstand how to proced.

Quote:
So i created a new eclipse plugin extending the main wb extension points


How you do that? I didn't find anythings about it..

Thanks to your help!
Re: Window Builder Custom Toolkit [message #855223 is a reply to message #855210] Tue, 24 April 2012 12:12 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
If you don't know how to create Eclipse plugins and what is extension point, you need to learn this first.
This book or Eric Clayberg is very good one.


Konstantin Scheglov,
Google, Inc.
Re: Window Builder Custom Toolkit [message #855235 is a reply to message #855223] Tue, 24 April 2012 12:24 Go to previous messageGo to next message
user Kyle is currently offline user Kyle
Messages: 19
Registered: April 2012
Junior Member
Thanks to your answer and for the book Wink

I created the plugin with the extension point but I didn't see it in windowbuilder setting (UI Toolkits).

I look to your book, thanks.
Re: Window Builder Custom Toolkit [message #855242 is a reply to message #855235] Tue, 24 April 2012 12:29 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
To which extension point did you create contribution?
WindowBuilder has quite a lot of them Smile

What kind of UI Toolkit do you want to support?
Something Swing based?

Look on some simple plugins which add support for non-standard Swing layout. Even if you want to support not layout, but component, this will give you idea, how to create custom model.

org.eclipse.wb.swing.MigLayout


Konstantin Scheglov,
Google, Inc.
Re: Window Builder Custom Toolkit [message #856032 is a reply to message #855242] Wed, 25 April 2012 05:56 Go to previous messageGo to next message
user Kyle is currently offline user Kyle
Messages: 19
Registered: April 2012
Junior Member
My UI Toolkit is not based on Swing, SWT or GWT, it's completly independent.

Actually, I have a project with my own UI Toolkit. Then, I created some Widgets, Composites, etc. To facilitate the programation, I want to use a palette to generate the codes of th GUI.

So I want to create a plugin depends of windowbuilder.

For example, I have a project where I want to add a palette. So I select new Project Palette, I enter my project in the first section, but in the second section my UI Toolkit doesn't appear.
You know wich extension point is concerned?

Thaks for your time

PS: Where I can find a complete documentation on windowbuilder pro?

[Updated on: Wed, 25 April 2012 07:35]

Report message to a moderator

Re: Window Builder Custom Toolkit [message #856215 is a reply to message #856032] Wed, 25 April 2012 09:27 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 554
Registered: July 2009
Senior Member
Well, if your toolkit is really completely independent, then you will need to do a lot.
You will need to copy some toolkit, such as Swing and make changes to work with your toolkit.
I can not say why you don't see your toolkit in wizard - too much possible problems.
At first you would need to implement IToolkitProvider and register it in plugin.xml file.
	<!-- ======================================================== -->
	<!-- Toolkit -->
	<!-- ======================================================== -->
	<extension point="org.eclipse.wb.core.toolkits">
		<toolkit id="org.eclipse.wb.swing">
			<provider class="org.eclipse.wb.internal.swing.ToolkitProvider"/>


We don't have any other developer documentation that you can already find.


Konstantin Scheglov,
Google, Inc.
Re: Window Builder Custom Toolkit [message #856807 is a reply to message #856032] Wed, 25 April 2012 21:46 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric Clayberg
Messages: 857
Registered: July 2009
Location: Boston, MA
Senior Member
I would recommend the info here...

http://www.codemaps.org/s/WindowBuilder
Re: Window Builder Custom Toolkit [message #857517 is a reply to message #856807] Thu, 26 April 2012 12:00 Go to previous messageGo to next message
user Kyle is currently offline user Kyle
Messages: 19
Registered: April 2012
Junior Member
It's work Smile Thanks for your help
Re: Window Builder Custom Toolkit [message #861579 is a reply to message #857517] Sat, 28 April 2012 12:43 Go to previous messageGo to next message
Hans Mueller is currently offline Hans Mueller
Messages: 28
Registered: April 2012
Junior Member
cool
Re: Window Builder Custom Toolkit [message #986866 is a reply to message #857517] Thu, 22 November 2012 02:45 Go to previous messageGo to next message
Florian Marquardt is currently offline Florian Marquardt
Messages: 1
Registered: November 2012
Junior Member
Hi kyle.

Can you provide an example, how you got this work?

Thanks a lot.

Florian
Re: Window Builder Custom Toolkit [message #988331 is a reply to message #986866] Thu, 29 November 2012 07:52 Go to previous message
Arthur Fücher is currently offline Arthur Fücher
Messages: 59
Registered: August 2012
Member
I want it too! Very Happy
Florian Marquardt wrote on Thu, 22 November 2012 02:45
Hi kyle.

Can you provide an example, how you got this work?

Thanks a lot.

Florian

Previous Topic:PropertyEditorSupport whit Composite (SWT)
Next Topic:Adding another Source tab
Goto Forum:
  


Current Time: Sat Aug 23 11:20:28 EDT 2014

Powered by FUDForum. Page generated in 0.02157 seconds