Help : different behaviour for figure if using zoom, ruler [message #151317] |
Fri, 17 September 2004 07:31  |
Eclipse User |
|
|
|
Originally posted by: xpmansami.msn.com
My problem : different behaviour between a Gef viewpart and a Gef editor
using zoom, ruler
Context :
I have a classical Gef View (extends Viewpart) that works well (not
including zoom nor ruler). My figure is a label and got its text from the
model.
Depending on some conditions, I set the new label text and create a new
rectangle (with different position) for my child model, and it works well.
Then, next I wrote a GraphicalEditor including zoom and ruler and based on
the same previous model, child editpart (same as for my Gef View).
Now I have the following problems/questions
1. why the figure never show the label text, nor the background color ?
where am I wrong. From the newsgroups, I found that we have probably have
to play with something like "fill the rectangle and then subtract 1 from
the width and height of the rectangle, and then draw it" . Is it the
solution ?
Curently, I am not using paintFigure.
2. I understand that the figure rectangle keep the same size independently
of the zoom factor.
Now, how and where Can I act on the zoomManager to zoom only the width ?
and at the same time keep the showed figure at the same Y position as for
zoom factor = 100% ?
3. How can I act on the ruler to show text in place of integer ?
Thanks a lot.
Sami
|
|
|
Re: Help : different behaviour for figure if using zoom, ruler [message #151333 is a reply to message #151317] |
Fri, 17 September 2004 10:03   |
Eclipse User |
|
|
|
Originally posted by: xpmansami.msn.com
xpmansami wrote:
> My problem : different behaviour between a Gef viewpart and a Gef editor
> using zoom, ruler
> Context :
> I have a classical Gef View (extends Viewpart) that works well (not
> including zoom nor ruler). My figure is a label and got its text from the
> model.
> Depending on some conditions, I set the new label text and create a new
> rectangle (with different position) for my child model, and it works well.
> Then, next I wrote a GraphicalEditor including zoom and ruler and based on
> the same previous model, child editpart (same as for my Gef View).
> Now I have the following problems/questions
> 1. why the figure never show the label text, nor the background color ?
> where am I wrong. From the newsgroups, I found that we have probably have
> to play with something like "fill the rectangle and then subtract 1 from
> the width and height of the rectangle, and then draw it" . Is it the
> solution ?
> Curently, I am not using paintFigure.
Note that I tested with zoom factor=100% and that the rectangle is well
positionned but the figure not painted nor the text appear.
> 2. I understand that the figure rectangle keep the same size independently
> of the zoom factor.
> Now, how and where Can I act on the zoomManager to zoom only the width ?
> and at the same time keep the showed figure at the same Y position as for
> zoom factor = 100% ?
> 3. How can I act on the ruler to show text in place of integer ?
> Thanks a lot.
> Sami
|
|
|
Re: Help : different behaviour for figure if using zoom, ruler [message #151431 is a reply to message #151317] |
Mon, 20 September 2004 10:31  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"xpmansami" <xpmansami@msn.com> wrote in message
news:ciehur$oce$1@eclipse.org...
> My problem : different behaviour between a Gef viewpart and a Gef editor
> using zoom, ruler
> Context :
> I have a classical Gef View (extends Viewpart) that works well (not
> including zoom nor ruler). My figure is a label and got its text from the
> model.
> Depending on some conditions, I set the new label text and create a new
> rectangle (with different position) for my child model, and it works well.
>
> Then, next I wrote a GraphicalEditor including zoom and ruler and based on
> the same previous model, child editpart (same as for my Gef View).
>
> Now I have the following problems/questions
> 1. why the figure never show the label text, nor the background color ?
> where am I wrong. From the newsgroups, I found that we have probably have
> to play with something like "fill the rectangle and then subtract 1 from
> the width and height of the rectangle, and then draw it" . Is it the
> solution ?
> Curently, I am not using paintFigure.
>
> 2. I understand that the figure rectangle keep the same size independently
> of the zoom factor.
> Now, how and where Can I act on the zoomManager to zoom only the width ?
This is not supported. There is no way to scale a Font in just one
direction.
> and at the same time keep the showed figure at the same Y position as for
> zoom factor = 100% ?
>
> 3. How can I act on the ruler to show text in place of integer ?
This is not supported. What text do you want to show? Open a feature
request with a detail use case.
>
> Thanks a lot.
> Sami
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02720 seconds