Bug in new text layout? [message #182662] |
Thu, 26 May 2005 00:21 |
Eclipse User |
|
|
|
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 #183034 is a reply to message #182677] |
Tue, 31 May 2005 03:20 |
Pratik Shah 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
> >
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.04094 seconds