Package org.pentaho.reporting.libraries.css.dom

Examples of org.pentaho.reporting.libraries.css.dom.DocumentContext


      {
        key = context;
        version = -1;
      }

      final DocumentContext documentContext;

      final StyleSheetHandler handler = new StyleSheetHandler();
      handler.init(StyleKeyRegistry.getRegistry(), manager, key, version, null);
      parser.setDocumentHandler(handler);
View Full Code Here


    this.resourceManager = layoutProcess.getResourceManager();

    final ArrayList pageRules = new ArrayList();
    final ArrayList counterRules = new ArrayList();
    final ArrayList styleRules = new ArrayList();
    final DocumentContext dc = this.layoutProcess;

    namespaces = dc.getNamespaces();
    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 = layoutProcess.getContextKey();
      final StyleSheet styleSheet = parseStyleSheet(rawKey, baseKey);
      if (styleSheet == null)
      {
        continue;
      }
//      Log.debug("Loaded stylesheet from " + rawKey + " for namespace " + nsDef.getURI());
      addStyleRules(styleSheet, styleRules);
      addPageRules(styleSheet, pageRules);
      addCounterRules(styleSheet, counterRules);
    }

    final StyleReference[] refs = dc.getStyleReferences();
    for (int i = 0; i < refs.length; i++)
    {
      final StyleReference ref = refs[i];
      if (ref.getType() == StyleReference.LINK)
      {
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.css.dom.DocumentContext

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.