com.lowagie.text.html
Class Markup

java.lang.Object
  extended by com.lowagie.text.html.Markup

public class Markup
extends Object

A class that contains all the possible tagnames and their attributes.


Field Summary
static String CSS_KEY_BGCOLOR
          the CSS tag for background color
static String CSS_KEY_BORDERCOLOR
          the CSS tag for the margin of an object
static String CSS_KEY_BORDERWIDTH
          the CSS tag for the margin of an object
static String CSS_KEY_BORDERWIDTHBOTTOM
          the CSS tag for the margin of an object
static String CSS_KEY_BORDERWIDTHLEFT
          the CSS tag for the margin of an object
static String CSS_KEY_BORDERWIDTHRIGHT
          the CSS tag for the margin of an object
static String CSS_KEY_BORDERWIDTHTOP
          the CSS tag for the margin of an object
static String CSS_KEY_COLOR
          the CSS tag for text color
static String CSS_KEY_DISPLAY
          CSS key that indicate the way something has to be displayed
static String CSS_KEY_FONTFAMILY
          the CSS tag for the font family
static String CSS_KEY_FONTSIZE
          the CSS tag for the font size
static String CSS_KEY_FONTSTYLE
          the CSS tag for the font style
static String CSS_KEY_FONTWEIGHT
          the CSS tag for the font weight
static String CSS_KEY_LINEHEIGHT
          the CSS tag for text decorations
static String CSS_KEY_MARGIN
          the CSS tag for the margin of an object
static String CSS_KEY_MARGINBOTTOM
          the CSS tag for the margin of an object
static String CSS_KEY_MARGINLEFT
          the CSS tag for the margin of an object
static String CSS_KEY_MARGINRIGHT
          the CSS tag for the margin of an object
static String CSS_KEY_MARGINTOP
          the CSS tag for the margin of an object
static String CSS_KEY_PADDING
          the CSS tag for the margin of an object
static String CSS_KEY_PADDINGBOTTOM
          the CSS tag for the margin of an object
static String CSS_KEY_PADDINGLEFT
          the CSS tag for the margin of an object
static String CSS_KEY_PADDINGRIGHT
          the CSS tag for the margin of an object
static String CSS_KEY_PADDINGTOP
          the CSS tag for the margin of an object
static String CSS_KEY_PAGE_BREAK_AFTER
          the CSS tag for adding a page break when the document is printed
static String CSS_KEY_PAGE_BREAK_BEFORE
          the CSS tag for adding a page break when the document is printed
static String CSS_KEY_TEXTALIGN
          the CSS tag for the horizontal alignment of an object
static String CSS_KEY_TEXTDECORATION
          the CSS tag for text decorations
static String CSS_KEY_VERTICALALIGN
          the CSS tag for text decorations
static String CSS_KEY_VISIBILITY
          the CSS tag for the visibility of objects
static String CSS_VALUE_ALWAYS
          value for the CSS tag for adding a page break when the document is printed
static String CSS_VALUE_BLOCK
          A possible value for the DISPLAY key
static String CSS_VALUE_BOLD
          a CSS value for text font weight
static String CSS_VALUE_HIDDEN
          the value if you want to hide objects.
static String CSS_VALUE_INLINE
          A possible value for the DISPLAY key
static String CSS_VALUE_ITALIC
          a CSS value for text font style
static String CSS_VALUE_LINETHROUGH
          a CSS value for text decoration
static String CSS_VALUE_LISTITEM
          A possible value for the DISPLAY key
static String CSS_VALUE_NONE
          a CSS value
static String CSS_VALUE_NORMAL
          a CSS value
static String CSS_VALUE_OBLIQUE
          a CSS value for text font style
static String CSS_VALUE_TABLE
          A possible value for the DISPLAY key
static String CSS_VALUE_TABLECELL
          A possible value for the DISPLAY key
static String CSS_VALUE_TABLEROW
          A possible value for the DISPLAY key
static String CSS_VALUE_TEXTALIGNCENTER
          the CSS value for a horizontal alignment of an object
