public class BasicHTML extends java.lang.Object
ComponentUI
implementations.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
documentBaseKey
The key that is used to store the document base in a JComponent's client
properties.
|
static java.lang.String |
propertyKey
The key that is used to store a HTML view in a JComponent's client
properties.
|
| Constructor and Description |
|---|
BasicHTML()
Creates a new instance of BasicHTML.
|
| Modifier and Type | Method and Description |
|---|---|
static javax.swing.text.View |
createHTMLView(javax.swing.JComponent c,
java.lang.String html)
Creates a
View instance that can be used by the component
c to render the HTML string html. |
static boolean |
isHTMLString(java.lang.String s)
Returns
true if s is HTML, false
otherwise. |
static void |
updateRenderer(javax.swing.JComponent c,
java.lang.String text)
Stores a HTML renderer in
c's client property if
text is HTML, otherwise it clears the corresponding client
property. |
public static final java.lang.String propertyKey
public static final java.lang.String documentBaseKey
public BasicHTML()
public static javax.swing.text.View createHTMLView(javax.swing.JComponent c, java.lang.String html)
View instance that can be used by the component
c to render the HTML string html.c - the component that needs to render the HTML stringhtml - the HTML string to be renderedpublic static boolean isHTMLString(java.lang.String s)
true if s is HTML, false
otherwise.s - the string to testtrue if s is HTML, false
otherwisepublic static void updateRenderer(javax.swing.JComponent c, java.lang.String text)
c's client property if
text is HTML, otherwise it clears the corresponding client
property. This is useful for ComponentUI
implementations that are shared between it's components.c - the component to update the renderer fortext - the string to be rendered