001// License: GPL. For details, see Readme.txt file. 002package org.openstreetmap.gui.jmapviewer.interfaces; 003 004import java.awt.Image; 005 006public interface Attributed { 007 /** 008 * @return True if the tile source requires attribution in text or image form. 009 */ 010 boolean requiresAttribution(); 011 012 /** 013 * @param zoom The optional zoom level for the view. 014 * @param botRight The bottom right of the bounding box for attribution. 015 * @param topLeft The top left of the bounding box for attribution. 016 * @return Attribution text for the image source. 017 */ 018 String getAttributionText(int zoom, ICoordinate topLeft, ICoordinate botRight); 019 020 /** 021 * @return The URL to open when the user clicks the attribution text. 022 */ 023 String getAttributionLinkURL(); 024 025 /** 026 * @return The URL for the attribution image. Null if no image should be displayed. 027 */ 028 Image getAttributionImage(); 029 030 /** 031 * @return The URL to open when the user clicks the attribution image. 032 * When return value is null, the image is still displayed (provided getAttributionImage() 033 * returns a value other than null), but the image does not link to a website. 034 */ 035 String getAttributionImageURL(); 036 037 /** 038 * @return The attribution "Terms of Use" text. 039 * In case it returns null, but getTermsOfUseURL() is not null, a default 040 * terms of use text is used. 041 */ 042 String getTermsOfUseText(); 043 044 /** 045 * @return The URL to open when the user clicks the attribution "Terms of Use" text. 046 */ 047 String getTermsOfUseURL(); 048}