java.lang.Object
org.openpdf.context.StyleReference
- Author:
- Torbjoern Gannholm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidFlushes any stylesheet associated with this style reference (based on the user agent callback) that are in cache.Returns a Map keyed by CSS property names (e.g.getCascadedStyle(@Nullable Element e, boolean restyle) Gets the CascadedStyle for an element.@NonNull PageInfogetPageStyle(@Nullable String pageName, String pseudoPage) @Nullable CascadedStylegetPseudoElementStyle(Node node, String pseudoElement) Gets the pseudoElementStyle attribute of the StyleReference objectbooleanvoidsetDocumentContext(SharedContext context, NamespaceHandler nsh, Document doc, UserInterface ui) Sets the documentContext attribute of the StyleReference objectvoidsetSupportCMYKColors(boolean b) voidsetUserAgentCallback(UserAgentCallback userAgentCallback)
-
Constructor Details
-
StyleReference
-
-
Method Details
-
isHoverStyled
-
getCascadedPropertiesMap
Returns a Map keyed by CSS property names (e.g. 'border-width'), and the assigned value as a SAC CSSValue instance. The properties should have been matched to the element when the Context was established for this StyleReference on the Document to which the Element belongs. SeeBasicPanel.setDocument(Document, String)for an example of how to establish a StyleReference and associate to a Document.- Parameters:
e- The DOM Element for which to find properties- Returns:
- Map of CSS property names to CSSValue instance assigned to it.
-
getPseudoElementStyle
Gets the pseudoElementStyle attribute of the StyleReference object -
getCascadedStyle
Gets the CascadedStyle for an element. This must then be converted in the current context to a CalculatedStyle (use getDerivedStyle) -
getPageStyle
-
flushStyleSheets
public void flushStyleSheets()Flushes any stylesheet associated with this style reference (based on the user agent callback) that are in cache. -
flushAllStyleSheets
public void flushAllStyleSheets() -
getFontFaceRules
-
setUserAgentCallback
-
setSupportCMYKColors
public void setSupportCMYKColors(boolean b)