Skip to main content



      Home
Home » Eclipse Projects » GEF » Text displayed in a thumbnail
Text displayed in a thumbnail [message #169467] Wed, 23 February 2005 11:20 Go to next message
Eclipse UserFriend
Originally posted by: alain.origlia.impika.com

Hi all,

I run into this problem:

I want to display a thumbnail of a figure which contains some text. I use
the StickyNoteFigure of the logic example as the figure to display in the
thumbnail.

Here is the code:

LightweightSystem lws = new LightweightSystem(overview); // overview is some
canvas
Thumbnail thumbnail = new Thumbnail();

StickyNoteFigure fig = new StickyNoteFigure();
fig.setText("The text to display");
fig.setBounds(new Rectangle(0, 0 , 300, 200));

thumbnail.setSource(fig);
lws.setContents(thumbnail);

If I run the code, I can see the yellow figure but it is empty. No text is
displayed. I don't know why. Any idea?

Thanks,

Alain
Re: Text displayed in a thumbnail [message #169475 is a reply to message #169467] Wed, 23 February 2005 14:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Perhaps the font being used does not scale.

> If I run the code, I can see the yellow figure but it is empty. No text is
> displayed. I don't know why. Any idea?
>
> Thanks,
>
> Alain
>
>
Re: Text displayed in a thumbnail [message #169530 is a reply to message #169475] Thu, 24 February 2005 03:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alain.origlia.impika.com

Thanks for your suggestion Randy.
The StickyNoteFigure uses a TextFlow. When I debug, I see that the TextFlow
does not paint correctly. The text fragments list is empty and the
paintFigure method of the TextFlow class returns immediately without
displaying any piece of text.
When I use this figure in my editor, it works properly. I don't understand
why within the thumbnail the fragments list is empty.


"Randy Hudson" <none@us.ibm.com> a
Re: Text displayed in a thumbnail [message #170952 is a reply to message #169530] Tue, 08 March 2005 01:16 Go to previous message
Eclipse UserFriend
That's because the StickyNoteFigure doesn't exist anywhere, except in
memory. It's not in a lightweight system, doesn't have a parent or an
update manager or a font, and is never laid out or painted.


"Alain Origlia" <alain.origlia@impika.com> wrote in message
news:cvk4h7$fn3$1@www.eclipse.org...
> Thanks for your suggestion Randy.
> The StickyNoteFigure uses a TextFlow. When I debug, I see that the
TextFlow
> does not paint correctly. The text fragments list is empty and the
> paintFigure method of the TextFlow class returns immediately without
> displaying any piece of text.
> When I use this figure in my editor, it works properly. I don't understand
> why within the thumbnail the fragments list is empty.
>
>
> "Randy Hudson" <none@us.ibm.com> a
Previous Topic:[Draw2d] Can we draw a dot line in draw2d
Next Topic:ChopboxAnchor bug ? - related to earler post on connection anchor and router
Goto Forum:
  


Current Time: Tue Jul 22 15:54:30 EDT 2025

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

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

Back to the top