Posted by odeamus
on May 7, 2009 at 3:35 AM PDT
We have an application where we do manual drawing to a panel. We also have a custom zoom implementation that is a real PITA to maintain. I changed the code to use JXLayer and TransformUI, and now the drawing works fine and zooming itself is much faster, which is nice bonus.
Now I'm not sure how the mouse events should be handled. Now they come to my handlers with coordinates that haven't been zoomed. Is this correct? Should I handle the zooming myself?
And one about layout. The panel where the drawing happens have been added to its parent as BorderLayer.CENTER, so it takes as much space as it can. Then the drawing has started from 0, 0, the top left corner. Now with JXLayer what is drawn is centered in the panel. How I can manage the layout of the JXLayer?