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:
Serializable
,Locatable
Implementation of CSSStyleRule.
- Author:
- Ronald Brill
- See Also:
-
Constructor Summary
ConstructorDescriptionCSSStyleRuleImpl
(CSSStyleSheetImpl parentStyleSheet, AbstractCSSRuleImpl parentRule, SelectorList selectors) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getCssText.getStyle()
int
hashCode()
void
setCssText
(String cssText) Sets the css text.void
setSelectors
(SelectorList selectors) Updates the selectors.void
setSelectorText
(String selectorText) Sets the selector text.void
setStyle
(CSSStyleDeclarationImpl style) Replaces the style.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
-
Constructor Details
-
CSSStyleRuleImpl
public CSSStyleRuleImpl(CSSStyleSheetImpl parentStyleSheet, AbstractCSSRuleImpl parentRule, SelectorList selectors) Ctor.- Parameters:
parentStyleSheet
- the parent style sheetparentRule
- the parent ruleselectors
- the selectors
-
-
Method Details
-
getSelectors
- Returns:
- all selectors
-
setSelectors
Updates the selectors.- Parameters:
selectors
- the new selectors
-
getCssText
getCssText.
- Specified by:
getCssText
in classAbstractCSSRuleImpl
- Returns:
- the current css text
-
setCssText
Sets the css text.- Specified by:
setCssText
in classAbstractCSSRuleImpl
- Parameters:
cssText
- the new css text- Throws:
DOMException
-
getSelectorText
- Returns:
- the selector text
-
setSelectorText
Sets the selector text.- Parameters:
selectorText
- the new selector text- Throws:
DOMException
- in clase of error
-
getStyle
- Returns:
- the style
-
setStyle
Replaces the style.- Parameters:
style
- the new style
-
toString
-
equals
Description copied from class:AbstractCSSRuleImpl
- Overrides:
equals
in classAbstractCSSRuleImpl
-
hashCode
public int hashCode()Description copied from class:AbstractCSSRuleImpl
- Overrides:
hashCode
in classAbstractCSSRuleImpl
-