/** * Adds all specified hints to the system hints. This * is for {@link GeoTools#init} implementation only. */ static void putSystemDefault(final RenderingHints hints) { synchronized (GLOBAL) { ensureSystemDefaultLoaded(); GLOBAL.add(hints); } GeoTools.fireConfigurationChanged(); }
/** * Adds all specified hints to the system hints. This * is for {@link GeoTools#init} implementation only. */ static void putSystemDefault(final RenderingHints hints) { synchronized (GLOBAL) { ensureSystemDefaultLoaded(); GLOBAL.add(hints); } GeoTools.fireConfigurationChanged(); }
final boolean changed; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); if (!GLOBAL.isEmpty()) { extra = new HashMap<Object,Object>(GLOBAL);
/** * Returns the hint {@linkplain GeoTools#getDefaultHints default value} * for the specified key. * * @param key The hints key. * @return The value for the specified key, or {@code null} * if the key did not have a mapping. * * @since 2.4 */ public static Object getSystemDefault(final RenderingHints.Key key) { final boolean changed; final Object value; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); value = GLOBAL.get(key); } if (changed) { GeoTools.fireConfigurationChanged(); } return value; }
/** * Removes the specified hints from the set of * {@linkplain GeoTools#getDefaultHints default hints}. * * @param key The hints key that needs to be removed. * @return The value to which the key had previously been mapped, * or {@code null} if the key did not have a mapping. * * @since 2.4 */ public static Object removeSystemDefault(final RenderingHints.Key key) { final boolean changed; final Object old; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); old = GLOBAL.remove(key); } if (changed || old != null) { GeoTools.fireConfigurationChanged(); } return old; }
final boolean changed; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); if (!GLOBAL.isEmpty()) { extra = new HashMap(GLOBAL);
/** * Removes the specified hints from the set of * {@linkplain GeoTools#getDefaultHints default hints}. * * @param key The hints key that needs to be removed. * @return The value to which the key had previously been mapped, * or {@code null} if the key did not have a mapping. * * @since 2.4 */ public static Object removeSystemDefault(final RenderingHints.Key key) { final boolean changed; final Object old; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); old = GLOBAL.remove(key); } if (changed || old != null) { GeoTools.fireConfigurationChanged(); } return old; }
/** * Returns the hint {@linkplain GeoTools#getDefaultHints default value} * for the specified key. * * @param key The hints key. * @return The value for the specified key, or {@code null} * if the key did not have a mapping. * * @since 2.4 */ public static Object getSystemDefault(final RenderingHints.Key key) { final boolean changed; final Object value; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); value = GLOBAL.get(key); } if (changed) { GeoTools.fireConfigurationChanged(); } return value; }
/** * Returns a copy of the system hints. This is for * {@link GeoTools#getDefaultHints} implementation only. */ static Hints getDefaults(final boolean strict) { final boolean changed; final Hints hints; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); if (strict) { hints = new StrictHints(GLOBAL); } else { hints = new Hints(GLOBAL); } } if (changed) { GeoTools.fireConfigurationChanged(); } return hints; }
/** * Returns a copy of the system hints. This is for * {@link GeoTools#getDefaultHints} implementation only. */ static Hints getDefaults(final boolean strict) { final boolean changed; final Hints hints; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); if (strict) { hints = new StrictHints(GLOBAL); } else { hints = new Hints(GLOBAL); } } if (changed) { GeoTools.fireConfigurationChanged(); } return hints; }
/** * Adds a hint value to the set of {@linkplain GeoTools#getDefaultHints default hints}. * Default hints can be added by call to this {@code putDefaultHint} method, to the * {@link GeoTools#init} method or by {@linkplain System#getProperties system properties} * with keys defined by the {@link String} constants in the {@link GeoTools} class. * * @param key The hint key. * @param value The hint value. * @return The previous value of the specified key, or {@code null} if none. * @throws IllegalArgumentException If {@link Hints.Key#isCompatibleValue()} * returns {@code false} for the specified value. * * @since 2.4 */ public static Object putSystemDefault(final RenderingHints.Key key, final Object value) { final boolean changed; final Object old; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); old = GLOBAL.put(key, value); } if (changed || !Utilities.equals(value, old)) { GeoTools.fireConfigurationChanged(); } return old; }
/** * Adds a hint value to the set of {@linkplain GeoTools#getDefaultHints default hints}. * Default hints can be added by call to this {@code putDefaultHint} method, to the * {@link GeoTools#init} method or by {@linkplain System#getProperties system properties} * with keys defined by the {@link String} constants in the {@link GeoTools} class. * * @param key The hint key. * @param value The hint value. * @return The previous value of the specified key, or {@code null} if none. * @throws IllegalArgumentException If {@link Hints.Key#isCompatibleValue()} * returns {@code false} for the specified value. * * @since 2.4 */ public static Object putSystemDefault(final RenderingHints.Key key, final Object value) { final boolean changed; final Object old; synchronized (GLOBAL) { changed = ensureSystemDefaultLoaded(); old = GLOBAL.put(key, value); } if (changed || !Utilities.equals(value, old)) { GeoTools.fireConfigurationChanged(); } return old; }