Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Limit ScrollableGraphicalViewer height, so it actually scrolls
Limit ScrollableGraphicalViewer height, so it actually scrolls [message #741122] Wed, 19 October 2011 07:38
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi GEF Community.

I embed a GEF viewer in a JFace form, which has a ColumnLayout. One of
the properties of this layout, is that children can grab all the space
they want and as the form is not scrollable, the result is that a
portion of the GEF viewer is not visible. (See screenshot) So I would
like the GEF viewer to have a fixed height or somehow limit itself to
the height of the form. (The latter is likely not possible in a
ColumnLayout in combination with a non-scrollable form).

This is my code, how do I limit the viewer from taking all the height
and start scolling?

// Do some gef here.
ScalableFreeformRootEditPart rootEditPart = new
ScalableFreeformRootEditPart();
graphicalViewer = new ScrollingGraphicalViewer();
graphicalViewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, true);
graphicalViewer.createControl(c);
graphicalViewer.getControl().setBackground(
ColorConstants.listBackground);
graphicalViewer.setRootEditPart(rootEditPart);
graphicalViewer.setEditPartFactory(new NodeTypeEditPartsFactory());
graphicalViewer.setContents(new WrappedNodeType(nodeType));
rootEditPart.refresh();


Any hints would be most welcome.
Rgds Christophe Bouhier.
Previous Topic:Limit ScrollableGraphicalViewer height, so it actually scrolls
Next Topic:best approach for sort of a gui builder
Goto Forum:
  


Current Time: Tue Apr 23 13:59:50 GMT 2024

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

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

Back to the top