Package org.jfree.resourceloader

Examples of org.jfree.resourceloader.ResourceKey


        }



        final ResourceKey baseKey =

            DocumentContextUtility.getBaseResource(process.getDocumentContext());

        final ResourceManager resourceManager =
View Full Code Here


          }



          final ResourceKey baseKey =

              DocumentContextUtility.getBaseResource(process.getDocumentContext());

          final ResourceManager resourceManager =
View Full Code Here

        }



        final ResourceKey baseKey =

            DocumentContextUtility.getBaseResource(process.getDocumentContext());

        final ResourceManager resourceManager =
View Full Code Here

      final String prefix = (String) metaNode.getMetaAttribute("prefix");
      final String classAttr = (String) metaNode.getMetaAttribute(
              "class-attribute");
      final String styleAttr = (String) metaNode.getMetaAttribute(
              "style-attribute");
      final ResourceKey styleSheetLocation =
              (ResourceKey) metaNode.getMetaAttribute("default-stylesheet");
      namespaceCollection.addDefinition(new DefaultNamespaceDefinition
              (uri, styleSheetLocation, classAttr, styleAttr, prefix));
    }
  }
View Full Code Here

  public ResourceKey createKey(Object value, Map factoryKeys)
      throws ResourceKeyCreationException
  {
    if (value instanceof File)
    {
      return new ResourceKey(FileResourceLoader.class.getName(), value, factoryKeys);
    }

    if (value instanceof String)
    {
      File f = new File(String.valueOf(value));
      if (f.exists() && f.isFile())
      {
        return new ResourceKey(FileResourceLoader.class.getName(), f, factoryKeys);
      }
    }

    return null;
  }
View Full Code Here

    }
    else
    {
      map = parent.getFactoryParameters();
    }
    return new ResourceKey(parent.getSchema(), target, map);
  }
View Full Code Here

      final String styleAttr = config.getConfigProperty(nsPrefix + "StyleAttr");
      final String prefixAttr = config.getConfigProperty(nsPrefix + "Prefix");
      final String defaultStyle = config.getConfigProperty(
          nsPrefix + "Default-Style");

      ResourceKey styleResourceKey = null;
      if (resourceManager != null)
      {
        try
        {
          if (defaultStyle != null)
View Full Code Here

                                              final Class[] type)
          throws FunctionEvaluationException
  {
    // ok, this is going to be expensive. Kids, you dont wanna try this at home ...
    final ResourceManager manager = process.getResourceManager();
    final ResourceKey baseKey = DocumentContextUtility.getBaseResource
            (process.getDocumentContext());
    try
    {
      final ResourceKey key;
      if (value instanceof ResourceKey)
      {
        key = (ResourceKey) value;
      }
      else if (baseKey == null)
View Full Code Here

  public static ResourceKey createURI(String uri, LayoutProcess layoutProcess)
  {
    try
    {
      final DocumentContext context = layoutProcess.getDocumentContext();
      final ResourceKey base = DocumentContextUtility.getBaseResource(context);
      final ResourceManager resourceManager =
              layoutProcess.getResourceManager();

      if (base != null)
      {
View Full Code Here

      final String styleText = (String) styleValue;
      try
      {
        final LayoutProcess layoutProcess = getLayoutProcess();
        final byte[] bytes = styleText.getBytes("UTF-8");
        final ResourceKey baseKey =
                DocumentContextUtility.getBaseResource
                        (layoutProcess.getDocumentContext());
        final ResourceManager manager = layoutProcess.getResourceManager();
        final ResourceKey key = manager.createKey(bytes);
        final Resource resource = manager.create(key, baseKey, StyleRule.class);

        final CSSDeclarationRule rule =
                (CSSDeclarationRule) resource.getResource();
        if (rule != null)
View Full Code Here

TOP

Related Classes of org.jfree.resourceloader.ResourceKey

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.