Package org.htmlunit.cssparser.dom
Class CSSStyleSheetImpl
java.lang.Object
org.htmlunit.cssparser.dom.CSSStyleSheetImpl
- All Implemented Interfaces:
Serializable
Implementation of CSSStyleSheet.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
CSSStyleSheetRuleIndex.(package private) static final class
static final class
SelectorEntry. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CSSRuleListImpl
private boolean
private String
private MediaListImpl
private Node
private AbstractCSSRuleImpl
private String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteRule
(int index) delete the rule at the given pos.boolean
boolean
getHref()
getMedia()
getTitle()
int
hashCode()
void
insertRule
(String rule, int index) inserts a new rule.private void
void
Clean the index.void
setCssRules
(CSSRuleListImpl rules) 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) void
Set the CSSStyleSheetRuleIndex.void
Set the title.toString()
private void
-
Field Details
-
disabled_
private boolean disabled_ -
ownerNode_
-
href_
-
title_
-
media_
-
ownerRule_
-
cssRules_
-
index_
-
-
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
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
- Parameters:
ownerRule
- the new ownerRule
-
setCssRules
- Parameters:
rules
- the new rules
-
toString
-
equals
-
hashCode
public int hashCode() -
writeObject
- Throws:
IOException
-
readObject
- Throws:
IOException
ClassNotFoundException
-
getRuleIndex
- Returns:
- the CSSStyleSheetRuleIndex
-
setRuleIndex
Set the CSSStyleSheetRuleIndex.- Parameters:
index
- the new index
-
resetRuleIndex
public void resetRuleIndex()Clean the index.
-