Package com.itextpdf.tool.xml.css
Class CSSFileWrapper
- java.lang.Object
-
- com.itextpdf.tool.xml.css.CSSFileWrapper
-
-
Field Summary
Fields Modifier and Type Field Description private CssFilecssprivate booleanpersistent
-
Constructor Summary
Constructors Constructor Description CSSFileWrapper(CssFile css, boolean b)Constructs a CssFile that does not allow adding of new CSS (given you don't mess with the CssFile provided on construction).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(java.lang.String selector, java.util.Map<java.lang.String,java.lang.String> props)Add CSS to this CssFile.java.util.List<CssRule>get(Tag t)Return CSS declarations for the given tag.booleanisPersistent()voidisPersistent(boolean b)Indicates that this file should be kept.
-
-
-
Field Detail
-
persistent
private final boolean persistent
-
css
private final CssFile css
-
-
Constructor Detail
-
CSSFileWrapper
public CSSFileWrapper(CssFile css, boolean b)
Constructs a CssFile that does not allow adding of new CSS (given you don't mess with the CssFile provided on construction).- Parameters:
css- the css fileb- true if this file should be kept forever.
-
-
Method Detail
-
add
public boolean add(java.lang.String selector, java.util.Map<java.lang.String,java.lang.String> props)Description copied from interface:CssFileAdd CSS to this CssFile.
-
get
public java.util.List<CssRule> get(Tag t)
Description copied from interface:CssFileReturn CSS declarations for the given tag.
-
isPersistent
public boolean isPersistent()
- Specified by:
isPersistentin interfaceCssFile- Returns:
- if this CSS file should never be thrown away. Used in CSSFilesImpl#clear
-
isPersistent
public void isPersistent(boolean b)
Description copied from interface:CssFileIndicates that this file should be kept.- Specified by:
isPersistentin interfaceCssFile- Parameters:
b- true if this file should be kept.
-
-