|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itextpdf.tool.xml.css.StyleAttrCSSResolver
public class StyleAttrCSSResolver
Resolves CSS properties.
| Field Summary | |
|---|---|
static String |
STYLE
|
| Constructor Summary | |
|---|---|
StyleAttrCSSResolver()
Construct a new StyleAttrCSSResolver with default settings. |
|
StyleAttrCSSResolver(CssFiles cssFiles)
Construct a new StyleAttrCSSResolver with the given CssFiles and the DefaultCssInheritanceRules. |
|
StyleAttrCSSResolver(CssFiles cssFiles,
CssUtils utils)
Construct a new StyleAttrCSSResolver with the given CssFiles and CssUtils and the
DefaultCssInheritanceRules. |
|
StyleAttrCSSResolver(CssFiles cssFiles,
FileRetrieve r)
|
|
StyleAttrCSSResolver(CssInheritanceRules rules,
CssFiles cssFiles,
CssUtils utils)
Construct a new StyleAttrCSSResolver with the given CssFiles and CssUtils. |
|
StyleAttrCSSResolver(CssInheritanceRules rules,
CssFiles cssFiles,
CssUtils utils,
FileRetrieve fileRetrieve)
Construct a new StyleAttrCSSResolver with the given CssFiles and CssUtils. |
|
| Method Summary | |
|---|---|
void |
addCss(CssFile file)
Add a file to the CssFiles Collection. |
void |
addCss(String content,
boolean isPersistent)
Add a piece of CSS code. |
void |
addCss(String content,
String charSet,
boolean isPersistent)
Add a piece of CSS code. |
void |
addCssFile(String href,
boolean isPersistent)
Add a file to the CssFiles Collection. |
CSSResolver |
clear()
|
void |
resolveStyles(Tag t)
Also taking into account the CSS properties of any parent tag in the given tag. |
void |
setCssInheritance(CssInheritanceRules cssInheritanceRules)
By setting an implementation of CssInheritanceRules a developer can set rules on what css selectors are
inherited from parent tags. |
void |
setCssInheritanceRules(CssInheritanceRules inherit)
|
void |
setFileRetrieve(FileRetrieve retrieve)
The FileRetrieve implementation to use in addCss(String, boolean). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String STYLE
| Constructor Detail |
|---|
public StyleAttrCSSResolver()
StyleAttrCSSResolver with default settings.
public StyleAttrCSSResolver(CssFiles cssFiles)
CssFiles and the DefaultCssInheritanceRules.
cssFiles - a CssFiles implementation.
public StyleAttrCSSResolver(CssFiles cssFiles,
CssUtils utils)
CssFiles and CssUtils and the
DefaultCssInheritanceRules.
cssFiles - a CssFiles implementation.utils - the CssUtils to use.
public StyleAttrCSSResolver(CssInheritanceRules rules,
CssFiles cssFiles,
CssUtils utils)
CssFiles and CssUtils.
rules - the CssInheritanceRules to use.cssFiles - a CssFiles implementation.utils - the CssUtils to use.
public StyleAttrCSSResolver(CssInheritanceRules rules,
CssFiles cssFiles,
CssUtils utils,
FileRetrieve fileRetrieve)
CssFiles and CssUtils.
rules - the CssInheritanceRules to use.cssFiles - a CssFiles implementation.utils - the CssUtils to use.fileRetrieve - the FileRetrieve implementation
public StyleAttrCSSResolver(CssFiles cssFiles,
FileRetrieve r)
cssFiles - the CssFile implementationr - the FileRetrieve implementation| Method Detail |
|---|
public void resolveStyles(Tag t)
resolveStyles in interface CSSResolvert - the tag.CSSResolver.resolveStyles(com.itextpdf.tool.xml.Tag)public void setCssInheritance(CssInheritanceRules cssInheritanceRules)
CssInheritanceRules a developer can set rules on what css selectors are
inherited from parent tags.
cssInheritanceRules - the inherit to set
public void addCss(String content,
String charSet,
boolean isPersistent)
throws CssResolverException
CSSResolver
addCss in interface CSSResolvercontent - the CSScharSet - a charsetisPersistent - true if the added css should not be deleted on a call to clear
CssResolverException - thrown if something goes wrong
public void addCssFile(String href,
boolean isPersistent)
throws CssResolverException
addCssFile in interface CSSResolverhref - the path, if it starts with http we try to retrieve the file
from the net, if not we try a normal file operation.isPersistent - true if the added css should not be deleted on a call to clear
CssResolverException - thrown if something goes wrongpublic void addCss(CssFile file)
addCss in interface CSSResolverfile - the CssFile to add.
public void addCss(String content,
boolean isPersistent)
throws CssResolverException
CSSResolver
addCss in interface CSSResolvercontent - the content to parse to cssisPersistent - true if the added css should not be deleted on a call to clear
CssResolverException - thrown if something goes wrongpublic void setCssInheritanceRules(CssInheritanceRules inherit)
inherit - the inherit to setpublic void setFileRetrieve(FileRetrieve retrieve)
FileRetrieve implementation to use in addCss(String, boolean).
setFileRetrieve in interface CSSResolverretrieve - the retrieve to set
public CSSResolver clear()
throws CssResolverException
clear in interface CSSResolverCssResolverException - thrown if something goes wrong
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||