Skip to main content



      Home
Home » Eclipse Projects » GEF » bug in draw2d.text
bug in draw2d.text [message #85892] Sat, 28 June 2003 03:06 Go to next message
Eclipse UserFriend
If there are two TextFlow and not enough space to place them in one line
second flow just disappear if it starts with space. I'm not sure what was
original idea, but this place produces fragment with length==0

class FlowUtilities
extends FigureUtilities
{
....
static void setupFragment(TextFragmentBox frag, Font f, String s) {
if (frag.length != s.length())
while (frag.length > 0 && s.charAt(frag.length - 1) == ' ')
frag.length--;
....
Re: bug in draw2d.text [message #85907 is a reply to message #85892] Sat, 28 June 2003 14:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

That code removes trailing spaces, but you said space at the beginning of
your fragment.

Please post snippet or reproducable scenario. For example, the palette in
"details" layout mode uses two text flows to display the text. Is there a
description that you can give a palette entry that shows this?

"Kirill Paliy" <kpaliy@aaanet.ru> wrote in message
news:bdjeou$1ru$1@rogue.oti.com...
> If there are two TextFlow and not enough space to place them in one line
> second flow just disappear if it starts with space. I'm not sure what was
> original idea, but this place produces fragment with length==0
>
> class FlowUtilities
> extends FigureUtilities
> {
> ...
> static void setupFragment(TextFragmentBox frag, Font f, String s) {
> if (frag.length != s.length())
> while (frag.length > 0 && s.charAt(frag.length - 1) == ' ')
> frag.length--;
> ...
>
>
Re: bug in draw2d.text [message #85950 is a reply to message #85907] Sun, 29 June 2003 06:19 Go to previous messageGo to next message
Eclipse UserFriend
"Randy Hudson" <none@us.ibm.com>
Re: bug in draw2d.text [message #85979 is a reply to message #85950] Sun, 29 June 2003 12:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Fixed. The while loop in ParagraphTextLayout was checking for fragment
length of zero, instead of an advance of zero:
Here is the correct expression:
} while (string.length() > 0 && length != 0);

But, 2.1.1 has already shipped, so I don't think this change will be in a
release for quite some time. Maybe there is a workaround, or you could just
redistribute the fix if absolutely necessary.

"Kirill Paliy" <kpaliy@aaanet.ru> wrote in message
news:bdmeeh$osj$1@rogue.oti.com...

>
> "Randy Hudson" <none@us.ibm.com>
Re: bug in draw2d.text [message #86025 is a reply to message #85979] Sun, 29 June 2003 16:53 Go to previous messageGo to next message
Eclipse UserFriend
"Randy Hudson" <none@us.ibm.com>
Re: bug in draw2d.text [message #86040 is a reply to message #86025] Sun, 29 June 2003 19:44 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

"Kirill Paliy" <kpaliy@aaanet.ru> wrote in message
news:bdnjjr$d9c$1@rogue.oti.com...
>
> "Randy Hudson" <none@us.ibm.com>
Previous Topic:Why can't I see my new connection?
Next Topic:Rendering HTML with draw2d.text
Goto Forum:
  


Current Time: Tue Jul 08 15:41:46 EDT 2025

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

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

Back to the top