Limit ScrollableGraphicalViewer height, so it actually scrolls [message #741122] |
Wed, 19 October 2011 07:38 |
Christophe Bouhier 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.
|
|
|
Powered by
FUDForum. Page generated in 0.03451 seconds