Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Scaling of a DirectEditRequestLocation
Scaling of a DirectEditRequestLocation [message #153937] Wed, 13 October 2004 20:16 Go to next message
Eclipse UserFriend
Originally posted by: brett.bock.embarcadero.com

I am attempting to place a CellEditorLocator class implementation over a
figure inside a parent figure during a
org.eclipse.gef.EditPart.performRequest( Request ) call. The Request type
casts to a DirectEditRequest. In the code I call the EditPart's
getFigure().findFigureAt() using the location from
DirectEditRequest.getLocation().

All works fine until I zoom the editor. Then it seems the
DirectEditRequest.getLocation() is scaled, so the findFigureAt() call fails.

Is there a bug here, or should I be doing something different? Can I get
the current zoom inside this call?

Thank you,
Brett
Re: Scaling of a DirectEditRequestLocation [message #153969 is a reply to message #153937] Thu, 14 October 2004 03:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

All request locations are absolute. You'll need to convert to relative first
by using:
getFigure().translateToRelative(locationCopy);

"Brett Bock" <brett.bock@embarcadero.com> wrote in message
news:ckk25c$nkg$1@eclipse.org...
> I am attempting to place a CellEditorLocator class implementation over a
> figure inside a parent figure during a
> org.eclipse.gef.EditPart.performRequest( Request ) call. The Request type
> casts to a DirectEditRequest. In the code I call the EditPart's
> getFigure().findFigureAt() using the location from
> DirectEditRequest.getLocation().
>
> All works fine until I zoom the editor. Then it seems the
> DirectEditRequest.getLocation() is scaled, so the findFigureAt() call
fails.
>
> Is there a bug here, or should I be doing something different? Can I get
> the current zoom inside this call?
>
> Thank you,
> Brett
>
>
Re: Scaling of a DirectEditRequestLocation [message #154103 is a reply to message #153969] Thu, 14 October 2004 17:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brett.bock.embarcadero.com

That works. Thank you.

I guess I had the concept of absolute and relative backwards. I thought
absolute would be the non-scaled coordinates, and relative would be the
scaled. It appears that this is not the case.

So, absolute == scaled values, and relative == non-scaled.

"Randy Hudson" <none@us.ibm.com> wrote in message
news:ckkrmu$r0g$1@eclipse.org...
> All request locations are absolute. You'll need to convert to relative
first
> by using:
> getFigure().translateToRelative(locationCopy);
>
Re: Scaling of a DirectEditRequestLocation [message #154119 is a reply to message #154103] Thu, 14 October 2004 19:46 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Absolute is where the coordinate appears "relative" to the absolute parent,
the root figure.

"Brett Bock" <brett.bock@embarcadero.com> wrote in message
news:ckmdip$rou$1@eclipse.org...
> That works. Thank you.
>
> I guess I had the concept of absolute and relative backwards. I thought
> absolute would be the non-scaled coordinates, and relative would be the
> scaled. It appears that this is not the case.
>
> So, absolute == scaled values, and relative == non-scaled.
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:ckkrmu$r0g$1@eclipse.org...
> > All request locations are absolute. You'll need to convert to relative
> first
> > by using:
> > getFigure().translateToRelative(locationCopy);
> >
>
>
Previous Topic:Image on Tool Bar
Next Topic:Eclipse-wiki down
Goto Forum:
  


Current Time: Thu Sep 26 03:09:24 GMT 2024

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

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

Back to the top