Package org.htmlunit.cssparser.dom
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
Modifier and TypeClassDescriptionstatic class
CSSStyleSheetRuleIndex.static final class
SelectorEntry. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteRule
(int index) delete the rule at the given pos.boolean
getCssRules.boolean
getDisabled.getHref()
getHref.getMedia()
getMedia.getOwnerNode.getOwnerRule.getRuleIndex.getTitle()
getTitle.int
hashCode()
void
insertRule
(String rule, int index) inserts a new rule.void
Clean the index.void
setCssRules
(CSSRuleListImpl rules) setCssRules.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.void
Set the href.void
setMediaText
(String mediaText) Set the media text.void
setOwnerNode
(Node ownerNode) Set the owner node.void
setOwnerRule
(AbstractCSSRuleImpl ownerRule) setOwnerRule.void
Set the CSSStyleSheetRuleIndex.void
Set the title.toString()
-
Constructor Details
-
CSSStyleSheetImpl
public CSSStyleSheetImpl()Ctor.
-
-
Method Details
-
getDisabled
public boolean getDisabled()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
getOwnerNode.
- Returns:
- the owner node
-
getHref
getHref.
- Returns:
- the href
-
getTitle
getTitle.
- Returns:
- the title
-
getMedia
getMedia.
- Returns:
- the media list
-
getOwnerRule
getOwnerRule.
- Returns:
- the owner rule
-
getCssRules
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
Set the owner node.- Parameters:
ownerNode
- the new node
-
setHref
Set the href.- Parameters:
href
- the new href
-
setTitle
Set the title.- Parameters:
title
- the new title
-
setMediaText
Set the media text.- Parameters:
mediaText
- the new media text
-
setOwnerRule
setOwnerRule.
- Parameters:
ownerRule
- the new ownerRule
-
setCssRules
setCssRules.
- Parameters:
rules
- the new rules
-
toString
-
equals
-
hashCode
public int hashCode() -
getRuleIndex
getRuleIndex.
- Returns:
- the CSSStyleSheetRuleIndex
-
setRuleIndex
Set the CSSStyleSheetRuleIndex.- Parameters:
index
- the new index
-
resetRuleIndex
public void resetRuleIndex()Clean the index.
-