Skip to main content



      Home
Home » Eclipse Projects » GEF » rotate a IFigure
rotate a IFigure [message #224289] Fri, 13 October 2006 04:29 Go to next message
Eclipse UserFriend
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 09:21 Go to previous message
Eclipse UserFriend
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
Previous Topic:Connection Selection Only Half Working
Next Topic:RulerFigure Customization
Goto Forum:
  


Current Time: Sun Jul 27 08:14:15 EDT 2025

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

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

Back to the top