Package de.hsh.graja.util.comment
Class HtmlFormattedContent
java.lang.Object
de.hsh.graja.util.comment.Content
de.hsh.graja.util.comment.AbstractElementContent
de.hsh.graja.util.comment.HtmlFormattedContent
- All Implemented Interfaces:
Serializable
This comment is a HTML preformatted content.
Usage example:
HtmlFormattedContent c= new HtmlFormattedContent(includeSpec, "Hello world!
");
- See Also:
-
Field Summary
Fields inherited from class de.hsh.graja.util.comment.Content
EXCLUSIVE, renderUuid -
Constructor Summary
ConstructorsConstructorDescriptionHtmlFormattedContent(IncludeSpec includeSpec, String data) Create a new content.HtmlFormattedContent(String data) Create a new content without include spec -
Method Summary
Modifier and TypeMethodDescriptionbooleanimplements the contract ofObject.equals(Object).getData()inthashCode()implements the contract ofObject.hashCode().booleanvoidrenderHtmlImpl(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx, boolean useJavascript) render content to HTML.voidrenderPlainImpl(StringBuilder appender, IncludeInfo includeInfo, RenderContext ctx) render content to plain text.voidSet new textThis method is for debugging purposes.Methods inherited from class de.hsh.graja.util.comment.AbstractElementContent
getNestedContentsMethods inherited from class de.hsh.graja.util.comment.Content
click, dehighlight, disableCallerStacktraceRecording, enableCallerStacktraceRecording, excludeGlobally, getIncludeSpec, getRenderUuid, getStackdump, hide, highlight, include, isCallerStacktraceRecordingEnabled, isHidden, isShowing, onClick, onClick, onHide, onHide, onLoad, onLoad, onShow, onShow, registerCallable, renderHtml, renderHtml, renderIdAttribute, renderJavascriptOncePerClass, renderOnClickAttribute, renderPlain, renderPlain, setGlobalIncludeInfo, setHref, setIncludeSpec, show, toString
-
Constructor Details
-
HtmlFormattedContent
Create a new content without include spec- Parameters:
data- the text of the comment
-
HtmlFormattedContent
Create a new content.- Parameters:
includeSpec- the includeSpec of the contentdata- the text of the content
-
-
Method Details
-
getData
- Returns:
- the text as it was passed to constructor or the setter.
-
setData
Set new text- Parameters:
data- the new text
-
isInlineContent
public boolean isInlineContent()- Specified by:
isInlineContentin classContent- Returns:
- false
- See Also:
-
toString
Description copied from class:ContentThis method is for debugging purposes. -
hashCode
public int hashCode()implements the contract ofObject.hashCode(). -
equals
implements the contract ofObject.equals(Object). -
renderHtmlImpl
public void renderHtmlImpl(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx, boolean useJavascript) Description copied from class:Contentrender content to HTML. This method is meant to be overriden by subclasses.- Specified by:
renderHtmlImplin classContent- Parameters:
sb- HTML code resultincludeInfo- controls, which content to be rendered.ctx- render contextuseJavascript- if true, the generated HTML code will contain Javascript- See Also:
-
de.hsh.graja.util.comment.Content#renderHtml(StringBuilder, IncludeInfo, RenderContext)
-
renderPlainImpl
Description copied from class:Contentrender content to plain text. This method is meant to be overriden by subclasses.- Specified by:
renderPlainImplin classContent- Parameters:
appender- plain text resultincludeInfo- controls, which content to be rendered.ctx- render context (unused).- See Also:
-