|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.util.HTMLTools
public class HTMLTools
Tools that can be applied in the development of servlets or JSP scripts handling JChem resources.
| Method Summary | |
|---|---|
static java.lang.String |
convertForAppletParameter(java.lang.String input)
Converts a string to a format that can be used as a value of an applet parameter in an HTML page. |
static java.lang.String |
convertForJavaScript(java.lang.String input)
Converts a string to a format that can be used as a value of JavaScript variable in an HTML page. |
static java.lang.String |
exceptionToPage(java.lang.Throwable e)
Creates an HTML page that displays the message(s) of an exception. |
static java.lang.String |
exceptionToString(java.lang.Throwable e)
Prints the message(s) of an exception in HTML format |
static java.awt.Color |
getColor(java.lang.String s)
Converts the string to a Color Object. |
static java.lang.String |
getHTMLColorString(java.awt.Color color)
Returns the HTML string representation of a Color |
static java.lang.String |
insertStringBeforeLineEnds(java.lang.String input,
java.lang.String insertion)
Inserts the specified string before the ends of lines. |
static java.lang.String |
stringToPage(java.lang.String text)
Creates an HTML page that displays the specified HTML text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String insertStringBeforeLineEnds(java.lang.String input,
java.lang.String insertion)
input - string containing line terminatorsinsertion - string to be inserted into inputString
before line terminators
public static java.lang.String convertForJavaScript(java.lang.String input)
input - original string containing line terminators
public static java.lang.String convertForAppletParameter(java.lang.String input)
input - original string containing line terminators
public static java.lang.String exceptionToString(java.lang.Throwable e)
public static java.lang.String stringToPage(java.lang.String text)
public static java.lang.String exceptionToPage(java.lang.Throwable e)
public static java.lang.String getHTMLColorString(java.awt.Color color)
color - the color
public static java.awt.Color getColor(java.lang.String s)
1.: Hexa RGB: #RRGGBB exmaple: "#00FF00" means full green
2.: Java awt.Color constant names examples: "cyan", "orange", "pink"
3.: Standard VGA colors:
"black" #000000
"white" #FFFFFF
"red" #FF0000
"yellow" #FFFF00
"lime" #00FF00
"aqua" #00FFFF
"blue" #0000FF
"fuchsia" #FF00FF
"gray" #808080
"silver" #C0C0C0
"maroon" #800000
"olive" #808000
"green" #008000
"teal" #008080
"navy" #000080
"purple" #800080
4.: Other colors:
"brown" #5C3317
"darkgreen" #006400
s - the color String to be parsed
Color object, or
null, if parsing was not successful
since 2.2
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||