Window Builder Custom Toolkit [message #758184] |
Tue, 22 November 2011 09:37  |
Eclipse User |
|
|
|
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 16:11   |
Eclipse User |
|
|
|
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)
|
|
|
Re: Window Builder Custom Toolkit [message #855210 is a reply to message #758184] |
Tue, 24 April 2012 16:00   |
Eclipse User |
|
|
|
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 #855242 is a reply to message #855235] |
Tue, 24 April 2012 16:29   |
Eclipse User |
|
|
|
To which extension point did you create contribution?
WindowBuilder has quite a lot of them 
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
|
|
|
Re: Window Builder Custom Toolkit [message #856032 is a reply to message #855242] |
Wed, 25 April 2012 09:56   |
Eclipse User |
|
|
|
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 11:35] by Moderator Report message to a moderator
|
|
|
Re: Window Builder Custom Toolkit [message #856215 is a reply to message #856032] |
Wed, 25 April 2012 13:27   |
Eclipse User |
|
|
|
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.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04730 seconds