Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to add ScrollingGraphicalViewer to Formpage
How to add ScrollingGraphicalViewer to Formpage [message #249192] Thu, 04 June 2009 10:26 Go to next message
cloud wang is currently offline cloud wangFriend
Messages: 3
Registered: July 2009
Junior Member
Hi all:
I want to embed a ScrollingGraphicalViewer viewer into a FormPage so
that the viewer occupies the available space. To this end, I do the

protected void createFormContent(IManagedForm managedForm) {
Composite container = toolkit.createComposite(scrolledForm.getBody());
container.setLayout(new GridLayout(1,true));
// viewer
ScrollingGraphicalViewer viewer = new ScrollingGraphicalViewer();
Control viewerControl = viewer.createControl(container);
Diagram diagram = new Diagram();
Ellipse ellipse = new Ellipse();
ellipse.setLocation(new Point(150, 50));
viewerControl.setLayoutData(new GridData(GridData.FILL_BOTH));

But when I run the application, nothing in the formpage. Anybody can
help me to solve this problem?

Thanks for any pointers.

Re: How to add ScrollingGraphicalViewer to Formpage [message #249205 is a reply to message #249192] Fri, 05 June 2009 02:19 Go to previous message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member

Did you set the editpart factory for the viewer? Did you create the root
editpart? I don't see that in your snippet.
If that doesn't help debug the #setContents(), check that editparts and
figures are created. IF yes, put a breakpoint in the ellipse figure paint
method or diagram figure paint method... check if they are being painted
and where...
Hope this helps.

Previous Topic:Is this a legal way to create an image?
Next Topic:Problem running the Editor for Directed Graphs as RCP application
Goto Forum:

Current Time: Mon Jun 25 18:07:42 GMT 2018

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

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

Back to the top