Package org.htmlunit.cssparser.dom
Class CSSStyleRuleImpl
- java.lang.Object
-
- org.htmlunit.cssparser.parser.AbstractLocatable
-
- org.htmlunit.cssparser.dom.AbstractCSSRuleImpl
-
- org.htmlunit.cssparser.dom.CSSStyleRuleImpl
-
- All Implemented Interfaces:
java.io.Serializable
,Locatable
public class CSSStyleRuleImpl extends AbstractCSSRuleImpl
Implementation of CSSStyleRule.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private SelectorList
selectors_
private CSSStyleDeclarationImpl
style_
-
Constructor Summary
Constructors Constructor Description CSSStyleRuleImpl(CSSStyleSheetImpl parentStyleSheet, AbstractCSSRuleImpl parentRule, SelectorList selectors)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getCssText()
SelectorList
getSelectors()
java.lang.String
getSelectorText()
CSSStyleDeclarationImpl
getStyle()
int
hashCode()
void
setCssText(java.lang.String cssText)
Sets the css text.void
setSelectors(SelectorList selectors)
Updates the selectors.void
setSelectorText(java.lang.String selectorText)
Sets the selector text.void
setStyle(CSSStyleDeclarationImpl style)
Replaces the style.java.lang.String
toString()
-
Methods inherited from class org.htmlunit.cssparser.dom.AbstractCSSRuleImpl
getParentRule, getParentStyleSheet, setParentRule, setParentStyleSheet
-
Methods inherited from class org.htmlunit.cssparser.parser.AbstractLocatable
getLocator, setLocator
-
-
-
-
Field Detail
-
selectors_
private SelectorList selectors_
-
style_
private CSSStyleDeclarationImpl style_
-
-
Constructor Detail
-
CSSStyleRuleImpl
public CSSStyleRuleImpl(CSSStyleSheetImpl parentStyleSheet, AbstractCSSRuleImpl parentRule, SelectorList selectors)
Ctor.- Parameters:
parentStyleSheet
- the parent style sheetparentRule
- the parent ruleselectors
- the selectors
-
-
Method Detail
-
getSelectors
public SelectorList getSelectors()
- Returns:
- all selectors
-
setSelectors
public void setSelectors(SelectorList selectors)
Updates the selectors.- Parameters:
selectors
- the new selectors
-
getCssText
public java.lang.String getCssText()
- Specified by:
getCssText
in classAbstractCSSRuleImpl
- Returns:
- the current css text
-
setCssText
public void setCssText(java.lang.String cssText) throws org.w3c.dom.DOMException
Sets the css text.- Specified by:
setCssText
in classAbstractCSSRuleImpl
- Parameters:
cssText
- the new css text- Throws:
org.w3c.dom.DOMException
-
getSelectorText
public java.lang.String getSelectorText()
- Returns:
- the selector text
-
setSelectorText
public void setSelectorText(java.lang.String selectorText) throws org.w3c.dom.DOMException
Sets the selector text.- Parameters:
selectorText
- the new selector text- Throws:
org.w3c.dom.DOMException
- in clase of error
-
getStyle
public CSSStyleDeclarationImpl getStyle()
- Returns:
- the style
-
setStyle
public void setStyle(CSSStyleDeclarationImpl style)
Replaces the style.- Parameters:
style
- the new style
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classAbstractCSSRuleImpl
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractCSSRuleImpl
-
-