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
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.booleangetCssRules.booleangetDisabled.getHref()getHref.getMedia()getMedia.getOwnerNode.getOwnerRule.getRuleIndex.getTitle()getTitle.inthashCode()voidinsertRule(String rule, int index) inserts a new rule.voidClean the index.voidsetCssRules(CSSRuleListImpl rules) setCssRules.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) setOwnerRule.voidSet the CSSStyleSheetRuleIndex.voidSet 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.
-