I only have time for a very quick reply now, but will follow up later if you
need more info.  (I haven't looked at your example code yet)

These methods are provided to help find which Components are located at
specific x & y coordinates.
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Container.html#getComponentAt(int,
int)
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Container.html#getDescendantAt(int,
int)

These ones map x & y coordinates from one Component/Container to another.
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Component.html#mapPointFromAncestor(org.apache.pivot.wtk.Container,
int, int)
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Component.html#mapPointFromAncestor(org.apache.pivot.wtk.Container,
org.apache.pivot.wtk.Point)
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Component.html#mapPointToAncestor(org.apache.pivot.wtk.Container,
int, int)
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Component.html#mapPointToAncestor(org.apache.pivot.wtk.Container,
org.apache.pivot.wtk.Point)

Chris

On 19 August 2011 06:39, Camilo Casadiego <[email protected]> wrote:

> Hi there guys, I'm pretty advanced in what I'm doing...There's some code
> added, now I have an issue, I managed to paint a BoxPane in any place using
> a context menu handler and mouse listeners, now I have to make the
> components drag able...in order to achieve that, I'm adding some code to the
> mouse down event, and when I make debug, I can see the actual little window
> I'm clicking on, the problem is that its holded into  variable of the
> container passed along the method, to be more specific its contained into
> mouseOverComponent which is an attribute of the abstract class Container.
> the actual doubt...is how can I get the actual component which I'm
> selecting...i tried to add the corresponding listener to the class holding
> the new window, the problem is that it doesn't follow the mouse events when
> I get out of the window.****
>
> ** **
>
> The code attached is an actual eclipse project, to run it you just have to
> add libraries to lib folder and the BXMLauncher class lets you load
> everything using the eclipse plugin.****
>
> ** **
>
> Once the app loads, you have to press new...and in the central frame right
> click and press the option...it renders the objet correctly and the new
> contextual menu is available...but now I need to be able to move that new
> object basically drag it arround the panel...****
>
> ** **
>
> Any ideas'll be appreciated!!! :D****
>
> ** **
>
> *Kind Regards,*****
>
>  ****
>
> [image: ::::ADV_Logo_CMYK300_Color.png]****
>
> *Camilo Casadiego Espitia***
>
> *Arquitecto de SW*****
>
> *(* + 57 1 6393000 ****
>
> * [email protected]****
>
> *:* http://www.adv.com.co****
>
> Carrera 11 No. 93 – 53 P7****
>
> Bogotá - Colombia****
>
> ** **
>
> ** **
>
> *De:* Camilo Casadiego [mailto:[email protected]]
> *Enviado el:* Thursday, August 18, 2011 4:30 PM
>
> *Para:* [email protected]
> *Asunto:* RE: Drag and drop****
>
> ** **
>
> actually thats  great idea..I'll try and give you any news :D****
>
> ** **
>
> *Kind Regards,*****
>
>  ****
>
> [image: ::::ADV_Logo_CMYK300_Color.png]****
>
> *Camilo Casadiego Espitia*
>
> *Arquitecto de SW*****
>
> *(* + 57 1 6393000 ****
>
> * [email protected]****
>
> *:* http://www.adv.com.co****
>
> Carrera 11 No. 93 – 53 P7****
>
> Bogotá - Colombia****
>
> ** **
>
> ** **
>
> *De:* Chris Bartlett [mailto:[email protected]]
> *Enviado el:* Thursday, August 18, 2011 4:05 PM
> *Para:* [email protected]
> *Asunto:* Re: Drag and drop****
>
> ** **
>
> I just had a thought.  It might be simpler to try to add drag & drop to the
> Panels tutorial first.  (Make the buttons draggable)****
>
> ** **
>
> Then once you have the drag and drop working with standard Pivot Components
> (PushButton & Panel), you can try to replace them with your custom
> Components.****
>
> ** **
>
> ** **
>
> On 19 August 2011 03:49, Chris Bartlett <[email protected]> wrote:****
>
> http://pivot.apache.org/tutorials/panels.html****
>
> According to the (short) Panel tutorial, Panels do not perform any layout
> or sizing of their children.  You will need to set the size & locations of
> any Component what you add to a Panel otherwise you will not see it as it
> will be 0 pixels wide and 0 pixels high. ****
>
> ** **
>
> If that doesn't help, then could you try to post a small, but complete
> example of the code you have so far?  Something we can just unzip and run.
>  I am having trouble understanding what is happening at the moment.****
>
> ** **
>

<<image001.png>>

Reply via email to