package de.renew.gui.tool;

import java.awt.Point;
import java.awt.event.MouseEvent;

import CH.ifa.draw.standard.StandardDrawingView;
import de.renew.draw.ui.ontology.DrawingEditor;

/**
 * Lets the user Zoom out with mouse clicks.
 */
public class ZoomOutTool extends AbstractZoomTool {

    public ZoomOutTool(DrawingEditor editor) {
        super(editor);
    }

    @Override
    public void mouseUp(MouseEvent e, int x, int y) {
        StandardDrawingView standardDrawingView = getCurrentStandardDrawingView();
        if (standardDrawingView != null) {
            standardDrawingView.zoomOutFromPoint(new Point(x, y));
        }
    }
}