Java Code Examples for java.awt.Component#getLocale()
The following examples show how to use
java.awt.Component#getLocale() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: jeveassets File: JOptionInput.java License: GNU General Public License v2.0 | 4 votes |
private static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return UIManager.getString(key, l); }
Example 2
Source Project: jdk1.8-source-analysis File: UIManager.java License: Apache License 2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 3
Source Project: dragonwell8_jdk File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 4
Source Project: TencentKona-8 File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 5
Source Project: jdk8u60 File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 6
Source Project: JDKSourceCode1.8 File: UIManager.java License: MIT License | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 7
Source Project: openjdk-jdk8u File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 8
Source Project: openjdk-jdk8u-backup File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 9
Source Project: Bytecoder File: UIManager.java License: Apache License 2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 10
Source Project: openjdk-jdk9 File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 11
Source Project: jdk8u-jdk File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 12
Source Project: Java8CN File: UIManager.java License: Apache License 2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 13
Source Project: hottub File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 14
Source Project: openjdk-8-source File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 15
Source Project: openjdk-8 File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 16
Source Project: jdk8u_jdk File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 17
Source Project: jdk8u-jdk File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }
Example 18
Source Project: jdk8u-dev-jdk File: UIManager.java License: GNU General Public License v2.0 | 2 votes |
/** * Returns a string from the defaults that is appropriate for the * given locale. If the value for * {@code key} is not a {@code String}, {@code null} is returned. * * @param key an <code>Object</code> specifying the string * @param c {@code Component} used to determine the locale; * {@code null} implies the default locale as * returned by {@code Locale.getDefault()} * @return the <code>String</code> * @throws NullPointerException if {@code key} is {@code null} */ static String getString(Object key, Component c) { Locale l = (c == null) ? Locale.getDefault() : c.getLocale(); return getString(key, l); }