Example usage for com.jgoodies.looks Fonts canDisplayLocalizedText

List of usage examples for com.jgoodies.looks Fonts canDisplayLocalizedText

Introduction

In this page you can find the example usage for com.jgoodies.looks Fonts canDisplayLocalizedText.

Prototype

public static Boolean canDisplayLocalizedText(Font font, Locale locale) 

Source Link

Document

Checks and answers whether the given font can display text that is localized for the specified locale.

Usage

From source file:FontTest.java

License:Open Source License

private void addInternationalizationProperties(StringBuffer buffer) {
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    buffer.append("\n\n");
    buffer.append("Internationalization:");
    Font defaultGUIFont = (Font) toolkit.getDesktopProperty("win.defaultGUI.font");
    Font iconFont = (Font) toolkit.getDesktopProperty("win.icon.font");
    Locale locale = Locale.getDefault();
    buffer.append("\n    defaultLocale.getDisplayName(Locale.ENGLISH)=");
    buffer.append(locale.getDisplayName(Locale.ENGLISH));
    buffer.append("\n    defaultLocale.getDisplayLanguage(Locale.ENGLISH)=");
    buffer.append(locale.getDisplayLanguage(Locale.ENGLISH));
    buffer.append("\n    defaultLocale.getDisplayLanguage(defaultLocale)=");
    buffer.append(locale.getDisplayLanguage(locale));
    buffer.append("\n    locale has localized display language=" + localeHasLocalizedDisplayLanguage(locale));
    buffer.append("\n    defaultGUI font can display localized text=");
    buffer.append(yesNoDontKnow(Fonts.canDisplayLocalizedText(defaultGUIFont, locale)));
    buffer.append("\n    icon font can display localized text=");
    buffer.append(yesNoDontKnow(Fonts.canDisplayLocalizedText(iconFont, locale)));
}