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: andrew_NOSPAM_.eisenberg.as

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
TextFlows.

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(adapter);
page.add(new TextFlow("textflow "));

lws.setContents(page);
shell.open();
while (!shell.isDisposed())
while (!d.readAndDispatch())
d.sleep();
}
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: andrew_NOSPAM_.eisenberg.as

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

thanks,
--andrew
Previous Topic:WhatÂ’s New for Callisto?
Next Topic:Cycle through edit parts
Goto Forum:
  


Current Time: Wed Nov 30 15:14:57 GMT 2022

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

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

Back to the top