Package org.jfree.util

Examples of org.jfree.util.Configuration


  }

  public Parser createCSSParser ()
          throws CSSParserInstantiationException
  {
    final Configuration config = LibLayoutBoot.getInstance().getGlobalConfig();
    final String parserClass =
            config.getConfigProperty("org.jfree.layouting.css.Parser");
    if (parserClass != null)
    {
      Parser p = (Parser) ObjectUtilities.loadAndInstantiate
            (parserClass, CSSParserFactory.class, Parser.class);
      if (p != null)
View Full Code Here


  }

  private HashMap loadModules(final String configPrefix)
  {
    final HashMap handlers = new HashMap();
    final Configuration config = LibLayoutBoot.getInstance().getGlobalConfig();
    Iterator sit = config.findPropertyKeys(configPrefix);
    int length = configPrefix.length();
    while (sit.hasNext())
    {
      final String configkey = (String) sit.next();
      final String name = configkey.substring(length).toLowerCase();
      final StyleKey key = registry.findKeyByName(name);
      if (key == null)
      {
        Log.warn("Invalid stylekey for resolver: " + name);
        continue;
      }

      final String c = config.getConfigProperty(configkey);
      ResolveHandler module = (ResolveHandler)
              ObjectUtilities.loadAndInstantiate(c, ResolverFactory.class, ResolveHandler.class);
      if (module != null)
      {
        //Log.info("Loaded resolver: " + name + " (" + module + ")");
View Full Code Here

    contentFunctions = new HashMap();
  }

  public void registerDefault ()
  {
    final Configuration config = LibLayoutBoot.getInstance().getGlobalConfig();
    final Iterator valueKeys = config.findPropertyKeys(VALUE_FUNCTIONS_KEY_RANGE);
    while (valueKeys.hasNext())
    {
      final String key = (String) valueKeys.next();
      final String value = config.getConfigProperty(key);
      final String name = key.substring(VALUE_FUNCTIONS_KEY_RANGE.length());
      final Object maybeFunction = ObjectUtilities.loadAndInstantiate
          (value, FunctionFactory.class, StyleValueFunction.class);
      if (maybeFunction instanceof StyleValueFunction)
      {
        styleFunctions.put (name.toLowerCase(), maybeFunction);
      }
    }

    final Iterator contentKeys = config.findPropertyKeys(CONTENT_FUNCTIONS_KEY_RANGE);
    while (contentKeys.hasNext())
    {
      final String key = (String) contentKeys.next();
      final String value = config.getConfigProperty(key);
      final String name = key.substring(CONTENT_FUNCTIONS_KEY_RANGE.length());
      final Object maybeFunction = ObjectUtilities.loadAndInstantiate
          (value, FunctionFactory.class, ContentFunction.class);
      if (maybeFunction instanceof ContentFunction)
      {
View Full Code Here

    registerFactoryCache();
  }

  public void registerDefaultFactories()
  {
    final Configuration config = LibLoaderBoot.getInstance().getGlobalConfig();
    final Iterator itType = config.findPropertyKeys(FACTORY_TYPE_PREFIX);
    while (itType.hasNext())
    {
      final String key = (String) itType.next();
      final String factoryClass = config.getConfigProperty(key);

      final Object maybeFactory = ObjectUtilities.loadAndInstantiate
          (factoryClass, ResourceManager.class, ResourceFactory.class);
      if (maybeFactory instanceof ResourceFactory == false)
      {
View Full Code Here

    }
  }

  public void registerDataCache()
  {
    final Configuration config = LibLoaderBoot.getInstance().getGlobalConfig();
    final String dataCacheProviderClass =
        config.getConfigProperty(DATA_CACHE_PROVIDER_KEY);
    if (dataCacheProviderClass == null)
    {
      return;
    }
    final Object maybeDataCacheProvider =
View Full Code Here

    }
  }

  public void registerFactoryCache()
  {
    final Configuration config = LibLoaderBoot.getInstance().getGlobalConfig();
    final String cacheProviderClass = config.getConfigProperty
        (FACTORY_CACHE_PROVIDER_KEY);
    if (cacheProviderClass == null)
    {
      return;
    }
View Full Code Here

    }
  }

  public void registerDefaultLoaders()
  {
    final Configuration config = LibLoaderBoot.getInstance().getGlobalConfig();
    final Iterator it = config.findPropertyKeys(LOADER_PREFIX);
    while (it.hasNext())
    {
      final String key = (String) it.next();
      final String value = config.getConfigProperty(key);
      final Object o = ObjectUtilities.loadAndInstantiate(value, ResourceManager.class, ResourceLoader.class);
      if (o != null)
      {
        final ResourceLoader loader = (ResourceLoader) o;
        //Log.debug("Registering loader for " + loader.getSchema());
View Full Code Here

    knownCounters = new HashMap();
  }

  public void registerDefaults ()
  {
    final Configuration config = LibLayoutBoot.getInstance().getGlobalConfig();
    final Iterator it = config.findPropertyKeys(PREFIX);
    while (it.hasNext())
    {
      final String key = (String) it.next();
      final String counterClass = config.getConfigProperty(key);
      if (counterClass == null)
      {
        continue;
      }
      final Object o = ObjectUtilities.loadAndInstantiate
View Full Code Here

    this.methods.put(method.getObjectClass(), method);
  }

  protected void registerMethods()
  {
    final Configuration config = JCommonSerializerBoot.getInstance().getGlobalConfig();
    Iterator sit = config.findPropertyKeys("org.jfree.serializer.handler.");

    while (sit.hasNext())
    {
      final String configkey = (String) sit.next();
      final String c = config.getConfigProperty(configkey);
      Object maybeModule = ObjectUtilities.loadAndInstantiate
          (c, SerializerHelper.class, SerializeMethod.class);
      if (maybeModule != null)
      {
        SerializeMethod module = (SerializeMethod) maybeModule;
View Full Code Here

        if (this.initSections.contains(modulePrefix)) {
            return;
        }
        this.initSections.add(modulePrefix);

        final Configuration config = this.booter.getGlobalConfig();
        final Iterator it = config.findPropertyKeys(modulePrefix);
        int count = 0;
        while (it.hasNext()) {
            final String key = (String) it.next();
            if (key.endsWith(".Module")) {
                final String moduleClass = config.getConfigProperty(key);
                if (moduleClass != null && moduleClass.length() > 0) {
                    addModule(moduleClass);
                    count++;
                }
            }
View Full Code Here

TOP

Related Classes of org.jfree.util.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.