Scaling of a DirectEditRequestLocation [message #153937] |
Wed, 13 October 2004 20:16 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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);
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03475 seconds