Skip to main content

Getting started ....

2 replies [Last post]
tipper258
Offline
Joined: 2010-10-12
Points: 0

Hi folks, been reading through the forum and trying to absorb as much info about JXLayer and ZoomUI this morning, having been pointed here after a question I asked in the Swing forum.

I can't see any direct examples of what I've been asked to implement, which is a zoom function on a JPanel full of swing components, which are all movable using Swings drag and drop (DnD) - needed to share outside the VM (otherwise this would be really easy with AffineTransform and our own mouse listeners).

Looking for anything to help me get started, including where to get the correct versions of JXLayer and ZoomUI from ;-)

If anyone knows up front that this doesn't work for java DnD please shout!

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tipper258
Offline
Joined: 2010-10-12
Points: 0

Just found posts here that suggest DnD won't work with ZoomUI, ie the co-ords won't get transformed for the mouse, leaving me with 2 options

1) challenge the need to use DnD so we can recode using just mouselisteners
2) iterate all the components changing their size and location when the user says zoom

Am surprised at hitting such a speedbump for what must be a very common swing requirement. Anyone got experience of solving this for large scale commercial apps?

pietblok
Offline
Joined: 2003-07-17
Points: 0

Sorry for this late reply.

Unfortunately I can confirm that drag and drop events are not automatically adjusted to correctly work with the ZoomUI.

Under the hood, these events are triggered by sun proprietary events. Please see the source code of the Container class and its companion LightweightDispatcher clas in the same source for a better understanding how this works.

I don't see how these events could be intercepted in a general way, like the MouseEvents are intercepted by the ZoomUI

Piet