Package de.hsh.graja.util.comment
Class List
java.lang.Object
de.hsh.graja.util.comment.Content
de.hsh.graja.util.comment.AbstractSequenceContent
de.hsh.graja.util.comment.Sequence
de.hsh.graja.util.comment.List
- All Implemented Interfaces:
ContentLogger
,Serializable
A content list is a numbered or unnumbered list of items. Each item itself can be a simple or a complex content.
Usage example:
List list= new List(ListComment.ListType.UNNUMBERED); for (long val : actualSleepMillis) { list.addItem(new Paragraph(Inline.format(includeSpec, "start - %d ms - stop", val))); }
The result is rendered in HTML as follows:
-
start - 50 ms - stop
-
start - 60 ms - stop
-
start - 55 ms - stop
-
start - 50 ms - stop
-
start - 150 ms - stop
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
This enum specifies, whether the list is rendered with or without leading numbers. -
Field Summary
Fields inherited from class de.hsh.graja.util.comment.Content
EXCLUSIVE, renderUuid
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
implements the contract ofObject.equals(Object)
.int
hashCode()
implements the contract ofObject.hashCode()
.void
renderHtmlImpl
(StringBuilder sb, IncludeInfo includeInfo, RenderContext ctx, boolean useJavascript) appends all comments in the sequence one after the other without any visual marks between the individual items.void
renderPlainImpl
(StringBuilder appender, IncludeInfo includeInfo, RenderContext ctx) appends all comments in the sequence one after the other without any visual marks between the individual items.This method is for debugging purposes.Methods inherited from class de.hsh.graja.util.comment.Sequence
addItem, addItems, clear, formatAsInlineNewlineSeq, getNestedContents, size
Methods inherited from class de.hsh.graja.util.comment.AbstractSequenceContent
isInlineContent
Methods 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
-
List
Create an empty list- Parameters:
listType
- the render type.
-
-
Method Details
-
getListType
- Returns:
- the render type
-
toString
Description copied from class:Content
This 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:Sequence
appends all comments in the sequence one after the other without any visual marks between the individual items.- Overrides:
renderHtmlImpl
in classSequence
- 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:Sequence
appends all comments in the sequence one after the other without any visual marks between the individual items.- Overrides:
renderPlainImpl
in classSequence
- Parameters:
appender
- plain text resultincludeInfo
- controls, which content to be rendered.ctx
- render context (unused).- See Also:
-