Draw2D menu? [message #3484] |
Tue, 21 May 2002 17:45  |
Eclipse User |
|
|
|
Originally posted by: craig.setera.kingland.com
Is there a pre-built popup menu figure in Draw2D or GEF? I see a
PopupHelper class, but I'm not sure what to do with it.
Thanks,
Craig
|
|
|
|
|
|
|
|
|
Re: Draw2D menu? [message #3894 is a reply to message #3889] |
Wed, 22 May 2002 11:48  |
Eclipse User |
|
|
|
Originally posted by: none.ibm.com
In GEF, a draw2d figure is used to render an EditPart. A
ContextMenuProvider can be set on the EditPartViewer, which contains the
EditParts being rendered as RectangleFigures or whatever. That viewer also
know the Parts which are selected. Remember that the context menu can be
invoked using Shift+F10.
So, your applications CMP can provide Menu actions specific to the
"figure(s)" or Part(s) that are selected. Even better, you can put things
on the context menu that aren't relevent to the shape, like Undo and Save.
Basically, you build the menu yourself based on the part or parts selected.
Hope this helps.
P.S. - My point about draw2d is that we have not implemented Swing on SWT,
so you cannot have a context menu associated with a Figure in the same way
that you have Control.setMenu(Menu)..\\
"dominic" <dominic@nospam.com> wrote in message
news:acgaq4$9mj$1@rogue.oti.com...
> Iam not sure i understand the subtle remark here ;-) but lemme say this. I
> think a popup on a figure is a valid use case. Whether done through GEF or
> draw2d i would not care but i would hope i am able to do this. I am
thinking
> of using GEF in a sequence diagram and it makes sense to show different
> methods/events popup menu on a per object basis.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.28516 seconds