Changeset 24530 in osm for applications/editors/josm/plugins/slippymap/src
- Timestamp:
- 2010-12-02T18:52:49+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapLayer.java ¶
r24488 r24530 14 14 import java.awt.event.MouseAdapter; 15 15 import java.awt.event.MouseEvent; 16 import java.awt.font.TextAttribute; 16 17 import java.awt.geom.Rectangle2D; 17 18 import java.awt.image.ImageObserver; … … 20 21 import java.net.URISyntaxException; 21 22 import java.util.ArrayList; 23 import java.util.HashMap; 22 24 import java.util.HashSet; 23 25 import java.util.LinkedList; … … 112 114 private String attrTermsUrl; 113 115 private Rectangle attrImageBounds, attrToUBounds; 114 private static Font ATTR_FONT = Font.decode("Arial 10"); 115 private static Font ATTR_LINK_FONT = Font.decode("Arial Underline 10"); 116 private static final Font ATTR_FONT = new Font("Arial", Font.PLAIN, 10); 117 private static final Font ATTR_LINK_FONT; 118 static { 119 HashMap<TextAttribute, Integer> aUnderline = new HashMap<TextAttribute, Integer>(); 120 aUnderline.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); 121 ATTR_LINK_FONT = ATTR_FONT.deriveFont(aUnderline); 122 } 116 123 117 124 void redraw() … … 979 986 int x = 2; 980 987 int height = attrImage.getHeight(this); 981 int y = termsTextY - height; 988 int y = termsTextY - height - textHeight - 5; 982 989 attrImageBounds = new Rectangle(x, y, imgWidth, height); 983 990 g.drawImage(attrImage, x, y, this); 984 991 } 985 992 993 g.setFont(ATTR_FONT); 986 994 String attributionText = tileSource.getAttributionText(currentZoomLevel, topLeft, botRight); 987 995 Rectangle2D stringBounds = g.getFontMetrics().getStringBounds(attributionText, g);
Note:
See TracChangeset
for help on using the changeset viewer.