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 classRule index helper for stylesheet selector lookups.static final classSelectorEntry structure holding a selector and its CSSStyleRuleImpl. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteRule(int index) Deletes the rule at the given pos.booleanReturns the CSS rules.booleanReturns the disabled state.getHref()Returns the href.getMedia()Returns the media list.Returns the owner node.Returns the owner rule.Returns the rule index.getTitle()Returns the title.inthashCode()voidinsertRule(String rule, int index) Inserts a new rule.voidCleans the index.voidsetCssRules(CSSRuleListImpl rules) Sets the CSS 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.voidSets the href.voidsetMediaText(String mediaText) Sets the media text.voidsetOwnerNode(Node ownerNode) Sets the owner node.voidsetOwnerRule(AbstractCSSRuleImpl ownerRule) Sets the owner rule.voidSets the CSSStyleSheetRuleIndex.voidSets the title.toString()
-
Constructor Details
-
CSSStyleSheetImpl
public CSSStyleSheetImpl()Ctor.
-
-
Method Details
-
getDisabled
public boolean getDisabled()Returns the disabled state.- Returns:
- the disabled 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 state
-
getOwnerNode
Returns the owner node.- Returns:
- the owner node
-
getHref
Returns the href.- Returns:
- the href
-
getTitle
Returns the title.- Returns:
- the title
-
getMedia
Returns the media list.- Returns:
- the media list
-
getOwnerRule
Returns the owner rule.- Returns:
- the owner rule
-
getCssRules
Returns the CSS rules.- 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
Deletes the rule at the given pos.- Parameters:
index- the pos- Throws:
DOMException- in case of error
-
setOwnerNode
Sets the owner node.- Parameters:
ownerNode- the new node
-
setHref
Sets the href.- Parameters:
href- the new href
-
setTitle
Sets the title.- Parameters:
title- the new title
-
setMediaText
Sets the media text.- Parameters:
mediaText- the new media text
-
setOwnerRule
Sets the owner rule.- Parameters:
ownerRule- the new ownerRule
-
setCssRules
Sets the CSS rules.- Parameters:
rules- the new rules
-
toString
-
equals
-
hashCode
public int hashCode() -
getRuleIndex
Returns the rule index.- Returns:
- the CSSStyleSheetRuleIndex
-
setRuleIndex
Sets the CSSStyleSheetRuleIndex.- Parameters:
index- the new index
-
resetRuleIndex
public void resetRuleIndex()Cleans the index.
-