|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.Component
com.threerings.opengl.gui.text.HTMLView
public class HTMLView
Displays HTML using Java's HTML rendering support to layout and render the HTML. This is not a part of the text factory system as we're not going to write our own HTML renderer to avoid dependence on Sun's JDK. If you don't want to depend on that, don't use this class.
Note: width and height hints do not work. The Java HTML code doesn't seem to handle being sized to a particular width or height and then determining its preferred span along the other axis. So we always get the "natural" preferred size of the HTML without any forced wrapping. Of course if the component is forcibly made smaller, the HTML will be wrapped, but it may not fit in the vertical or horizontal space made available. Caveat user.
| Field Summary |
|---|
| Fields inherited from class com.threerings.opengl.gui.Component |
|---|
DEFAULT, DISABLED, HOVER |
| Constructor Summary | |
|---|---|
HTMLView(GlContext ctx)
Creates a blank HTML view. |
|
HTMLView(GlContext ctx,
String stylesheet,
String contents)
Creates an HTML view with the specified contents. |
|
| Method Summary | |
|---|---|
HTMLEditorKit |
getEditorKit()
Returns the HTML editor kit used by this view. |
StyleSheet |
getStyleSheet()
Returns the stylesheet in effect for this view. |
void |
setAntialiased(boolean antialias)
Configures whether or not our text is antialiased. |
void |
setContents(HTMLDocument document)
Configures the contents of this HTML view. |
void |
setContents(String contents)
Configures the contents of this HTML view. |
void |
setStyleSheet(String stylesheet)
Configures the stylesheet used to render HTML in this view. |
void |
setStyleSheet(StyleSheet stylesheet)
Configures the stylesheet used to render HTML in this view. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTMLView(GlContext ctx)
setContents(java.lang.String).
public HTMLView(GlContext ctx,
String stylesheet,
String contents)
| Method Detail |
|---|
public void setAntialiased(boolean antialias)
public void setStyleSheet(String stylesheet)
public void setStyleSheet(StyleSheet stylesheet)
public StyleSheet getStyleSheet()
public HTMLEditorKit getEditorKit()
public void setContents(String contents)
public void setContents(HTMLDocument document)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||