Package org.jfree.resourceloader

Examples of org.jfree.resourceloader.ResourceKey


    if (value instanceof byte[] == false)
    {
      return null;
    }

    return new ResourceKey(RawResourceLoader.class.getName(), value, factoryKeys);
  }
View Full Code Here


    }

    final HashMap map = new HashMap();
    map.putAll(parent.getFactoryParameters());
    map.putAll(factoryKeys);
    return new ResourceKey(parent.getSchema(), parent.getIdentifier(), map);
  }
View Full Code Here

    final String[] nsUri = namespaces.getNamespaces();
    for (int i = 0; i < nsUri.length; i++)
    {
      final String uri = nsUri[i];
      final NamespaceDefinition nsDef = namespaces.getDefinition(uri);
      final ResourceKey rawKey = nsDef.getDefaultStyleSheetLocation();
      if (rawKey == null)
      {
        // there is no default stylesheet for that namespace.
        continue;
      }

      final ResourceKey baseKey =
          DocumentContextUtility.getBaseResource
              (layoutProcess.getDocumentContext());
      final StyleSheet styleSheet = parseStyleSheet(rawKey, baseKey);
      if (styleSheet == null)
      {
View Full Code Here

    // do some external parsing
    // (Same as the <link> element of HTML)
    try
    {
      final Object href = node.getMetaAttribute("href");
      final ResourceKey baseKey =
          DocumentContextUtility.getBaseResource
              (layoutProcess.getDocumentContext());

      final ResourceKey derivedKey;
      if (baseKey == null)
      {
        derivedKey = resourceManager.createKey(href);
      }
      else
View Full Code Here

    final String styleText = String.valueOf(style);
    try
    {
      final byte[] bytes = styleText.getBytes("UTF-8");
      final ResourceKey rawKey = resourceManager.createKey(bytes);

      final ResourceKey baseKey =
          DocumentContextUtility.getBaseResource
              (layoutProcess.getDocumentContext());
      final StyleSheet styleSheet = parseStyleSheet(rawKey, baseKey);
      if (styleSheet == null)
      {
View Full Code Here

          throws ResourceCreationException, ResourceLoadingException
  {
    try
    {
      final Parser parser = CSSParserFactory.getInstance().createCSSParser();
      final ResourceKey key;
      final long version;
      if (context == null)
      {
        key = data.getKey();
        version = data.getVersion(manager);
View Full Code Here

  {
    try
    {
      final Parser parser = CSSParserFactory.getInstance().createCSSParser();

      final ResourceKey key;
      final long version;
      if (context == null)
      {
        key = data.getKey();
        version = data.getVersion(manager);
View Full Code Here

  }

  private CSSPageAreaRule parsePageRule(final PageAreaType areaType, final String atRule)
  {
    final ResourceManager manager = getResourceManager();
    final ResourceKey source = this.source;
    final CSSPageAreaRule areaRule =
        new CSSPageAreaRule(styleSheet, styleRule, areaType);
    final int firstBrace = atRule.indexOf('{');
    final int lastBrace = atRule.indexOf('}');
    if (firstBrace < 0 || lastBrace < firstBrace)
View Full Code Here

      return;
    }
    try
    {
      CSSParserContext.getContext().setDefaultNamespace(defaultNamespaceURI);
      final ResourceKey key;
      if (source == null)
      {
        key = manager.createKey(uri);
      }
      else
View Full Code Here

    {
      return;
    }
    final BackgroundSpecification backgroundSpecification =
            layoutContext.getBackgroundSpecification();
    final ResourceKey baseURL = DocumentContextUtility.getBaseResource
        (process.getDocumentContext());

    for (int i = 0; i < length; i++)
    {
      final CSSValue item = list.getItem(i);

      if (CSSValueResolverUtility.isURI(item))
      {
        final CSSStringValue svalue = (CSSStringValue) item;
        try
        {
          final ResourceKey sourceURL = process.getResourceManager().deriveKey
                  (baseURL, svalue.getValue());
          // todo: We have to rethink the image feeding ..
//          backgroundSpecification.setBackgroundImage
//                  (i, new URLLayoutImageData(sourceURL, svalue.getValue()));
        }
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.