Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Embedding FlowPage inside FlowAdapter
Embedding FlowPage inside FlowAdapter [message #214097] Wed, 12 April 2006 18:20 Go to next message
Eclipse UserFriend
Originally posted by:

I want to embed a FlowPage (or even just a textual label) inside of a
FlowAdapter. I am able to do this, but the contents of the embedded FlowPage is
shifted up a few pixels (3 or 4). Does this have something to do with the
baseline of the FigureBox? If so, how can I change it?

The code snippet below is the simplest example of this that I could think of.
The label (new Label("label---up above ")) will appear 3 or 4 pixels above the

I am using Eclipse3.2M5 and Draw2D version 3.2.0.

Any help would be appreciated. Thanks.

public static void main(String[] args) {
Display d = new Display();
final Shell shell = new Shell(d);
shell.setSize(400, 400);
shell.setText("Embedded Flow Pages Test");
LightweightSystem lws = new LightweightSystem(shell);
Figure page = new FlowPage();
page.add(new TextFlow("textflow "));

FlowAdapter adapter = new FlowAdapter();
adapter.setLayoutManager(new ToolbarLayout(true));
adapter.add(new Label("label---up above "));
page.add(new TextFlow("textflow "));

while (!shell.isDisposed())
while (!d.readAndDispatch())
Re: Embedding FlowPage inside FlowAdapter [message #214107 is a reply to message #214097] Wed, 12 April 2006 18:28 Go to previous message
Eclipse UserFriend
Originally posted by:

I meant to say that I am using Draw2D version 3.2M4.

Previous Topic:GEF M6 dependencies to ICU
Next Topic:drawing is done twice ??
Goto Forum:

Current Time: Sun Jan 29 07:12:35 GMT 2023

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

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

Back to the top