public class StyleReference
extends java.lang.Object
Constructor and Description |
---|
StyleReference(UserAgentCallback userAgent)
Default constructor for initializing members.
|
Modifier and Type | Method and Description |
---|---|
void |
flushAllStyleSheets() |
void |
flushStyleSheets()
Flushes any stylesheet associated with this stylereference (based on the user agent callback) that are in cache.
|
java.util.Map |
getCascadedPropertiesMap(org.w3c.dom.Element e)
Returns a Map keyed by CSS property names (e.g.
|
CascadedStyle |
getCascadedStyle(org.w3c.dom.Element e,
boolean restyle)
Gets the CascadedStyle for an element.
|
java.util.List |
getFontFaceRules() |
PageInfo |
getPageStyle(java.lang.String pageName,
java.lang.String pseudoPage) |
CascadedStyle |
getPseudoElementStyle(org.w3c.dom.Node node,
java.lang.String pseudoElement)
Gets the pseudoElementStyle attribute of the StyleReference object
|
boolean |
isHoverStyled(org.w3c.dom.Element e)
Description of the Method
|
void |
removeStyle(org.w3c.dom.Element e) |
void |
setDocumentContext(SharedContext context,
NamespaceHandler nsh,
org.w3c.dom.Document doc,
UserInterface ui)
Sets the documentContext attribute of the StyleReference object
|
void |
setSupportCMYKColors(boolean b) |
void |
setUserAgentCallback(UserAgentCallback userAgentCallback) |
public StyleReference(UserAgentCallback userAgent)
userAgent
- PARAMpublic void setDocumentContext(SharedContext context, NamespaceHandler nsh, org.w3c.dom.Document doc, UserInterface ui)
context
- The new documentContext valuensh
- The new documentContext valuedoc
- The new documentContext valueui
- public boolean isHoverStyled(org.w3c.dom.Element e)
e
- PARAMpublic java.util.Map getCascadedPropertiesMap(org.w3c.dom.Element e)
org.xhtmlrenderer.swing.BasicPanel#setDocument(Document, java.net.URL)
for an example of how to establish a StyleReference and associate to a
Document.e
- The DOM Element for which to find propertiespublic CascadedStyle getPseudoElementStyle(org.w3c.dom.Node node, java.lang.String pseudoElement)
node
- PARAMpseudoElement
- PARAMpublic CascadedStyle getCascadedStyle(org.w3c.dom.Element e, boolean restyle)
e
- The elementrestyle
- public PageInfo getPageStyle(java.lang.String pageName, java.lang.String pseudoPage)
public void flushStyleSheets()
public void flushAllStyleSheets()
public void removeStyle(org.w3c.dom.Element e)
public java.util.List getFontFaceRules()
public void setUserAgentCallback(UserAgentCallback userAgentCallback)
public void setSupportCMYKColors(boolean b)