How to limit the panning range.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
SlowFoot
Posts: 21
Joined: Fri Oct 02, 2009 4:01 pm
antibot: No, of course not.

How to limit the panning range.

Post by SlowFoot » Wed Feb 16, 2011 7:35 pm

I have a contour plot applet that I want to implement panning in. Currently, I can pan the graph any way that I want, but I would like to constrain the allowable panning area so that a user can't pan outside of the dataset range. My current dataset is a 320x240 grid of temperature values with no values outside of that range and they will never be outside that range as we're mapping an image into a contour plot (XYPlot using an XYZDataset). I'm looking at the various methods available in the XYPlot but I can't figure out the process that I should use to limit it so that a user can't pan outside that range.

Has anyone implemented something like this before?

Thanks

Locked