com.steadystate.css.dom

Class CSSStyleRuleImpl

Implemented Interfaces:
CSSRule, CSSStyleRule, Serializable

public class CSSStyleRuleImpl
extends java.lang.Object
implements CSSStyleRule, Serializable

Version:
$Release$
Author:
David Schweinsberg

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

CSSStyleRuleImpl(CSSStyleSheetImpl parentStyleSheet, CSSRule parentRule, SelectorList selectors)

Method Summary

String
getCssText()
The parsable textual representation of the rule.
CSSRule
getParentRule()
If this rule is contained inside another rule (e.g.
CSSStyleSheet
getParentStyleSheet()
The style sheet that contains this rule.
String
getSelectorText()
CSSStyleDeclaration
getStyle()
short
getType()
The type of the rule, as defined above.
void
setCssText(String cssText)
void
setSelectorText(String selectorText)
void
setStyle(CSSStyleDeclarationImpl style)
String
toString()

Constructor Details

CSSStyleRuleImpl

public CSSStyleRuleImpl(CSSStyleSheetImpl parentStyleSheet,
                        CSSRule parentRule,
                        SelectorList selectors)

Method Details

getCssText

public String getCssText()
The parsable textual representation of the rule. This reflects the current state of the rule and not its initial value.
Specified by:
getCssText in interface CSSRule

getParentRule

public CSSRule getParentRule()
If this rule is contained inside another rule (e.g. a style rule inside an @media block), this is the containing rule. If this rule is not nested inside any other rules, this returns null.
Specified by:
getParentRule in interface CSSRule

getParentStyleSheet

public CSSStyleSheet getParentStyleSheet()
The style sheet that contains this rule.
Specified by:
getParentStyleSheet in interface CSSRule

getSelectorText

public String getSelectorText()
Specified by:
getSelectorText in interface CSSStyleRule

getStyle

public CSSStyleDeclaration getStyle()
Specified by:
getStyle in interface CSSStyleRule

getType

public short getType()
The type of the rule, as defined above. The expectation is that binding-specific casting methods can be used to cast down from an instance of the CSSRule interface to the specific derived interface implied by the type.
Specified by:
getType in interface CSSRule

setCssText

public void setCssText(String cssText)
            throws DOMException
Specified by:
setCssText in interface CSSRule

setSelectorText

public void setSelectorText(String selectorText)
            throws DOMException
Specified by:
setSelectorText in interface CSSStyleRule

setStyle

public void setStyle(CSSStyleDeclarationImpl style)

toString

public String toString()