Package org.jivesoftware.smackx.xhtmlim
Class XHTMLText
java.lang.Object
org.jivesoftware.smackx.xhtmlim.XHTMLText
An XHTMLText represents formatted text. This class also helps to build valid
XHTML tags.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAppends a given text to the XHTMLText.Appends a tag that inserts a single carriage return.Appends a tag that indicates that an anchor section ends.Appends a tag that indicates that a blockquote section ends.Appends a tag that indicates that the body section ends.Appends a tag that indicates end of text that is the code for a program.Appends a tag that indicates end of emphasis.appendCloseHeaderTag
(int level) Appends a tag that indicates that a header section ends.Appends a tag that indicates that an inlined quote section ends.Appends a tag that indicates that a line item section ends.Appends a tag that indicates that an ordered list section ends.Appends a tag that indicates the end of a new paragraph.Appends a tag that indicates that a span section ends.Appends a tag that indicates that a strong section ends.Appends a tag that indicates that an unordered list section ends.Appends a tag that indicates an image.appendLineItemTag
(String style) Appends a tag that indicates the start of a new line item within a list.appendOpenAnchorTag
(String href, String style) Appends a tag that indicates that an anchor section begins.appendOpenBlockQuoteTag
(String style) Appends a tag that indicates that a blockquote section begins.Appends a tag that indicates a reference to work, such as a book, report or web site.Appends a tag that indicates text that is the code for a program.Appends a tag that indicates emphasis.appendOpenHeaderTag
(int level, String style) Appends a tag that indicates a header, a title of a section of the message.appendOpenInlinedQuoteTag
(String style) Appends a tag that indicates that an inlined quote section begins.appendOpenOrderedListTag
(String style) Appends a tag that creates an ordered list.appendOpenParagraphTag
(String style) Appends a tag that indicates the start of a new paragraph.appendOpenSpanTag
(String style) Appends a tag that allows to set the fonts for a span of text.Appends a tag that indicates text which should be more forceful than surrounding text.appendOpenUnorderedListTag
(String style) Appends a tag that creates an unordered list.toString()
Returns the text of the XHTMLText.toXML()
-
Field Details
-
NAMESPACE
- See Also:
-
A
- See Also:
-
HREF
- See Also:
-
STYLE
- See Also:
-
BLOCKQUOTE
- See Also:
-
BR
- See Also:
-
CITE
- See Also:
-
CODE
- See Also:
-
EM
- See Also:
-
H
- See Also:
-
IMG
- See Also:
-
LI
- See Also:
-
OL
- See Also:
-
UL
- See Also:
-
P
- See Also:
-
Q
- See Also:
-
SPAN
- See Also:
-
STRONG
- See Also:
-
-
Constructor Details
-
XHTMLText
Creates a new XHTMLText with body tag params.- Parameters:
style
- the XHTML style of the bodylang
- the language of the body
-
-
Method Details
-
appendOpenAnchorTag
Appends a tag that indicates that an anchor section begins.- Parameters:
href
- indicates the URL being linked tostyle
- the XHTML style of the anchor- Returns:
- this.
-
appendCloseAnchorTag
Appends a tag that indicates that an anchor section ends.- Returns:
- this.
-
appendOpenBlockQuoteTag
Appends a tag that indicates that a blockquote section begins.- Parameters:
style
- the XHTML style of the blockquote- Returns:
- this.
-
appendCloseBlockQuoteTag
Appends a tag that indicates that a blockquote section ends.- Returns:
- this.
-
appendCloseBodyTag
Appends a tag that indicates that the body section ends.- Returns:
- this.
-
appendBrTag
Appends a tag that inserts a single carriage return.- Returns:
- this.
-
appendOpenCiteTag
Appends a tag that indicates a reference to work, such as a book, report or web site.- Returns:
- this.
-
appendOpenCodeTag
Appends a tag that indicates text that is the code for a program.- Returns:
- this.
-
appendCloseCodeTag
Appends a tag that indicates end of text that is the code for a program.- Returns:
- this.
-
appendOpenEmTag
Appends a tag that indicates emphasis.- Returns:
- this.
-
appendCloseEmTag
Appends a tag that indicates end of emphasis.- Returns:
- this.
-
appendOpenHeaderTag
Appends a tag that indicates a header, a title of a section of the message.- Parameters:
level
- the level of the Header. It must be a value between 1 and 3style
- the XHTML style of the blockquote- Returns:
- this.
-
appendCloseHeaderTag
Appends a tag that indicates that a header section ends.- Parameters:
level
- the level of the Header. It must be a value between 1 and 3- Returns:
- this.
-
appendImageTag
Appends a tag that indicates an image.- Parameters:
align
- how text should flow around the picturealt
- the text to show if you don't show the pictureheight
- how tall is the picturesrc
- where to get the picturewidth
- how wide is the picture- Returns:
- this.
-
appendLineItemTag
Appends a tag that indicates the start of a new line item within a list.- Parameters:
style
- the style of the line item- Returns:
- this.
-
appendCloseLineItemTag
Appends a tag that indicates that a line item section ends.- Returns:
- this.
-
appendOpenOrderedListTag
Appends a tag that creates an ordered list. "Ordered" means that the order of the items in the list is important. To show this, browsers automatically number the list.- Parameters:
style
- the style of the ordered list- Returns:
- this.
-
appendCloseOrderedListTag
Appends a tag that indicates that an ordered list section ends.- Returns:
- this.
-
appendOpenUnorderedListTag
Appends a tag that creates an unordered list. The unordered part means that the items in the list are not in any particular order.- Parameters:
style
- the style of the unordered list- Returns:
- this.
-
appendCloseUnorderedListTag
Appends a tag that indicates that an unordered list section ends.- Returns:
- this.
-
appendOpenParagraphTag
Appends a tag that indicates the start of a new paragraph. This is usually rendered with two carriage returns, producing a single blank line in between the two paragraphs.- Parameters:
style
- the style of the paragraph- Returns:
- this.
-
appendCloseParagraphTag
Appends a tag that indicates the end of a new paragraph. This is usually rendered with two carriage returns, producing a single blank line in between the two paragraphs.- Returns:
- this.
-
appendOpenInlinedQuoteTag
Appends a tag that indicates that an inlined quote section begins.- Parameters:
style
- the style of the inlined quote- Returns:
- this.
-
appendCloseInlinedQuoteTag
Appends a tag that indicates that an inlined quote section ends.- Returns:
- this.
-
appendOpenSpanTag
Appends a tag that allows to set the fonts for a span of text.- Parameters:
style
- the style for a span of text- Returns:
- this.
-
appendCloseSpanTag
Appends a tag that indicates that a span section ends.- Returns:
- this.
-
appendOpenStrongTag
Appends a tag that indicates text which should be more forceful than surrounding text.- Returns:
- this.
-
appendCloseStrongTag
Appends a tag that indicates that a strong section ends.- Returns:
- this.
-
append
Appends a given text to the XHTMLText.- Parameters:
textToAppend
- the text to append- Returns:
- this.
-
toString
Returns the text of the XHTMLText. -
toXML
-