TV-Browser 2.7.5 API

util.ui.html
Class HTMLTextHelper

java.lang.Object
  extended by util.ui.html.HTMLTextHelper

public class HTMLTextHelper
extends Object

This is a Helper-Class for converting Text to HMTL

Since:
2.1
Author:
bodum

Constructor Summary
HTMLTextHelper()
           
 
Method Summary
static String convertHtmlToText(String html)
          Replaces HTML German umlauts and the HTML formatting tags with a Java String.
static String convertTextToHtml(String text)
          Convert Text to HTML. > and < will be converted to > and < \n will be <br> Links in the text will be made clickable.
static String convertTextToHtml(String text, boolean createLinks)
          Convert Text to HTML. > and < will be converted to > and < \n will be <br> If createLinks is true, it will try to find links and make them clickable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLTextHelper

public HTMLTextHelper()
Method Detail

convertTextToHtml

public static String convertTextToHtml(String text)
Convert Text to HTML. > and < will be converted to > and < \n will be <br> Links in the text will be made clickable.

Parameters:
text - text to display
Returns:
Result
Since:
2.7

convertTextToHtml

public static String convertTextToHtml(String text,
                                       boolean createLinks)
Convert Text to HTML. > and < will be converted to > and < \n will be <br> If createLinks is true, it will try to find links and make them clickable

Parameters:
text - text to display
createLinks - if true, it will create links
Returns:
Result

convertHtmlToText

public static String convertHtmlToText(String html)
Replaces HTML German umlauts and the HTML formatting tags with a Java String.

Parameters:
html - The HTML text to replace.
Returns:
The text with the replaced Strings.
Since:
2.7

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)