static String CSS_VALUE_TEXTALIGNJUSTIFY
          the CSS value for a horizontal alignment of an object
static String CSS_VALUE_TEXTALIGNLEFT
          the CSS value for a horizontal alignment of an object
static String CSS_VALUE_TEXTALIGNRIGHT
          the CSS value for a horizontal alignment of an object
static String CSS_VALUE_UNDERLINE
          a CSS value for text decoration
static float DEFAULT_FONT_SIZE
          a default value for font-size
static String HTML_ATTR_CSS_CLASS
          attribute for specifying externally defined CSS class
static String HTML_ATTR_CSS_ID
          The ID attribute.
static String HTML_ATTR_HEIGHT
          the height attribute.
static String HTML_ATTR_HREF
          the hyperlink reference attribute.
static String HTML_ATTR_REL
          This is a possible HTML attribute for the LINK tag.
static String HTML_ATTR_STYLE
          This is used for inline css style information
static String HTML_ATTR_STYLESHEET
          This is a possible HTML attribute.
static String HTML_ATTR_TYPE
          This is a possible HTML attribute for the LINK tag.
static String HTML_ATTR_WIDTH
          the width attribute.
static String HTML_TAG_BODY
          the markup for the body part of a file
static String HTML_TAG_DIV
          The DIV tag.
static String HTML_TAG_LINK
          This is a possible HTML-tag.
static String HTML_TAG_SPAN
          The SPAN tag.
static String HTML_VALUE_CSS
          This is a possible HTML attribute for the LINK tag.
static String HTML_VALUE_JAVASCRIPT
          This is a possible value for the language attribute (SCRIPT tag).
static String ITEXT_TAG
          the key for any tag
 
Constructor Summary
Markup()
           
 
Method Summary
static Color decodeColor(String s)
          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 float parseLength(String string)
          Parses a length.
static float parseLength(String string, float actualFontSize)
          New method contributed by: Lubos Strapko
static String removeComment(String string, String startComment, String endComment)
          Removes the comments sections of a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ITEXT_TAG

public static final String ITEXT_TAG
the key for any tag

See Also:
Constant Field Values

HTML_TAG_BODY

public static final String HTML_TAG_BODY
the markup for the body part of a file

See Also:
Constant Field Values

HTML_TAG_DIV

public static final String HTML_TAG_DIV
The DIV tag.

See Also:
Constant Field Values

HTML_TAG_LINK

public static final String HTML_TAG_LINK
This is a possible HTML-tag.

See Also:
Constant Field Values

HTML_TAG_SPAN

public static final String HTML_TAG_SPAN
The SPAN tag.

See Also:
Constant Field Values

HTML_ATTR_HEIGHT

public static final String HTML_ATTR_HEIGHT
the height attribute.

See Also:
Constant Field Values

HTML_ATTR_HREF

public static final String HTML_ATTR_HREF
the hyperlink reference attribute.

See Also:
Constant Field Values

HTML_ATTR_REL

public static final String HTML_ATTR_REL
This is a possible HTML attribute for the LINK tag.

See Also:
Constant Field Values

HTML_ATTR_STYLE

public static final String HTML_ATTR_STYLE
This is used for inline css style information

See Also:
Constant Field Values

HTML_ATTR_TYPE

public static final String HTML_ATTR_TYPE
This is a possible HTML attribute for the LINK tag.

See Also:
Constant Field Values

HTML_ATTR_STYLESHEET

public static final String HTML_ATTR_STYLESHEET
This is a possible HTML attribute.

See Also:
Constant Field Values

HTML_ATTR_WIDTH

public static final String HTML_ATTR_WIDTH
the width attribute.

See Also:
Constant Field Values

HTML_ATTR_CSS_CLASS

public static final String HTML_ATTR_CSS_CLASS
attribute for specifying externally defined CSS class

See Also:
Constant Field Values

HTML_ATTR_CSS_ID

public static final String HTML_ATTR_CSS_ID
The ID attribute.

