Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Drag Position
Drag Position [message #233414] Tue, 24 April 2007 13:32 Go to next message
Eclipse UserFriend
Originally posted by: michele.l.evinco.it

This is a multi-part message in MIME format.
--------------090606020908000906030106
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi,
I've an editPart that act as background for my editor (this editpart
display a Map where then the user can drag other editpart).
The "background" editPart have width and height bigger than editor
dimension so i've set ScalableFreeformRootEditPart as RootEditPart to
use the scroll.
The problem is :

If i drag a child editpart of "background" editPart when the vertical
scroll is on the bottom the edit part don't follow the mouse but it move
with a distance from the mouse pointer that is the same of the amount of
scroll (fig1.jpg).

I've tryed to implement the useLocalCoordinates method in "background"
editPart and in her childs editpart to return true/false but nothing
change in the behavior, i try with vorious traslate method
translateFromParent, translateToAbsolute, translateToParent,
translateToRelative in the paintFigure method of the child edit part
but nothing works!

Someome have been my problem?

Bye
Michele


--------------090606020908000906030106
Content-Type: image/jpeg;
name="fig1.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="fig1.jpg"

/9j/4AAQSkZJRgABAQEASABIAAD//gAXQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q /9sAQwAFAwQE
BAMFBAQEBQUFBgcMCAcHBwcPCwsJDBEPEhIRDxERExYcFxMUGhURERghGBod HR8fHxMXIiQi
HiQcHh8e/9sAQwEFBQUHBgcOCAgOHhQRFB4eHh4eHh4eHh4eHh4eHh4eHh4e Hh4eHh4eHh4e
Hh4eHh4eHh4eHh4eHh4eHh4eHh4e/8AAEQgA1gB2AwEiAAIRAQMRAf/EAB0A AQACAwEBAQEA
AAAAAAAAAAAGCQMECAUHAgH/xABPEAAABAMCBQ4JCAkFAQAAAAAAAQIDBAUR BgcSITV0shMU
FhcxM0VVV3GWs8HUFRgiQZOU0dLTMjQ3UWF2lbQIJDZCcnWBg7VDVGWRobH/ xAAaAQEAAwEB
AQAAAAA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F9lUmfmpWnm E0qtSNXhVbXa
umtSNobPwVfZ/wBfs/eUYy3ZQk77ra5NOyuna3f8ZRsAAbTy4AAAAW0Tbfme ZXYKlxbPODSh
bS1qJKCI6mf9BnxDSV2dRdjVGRHBedL6t0a2uoXH+sIxfYfsGaFdQ81KXW1Y SFRS6H/bdGSM
4yyZKknkRW8/K7ebt6TgBefldvN29JwBirdRnOrKywAB6AgCayS1MriZI1JL TQan2GlIS06h
PyUliI1UMjI0liqnGZYqbtYUApr0IVlaWmT1R9PZe1sRsyo50bNSVpRavGS7 NPM+gypV3sum
hTBmYPOLSo1NtutLUhs64jIsCtS81TP693GInamdOz6bKjnG9SSSEobbwiVg JLzVoVcZmf8A
UeUArpYSNOfEbcnlzNm0P8hrYzDLCwpwpU77zUE1d93dvLRcl7KwAAaj4AAA AAWw2o+Zp/jL
tFTwthtR8zT/ABl2jHjumRL0MjS/kGPYkOTZPnj2i8PHX8gx7EhybJ88e0Xh 83Derzuiuj6i
P3n5XbzdvScALz8rt5u3pOAOa3UZdqyssAAegIAAAAAAAAAAAAAAAC2G1HzN P8ZdoAMeO6ZE
vQyNL+QY9iQ5Nk+ePaLwAPm4b1ed0V0fUR+8/K7ebt6TgAA5rdRl2rP/2Q==
--------------090606020908000906030106--
Re: Drag Position [message #233433 is a reply to message #233414] Tue, 24 April 2007 16:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michele.l.evinco.it

Hi,

I find the solution by myself

If someone is interested in it ask to me

Thank's
Michele

michele wrote:
> Hi,
> I've an editPart that act as background for my editor (this editpart
> display a Map where then the user can drag other editpart).
> The "background" editPart have width and height bigger than editor
> dimension so i've set ScalableFreeformRootEditPart as RootEditPart to
> use the scroll.
> The problem is :
>
> If i drag a child editpart of "background" editPart when the
> vertical scroll is on the bottom the edit part don't follow the mouse
> but it move with a distance from the mouse pointer that is the same of
> the amount of scroll (fig1.jpg).
>
> I've tryed to implement the useLocalCoordinates method in "background"
> editPart and in her childs editpart to return true/false but nothing
> change in the behavior, i try with vorious traslate method
> translateFromParent, translateToAbsolute, translateToParent,
> translateToRelative in the paintFigure method of the child edit part
> but nothing works!
>
> Someome have been my problem?
>
> Bye
> Michele
>
>
> ------------------------------------------------------------ ------------
>
Re: Drag Position [message #233457 is a reply to message #233433] Tue, 24 April 2007 20:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vb.prismtech.com

Hi,
I am interested.

"michele" <michele.l@evinco.it> wrote in message
news:f0l9mo$gvo$1@build.eclipse.org...
> Hi,
>
> I find the solution by myself
>
> If someone is interested in it ask to me
>
> Thank's
> Michele
>
> michele wrote:
>> Hi,
>> I've an editPart that act as background for my editor (this editpart
>> display a Map where then the user can drag other editpart).
>> The "background" editPart have width and height bigger than editor
>> dimension so i've set ScalableFreeformRootEditPart as RootEditPart to use
>> the scroll.
>> The problem is :
>>
>> If i drag a child editpart of "background" editPart when the vertical
>> scroll is on the bottom the edit part don't follow the mouse but it move
>> with a distance from the mouse pointer that is the same of the amount of
>> scroll (fig1.jpg).
>>
>> I've tryed to implement the useLocalCoordinates method in "background"
>> editPart and in her childs editpart to return true/false but nothing
>> change in the behavior, i try with vorious traslate method
>> translateFromParent, translateToAbsolute, translateToParent,
>> translateToRelative in the paintFigure method of the child edit part
>> but nothing works!
>>
>> Someome have been my problem?
>>
>> Bye
>> Michele
>> ------------------------------------------------------------ ------------
>>
Re: Drag Position [message #233553 is a reply to message #233457] Thu, 26 April 2007 12:49 Go to previous message
Eclipse UserFriend
Originally posted by: michele.l.evinco.it

In the editPart that i drag (the child of backgroud) in the method
refreshVisuals() I do this :

IFigure antennaFigure = getFigure();
Point(am.getLocation().x,am.getLocation().y);
antennaFigure.translateToRelative(p);

am is the model relative to antennaFigure.



Vikram wrote:
> Hi,
> I am interested.
>
> "michele" <michele.l@evinco.it> wrote in message
> news:f0l9mo$gvo$1@build.eclipse.org...
>
>>Hi,
>>
>>I find the solution by myself
>>
>>If someone is interested in it ask to me
>>
>>Thank's
>>Michele
>>
>>michele wrote:
>>
>>>Hi,
>>> I've an editPart that act as background for my editor (this editpart
>>>display a Map where then the user can drag other editpart).
>>>The "background" editPart have width and height bigger than editor
>>>dimension so i've set ScalableFreeformRootEditPart as RootEditPart to use
>>>the scroll.
>>>The problem is :
>>>
>>> If i drag a child editpart of "background" editPart when the vertical
>>>scroll is on the bottom the edit part don't follow the mouse but it move
>>>with a distance from the mouse pointer that is the same of the amount of
>>>scroll (fig1.jpg).
>>>
>>>I've tryed to implement the useLocalCoordinates method in "background"
>>>editPart and in her childs editpart to return true/false but nothing
>>>change in the behavior, i try with vorious traslate method
>>>translateFromParent, translateToAbsolute, translateToParent,
>>>translateToRelative in the paintFigure method of the child edit part
>>>but nothing works!
>>>
>>>Someome have been my problem?
>>>
>>>Bye
>>>Michele
>>> ------------------------------------------------------------ ------------
>>>
>
>
>
Previous Topic:Resize only in north and south directions
Next Topic:Resizing labels
Goto Forum:
  


Current Time: Fri Aug 12 23:49:42 GMT 2022

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

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

Back to the top