Adding items from list [message #102737] |
Wed, 29 October 2003 10:19 |
Eclipse User |
|
|
|
Originally posted by: hoonge.hotmail.com
Hi,
I've just started looking at GEF. I would like help on two things.
1) I'm building an editor that will allow me to drop fields and their
associated labels say Order number _______
the "_____" bit would represent a textbox. I would like to be able to add
the fields from a dynamically build list box. So when my editor is being
displayed I would show list of fields available in a drop down or list box
in the pallete. Then as I add items to my view they are removed from
pallet - (you can't add fields twice) When I delete a field from my
diagram then they will be added back into drop down.
I not quite sure how to do this so any help much appreciated!
2) I would also like to force the items as they are dropped into a grid
so each label and field will be in a row and column. So the canvas would
start off with 2 rows and 2 columns (let's say) and then the the fields
will be added to col and row depending on the co-ords when the item is
dropped. Or a new column or row is added before adding the item. Am I
right in thinking that my I should add one item onto a freeform layer when
I instantiate my graphical viewer. This item should have a bespoke layout
edit policy bound to the layout role.
This policy would override createAddCommand to decide the right row and
column and to move the other fields if this field is being added between
rows or columns.
Any pointers most appreciated.
E
|
|
|
Re: Adding items from list [message #102771 is a reply to message #102737] |
Wed, 29 October 2003 17:14 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"eric" <hoonge@hotmail.com> wrote in message
news:bno47d$hso$1@eclipse.org...
> Hi,
>
> I've just started looking at GEF. I would like help on two things.
>
> 1) I'm building an editor that will allow me to drop fields and their
> associated labels say Order number _______
> the "_____" bit would represent a textbox. I would like to be able to add
> the fields from a dynamically build list box. So when my editor is being
> displayed I would show list of fields available in a drop down or list box
> in the pallete. Then as I add items to my view they are removed from
> pallet - (you can't add fields twice) When I delete a field from my
> diagram then they will be added back into drop down.
>
> I not quite sure how to do this so any help much appreciated!
Could you use some other control like a List for this? And then use native
DND from the list to your diagram? Of course, it is also possible to use
the palette. You simply remove the entry from its parent, and it
disappears.
|
|
|
Powered by
FUDForum. Page generated in 0.02997 seconds