Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Bug in new text layout?
Bug in new text layout? [message #182662] Thu, 26 May 2005 00:21 Go to next message
Eclipse UserFriend
Originally posted by: freddie_nurke.hotmail.com

Hi Randy and Pratik,

I merged the new M7 text editor sample code into my M4-derived code
today to take advantage of some bug fixes and I'm getting some weird
behaviour. All the text is appearing in the top left hand of the cell
editor. The previous code used TextLayoutParts to put all the runs one
after the other, and this class has been removed. Is there a known
issue there? Where should I start to determine why text is being placed
incorrectly?

Thanks,

Fred
Re: Bug in new text layout? [message #182677 is a reply to message #182662] Thu, 26 May 2005 00:31 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
TextLayoutPart was there just to see how SWT would display the text (for a
quick comparison to see if we were doing the same). They were never meant
to be used. TextFlowParts should be used.

"Fred Nurke" <freddie_nurke@hotmail.com> wrote in message
news:d73503$cfu$1@news.eclipse.org...
> Hi Randy and Pratik,
>
> I merged the new M7 text editor sample code into my M4-derived code
> today to take advantage of some bug fixes and I'm getting some weird
> behaviour. All the text is appearing in the top left hand of the cell
> editor. The previous code used TextLayoutParts to put all the runs one
> after the other, and this class has been removed. Is there a known
> issue there? Where should I start to determine why text is being placed
> incorrectly?
>
> Thanks,
>
> Fred
Re: Bug in new text layout? [message #183034 is a reply to message #182677] Tue, 31 May 2005 03:20 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Oh, boy. It's not easy following that code. I know I was confused as hell
the first time I saw it. But, if you want to, you can start by looking at
BlockFlowLayout and ParagraphTextLayout.

The figures in the text package use FlowBoxes to place their text. So, a
TextFlow will divide its text into different fragments (a different fragment
is where the text would wrap, or the text's bidi level changes). The
TextFragmentBoxes are positioned by the ParagraphTextLayout, which puts them
in the BlockBox (which is positioned by the BlockFlowLayout). When it comes
time to paint the text, the text is drawn where the fragment is positioned.
The fragments themselves are not figures and are not painted. They just
represent some text.

"Fred Nurke" <freddie_nurke@hotmail.com> wrote in message
news:d736qg$e3l$1@news.eclipse.org...
> How do TextFlowParts get positioned?
>
> Thanks,
>
> Fred
>
> Pratik Shah wrote:
> > TextLayoutPart was there just to see how SWT would display the text (for
a
> > quick comparison to see if we were doing the same). They were never
meant
> > to be used. TextFlowParts should be used.
> >
> > "Fred Nurke" <freddie_nurke@hotmail.com> wrote in message
> > news:d73503$cfu$1@news.eclipse.org...
> >
> >>Hi Randy and Pratik,
> >>
> >>I merged the new M7 text editor sample code into my M4-derived code
> >>today to take advantage of some bug fixes and I'm getting some weird
> >>behaviour. All the text is appearing in the top left hand of the cell
> >>editor. The previous code used TextLayoutParts to put all the runs one
> >>after the other, and this class has been removed. Is there a known
> >>issue there? Where should I start to determine why text is being placed
> >>incorrectly?
> >>
> >>Thanks,
> >>
> >>Fred
> >
> >
> >
Previous Topic:changing Flyout Palette background color ?
Next Topic:How to delegate requests to parent nodes?
Goto Forum:
  


Current Time: Thu Dec 12 16:47:12 GMT 2024

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

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

Back to the top