From: SourceForge.net <no...@so...> - 2009-03-18 17:11:24
|
Patches item #2686040, was opened at 2009-03-13 10:58 Message generated for change (Comment added) made by boente You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=315494&aid=2686040&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 7 Private: No Submitted By: Boente (boente) Assigned to: David Gilbert (mungady) Summary: Panning of charts Initial Comment: The attached files enable the JFreeCharts to be panned. They must implement the Pannable interface. An example implementation have been added for the XYPlot. To enable the panning just call <code> PannableChartPanel chartPanel = .... chartPanel.setMouseMode(PannableChartPanel .MOUSE_PAN); </code> and use the PannableXYPlot. Someone might find some nice mouse gestures to use the panning. I would be happy if this is integrated to JFreeChart. ---------------------------------------------------------------------- >Comment By: Boente (boente) Date: 2009-03-18 17:10 Message: ad 2): The pan_patch3.zip patch added the functionality to start panning with the CTRL-modifier. ad 1): The mouse wheel support is only necessary for zooming. It can be dropped without influencing the pan support, which should be added by this path track. Ok, only the ranges are missing... We are getting forward :-) ---------------------------------------------------------------------- Comment By: Boente (boente) Date: 2009-03-18 17:01 Message: ad 4): Implementation is very easy. I have uploaded a new patch including a demo application for the panning. ad 1): I am a big supporter of dropping 1.3 support ad 2): The setMouseMode() variant is a hack. I would prefer if one can select between different invocation schemes. But the CTRL-mouse drag is ok for now. ad 3): Yeah. I aggree. We should think about to get the ranges from the datasets automatically (as default) and if the programmer likes, the default settings should be overwritable. ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2009-03-17 15:27 Message: Right, I've taken a look and I think this is very promising. There are a few things we need to work on: (1) Mouse wheel event support was new in Java 1.4, and JFreeChart is still advertised as supporting Java 1.3 or later. Options to get around this: (i) drop 1.3 support; (ii) find a way to implement mouse wheel support as an option that fails gracefully when the runtime is 1.3; (2) I'd prefer the panning to be invoked with a modifier key (e.g. CTRL-mouse drag) rather than specifying a mode via the setMouseMode() method. Then we can have both zooming and panning behaviour triggered by mouse drags. (3) It might make sense to allow bounds to be specified on the zooming and panning - i.e. not let the user pan too far away from the actual data values, or zoom too far in or out. (4) For consistency, it might be a good idea to specify the panRange in the Pannable interface as a percentage value of the current axis length (that's the way the Zoomable interface methods are specified). ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2009-03-17 13:53 Message: Thanks, I'll take a look. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=315494&aid=2686040&group_id=15494 |