rotate a IFigure [message #224289] |
Fri, 13 October 2006 08:29 |
Eclipse User |
|
|
|
Originally posted by: mounafeki.yahoo.fr
Hi,
I drew a IFigur . Now my goal is the following:
If I press two times on this Figure, then she will be rotated. How and
in which class can the problem solve?
Thanks in Advance
Mouna Feki
|
|
|
Re: rotate a IFigure [message #224349 is a reply to message #224289] |
Sat, 14 October 2006 13:21 |
Eclipse User |
|
|
|
Originally posted by: martin.tauber.t-online.de
Hi Mouna,
I haven't tried it yet, since I have mostly been working with the standard
java Graphics2D class, but to me it looks like the Graphics.rotate() method
seams to be the starting point to at least rotate the figure. So what I
would try to do is:
(1) extend the model so that the rotation state is stored
(2) create a policy for the double click (Why are you not considering using
an action?)
(3) before drawing the figure in the paintFigure(Graphics g) method set the
rotation using g.rotate()
Regards
Martin
"Mouna Feki" <mounafeki@yahoo.fr> schrieb im Newsbeitrag
news:egniq5$aap$1@utils.eclipse.org...
> Hi,
>
> I drew a IFigur . Now my goal is the following:
> If I press two times on this Figure, then she will be rotated. How and in
> which class can the problem solve?
>
> Thanks in Advance
> Mouna Feki
|
|
|
Powered by
FUDForum. Page generated in 0.04223 seconds