Changeset 30848 in osm for applications
- Timestamp:
- 2014-12-13T20:04:25+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/FeatureAdapter.java
r30223 r30848 7 7 import java.net.URISyntaxException; 8 8 import java.text.MessageFormat; 9 import java.util.logging.Logger; 9 10 10 11 public class FeatureAdapter { … … 19 20 } 20 21 22 public static interface LoggingAdapter { 23 Logger getLogger(String name); 24 } 25 21 26 private static BrowserAdapter browserAdapter = new DefaultBrowserAdapter(); 22 27 private static TranslationAdapter translationAdapter = new DefaultTranslationAdapter(); 28 private static LoggingAdapter loggingAdapter = new DefaultLoggingAdapter(); 23 29 24 30 public static void registerBrowserAdapter(BrowserAdapter browserAdapter) { … … 30 36 } 31 37 38 public static void registerLoggingAdapter(LoggingAdapter loggingAdapter) { 39 FeatureAdapter.loggingAdapter = loggingAdapter; 40 } 41 32 42 public static void openLink(String url) { 33 43 browserAdapter.openLink(url); … … 36 46 public static String tr(String text, Object... objects) { 37 47 return translationAdapter.tr(text, objects); 48 } 49 50 public static Logger getLogger(String name) { 51 return loggingAdapter.getLogger(name); 38 52 } 39 53 … … 61 75 } 62 76 } 77 78 public static class DefaultLoggingAdapter implements LoggingAdapter { 79 @Override 80 public Logger getLogger(String name) { 81 return Logger.getLogger(name); 82 } 83 } 63 84 }
Note:
See TracChangeset
for help on using the changeset viewer.