| WindowBuilder integration for custom table-like SWT widget [message #740471] |
Tue, 18 October 2011 10:51  |
Jim Mayer Messages: 15 Registered: July 2009 |
Junior Member |
|
|
We're building a table-like custom widget. The structure follows that of the standard SWT Table class:
* Table (a subclass of Composite)
* TableItem (a subclass of Item)
* TableColumn (another subclass of Item)
I've written an RCP plugin that provides corresponding "info" classes for our Table, TableItem, and TableColumn classes. The code is closely modeled on the info classes from WindowBuilder. Similarly, our "XXX.wbp-component.xml" classes are modeled on WindowBuilder's table integration.
At this point, I can build the plugin, see our table, item, and column classes on the palette, and can see that our table info class is being instantiated and queried.
What I haven't been able to figure out is how to convince WindowBuilder to let me drag items and columns onto the table.
Could anyone point me at an example of how this is done? (or tell me to stop wasting my time!).
If there are no examples for me to look at, I can certainly put together a "mini" example that I could share (which might be useful for other folks as well).
Thanks!
-- Jim
|
|
|
|
|
| Re: WindowBuilder integration for custom table-like SWT widget [message #740621 is a reply to message #740544] |
Tue, 18 October 2011 14:10   |
Konstantin Scheglov Messages: 547 Registered: July 2009 |
Senior Member |
|
|
I would say that ItemsHierarchyProvider is for building hierarchy of exposed Table and Columns/Items. To just Column manipulations you need "flow container".
<!-- PARAMETERS -->
<parameters>
<parameter name="layout.has">false</parameter>
<parameter name="gridLayout.grabHorizontal">true</parameter>
<parameter name="gridLayout.grabVertical">true</parameter>
<!-- flow container: TableColumn -->
<parameter name="flowContainer.1">true</parameter>
<parameter name="flowContainer.1.horizontal">true</parameter>
<parameter name="flowContainer.1.component">org.eclipse.swt.widgets.TableColumn</parameter>
<!-- flow container: TableItem -->
<parameter name="flowContainer.2">true</parameter>
<parameter name="flowContainer.2.horizontal">false</parameter>
<parameter name="flowContainer.2.component">org.eclipse.swt.widgets.TableItem</parameter>
<!-- simple container: TableCursor -->
<parameter name="simpleContainer">true</parameter>
<parameter name="simpleContainer.component">org.eclipse.swt.custom.TableCursor</parameter>
</parameters>
Konstantin Scheglov,
Google, Inc.
|
|
|
|
Powered by
FUDForum. Page generated in 0.07638 seconds