Package de.hsh.graja.util.comment
Class Newline
- java.lang.Object
-
- de.hsh.graja.util.comment.Content
-
- de.hsh.graja.util.comment.AbstractElementContent
-
- de.hsh.graja.util.comment.Newline
-
- All Implemented Interfaces:
Serializable
public class Newline extends AbstractElementContent
This content is rendered as a <br/> inside a paragraph. A subsequent content will begin immediately after this content on a new line.
Usage example:
Paragraph para= new Paragraph(); para.formatInlineItem(includeSpec, "%s: %d", "Expected result", 15); para.newLine(includeSpec); para.formatInlineItem(includeSpec, "%s: %d", "Observed result", 12);
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.hsh.graja.util.comment.Content
EXCLUSIVE, renderUuid
-
-
Constructor Summary
Constructors Constructor Description Newline(IncludeSpec includeSpec)
Create a new content.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
renderHtmlImpl(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx, boolean useJavascript)
render content to HTML.void
renderPlainImpl(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx)
render content to plain text.String
toString(String prefix)
This method is for debugging purposes.-
Methods inherited from class de.hsh.graja.util.comment.AbstractElementContent
getNestedContents
-
Methods inherited from class de.hsh.graja.util.comment.Content
click, disableCallerStacktraceRecording, enableCallerStacktraceRecording, equals, excludeGlobally, getIncludeSpec, getRenderUuid, getStackdump, hashCode, hide, 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 Detail
-
Newline
public Newline(IncludeSpec includeSpec)
Create a new content.- Parameters:
includeSpec
- the includeSpec of the content
-
-
Method Detail
-
toString
public String toString(String prefix)
Description copied from class:Content
This method is for debugging purposes.- Overrides:
toString
in classContent
- Parameters:
prefix
- If the output has multiple lines,prefix
specifies the indentation of the subsequent lines.- Returns:
- a string representation of the content and it's internal structure.
- See Also:
Content.toString(java.lang.String)
-
renderHtmlImpl
public void renderHtmlImpl(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx, boolean useJavascript)
Description copied from class:Content
render content to HTML. This method is meant to be overriden by subclasses.- Specified by:
renderHtmlImpl
in 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:
Content#renderHtmlImpl(StringBuilder, IncludeInfo, RenderContext)
-
renderPlainImpl
public void renderPlainImpl(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx)
Description copied from class:Content
render content to plain text. This method is meant to be overriden by subclasses.- Specified by:
renderPlainImpl
in classContent
- Parameters:
sb
- plain text resultincludeInfo
- controls, which content to be rendered.ctx
- render context (unused).- See Also:
Content.renderPlainImpl(StringBuilder, IncludeInfo, RenderContext)
-
-