Package org.pentaho.reporting.engine.classic.core.style.css.namespaces

Examples of org.pentaho.reporting.engine.classic.core.style.css.namespaces.NamespaceCollection


    }
  }

  private String convertSelectorText(final ElementStyleRule rule)
  {
    final NamespaceCollection nc = StyleSheetParserUtil.getInstance().getNamespaceCollection();
    final StringBuilder b = new StringBuilder();
    for (int i = 0; i < rule.getSelectorCount(); i += 1)
    {
      if (i != 0)
      {
View Full Code Here


    protected void handleChange(final DocumentEvent e)
    {
      try
      {
        final NamespaceCollection nc = StyleSheetParserUtil.getInstance().getNamespaceCollection();
        final String selectorText = textField.getText();
        final SelectorList list = StyleSheetParserUtil.getInstance().parseSelector(nc, selectorText);
        styleRule.clearSelectors();
        textField.setBackground(color);
        for (int i = 0; i < list.getLength(); i++)
View Full Code Here

  protected void doneParsing() throws SAXException
  {
    super.doneParsing();
    try
    {
      final NamespaceCollection namespaceCollection = StyleSheetParserUtil.getInstance().getNamespaceCollection();
      final SelectorList selectorList = StyleSheetParserUtil.getInstance().parseSelector(namespaceCollection, getResult());
      for (int i = 0; i < selectorList.getLength(); i+= 1)
      {
        selector.add((CSSSelector) selectorList.item(i));
      }
View Full Code Here

    {
      return;
    }

    writer.writeTag(BundleNamespaces.STYLE, "rule", XmlWriter.OPEN);
    final NamespaceCollection collection = StyleSheetParserUtil.getInstance().getNamespaceCollection();
    for (int i = 0; i < styleRule.getSelectorCount(); i += 1)
    {
      writer.writeTag(BundleNamespaces.STYLE, "selector", XmlWriter.OPEN);
      writer.writeTextNormalized(styleRule.getSelector(i).print(collection), false);
      writer.writeCloseTag();
View Full Code Here

    ClassicEngineBoot.getInstance().start();
  }

  public void testParsing() throws Exception
  {
    final NamespaceCollection namespaceCollection = StyleSheetParserUtil.getInstance().getNamespaceCollection();
    final SelectorList selectorList = StyleSheetParserUtil.getInstance().parseSelector(namespaceCollection, "h1.test[x-lang=\"fr'\\\"\"]");
    for (int i = 0; i < selectorList.getLength(); i+= 1)
    {
      CSSSelector item = (CSSSelector) selectorList.item(i);
      System.out.println (item.print(namespaceCollection));
View Full Code Here

    }
  }

  public void testParsingClass() throws Exception
  {
    final NamespaceCollection namespaceCollection = StyleSheetParserUtil.getInstance().getNamespaceCollection();
    final SelectorList selectorList = StyleSheetParserUtil.getInstance().parseSelector(namespaceCollection, ".\\aa  test");
    for (int i = 0; i < selectorList.getLength(); i+= 1)
    {
      CSSSelector item = (CSSSelector) selectorList.item(i);
      System.out.println (item.print(namespaceCollection));
View Full Code Here

      return new SimpleStyleResolver(designTime);
    }
    else
    {
      final CSSStyleResolver resolver = new CSSStyleResolver(designTime);
      final NamespaceCollection namespaceCollection = StyleSheetParserUtil.getInstance().getNamespaceCollection();
      final DefaultDocumentContext documentContext =
          new DefaultDocumentContext(namespaceCollection, resourceManager, contentBase, null, styleDefinition);
      resolver.initialize(documentContext);
      return resolver;
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.style.css.namespaces.NamespaceCollection

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.