001 // License: GPL. For details, see LICENSE file. 002 package org.openstreetmap.josm.gui.bbox; 003 004 import org.openstreetmap.josm.data.Bounds; 005 006 /** 007 * A BBoxChooser is a component which provides a UI for choosing a 008 * bounding box. 009 * 010 */ 011 public interface BBoxChooser { 012 013 /** 014 * A BBoxChooser emits {@link ProperyChangeEvent}s for this property 015 * if the current bounding box changes. 016 */ 017 String BBOX_PROP = BBoxChooser.class.getName() + ".bbox"; 018 019 /** 020 * Sets the current bounding box in this BboxChooser. If {@code bbox} 021 * is null the current bbox in this BBoxChooser is removed. 022 * 023 * @param bbox the bounding box 024 */ 025 public void setBoundingBox(Bounds bbox); 026 027 /** 028 * Replies the currently selected bounding box in this BBoxChooser. 029 * Replies null, if currently there isn't a bbox choosen in this 030 * BBoxChooser. 031 * 032 * @return the currently selected bounding box 033 */ 034 public Bounds getBoundingBox(); 035 }