Class CSSMediaRuleImpl
java.lang.Object
org.htmlunit.cssparser.parser.AbstractLocatable
org.htmlunit.cssparser.dom.AbstractCSSRuleImpl
org.htmlunit.cssparser.dom.CSSMediaRuleImpl
- All Implemented Interfaces:
Serializable, Locatable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCSSMediaRuleImpl(CSSStyleSheetImpl parentStyleSheet, AbstractCSSRuleImpl parentRule, MediaListImpl media) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteRule(int index) Removes a rule at the given index.booleaninthashCode()voidinsertRule(String rule, int index) Insert a new rule at the given index.private voidvoidsetCssText(String cssText) Sets the css text.voidsetRuleList(CSSRuleListImpl rules) Replaces the rule list.toString()private voidMethods inherited from class AbstractCSSRuleImpl
getParentRule, getParentStyleSheet, setParentRule, setParentStyleSheetMethods inherited from class AbstractLocatable
getLocator, setLocator
-
Field Details
-
mediaList_
-
cssRules_
-
-
Constructor Details
-
CSSMediaRuleImpl
public CSSMediaRuleImpl(CSSStyleSheetImpl parentStyleSheet, AbstractCSSRuleImpl parentRule, MediaListImpl media) Ctor.- Parameters:
parentStyleSheet- the parent style sheetparentRule- the parent rulemedia- the media
-
-
Method Details
-
getCssText
- Specified by:
getCssTextin classAbstractCSSRuleImpl- Returns:
- the current css text
-
setCssText
Sets the css text.- Specified by:
setCssTextin classAbstractCSSRuleImpl- Parameters:
cssText- the new css text- Throws:
DOMException
-
getMediaList
- Returns:
- the media list
-
getCssRules
- Returns:
- the css rules
-
insertRule
Insert a new rule at the given index.- Parameters:
rule- the rule to be insertedindex- the insert pos- Throws:
DOMException- in case of error
-
deleteRule
Removes a rule at the given index.- Parameters:
index- the insert pos- Throws:
DOMException- in case of error
-
setRuleList
Replaces the rule list.- Parameters:
rules- the new rule list
-
toString
-
equals
- Overrides:
equalsin classAbstractCSSRuleImpl
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractCSSRuleImpl
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOExceptionClassNotFoundException
-