Friday 24 October 2008

Geoff on GEF pt. III

I tracked down the reason for my figures not appearing to the layout used in my root figure. I was using the XYLayout from the example, changing it to the ToolbarLayout immediately produced the desired results. e.g.

@Override
protected IFigure createFigure() {
Figure f = new Figure();
f.setOpaque(true);
f.setLayoutManager(new ToolbarLayout());
return f;
}


I can now plough on and create edit parts and figures for the remaining components of my model.

One of the problems I encountered when using the ttolbar layout, is that shapes I have defined are not appearing as expected, is the short term I have replaced them with Labels containing just icons, but I think I will have to revisit this in the future.

No comments: