001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.gui.bbox;
003
004import 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 */
011public interface BBoxChooser {
012
013    /**
014     * A BBoxChooser emits {@link java.beans.PropertyChangeEvent}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    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    Bounds getBoundingBox();
035}