fi.hut.tml.xsmiles.mlfc.css
Class XSmilesCSSStyleRule

java.lang.Object
  extended bycom.steadystate.css.dom.CSSStyleRuleImpl
      extended byfi.hut.tml.xsmiles.mlfc.css.XSmilesCSSStyleRule
All Implemented Interfaces:
org.w3c.dom.css.CSSRule, org.w3c.dom.css.CSSStyleRule, java.io.Serializable

public class XSmilesCSSStyleRule
extends com.steadystate.css.dom.CSSStyleRuleImpl
implements org.w3c.dom.css.CSSStyleRule

Implements a single style rule with specificity calculation This class extends SS CSS style rule, with the following addition: - Ability to parse the selector and count the specificity value

Author:
Mikko Honkala
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.steadystate.css.dom.CSSStyleRuleImpl
_parentRule, _parentStyleSheet, _selectors, _style
 
Fields inherited from interface org.w3c.dom.css.CSSRule
CHARSET_RULE, FONT_FACE_RULE, IMPORT_RULE, MEDIA_RULE, PAGE_RULE, STYLE_RULE, UNKNOWN_RULE
 
Constructor Summary
XSmilesCSSStyleRule(com.steadystate.css.dom.CSSStyleSheetImpl parentStyleSheet, org.w3c.dom.css.CSSRule parentRule, org.w3c.css.sac.SelectorList selectors)
           
 
Method Summary
 org.w3c.css.sac.SelectorList getSelectorList()
          Return the selectors for this rule
 long getSpecificity()
          Return the specificity for this rule
 boolean match(org.w3c.dom.Element elem, Selectors sel)
          check whether this style matches a certain element
 java.lang.String toString()
           
 
Methods inherited from class com.steadystate.css.dom.CSSStyleRuleImpl
getCssText, getParentRule, getParentStyleSheet, getSelectorText, getStyle, getType, setCssText, setSelectorText, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.css.CSSStyleRule
getSelectorText, getStyle, setSelectorText
 
Methods inherited from interface org.w3c.dom.css.CSSRule
getCssText, getParentRule, getParentStyleSheet, getType, setCssText
 

Constructor Detail

XSmilesCSSStyleRule

public XSmilesCSSStyleRule(com.steadystate.css.dom.CSSStyleSheetImpl parentStyleSheet,
                           org.w3c.dom.css.CSSRule parentRule,
                           org.w3c.css.sac.SelectorList selectors)
Method Detail

match

public boolean match(org.w3c.dom.Element elem,
                     Selectors sel)
check whether this style matches a certain element


getSelectorList

public org.w3c.css.sac.SelectorList getSelectorList()
Return the selectors for this rule


getSpecificity

public long getSpecificity()
Return the specificity for this rule


toString

public java.lang.String toString()


X-Smiles 1.2