See Also:
Constant Field Values

HTML_VALUE_JAVASCRIPT

public static final String HTML_VALUE_JAVASCRIPT
This is a possible value for the language attribute (SCRIPT tag).

See Also:
Constant Field Values

HTML_VALUE_CSS

public static final String HTML_VALUE_CSS
This is a possible HTML attribute for the LINK tag.

See Also:
Constant Field Values

CSS_KEY_BGCOLOR

public static final String CSS_KEY_BGCOLOR
the CSS tag for background color

See Also:
Constant Field Values

CSS_KEY_COLOR

public static final String CSS_KEY_COLOR
the CSS tag for text color

See Also:
Constant Field Values

CSS_KEY_DISPLAY

public static final String CSS_KEY_DISPLAY
CSS key that indicate the way something has to be displayed

See Also:
Constant Field Values

CSS_KEY_FONTFAMILY

public static final String CSS_KEY_FONTFAMILY
the CSS tag for the font family

See Also:
Constant Field Values

CSS_KEY_FONTSIZE

public static final String CSS_KEY_FONTSIZE
the CSS tag for the font size

See Also:
Constant Field Values

CSS_KEY_FONTSTYLE

public static final String CSS_KEY_FONTSTYLE
the CSS tag for the font style

See Also:
Constant Field Values

CSS_KEY_FONTWEIGHT

public static final String CSS_KEY_FONTWEIGHT
the CSS tag for the font weight

See Also:
Constant Field Values

CSS_KEY_LINEHEIGHT

public static final String CSS_KEY_LINEHEIGHT
the CSS tag for text decorations

See Also:
Constant Field Values

CSS_KEY_MARGIN

public static final String CSS_KEY_MARGIN
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_MARGINLEFT

public static final String CSS_KEY_MARGINLEFT
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_MARGINRIGHT

public static final String CSS_KEY_MARGINRIGHT
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_MARGINTOP

public static final String CSS_KEY_MARGINTOP
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_MARGINBOTTOM

public static final String CSS_KEY_MARGINBOTTOM
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_PADDING

public static final String CSS_KEY_PADDING
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_PADDINGLEFT

public static final String CSS_KEY_PADDINGLEFT
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_PADDINGRIGHT

public static final String CSS_KEY_PADDINGRIGHT
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_PADDINGTOP

public static final String CSS_KEY_PADDINGTOP
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_PADDINGBOTTOM

public static final String CSS_KEY_PADDINGBOTTOM
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_BORDERCOLOR

public static final String CSS_KEY_BORDERCOLOR
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_BORDERWIDTH

public static final String CSS_KEY_BORDERWIDTH
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_BORDERWIDTHLEFT

public static final String CSS_KEY_BORDERWIDTHLEFT
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_BORDERWIDTHRIGHT

public static final String CSS_KEY_BORDERWIDTHRIGHT
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_BORDERWIDTHTOP

public static final String CSS_KEY_BORDERWIDTHTOP
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_BORDERWIDTHBOTTOM

public static final String CSS_KEY_BORDERWIDTHBOTTOM
the CSS tag for the margin of an object

See Also:
Constant Field Values

CSS_KEY_PAGE_BREAK_AFTER

public static final String CSS_KEY_PAGE_BREAK_AFTER
the CSS tag for adding a page break when the document is printed

See Also:
Constant Field Values

CSS_KEY_PAGE_BREAK_BEFORE

public static final String CSS_KEY_PAGE_BREAK_BEFORE
the CSS tag for adding a page break when the document is printed

See Also:
Constant Field Values

CSS_KEY_TEXTALIGN

public static final String CSS_KEY_TEXTALIGN
the CSS tag for the horizontal alignment of an object

See Also:
Constant Field Values

CSS_KEY_TEXTDECORATION

public static final String CSS_KEY_TEXTDECORATION
the CSS tag for text decorations

See Also:
Constant Field Values

CSS_KEY_VERTICALALIGN

public static final String CSS_KEY_VERTICALALIGN
the CSS tag for text decorations

