Revision 41390 trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/impl/DefaultPluginsManager.java
DefaultPluginsManager.java | ||
---|---|---|
300 | 300 |
public File getApplicationI18nFolder() { |
301 | 301 |
return new File(this.getApplicationFolder(), "i18n"); |
302 | 302 |
} |
303 |
|
|
304 |
public Locale getCurrentLocale() { |
|
305 |
return org.gvsig.i18n.Messages.getCurrentLocale(); |
|
306 |
} |
|
307 |
|
|
308 |
public void setCurrentLocale(final Locale locale) { |
|
309 |
org.gvsig.i18n.Messages.setCurrentLocale(locale); |
|
310 |
|
|
311 |
AndamiConfig config = Launcher.getAndamiConfig(); |
|
312 |
config.setLocaleLanguage(locale.getLanguage()); |
|
313 |
config.setLocaleCountry(locale.getCountry()); |
|
314 |
config.setLocaleVariant(locale.getVariant()); |
|
315 |
|
|
316 |
setCurrentLocaleUI(locale); |
|
317 |
} |
|
318 |
|
|
319 |
private void setCurrentLocaleUI(final Locale locale) { |
|
320 |
if( !SwingUtilities.isEventDispatchThread() ) { |
|
321 |
try { |
|
322 |
SwingUtilities.invokeAndWait(new Runnable() { |
|
323 |
public void run() { |
|
324 |
setCurrentLocaleUI(locale); |
|
325 |
} |
|
326 |
}); |
|
327 |
} catch (Exception ex) { |
|
328 |
// Ignore |
|
329 |
} |
|
330 |
} |
|
331 |
try { |
|
332 |
JComponent.setDefaultLocale(locale); |
|
333 |
} catch (Exception ex) { |
|
334 |
logger.warn("Problems setting locale to JComponent.",ex); |
|
335 |
} |
|
336 |
try { |
|
337 |
MDIFrame.getInstance().setLocale(locale); |
|
338 |
} catch(Exception ex) { |
|
339 |
logger.warn("Problems settings locale to MDIFrame.",ex); |
|
340 |
} |
|
341 |
} |
|
342 |
|
|
343 | 303 |
public FirewallConfiguration getFirewallConfiguration() { |
344 | 304 |
return new DefaultFirewallConfiguration(); |
345 | 305 |
} |
Also available in: Unified diff