1 18 package org.apache.batik.css.parser; 19 20 import org.w3c.css.sac.Selector; 21 import org.w3c.css.sac.SimpleSelector; 22 23 30 public class DefaultChildSelector extends AbstractDescendantSelector { 31 32 35 public DefaultChildSelector(Selector ancestor, SimpleSelector simple) { 36 super(ancestor, simple); 37 } 38 39 43 public short getSelectorType() { 44 return SAC_CHILD_SELECTOR; 45 } 46 47 50 public String toString() { 51 SimpleSelector s = getSimpleSelector(); 52 if (s.getSelectorType() == SAC_PSEUDO_ELEMENT_SELECTOR) { 53 return "" + getAncestorSelector() + s; 54 } 55 return getAncestorSelector() + " > " + s; 56 } 57 } 58 | Popular Tags |