Class StyleSheet
- java.lang.Object
-
- com.itextpdf.text.html.simpleparser.StyleSheet
-
@Deprecated public class StyleSheet extends java.lang.ObjectDeprecated.since 5.5.2Old class to define styles for HTMLWorker. We've completely rewritten HTML to PDF functionality; see project XML Worker. XML Worker is able to parse CSS files and "style" attribute values.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>classMapDeprecated.Map storing possible names of the "class" attribute and their corresponding styles.protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>tagMapDeprecated.Map storing tags and their corresponding styles.
-
Constructor Summary
Constructors Constructor Description StyleSheet()Deprecated.Creates a new instance of StyleSheet
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidapplyStyle(java.lang.String tag, java.util.Map<java.lang.String,java.lang.String> attrs)Deprecated.Resolves the styles based on the tag name and the value of the class attribute.voidloadStyle(java.lang.String className, java.lang.String key, java.lang.String value)Deprecated.Adds an extra style key-value pair to the styles Map of a specific tagvoidloadStyle(java.lang.String className, java.util.HashMap<java.lang.String,java.lang.String> attrs)Deprecated.Associates a Map containing styles with a class name.voidloadTagStyle(java.lang.String tag, java.lang.String key, java.lang.String value)Deprecated.Adds an extra style key-value pair to the styles Map of a specific tagvoidloadTagStyle(java.lang.String tag, java.util.Map<java.lang.String,java.lang.String> attrs)Deprecated.Associates a Map containing styles with a tag.static voidresolveStyleAttribute(java.util.Map<java.lang.String,java.lang.String> h, ChainedProperties chain)Deprecated.Method contributed by Lubos Strapko
-
-
-
Field Detail
-
tagMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> tagMap
Deprecated.Map storing tags and their corresponding styles.- Since:
- 5.0.6 (changed HashMap => Map)
-
classMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> classMap
Deprecated.Map storing possible names of the "class" attribute and their corresponding styles.- Since:
- 5.0.6 (changed HashMap => Map)
-
-
Method Detail
-
loadTagStyle
public void loadTagStyle(java.lang.String tag, java.util.Map<java.lang.String,java.lang.String> attrs)Deprecated.Associates a Map containing styles with a tag.- Parameters:
tag- the name of the HTML/XML tagattrs- a map containing styles
-
loadTagStyle
public void loadTagStyle(java.lang.String tag, java.lang.String key, java.lang.String value)Deprecated.Adds an extra style key-value pair to the styles Map of a specific tag- Parameters:
tag- the name of the HTML/XML tagkey- the key specifying a specific stylevalue- the value defining the style
-
loadStyle
public void loadStyle(java.lang.String className, java.util.HashMap<java.lang.String,java.lang.String> attrs)Deprecated.Associates a Map containing styles with a class name.- Parameters:
className- the value of the class attributeattrs- a map containing styles
-
loadStyle
public void loadStyle(java.lang.String className, java.lang.String key, java.lang.String value)Deprecated.Adds an extra style key-value pair to the styles Map of a specific tag- Parameters:
className- the name of the HTML/XML tagkey- the key specifying a specific stylevalue- the value defining the style
-
applyStyle
public void applyStyle(java.lang.String tag, java.util.Map<java.lang.String,java.lang.String> attrs)Deprecated.Resolves the styles based on the tag name and the value of the class attribute.- Parameters:
tag- the tag that needs to be resolvedattrs- existing style map that will be updated
-
resolveStyleAttribute
public static void resolveStyleAttribute(java.util.Map<java.lang.String,java.lang.String> h, ChainedProperties chain)Deprecated.Method contributed by Lubos Strapko- Parameters:
h-chain-- Since:
- 2.1.3
-
-