Class CSSStyleSheetImpl
java.lang.Object
org.htmlunit.cssparser.dom.CSSStyleSheetImpl
- All Implemented Interfaces:
Serializable
Implementation of CSSStyleSheet.
- Author:
- Ronald Brill
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCSSStyleSheetRuleIndex.static final classSelectorEntry. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteRule(int index) delete the rule at the given pos.booleanbooleangetHref()getMedia()getTitle()inthashCode()voidinsertRule(String rule, int index) inserts a new rule.voidClean the index.voidsetCssRules(CSSRuleListImpl rules) voidsetDisabled(boolean disabled) We will need to respond more fully if a stylesheet is disabled, probably by generating an event for the main application.voidSet the href.voidsetMediaText(String mediaText) Set the media text.voidsetOwnerNode(Node ownerNode) Set the owner node.voidsetOwnerRule(AbstractCSSRuleImpl ownerRule) voidSet the CSSStyleSheetRuleIndex.voidSet the title.toString()
-
Constructor Details
-
CSSStyleSheetImpl
public CSSStyleSheetImpl()Ctor.
-
-
Method Details
-
getDisabled
public boolean getDisabled()- Returns:
- the disable state
-
setDisabled
public void setDisabled(boolean disabled) We will need to respond more fully if a stylesheet is disabled, probably by generating an event for the main application.- Parameters:
disabled- the new disabled
-
getOwnerNode
- Returns:
- the owner node
-
getHref
- Returns:
- the href
-
getTitle
- Returns:
- the title
-
getMedia
- Returns:
- the media list
-
getOwnerRule
- Returns:
- the owner rule
-
getCssRules
- Returns:
- the css rules
-
insertRule
inserts a new rule.- Parameters:
rule- the rule to insertindex- the insert pos- Throws:
DOMException- in case of error
-
deleteRule
delete the rule at the given pos.- Parameters:
index- the pos- Throws:
DOMException- in case of error
-
setOwnerNode
-
setHref
-
setTitle
-
setMediaText
Set the media text.- Parameters:
mediaText- the new media text
-
setOwnerRule
- Parameters:
ownerRule- the new ownerRule
-
setCssRules
- Parameters:
rules- the new rules
-
toString
-
equals
-
hashCode
-
getRuleIndex
- Returns:
- the CSSStyleSheetRuleIndex
-
setRuleIndex
Set the CSSStyleSheetRuleIndex.- Parameters:
index- the new index
-
resetRuleIndex
public void resetRuleIndex()Clean the index.
-