How to meaure the string(text) width? [message #229528] |
Sun, 21 January 2007 01:06  |
Eclipse User |
|
|
|
Originally posted by: zjg.robin.gmail.com
Hi,
I want to draw string in the figure, and I must know the width the string, how to get such info? I know that GC has such method to get it, but how to get GC in figure object?
Thanks. Robin
|
|
|
|
|
|
Re: How to meaure the string(text) width? [message #229587 is a reply to message #229579] |
Mon, 22 January 2007 09:28  |
Eclipse User |
|
|
|
If you need to draw a string inside a node, perhaps, you all you need is
indeed create a GEF's label figure and add it to the node figure. For the
node figure install GEF's tool bar layout or stack layout manager, this
will resize the node figure to fit the entire label figure (i.e. to fit
the whole string). The closest example to this would StickyNoteFigure from
GEF logic example editor.
Hope this helps.
Cheers,
Alex
|
|
|
Powered by
FUDForum. Page generated in 0.26812 seconds