Author: xethyrxethyr
Date: Jul 1, 2008 12:54
When using AffineTransform on Swing components, the graphics of each
component is updated, but the bounds are not. How can I properly set
the bounds of a Swing component to match that of the AffineTransform?
I'm using AffineTransform to scale (zoom in/out) Swing components, and
while the graphics successfully zoom in/out, mouse events stop working
properly. So, I think I either need to somehow "trick" every
MouseEvent and recalculate each point into the AffineTransform's
coordinate space, or I need to update the bounds of each Swing
component for every zoom. However, I'm not sure how to retrieve the
width and height of a component within the AffineTransform's
coordinate space. Does anyone know how to do this?
|