/** Zoom in or out to magnify by the specified factor, from the current
* magnification.
* @param factor The magnification factor (relative to 1.0).
*/
public void zoom(double factor) {
JCanvas canvas = getJGraph().getGraphPane().getCanvas();
AffineTransform current = canvas.getCanvasPane().getTransformContext()
.getTransform();
// Save the center, so we remember what we were looking at.
Point2D center = getCenter();
current.scale(factor, factor);
canvas.getCanvasPane().setTransform(current);
// Reset the center.
setCenter(center);
if (_graphPanner != null) {