public class HtmlUtilFns extends java.lang.Object implements HtmlConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HTML_START_TAG
HTML start tag, any HTML strings should start with this.
|
ANCHOR_ELEMENT, BOLD_ELEMENT, COLOR_ATTRIBUTE, FONT_ELEMENT, HORIZONTAL_RULE_ELEMENT, HREF_ATTRIBUTE, HTML_ELEMENT, LINE_BREAK_ELEMENT, PARAGRAPH_ELEMENT, WORD_BREAK_ELEMENT
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
createHref(java.lang.String url,
java.lang.String s)
Create the HREF text.
|
static java.lang.String |
createTag(java.lang.String element)
Create the tag text.
|
static java.lang.String |
createTag(java.lang.String element,
java.lang.String s)
Create the tag text.
|
static java.lang.String |
createTag(java.lang.String element,
java.lang.String s,
java.lang.String attributeText)
Create the tag text.
|
static java.lang.String |
createTag(java.lang.String element,
java.lang.String s,
java.lang.String[] attributeTextArray)
Create the tag text.
|
static java.lang.String |
getColorAttributeText(java.awt.Color color)
Gets the font color text.
|
static java.lang.String |
getFontText(java.lang.String s,
java.awt.Color color)
Gets the font text for the specified color.
|
static java.lang.String |
getHtmlText(java.lang.String s)
Gets the html text by adding the HTML elements if needed.
|
static java.lang.String |
getNameValueText(java.lang.String name,
java.lang.String value)
Get the name value text.
|
static java.lang.String |
getQuotedText(java.lang.String s)
Get the quoted text.
|
static java.lang.String[] |
getStringArray(java.lang.String s)
Gets the string array with the specified string.
|
static java.lang.String |
getText(java.lang.String s,
java.lang.String element)
Gets the text with the specified element.
|
static java.lang.String |
getText(java.lang.String s,
java.lang.String element,
java.lang.String attributeText)
Gets the text with the specified element.
|
static boolean |
isClosingTagOptional(java.lang.String element)
Determines if the closing tag is optional for the specified element.
|
static boolean |
startsWithHtml(java.lang.String s)
Determines if the text starts with the HTML start tag.
|
public static final java.lang.String HTML_START_TAG
public static java.lang.String createHref(java.lang.String url, java.lang.String s)
url
- the URL.s
- the text or null if none.public static java.lang.String createTag(java.lang.String element)
element
- the element (such as BOLD_ELEMENT) or null if none.public static java.lang.String createTag(java.lang.String element, java.lang.String s)
element
- the element (such as BOLD_ELEMENT) or null if none.s
- the text or null if none.public static java.lang.String createTag(java.lang.String element, java.lang.String s, java.lang.String attributeText)
element
- the element (such as BOLD_ELEMENT) or null if none.s
- the text or null if none.attributeText
- the attribute text or null if none.public static java.lang.String createTag(java.lang.String element, java.lang.String s, java.lang.String[] attributeTextArray)
element
- the element (such as BOLD_ELEMENT) or null if none.s
- the text or null if none.attributeTextArray
- the attribute text array or null if none.public static java.lang.String getColorAttributeText(java.awt.Color color)
color
- the color or null if none.public static java.lang.String getFontText(java.lang.String s, java.awt.Color color)
s
- the text or null if none.color
- the color or null if none.public static java.lang.String getHtmlText(java.lang.String s)
s
- the text or null if none.public static java.lang.String getNameValueText(java.lang.String name, java.lang.String value)
name
- the name.value
- the value.public static java.lang.String getQuotedText(java.lang.String s)
s
- the text.public static java.lang.String[] getStringArray(java.lang.String s)
s
- the string or null if none.public static java.lang.String getText(java.lang.String s, java.lang.String element)
s
- the text or null if none.element
- the element (such as BOLD_ELEMENT) or null if none.public static java.lang.String getText(java.lang.String s, java.lang.String element, java.lang.String attributeText)
s
- the text or null if none.element
- the element (such as BOLD_ELEMENT) or null if none.attributeText
- the attribute text or null if none.public static boolean isClosingTagOptional(java.lang.String element)
element
- the element (such as BOLD_ELEMENT) or null if none.public static boolean startsWithHtml(java.lang.String s)
s
- the text.