See Also:
Constant Field Values

CSS_KEY_VISIBILITY

public static final String CSS_KEY_VISIBILITY
the CSS tag for the visibility of objects

See Also:
Constant Field Values

CSS_VALUE_ALWAYS

public static final String CSS_VALUE_ALWAYS
value for the CSS tag for adding a page break when the document is printed

See Also:
Constant Field Values

CSS_VALUE_BLOCK

public static final String CSS_VALUE_BLOCK
A possible value for the DISPLAY key

See Also:
Constant Field Values

CSS_VALUE_BOLD

public static final String CSS_VALUE_BOLD
a CSS value for text font weight

See Also:
Constant Field Values

CSS_VALUE_HIDDEN

public static final String CSS_VALUE_HIDDEN
the value if you want to hide objects.

See Also:
Constant Field Values

CSS_VALUE_INLINE

public static final String CSS_VALUE_INLINE
A possible value for the DISPLAY key

See Also:
Constant Field Values

CSS_VALUE_ITALIC

public static final String CSS_VALUE_ITALIC
a CSS value for text font style

See Also:
Constant Field Values

CSS_VALUE_LINETHROUGH

public static final String CSS_VALUE_LINETHROUGH
a CSS value for text decoration

See Also:
Constant Field Values

CSS_VALUE_LISTITEM

public static final String CSS_VALUE_LISTITEM
A possible value for the DISPLAY key

See Also:
Constant Field Values

CSS_VALUE_NONE

public static final String CSS_VALUE_NONE
a CSS value

See Also:
Constant Field Values

CSS_VALUE_NORMAL

public static final String CSS_VALUE_NORMAL
a CSS value

See Also:
Constant Field Values

CSS_VALUE_OBLIQUE

public static final String CSS_VALUE_OBLIQUE
a CSS value for text font style

See Also:
Constant Field Values

CSS_VALUE_TABLE

public static final String CSS_VALUE_TABLE
A possible value for the DISPLAY key

See Also:
Constant Field Values

CSS_VALUE_TABLEROW

public static final String CSS_VALUE_TABLEROW
A possible value for the DISPLAY key

See Also:
Constant Field Values

CSS_VALUE_TABLECELL

public static final String CSS_VALUE_TABLECELL
A possible value for the DISPLAY key

See Also:
Constant Field Values

CSS_VALUE_TEXTALIGNLEFT

public static final String CSS_VALUE_TEXTALIGNLEFT
the CSS value for a horizontal alignment of an object

See Also:
Constant Field Values

CSS_VALUE_TEXTALIGNRIGHT

public static final String CSS_VALUE_TEXTALIGNRIGHT
the CSS value for a horizontal alignment of an object

See Also:
Constant Field Values

CSS_VALUE_TEXTALIGNCENTER

public static final String CSS_VALUE_TEXTALIGNCENTER
the CSS value for a horizontal alignment of an object

See Also:
Constant Field Values

CSS_VALUE_TEXTALIGNJUSTIFY

public static final String CSS_VALUE_TEXTALIGNJUSTIFY
the CSS value for a horizontal alignment of an object

See Also:
Constant Field Values

CSS_VALUE_UNDERLINE

public static final 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
Constructor Detail

Markup

public Markup()
Method Detail

parseLength

public static float parseLength(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(String string,
                                float actualFontSize)
New method contributed by: Lubos Strapko

Since:
2.1.3

decodeColor

public static Color decodeColor(String s)
Converts a Color into a HTML representation of this Color.

Parameters:
s - the Color that has to be converted.
Returns:
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.

Parameters:
string - a String of this form: 'key1="value1"; key2="value2";... keyN="valueN" '
Returns:
a Properties object

removeComment

public static String removeComment(String string,
                                   String startComment,
                                   String endComment)
Removes the comments sections of a String.

Parameters:
string - the original String
startComment - the String that marks the start of a Comment section
endComment - the String that marks the end of a Comment section.
Returns:
the String stripped of its comment section

Hosted by Hostbasket