Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » draw2 text
draw2 text [message #182487] Wed, 25 May 2005 20:14 Go to next message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 39
Registered: July 2009
Member
Has anyone got any examples of how to use the TextFlow stuff in
draw2d.text? Specifically, I'm trying to create a feedback figure that
displays wrapped text. I can create a Label with unwrapped text and this
works fine. But everything I try to do with TextFlow layout stuff keeps
throwing NPE's because a FlowContext isn't being set. What's strange is
that the protected call createDefaultFlowLayout() in FlowFigure's
constructor creates a ParagraphTextLayout when called on TextFlow, which
doesn't seem to have a FlowContext set either.


Regards,

Cameron
Re: draw2 text [message #182495 is a reply to message #182487] Wed, 25 May 2005 20:19 Go to previous messageGo to next message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 39
Registered: July 2009
Member
Oops, I should also say I'm using Eclipse 3.0 with the match GEF release
build.
Re: draw2 text [message #182560 is a reply to message #182487] Wed, 25 May 2005 22:49 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
FlowPage page = new FlowPage();
page.add(new TextFlow("Some text that needs wrapping.");

You can search for its usage in our examples.

"Cameron Bateman" <cbateman@rim.com> wrote in message
news:df92c9fb29da77a1043ec27de106219d$1@www.eclipse.org...
> Has anyone got any examples of how to use the TextFlow stuff in
> draw2d.text? Specifically, I'm trying to create a feedback figure that
> displays wrapped text. I can create a Label with unwrapped text and this
> works fine. But everything I try to do with TextFlow layout stuff keeps
> throwing NPE's because a FlowContext isn't being set. What's strange is
> that the protected call createDefaultFlowLayout() in FlowFigure's
> constructor creates a ParagraphTextLayout when called on TextFlow, which
> doesn't seem to have a FlowContext set either.
>
>
> Regards,
>
> Cameron
>
Previous Topic:DirectEditManager
Next Topic:Multiple connections between two figures
Goto Forum:
  


Current Time: Thu Apr 25 22:42:11 GMT 2024

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

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

Back to the top