Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » TextFlow
TextFlow [message #236410] Wed, 27 June 2007 14:17
Eclipse UserFriend
Originally posted by: alexjaquet.gmail.com

Hi,

I made a little test application to try the usage of text flow


public class Label extends Figure{


public Label() {
TextFlow tf = new TextFlow("WRAPME WRAPME WRAPME");
FlowPage fp = new FlowPage();
fp.add(tf);
add(fp);
}

protected void paintFigure(Graphics graphics) {
Rectangle rect = getBounds().getCopy();
rect.crop(new Insets(0, 0, 0, 0));
graphics.fillRectangle(rect);
}
}

Main :
public static void main(String args[]) {
Display d = new Display();
final Shell shell = new Shell(d);
shell.setBackground(ColorConstants.white);
shell.setSize(400, 290);
LightweightSystem lws = new LightweightSystem(shell);
lws.setContents(new Label());
shell.open();
while (!shell.isDisposed())
while (!d.readAndDispatch())
d.sleep();
}

but nothing is displayed any idea ?

Thanks
Previous Topic:How can I pass drop target information to the CreateFactory?
Next Topic:displaying text with textFlow
Goto Forum:
  


Current Time: Sat Aug 13 02:28:06 GMT 2022

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

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

Back to the top