Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to layout and repaint all EditParts?
How to layout and repaint all EditParts? [message #233766] Wed, 02 May 2007 11:02
Eclipse UserFriend
Originally posted by:


what is the simplest way to force GEF to relayout all EditPart's figures? I had something like

((ScalableRootEditPart) getRoot()).getFigure().invalidateTree();
((ScalableRootEditPart) getRoot()).getFigure().validate();

but this did not work. My model is displayed correctly when initially displaying the editor, even if I expand a figure the layout is correct. But if I want to shrink that figure back to its original size, the surrounding figures are not updated correctly. See also the attached images.

Here is a snippet of what I am doing:
IFigure contentPane;
IFigure shrinkedFigure = new SmallFigure();
IFigure expandedFigure = new BigFigure();
boolean isExpanded = false;

refreshVisuals() {

if (isExpanded)

// this did not work

// this did not work, too
((ScalableRootEditPart) getRoot()).getFigure().invalidateTree();
((ScalableRootEditPart) getRoot()).getFigure().validate();

The first and easiest step therefore would be to relayout all edit parts. But how?
Previous Topic:Data Flow Diagram Editor
Next Topic:DispatchMouseReleased
Goto Forum:

Current Time: Mon Aug 15 17:04:57 GMT 2022

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

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

Back to the top