Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Drop swt widget on RCP MultipageEditor page
Drop swt widget on RCP MultipageEditor page [message #640438] Mon, 22 November 2010 06:00
Ani  is currently offline Ani Friend
Messages: 37
Registered: November 2010
Member
I've the following requirement :-

1) I need to have a view with various swt widgets like buttons, tree, text fields/area, list boxes

etc...these widgets can be dragged from this view for dropping in an editor.
2) Ineed a multipage editor in which -
a) the first page is a widget page where i can drop the widgets dragged from the above view
b) the second page is a kind of text editor where code is automatically generated w.r.t. the

widget dropped in the first page.

(both these editor pages work together...if one page edited, the other reflects it.)


Current status :-

I'm using SWT api for this along with eclipse ui api.

I'm able to get the particular widgets view and attached a drag source to it.

Also created a multipage editor.
The text editor takes the text value of drop from the view with out any drop target attached to it.

But for the widget editor(basically a Composite page), This page has got an attached droptarget listener.

I'm explicitly creating the instances of dropped widget again and attaching to the composite page. It's

difficult to know what widget is dropped....a button, or a combobox or a text field (but I don't know how

to do it otherwise, I may have to extend the transfer types someway to take any kind of widget).


The biggest concern is :-

I'm able to drop one widget first and it's visible. But for the second drop, I've to alter the size of

editor manually (may be by mouse drag or so) for the widget to be visible.

I'm not able to activate the save button for the widget editor. So what ever data input is never saved and

lost when i close the editor.



Can someone help me on these 3 points mainly :-

1) How to save the widget editor data

2) How to make the dropped widgets visible without any manual action such as resizing.

3) How can i take my widgets as the transfer types instead of instantiating a new one every time

Previous Topic:Drawing a border around a Combo
Next Topic:Browser execute() mechanism kills existing JS
Goto Forum:
  


Current Time: Wed Oct 18 16:57:14 GMT 2017

Powered by FUDForum. Page generated in 0.02556 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software