Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Help : different behaviour for figure if using zoom, ruler
Help : different behaviour for figure if using zoom, ruler [message #151317] Fri, 17 September 2004 11:31 Go to next message
Eclipse UserFriend
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 14:03 Go to previous messageGo to next message
Eclipse UserFriend
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 14:31 Go to previous message
Eclipse UserFriend
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
>
>
>
Previous Topic:Draw2D/Gef Export to JPG
Next Topic:org.eclipse.swt.SWTException: Invalid thread access
Goto Forum:
  


Current Time: Wed Sep 25 14:08:52 GMT 2024

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

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

Back to the top