facets.core.app
Class HtmlContent

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.util.StatefulCore
          extended by facets.core.app.HtmlContent
All Implemented Interfaces:
Stateful, Titled, java.io.Serializable

public final class HtmlContent
extends StatefulCore

Stateful container for mutable HTML source.

See Also:
Serialized Form

Nested Class Summary
static class HtmlContent.HtmlSelected
          Defines start and end of text selection in rendering and source.
 
Constructor Summary
HtmlContent(java.lang.String title, java.lang.String source)
          Unique constructor.
 
Method Summary
 Stateful copyState()
          Implements interface method.
 SSelection newSelection(int start, int stop, boolean inSource)
           
 void setState(java.lang.Object src)
          Implements interface method.
 java.lang.String source()
          The HTML currently wrapped, possibly set via setState(Object).
 boolean stateEquals(Stateful s)
          Invalid stub implementation.
 
Methods inherited from class facets.util.StatefulCore
setTitle, 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
 

Constructor Detail

HtmlContent

public HtmlContent(java.lang.String title,
                   java.lang.String source)
Unique constructor.

Parameters:
title - passed to superclass
source - valid HTML text, non-null but possibly empty
Method Detail

source

public java.lang.String source()
The HTML currently wrapped, possibly set via setState(Object).

Returns:
valid HTML text, non-null but possibly empty

setState

public void setState(java.lang.Object src)
Description copied from class: StatefulCore
Implements interface method.

Does not actually set any state, but does change the value returned by StatefulCore.stateStamp(): if updating itself by calling StatefulCore.updateStateStamp(), otherwise by casting src to a Stateful and copying its StatefulCore.stateStamp()

Specified by:
setState in interface Stateful
Overrides:
setState in class StatefulCore
Parameters:
src - must be non-null and interpretable by the implementation as state information; it will usually be another instance of the Stateful's class.

copyState

public Stateful copyState()
Description copied from class: StatefulCore
Implements interface method.

Wrapper for Util.deserializedCopy(Serializable)

Specified by:
copyState in interface Stateful
Overrides:
copyState in class StatefulCore

stateEquals

public boolean stateEquals(Stateful s)
Description copied from class: StatefulCore
Invalid stub implementation.

Specified by:
stateEquals in interface Stateful
Overrides:
stateEquals in class StatefulCore
Parameters:
s - to compare

newSelection

public SSelection newSelection(int start,
                               int stop,
                               boolean inSource)