Just in case..I have to make those components dragables...because the next step...is to draw a line between boxes...and keep the visual relations (is like design editor for specific objects)
Kind Regards, [cid:[email protected]] Camilo Casadiego Espitia Arquitecto de SW * + 57 1 6393000 * [email protected]<mailto:[email protected]> * http://www.adv.com.co<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 6:39 PM Para: [email protected] Asunto: RE: Drag and drop 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, [cid:[email protected]] Camilo Casadiego Espitia Arquitecto de SW * + 57 1 6393000 * [email protected]<mailto:[email protected]> * http://www.adv.com.co<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, [cid:[email protected]] Camilo Casadiego Espitia Arquitecto de SW * + 57 1 6393000 * [email protected]<mailto:[email protected]> * http://www.adv.com.co<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]<mailto:[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.
<<inline: image001.png>>
