public class StyleReference extends 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.
|
Map |
getCascadedPropertiesMap(Element e)
Returns a Map keyed by CSS property names (e.g.
|
CascadedStyle |
getCascadedStyle(Element e,
boolean restyle)
Gets the CascadedStyle for an element.
|
List |
getFontFaceRules() |
PageInfo |
getPageStyle(String pageName,
String pseudoPage) |
CascadedStyle |
getPseudoElementStyle(Node node,
String pseudoElement)
Gets the pseudoElementStyle attribute of the StyleReference object
|
boolean |
isHoverStyled(Element e)
Description of the Method
|
void |
removeStyle(Element e) |
void |
setDocumentContext(SharedContext context,
NamespaceHandler nsh,
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, Document doc, UserInterface ui)
context
- The new documentContext valuensh
- The new documentContext valuedoc
- The new documentContext valueui
- public boolean isHoverStyled(Element e)
e
- PARAMpublic Map getCascadedPropertiesMap(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(Node node, String pseudoElement)
node
- PARAMpseudoElement
- PARAMpublic CascadedStyle getCascadedStyle(Element e, boolean restyle)
e
- The elementrestyle
- public void flushStyleSheets()
public void flushAllStyleSheets()
public void removeStyle(Element e)
public List getFontFaceRules()
public void setUserAgentCallback(UserAgentCallback userAgentCallback)
public void setSupportCMYKColors(boolean b)
Copyright © 2018. All rights reserved.