Package org.jfree.resourceloader

Examples of org.jfree.resourceloader.ResourceManager


    if (href == null)
    {
      throw new ParseException("Required attribute 'href' is missing.", getLocator());
    }
    final ResourceKey key = getRootHandler().getSource();
    final ResourceManager manager = getRootHandler().getResourceManager();
    try
    {
      final ResourceKey derivedKey = manager.deriveKey(key, href);
      final Resource resource = manager.create(derivedKey, null, ReportDataFactory.class);
      getRootHandler().getDependencyCollector().add(resource);
      dataFactory = (ReportDataFactory) resource.getResource();
    }
    catch (ResourceKeyCreationException e)
    {
View Full Code Here


    super.startParsing(attrs);
    String href = attrs.getValue(getUri(), "href");
    if (href != null)
    {
      final ResourceKey key = getRootHandler().getSource();
      final ResourceManager manager = getRootHandler().getResourceManager();
      try
      {
        final ResourceKey derivedKey = manager.deriveKey(key, href);
        final Resource resource = manager.create(derivedKey, null,
                StyleSheet.class);
        getRootHandler().getDependencyCollector().add(resource);
        styleSheet = (StyleSheet) resource.getResource();
      }
      catch (ResourceKeyCreationException e)
View Full Code Here

    try
    {
      final byte[] bytes = styleText.getBytes("UTF-8");

      final ResourceKey baseKey = getRootHandler().getSource();
      final ResourceManager resourceManager = getRootHandler().getResourceManager();
      final ResourceKey rawKey = resourceManager.createKey(bytes);

      final Resource resource = resourceManager.create
              (rawKey, baseKey, StyleSheet.class);
      this.styleSheet = (StyleSheet) resource.getResource();
    }
    catch (Exception e)
    {
View Full Code Here

  public ResourceManager getResourceManager()
  {
    final Object o = getMetaAttribute(RESOURCE_MANAGER_ATTR);
    if (o instanceof ResourceManager == false)
    {
      final ResourceManager value = new ResourceManager();
      value.registerDefaults();
      setMetaAttribute(RESOURCE_MANAGER_ATTR, value);
      return value;
    }
    return (ResourceManager) o;
  }
View Full Code Here

  public ResourceManager getResourceManager()
  {
    if (resourceManager == null)
    {
      resourceManager = new ResourceManager();
      resourceManager.registerDefaults();
    }
    return resourceManager;
  }
View Full Code Here

    if (href == null)
    {
      throw new ParseException("Required attribute 'href' is missing.", getLocator());
    }
    final ResourceKey key = getRootHandler().getSource();
    final ResourceManager manager = getRootHandler().getResourceManager();
    try
    {
      final ResourceKey derivedKey = manager.deriveKey(key, href);
      final Resource resource = manager.create(derivedKey, null, ReportDataFactory.class);
      getRootHandler().getDependencyCollector().add(resource);
      dataFactory = (ReportDataFactory) resource.getResource();
    }
    catch (ResourceKeyCreationException e)
    {
View Full Code Here

    super.startParsing(attrs);
    final String href = attrs.getValue(getUri(), "href");
    if (href != null)
    {
      final ResourceKey key = getRootHandler().getSource();
      final ResourceManager manager = getRootHandler().getResourceManager();
      try
      {
        final ResourceKey derivedKey = manager.deriveKey(key, href);
        final Resource resource = manager.create(derivedKey, null,
                StyleSheet.class);
        getRootHandler().getDependencyCollector().add(resource);
        styleSheet = (StyleSheet) resource.getResource();
      }
      catch (ResourceKeyCreationException e)
View Full Code Here

    try
    {
      final byte[] bytes = styleText.getBytes("UTF-8");

      final ResourceKey baseKey = getRootHandler().getSource();
      final ResourceManager resourceManager = getRootHandler().getResourceManager();
      final ResourceKey rawKey = resourceManager.createKey(bytes);

      final Resource resource = resourceManager.create
              (rawKey, baseKey, StyleSheet.class);
      this.styleSheet = (StyleSheet) resource.getResource();
    }
    catch (Exception e)
    {
View Full Code Here

  public static ResourceManager getResourceManager(final DocumentContext context)
  {
    final Object o = context.getMetaAttribute(DocumentContext.RESOURCE_MANAGER_ATTR);
    if (o instanceof ResourceManager == false)
    {
      final ResourceManager value = new ResourceManager();
      value.registerDefaults();
      context.setMetaAttribute(DocumentContext.RESOURCE_MANAGER_ATTR, value);
      return value;
    }
    return (ResourceManager) o;
  }
View Full Code Here

    return instance;
  }

  private EncodingRegistry()
  {
    this.manager = new ResourceManager();
    this.manager.registerFactoryCache();
    this.manager.registerDataCache();
    this.manager.registerDefaultLoaders();
    this.manager.registerFactory(new EncodingFactory());
    this.manager.registerFactory(new PropertiesResourceFactory());
View Full Code Here

TOP

Related Classes of org.jfree.resourceloader.ResourceManager

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.