Package jodd.csselly.selector

Examples of jodd.csselly.selector.PseudoClassSelector


    assertEquals(1, selectors.size());
    assertEquals("div:first-child", CSSelly.toString(selectors));

    CssSelector cssSelector = selectors.get(0);
    assertEquals(1, cssSelector.selectorsCount());
    PseudoClassSelector psc = (PseudoClassSelector) cssSelector.getSelector(0);
    assertEquals("first-child", psc.getPseudoClass().getPseudoClassName());
  }
View Full Code Here


    List<CssSelector> selectors = lexer.parse();

    assertEquals(1, selectors.size());
    CssSelector cssSelector = selectors.get(0);

    PseudoClassSelector pseudoClassSelector = (PseudoClassSelector) cssSelector.getSelector(0);

    assertEquals("image", pseudoClassSelector.getPseudoClass().getPseudoClassName());


    lexer = new CSSelly("foo::contains(xxx)");
    selectors = lexer.parse();
View Full Code Here

  }

  // ---------------------------------------------------------------- pseudo class

  public void addPseudoClassSelector(String pseudoClass) {
    selectors.add(new PseudoClassSelector(pseudoClass));
  }
View Full Code Here

            }
            out.append(']');
          }
          break;
        case PSEUDO_CLASS:
          PseudoClassSelector psc = (PseudoClassSelector) selector;
          out.append(':').append(psc.getPseudoClass().getPseudoClassName());
          break;
        case PSEUDO_FUNCTION:
          PseudoFunctionSelector pfns = (PseudoFunctionSelector) selector;
          out.append(':').append(pfns.getPseudoFunction().getPseudoFunctionName()).append('(');
          out.append(pfns.getExpression()).append(')');
View Full Code Here

TOP

Related Classes of jodd.csselly.selector.PseudoClassSelector

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.