Changeset 6889 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java
- Timestamp:
- 2014-02-27T01:41:49+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java
r6663 r6889 14 14 import org.openstreetmap.josm.gui.mappaint.mapcss.Instruction.RelativeFloat; 15 15 16 abstract publicclass ElemStyle implements StyleKeys {16 public abstract class ElemStyle implements StyleKeys { 17 17 18 18 protected static final String[] ICON_KEYS = {"icon-image", "icon-width", "icon-height", "icon-opacity"}; … … 91 91 * a JOSM session. Should have a listener listening to preference changes. 92 92 */ 93 static privateString DEFAULT_FONT_NAME = null;94 static privateFloat DEFAULT_FONT_SIZE = null;95 static privatevoid initDefaultFontParameters() {93 private static String DEFAULT_FONT_NAME = null; 94 private static Float DEFAULT_FONT_SIZE = null; 95 private static void initDefaultFontParameters() { 96 96 if (DEFAULT_FONT_NAME != null) return; // already initialized - skip initialization 97 97 DEFAULT_FONT_NAME = Main.pref.get("mappaint.font", "Helvetica"); … … 99 99 } 100 100 101 static privateclass FontDescriptor {101 private static class FontDescriptor { 102 102 public String name; 103 103 public int style; … … 141 141 } 142 142 143 static privatefinal Map<FontDescriptor, Font> FONT_MAP = new HashMap<FontDescriptor, Font>();144 static privateFont getCachedFont(FontDescriptor fd) {143 private static final Map<FontDescriptor, Font> FONT_MAP = new HashMap<FontDescriptor, Font>(); 144 private static Font getCachedFont(FontDescriptor fd) { 145 145 Font f = FONT_MAP.get(fd); 146 146 if (f != null) return f; … … 150 150 } 151 151 152 static privateFont getCachedFont(String name, int style, int size){152 private static Font getCachedFont(String name, int style, int size){ 153 153 return getCachedFont(new FontDescriptor(name, style, size)); 154 154 }
Note:
See TracChangeset
for help on using the changeset viewer.