org.geotools.factory.GeoTools.fireConfigurationChanged()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(188)

本文整理了Java中org.geotools.factory.GeoTools.fireConfigurationChanged()方法的一些代码示例,展示了GeoTools.fireConfigurationChanged()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeoTools.fireConfigurationChanged()方法的具体详情如下:
包路径:org.geotools.factory.GeoTools
类名称:GeoTools
方法名:fireConfigurationChanged

GeoTools.fireConfigurationChanged介绍

[英]Informs every listeners that system-wide configuration changed.
[中]通知每个侦听器系统范围的配置已更改。

代码示例

代码示例来源:origin: org.geotools/gt-metadata

/**
 * Forces the initial context for test cases, or as needed.
 *
 * @param applicationContext The initial context to use.
 *
 * @see #getInitialContext
 *
 * @since 2.4
 */
public static void init(final InitialContext applicationContext) {
  synchronized (GeoTools.class) {
    context = applicationContext;
  }
  fireConfigurationChanged();
}

代码示例来源:origin: org.geotools/gt-metadata

/**
 * Adds a class loader to be included in the list of class loaders that are used to locate
 * GeoTools plug-ins.
 * <p>
 * Client code that calls this method may also need to call {@link FactoryRegistry#scanForPlugins()}
 * on any existing registry to force it to clear its cache and use the added class loader to 
 * locate plugins.
 * </p>
 * 
 * @param classLoader The class loader.
 */
public static void addClassLoader(ClassLoader classLoader) {
  addedClassLoaders.add(classLoader);
  fireConfigurationChanged();
}

代码示例来源:origin: org.geotools/gt2-metadata

/**
 * 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();
}

代码示例来源:origin: org.geotools/gt-metadata

/**
 * 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();
}

代码示例来源:origin: org.geotools/gt-metadata

GeoTools.fireConfigurationChanged();

代码示例来源:origin: org.geotools/gt-metadata

/**
 * 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;
}

代码示例来源:origin: org.geotools/gt-metadata

/**
 * 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;
}

代码示例来源:origin: org.geotools/gt2-metadata

GeoTools.fireConfigurationChanged();

代码示例来源:origin: org.geotools/gt2-metadata

/**
 * 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;
}

代码示例来源:origin: org.geotools/gt2-metadata

/**
 * 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;
}

代码示例来源:origin: org.geotools/gt-metadata

/**
 * 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;
}

代码示例来源:origin: org.geotools/gt2-metadata

/**
 * 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;
}

代码示例来源:origin: org.geotools/gt-metadata

/**
 * 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;
}

代码示例来源:origin: org.geotools/gt2-metadata

/**
 * 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;
}

相关文章