1 18 package org.apache.batik.css.engine.sac; 19 20 import java.util.Set ; 21 22 import org.apache.batik.css.engine.CSSStylableElement; 23 import org.w3c.dom.Element ; 24 25 32 public class CSSPseudoClassCondition extends AbstractAttributeCondition { 33 36 protected String namespaceURI; 37 38 41 public CSSPseudoClassCondition(String namespaceURI, String value) { 42 super(value); 43 this.namespaceURI = namespaceURI; 44 } 45 46 50 public boolean equals(Object obj) { 51 if (!super.equals(obj)) { 52 return false; 53 } 54 CSSPseudoClassCondition c = (CSSPseudoClassCondition)obj; 55 return c.namespaceURI.equals(namespaceURI); 56 } 57 58 62 public short getConditionType() { 63 return SAC_PSEUDO_CLASS_CONDITION; 64 } 65 66 70 public String getNamespaceURI() { 71 return namespaceURI; 72 } 73 74 78 public String getLocalName() { 79 return null; 80 } 81 82 86 public boolean getSpecified() { 87 return false; 88 } 89 90 93 public boolean match(Element e, String pseudoE) { 94 return (e instanceof CSSStylableElement) 95 ? ((CSSStylableElement)e).isPseudoInstanceOf(getValue()) 96 : false; 97 } 98 99 102 public void fillAttributeSet(Set attrSet) { 103 } 104 105 108 public String toString() { 109 return ":" + getValue(); 110 } 111 } 112 | Popular Tags |