Skip to main content



      Home
Home » Eclipse Projects » GEF » displaying graph in popup window
displaying graph in popup window [message #168557] Wed, 16 February 2005 12:29 Go to next message
Eclipse UserFriend
Hi -- I'm trying to display a graphical editor in a popup window (shell),
but am not seeing its graph when I do a shell.open(). Has anyone tried to
do this? Any help would be greatly appreciated.

Thanks -- james barnett
Re: displaying graph in popup window [message #168585 is a reply to message #168557] Wed, 16 February 2005 16:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

did you position the Canvas? Layout?
"James Barnett" <jbarnett@bea.com> escreveu na mensagem
news:cuvvtq$8ej$1@www.eclipse.org...
> Hi -- I'm trying to display a graphical editor in a popup window (shell),
> but am not seeing its graph when I do a shell.open(). Has anyone tried to
> do this? Any help would be greatly appreciated.
>
> Thanks -- james barnett
>
Re: displaying graph in popup window [message #168601 is a reply to message #168585] Wed, 16 February 2005 23:05 Go to previous message
Eclipse UserFriend
I had got a Graphical viewer embedded in a dialog.
Hopefully it should be the same for a shell as well.
The following are the basic things that need to be done

//instantiate the viewer
ScrollingGraphicalViewer graphicalViewer = new ScrollingGraphicalViewer();

//Create the control
Control control = graphicalViewer.createControl(parentComposite);

//Set the edit Part factory
graphicalViewer.setEditPartFactory(new GraphicalEditPartsFactory());

//Set the root edit part
graphicalViewer.setRootEditPart(new FreeformGraphicalRootEditPart());

//Set the edit domain
graphicalViewer.setEditDomain(new DefaultEditDomain(null));

//set the command stack
graphicalViewer.getEditDomain().setCommandStack(new CommandStack());


I am guessing you should have done this.
If it doesn't shup up then you might need to check whether you have set
a layout for the parent composite.
Not setting the layout also causes the components to not display.


Roshan



Randy Hudson wrote:
> did you position the Canvas? Layout?
> "James Barnett" <jbarnett@bea.com> escreveu na mensagem
> news:cuvvtq$8ej$1@www.eclipse.org...
>
>>Hi -- I'm trying to display a graphical editor in a popup window (shell),
>>but am not seeing its graph when I do a shell.open(). Has anyone tried to
>>do this? Any help would be greatly appreciated.
>>
>>Thanks -- james barnett
>>
>
>
>
Previous Topic:Cancel a time consuming paint operation
Next Topic:Need help in PolylineConnection
Goto Forum:
  


Current Time: Fri Jun 20 06:58:11 EDT 2025

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

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

Back to the top