Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Display editparts on a ScrollingGraphicalViewer
Display editparts on a ScrollingGraphicalViewer [message #249050] Tue, 26 May 2009 10:42 Go to next message
Chris Turner is currently offline Chris TurnerFriend
Messages: 9
Registered: July 2009
Junior Member
Hi everyone!

I'am new to GEF so maybe this is a stupid question... (please keep that in
mind)

I finally got my Model displayed on the Viewer - everything looks just
fine. BUT the Problem is that I use a Figure as parent of all my
EditParts(or Figures). And this "main"-Figure has a certain size but my
ScrollingGraphicalViewer has no certain size it can just expand. With this
main-Figure construct I just removed an important feature from GEF - so
obviously I'm missing here something. If I set the RootEditPart as parent
of my EditParts they won't be displayed...


I hope I explained it adequate - so If anybody knows whats going on -
please tell.

Thanks in advance!
Chris
Re: Display editparts on a ScrollingGraphicalViewer [message #249054 is a reply to message #249050] Tue, 26 May 2009 14:25 Go to previous message
Chris Turner is currently offline Chris TurnerFriend
Messages: 9
Registered: July 2009
Junior Member
Okay sorry for bothering!

The solution is:

Instead of using a "main"-Figure use a FreeformLayer.
Something like that:

Figure f = new FreeformLayer();
f.setBorder(new MarginBorder(3));
f.setLayoutManager(new FreeformLayout());
return f;

(stolen from the shape example)

Btw. is it only me or is it really hard to get stated with GEF?!


Thanks anyway!
Chris
Previous Topic:Make Figure resizable but not repositionable
Next Topic:Re: SWT Controls to Custom Figure
Goto Forum:
  


Current Time: Mon Dec 22 07:14:54 GMT 2014

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

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