facets.core.app
Class HtmlView

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.util.StatefulCore
          extended by facets.core.superficial.app.SelectionView
              extended by facets.core.app.TextView
                  extended by 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 class facets.core.app.TextView
FONT_LARGER, FONT_OFFSET, FONT_SMALLER, PAGE_BACK, PAGE_DOWN, PAGE_FORWARD, PAGE_NEXT, PAGE_PREVIOUS, PAGE_UP
 
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 facets.core.superficial.app.SelectionView
allowMultipleSelection, isLive, newViewerSelection
 
Methods inherited from class facets.util.StatefulCore
copyState, setState, setTitle, stateEquals, stateStamp, title, toString, updateStateStamp
 
Methods inherited from class facets.util.Tracer
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass
 
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
 

Field Detail

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
Constructor Detail

HtmlView

public HtmlView(java.lang.String title)
Method Detail

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