Package com.aowagie.text.html
Class Markup
- java.lang.Object
-
- com.aowagie.text.html.Markup
-
public class Markup extends java.lang.Object
A class that contains all the possible tagnames and their attributes.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CSS_KEY_COLOR
the CSS tag for text colorstatic java.lang.String
CSS_KEY_FONTFAMILY
the CSS tag for the font familystatic java.lang.String
CSS_KEY_FONTSIZE
the CSS tag for the font sizestatic java.lang.String
CSS_KEY_FONTSTYLE
the CSS tag for the font stylestatic java.lang.String
CSS_KEY_FONTWEIGHT
the CSS tag for the font weightstatic java.lang.String
CSS_KEY_LINEHEIGHT
the CSS tag for text decorationsstatic java.lang.String
CSS_KEY_VERTICALALIGN
the CSS tag for text decorationsstatic java.lang.String
CSS_VALUE_BOLD
a CSS value for text font weightstatic java.lang.String
CSS_VALUE_ITALIC
a CSS value for text font stylestatic java.lang.String
CSS_VALUE_LINETHROUGH
a CSS value for text decorationstatic java.lang.String
CSS_VALUE_NORMAL
a CSS valuestatic java.lang.String
CSS_VALUE_OBLIQUE
a CSS value for text font stylestatic java.lang.String
CSS_VALUE_UNDERLINE
a CSS value for text decorationstatic float
DEFAULT_FONT_SIZE
a default value for font-sizestatic java.lang.String
HTML_ATTR_STYLE
This is used for inline css style information
-
Constructor Summary
Constructors Constructor Description Markup()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.Color
decodeColor(java.lang.String s)
Converts aColor
into a HTML representation of thisColor
.static java.util.Properties
parseAttributes(java.lang.String string)
This method parses a String with attributes and returns a Properties object.static float
parseLength(java.lang.String string)
Parses a length.static float
parseLength(java.lang.String string, float actualFontSize)
New method contributed by: Lubos Strapko
-
-
-
Field Detail
-
HTML_ATTR_STYLE
public static final java.lang.String HTML_ATTR_STYLE
This is used for inline css style information- See Also:
- Constant Field Values
-
CSS_KEY_COLOR
public static final java.lang.String CSS_KEY_COLOR
the CSS tag for text color- See Also:
- Constant Field Values
-
CSS_KEY_FONTFAMILY
public static final java.lang.String CSS_KEY_FONTFAMILY
the CSS tag for the font family- See Also:
- Constant Field Values
-
CSS_KEY_FONTSIZE
public static final java.lang.String CSS_KEY_FONTSIZE
the CSS tag for the font size- See Also:
- Constant Field Values
-
CSS_KEY_FONTSTYLE
public static final java.lang.String CSS_KEY_FONTSTYLE
the CSS tag for the font style- See Also:
- Constant Field Values
-
CSS_KEY_FONTWEIGHT
public static final java.lang.String CSS_KEY_FONTWEIGHT
the CSS tag for the font weight- See Also:
- Constant Field Values
-
CSS_KEY_LINEHEIGHT
public static final java.lang.String CSS_KEY_LINEHEIGHT
the CSS tag for text decorations- See Also:
- Constant Field Values
-
CSS_KEY_VERTICALALIGN
public static final java.lang.String CSS_KEY_VERTICALALIGN
the CSS tag for text decorations- See Also:
- Constant Field Values
-
CSS_VALUE_BOLD
public static final java.lang.String CSS_VALUE_BOLD
a CSS value for text font weight- See Also:
- Constant Field Values
-
CSS_VALUE_ITALIC
public static final java.lang.String CSS_VALUE_ITALIC
a CSS value for text font style- See Also:
- Constant Field Values
-
CSS_VALUE_LINETHROUGH
public static final java.lang.String CSS_VALUE_LINETHROUGH
a CSS value for text decoration- See Also:
- Constant Field Values
-
CSS_VALUE_NORMAL
public static final java.lang.String CSS_VALUE_NORMAL
a CSS value- See Also:
- Constant Field Values
-
CSS_VALUE_OBLIQUE
public static final java.lang.String CSS_VALUE_OBLIQUE
a CSS value for text font style- See Also:
- Constant Field Values
-
CSS_VALUE_UNDERLINE
public static final java.lang.String CSS_VALUE_UNDERLINE
a CSS value for text decoration- See Also:
- Constant Field Values
-
DEFAULT_FONT_SIZE
public static final float DEFAULT_FONT_SIZE
a default value for font-size- Since:
- 2.1.3
- See Also:
- Constant Field Values
-
-
Method Detail
-
parseLength
public static float parseLength(java.lang.String string)
Parses a length.- Parameters:
string
- a length in the form of an optional + or -, followed by a number and a unit.- Returns:
- a float
-
parseLength
public static float parseLength(java.lang.String string, float actualFontSize)
New method contributed by: Lubos Strapko- Parameters:
string
- StringactualFontSize
- Actual Font Size- Returns:
- Length
- Since:
- 2.1.3
-
decodeColor
public static java.awt.Color decodeColor(java.lang.String s)
Converts aColor
into a HTML representation of thisColor
.- Parameters:
s
- theColor
that has to be converted.- Returns:
- the HTML representation of this
Color
-
parseAttributes
public static java.util.Properties parseAttributes(java.lang.String string)
This method parses a String with attributes and returns a Properties object.- Parameters:
string
- a String of this form: 'key1="value1"; key2="value2";... keyN="valueN" '- Returns:
- a Properties object
-
-