Interface CSSResolver
-
- All Known Implementing Classes:
StyleAttrCSSResolver
public interface CSSResolverResolves CSS rules for a given tag.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCss(CssFile file)Add a CssFilevoidaddCss(java.lang.String content, boolean isPersistent)Add a piece of CSS code.voidaddCss(java.lang.String content, java.lang.String charSet, boolean isPersistent)Add a piece of CSS code.voidaddCssFile(java.lang.String href, boolean isPersistent)Add aCSSResolverclear()voidresolveStyles(Tag t)This method should resolve css, meaning, it will look at the css and retrieve relevant css rules for the given tag.voidsetFileRetrieve(FileRetrieve retrieve)TheFileRetrieveimplementation to use inaddCss(String, boolean).
-
-
-
Method Detail
-
resolveStyles
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. The rules must then be set inTag.setCSS(java.util.Map).- Parameters:
t- the tag.
-
addCss
void addCss(java.lang.String content, java.lang.String charSet, boolean isPersistent) throws CssResolverExceptionAdd 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
void addCssFile(java.lang.String href, boolean isPersistent) throws CssResolverExceptionAdd 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
void addCss(java.lang.String content, boolean isPersistent) throws CssResolverExceptionAdd 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
void addCss(CssFile file)
Add a CssFile- Parameters:
file- the CssFile
-
setFileRetrieve
void setFileRetrieve(FileRetrieve retrieve)
TheFileRetrieveimplementation to use inaddCss(String, boolean).- Parameters:
retrieve- the retrieve to set
-
clear
CSSResolver clear() throws CssResolverException
- Returns:
- an instance of this resolver
- Throws:
CssResolverException- thrown if something goes wrong
-
-