Interface CSSResolver
- All Known Implementing Classes:
StyleAttrCSSResolver
public interface CSSResolver
Resolves CSS rules for a given tag.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a CssFilevoid
Add a piece of CSS code.void
Add a piece of CSS code.void
addCssFile
(String href, boolean isPersistent) Add aclear()
void
resolveStyles
(Tag t) This method should resolve css, meaning, it will look at the css and retrieve relevant css rules for the given tag.void
setFileRetrieve
(FileRetrieve retrieve) TheFileRetrieve
implementation to use inaddCss(String, boolean)
.
-
Method Details
-
resolveStyles
This method should resolve css, meaning, it will look at the css and retrieve relevant css rules for the given tag. The rules must then be set inTag.setCSS(java.util.Map)
.- Parameters:
t
- the tag.
-
addCss
Add a piece of CSS code.- Parameters:
content
- the CSScharSet
- a charsetisPersistent
- true if the added css should not be deleted on a call to clear- Throws:
CssResolverException
- thrown if something goes wrong
-
addCssFile
Add a- Parameters:
href
- the link to the css file ( an absolute uri )isPersistent
- true if the added css should not be deleted on a call to clear- Throws:
CssResolverException
- thrown if something goes wrong
-
addCss
Add a piece of CSS code.- Parameters:
content
- the content to parse to cssisPersistent
- true if the added css should not be deleted on a call to clear- Throws:
CssResolverException
- thrown if something goes wrong
-
addCss
Add a CssFile- Parameters:
file
- the CssFile
-
setFileRetrieve
TheFileRetrieve
implementation to use inaddCss(String, boolean)
.- Parameters:
retrieve
- the retrieve to set
-
clear
- Returns:
- an instance of this resolver
- Throws:
CssResolverException
- thrown if something goes wrong
-