001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.projection; 003 004import org.openstreetmap.josm.data.Bounds; 005 006/** 007 * Handles projection change events by keeping a clean state of current bounds. 008 * @since 14120 009 */ 010public interface ProjectionBoundsProvider { 011 012 /** 013 * Returns the bounds for the current projection. Used for projection events. 014 * @return the bounds for the current projection 015 * @see #restoreOldBounds 016 */ 017 Bounds getRealBounds(); 018 019 /** 020 * Restore clean state corresponding to old bounds after a projection change event. 021 * @param oldBounds bounds previously returned by {@link #getRealBounds}, before the change of projection 022 * @see #getRealBounds 023 */ 024 void restoreOldBounds(Bounds oldBounds); 025}