facets.core.app
Class HtmlView
java.lang.Object
facets.util.Tracer
facets.util.StatefulCore
facets.core.superficial.app.SelectionView
facets.core.app.TextView
facets.core.app.HtmlView
- All Implemented Interfaces:
- SView, Stateful, Titled, java.io.Serializable
public abstract class HtmlView
- extends TextView
TextView
displaying rich text defined using HTML.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
KEY_SOURCE
Key/node type for HTML source. |
static boolean |
showSource
|
Fields inherited from interface facets.core.superficial.app.SView |
NO_VIEW |
Constructor Summary |
HtmlView(java.lang.String title)
|
Method Summary |
int |
quickLineHeight()
Allows optimised rendering by truncation of content to fit viewer size. |
boolean |
showSource()
Instructs the viewer to display the HTML source. |
boolean |
wrapLines()
Re-implementation returning true for rich text. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface facets.util.Titled |
title |
showSource
public static boolean showSource
KEY_SOURCE
public static final java.lang.String KEY_SOURCE
- Key/node type for HTML source.
- See Also:
- Constant Field Values
HtmlView
public HtmlView(java.lang.String title)
showSource
public boolean showSource()
- Instructs the viewer to display the HTML source.
Default returns showSource
.
wrapLines
public boolean wrapLines()
- Re-implementation returning
true
for rich text.
- Overrides:
wrapLines
in class TextView
quickLineHeight
public int quickLineHeight()
- Allows optimised rendering by truncation of content to fit viewer size.
If the associated SViewer
returns as SSelection.content()
a
String
[] of lines, the viewer facet can optimise by only rendering a subset of
these; to do so it needs an estimate of height of each line.
- Returns:
- by default -1 to signal no value; or estimated pixel height of each line