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 #741118] Wed, 19 October 2011 03:38
Christophe Bouhier is currently offline Christophe Bouhier
Messages: 914
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:GEF Palette Creation tool: it's possible to enable/disable?
Next Topic:Limit ScrollableGraphicalViewer height, so it actually scrolls
Goto Forum:
  


Current Time: Thu Aug 21 04:28:35 EDT 2014

Powered by FUDForum. Page generated in 0.01908 seconds