|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.xml.HTMLs
public class HTMLs
Utilities for HTML attributes and styles.
| Constructor Summary | |
|---|---|
HTMLs()
|
|
| Method Summary | |
|---|---|
static void |
appendAttribute(java.lang.StringBuffer sb,
java.lang.String name,
boolean val)
Appends an attribute to the string buffer for HTML/XML (name="val"). |
static void |
appendAttribute(java.lang.StringBuffer sb,
java.lang.String name,
int val)
Appends an attribute to the string buffer for HTML/XML (name="val"). |
static void |
appendAttribute(java.lang.StringBuffer sb,
java.lang.String name,
java.lang.String val)
Appends an attribute to the string buffer for HTML/XML (name="val"). |
static void |
appendStyle(java.lang.StringBuffer sb,
java.lang.String name,
java.lang.String val)
Appends a style value to the string buffer for HTML/XML (name:"val";). |
static int |
getSubstyleIndex(java.lang.String style,
java.lang.String substyle)
Returns the position of the specified substyle, or -1 if not found. |
static java.lang.String |
getSubstyleValue(java.lang.String style,
int j)
Returns the value starting at the specified index (never null). |
static java.lang.String |
getTextRelevantStyle(java.lang.String style)
Retrieves text relevant CSS styles. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTMLs()
| Method Detail |
|---|
public static final void appendAttribute(java.lang.StringBuffer sb,
java.lang.String name,
java.lang.String val)
Note: XMLs.encodeAttribute(java.lang.String) is called automatically
to encode val.
public static final void appendAttribute(java.lang.StringBuffer sb,
java.lang.String name,
int val)
public static final void appendAttribute(java.lang.StringBuffer sb,
java.lang.String name,
boolean val)
public static final void appendStyle(java.lang.StringBuffer sb,
java.lang.String name,
java.lang.String val)
public static final int getSubstyleIndex(java.lang.String style,
java.lang.String substyle)
style - the stylesubstyle - the sub-style, e.g., display.
java.lang.IllegalArgumentException - if style is null, or substyle is null
or empty.
public static final java.lang.String getSubstyleValue(java.lang.String style,
int j)
Note: the index is usually the returned vale of getSubstyleIndex(java.lang.String, java.lang.String).
style - the stylej - the index that the substyle starts at (including the style's name)public static final java.lang.String getTextRelevantStyle(java.lang.String style)
For example, if style is "border: 1px solid blue; font-size: 10px; padding: 3px; color: black;", then "font-size: 10px;color: black;" is returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||