com.lowagie.text.markup
Class MarkupParser
java.lang.Object
com.lowagie.text.markup.MarkupParser
public class MarkupParser
extends java.lang.Object
This class contains several static methods that can be used to parse markup.
static Color | decodeColor(String color) - Converts a
Color into a HTML representation of this Color .
|
static Properties | parseAttributes(String string) - This method parses a String with attributes and returns a Properties object.
|
static Properties | parseFont(String string) - This method parses the value of 'font' attribute and returns a Properties object.
|
static float | parseLength(String string) - Parses a length.
|
MarkupParser
private MarkupParser()
Creates new MarkupParser
decodeColor
public static Color decodeColor(String color)
Converts a Color
into a HTML representation of this Color
.
color
- the Color
that has to be converted.
- the HTML representation of this Color
parseAttributes
public static Properties parseAttributes(String string)
This method parses a String with attributes and returns a Properties object.
string
- a String of this form: 'key1="value1"; key2="value2";... keyN="valueN" '
parseFont
public static Properties parseFont(String string)
This method parses the value of 'font' attribute and returns a Properties object.
string
- a String of this form: 'style1 ... styleN size/leading font1 ... fontN'
parseLength
public static float parseLength(String string)
Parses a length.
string
- a length in the form of an optional + or -, followed by a number and a unit.