Sean McGowan a écrit :
1. I noticed when using the StyledMapPane class to display my map, there is pan and zoom functionality when you right-click on the map. How do I access this functionality? I'd like to add zoom and pan buttons to a toolbar in my application.

This is implemented in ZoomPane. You can override the 'getPopupMenu' method in order to add additional menus.


2. Also, I noticed the map's scrollbar acts as zoom in/out when I use the mouse wheel. Is there any way to have the scrollbars for the map behave normally? By normal I mean scroll up and down the map without zooming in/out.

There is no convenient method for that... We probably need to unregister the MouseWheelListener (you can get the listener using Component.getMouseWheelListeners() method or something similar, and then invoke Component.removeMouseWheelListener), and register yours own listener.

        Martin.


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id845&op=click
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to