Changeset 7634 in josm
- Timestamp:
- 2014-10-19T18:49:43+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r7476 r7634 45 45 import javax.swing.JTextArea; 46 46 import javax.swing.KeyStroke; 47 import javax.swing.LookAndFeel; 47 48 import javax.swing.UIManager; 48 49 import javax.swing.UnsupportedLookAndFeelException; … … 95 96 import org.openstreetmap.josm.io.OnlineResource; 96 97 import org.openstreetmap.josm.io.OsmApi; 98 import org.openstreetmap.josm.plugins.PluginHandler; 97 99 import org.openstreetmap.josm.tools.CheckParameterUtil; 98 100 import org.openstreetmap.josm.tools.I18n; … … 826 828 } 827 829 catch (final NoClassDefFoundError | ClassNotFoundException e) { 828 info("Look and Feel not found: " + laf); 829 Main.pref.put("laf", defaultlaf); 830 // Try to find look and feel in plugin classloaders 831 Class<?> klass = null; 832 for (ClassLoader cl : PluginHandler.getResourceClassLoaders()) { 833 try { 834 klass = cl.loadClass(laf); 835 break; 836 } catch (ClassNotFoundException ex) { 837 // Do nothing 838 } 839 } 840 if (klass != null && LookAndFeel.class.isAssignableFrom(klass)) { 841 try { 842 UIManager.setLookAndFeel((LookAndFeel) klass.newInstance()); 843 } catch (Exception ex) { 844 warn("Cannot set Look and Feel: " + laf + ": "+ex.getMessage()); 845 } 846 } else { 847 info("Look and Feel not found: " + laf); 848 Main.pref.put("laf", defaultlaf); 849 } 830 850 } 831 851 catch (final UnsupportedLookAndFeelException e) {
Note:
See TracChangeset
for help on using the changeset viewer.