|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cafesip.gwtcomp.client.utils.HTMLHelper
public class HTMLHelper
A set of helper methods for generating HTML segments that are commonly used. Whether you use GWT, JSF or any other GUI framework, there is no getting away from HTML coding (I guess that is why GWT also provides a HTML widget). This class contains method that help you generate commly-used HTML segments. For example you can use:
String important = HTMLHelper.bold ("Important!");
instead of
String important = "<b> + "Important" + "</b>";
| Constructor Summary | |
|---|---|
HTMLHelper()
|
|
| Method Summary | |
|---|---|
static String |
bold(String text)
HTML rendition of bold text. |
static String |
boxedText(String text)
HTML rendition of boxed text. |
static String |
bulletList(String[] items)
HTML rendition of a bullet (unordered) list. |
static String |
header(int i,
String title)
HTML rendition of a header element. |
static String |
hr(String color)
HTML rendition of a horizontal rule. |
static String |
imageWithText(String url,
String text)
HTML rendition of a image next to a text. |
static String |
italics(String text)
HTML rendition of italicized text. |
static String |
newline()
HTML rendition of newline. |
static String |
orderedList(String[] items)
HTML rendition of a numbered (ordered) list. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTMLHelper()
| Method Detail |
|---|
public static String bold(String text)
text - text to be rendered in bold.
public static String italics(String text)
text - text to be rendered in italicized format.
public static String newline()
public static String hr(String color)
color - Color of the line. Use the HTML color-definition conventions.
public static String boxedText(String text)
.gwtcomp-BoxedText
text - text to be boxed.
public static String imageWithText(String url,
String text)
url - URL of the imagetext - text
public static String orderedList(String[] items)
items - items in the list
public static String bulletList(String[] items)
items - items in the list.
public static String header(int i,
String title)
i - header level (1, 2, 3, 4, etc.)title - header text
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||