Class HtmlBuilder
- java.lang.Object
-
- com.vladsch.flexmark.util.html.HtmlAppendableBase<HtmlBuilder>
-
- com.vladsch.flexmark.util.html.ui.HtmlBuilder
-
- All Implemented Interfaces:
HtmlAppendable,LineAppendable,java.lang.Appendable,java.lang.Iterable<LineInfo>
public class HtmlBuilder extends HtmlAppendableBase<HtmlBuilder>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vladsch.flexmark.util.sequence.LineAppendable
LineAppendable.Options
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.HashMap<java.lang.Class,HtmlStyler>stylerMap-
Fields inherited from interface com.vladsch.flexmark.util.sequence.LineAppendable
ALLOW_LEADING_EOL, ALLOW_LEADING_WHITESPACE, COLLAPSE_WHITESPACE, CONVERT_TABS, F_COLLAPSE_WHITESPACE, F_CONVERT_TABS, F_FORMAT_ALL, F_PASS_THROUGH, F_PREFIX_PRE_FORMATTED, F_TRIM_LEADING_EOL, F_TRIM_LEADING_WHITESPACE, F_TRIM_TRAILING_WHITESPACE, F_WHITESPACE_REMOVAL, FORMAT_ALL, O_COLLAPSE_WHITESPACE, O_CONVERT_TABS, O_FORMAT_ALL, O_PASS_THROUGH, O_PREFIX_PRE_FORMATTED, O_TRIM_LEADING_EOL, O_TRIM_LEADING_WHITESPACE, O_TRIM_TRAILING_WHITESPACE, PASS_THROUGH, PREFIX_PRE_FORMATTED, TRIM_LEADING_WHITESPACE, TRIM_TRAILING_WHITESPACE
-
-
Constructor Summary
Constructors Constructor Description HtmlBuilder()HtmlBuilder(int indentSize, int formatOptions)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddColorStylerClass(java.lang.Class clazz)HtmlBuilderappend(boolean b)@NotNull HtmlBuilderappend(char c)HtmlBuilderappend(char[] str)HtmlBuilderappend(char[] str, int offset, int len)HtmlBuilderappend(double d)HtmlBuilderappend(float f)HtmlBuilderappend(int i)HtmlBuilderappend(long l)@NotNull HtmlBuilderappend(@NotNull java.lang.CharSequence s)@NotNull HtmlBuilderappend(@NotNull java.lang.CharSequence s, int start, int end)HtmlBuilderappend(java.lang.Object obj)HtmlBuilderappend(java.lang.String str)HtmlBuilderappend(java.lang.StringBuffer sb)@NotNull HtmlBuilderattr(@NotNull Attribute... attribute)@NotNull HtmlBuilderattr(@NotNull Attributes attributes)@NotNull HtmlBuilderattr(@NotNull java.lang.CharSequence name, @Nullable java.lang.CharSequence value)HtmlBuilderattr(java.lang.Object... convertible)HtmlBuildercloseAllTags()HtmlBuildercloseSpan()static AttributegetAttribute(java.lang.Object item)static HtmlStylergetHtmlStyler(java.lang.Object item)HtmlBuilderspan()HtmlBuilderspan(boolean withLine, java.lang.Runnable runnable)HtmlBuilderspan(java.lang.CharSequence text)HtmlBuilderspan(java.lang.Runnable runnable)HtmlBuilderspanLine(java.lang.Runnable runnable)HtmlBuilderstyle(java.lang.CharSequence value)java.lang.StringtoFinalizedString()-
Methods inherited from class com.vladsch.flexmark.util.html.HtmlAppendableBase
addIndentOnFirstEOL, addPrefix, addPrefix, append, append, appendTo, blankLine, blankLine, blankLineIf, changeOptions, closePre, closePreFormatted, closeTag, column, endsWithEOL, getAfterEolPrefixDelta, getAttributes, getBeforeEolPrefix, getBuilder, getEmptyAppendable, getIndentPrefix, getLine, getLineCount, getLineCountWithPending, getLineInfo, getLines, getLinesInfo, getOpenTags, getOpenTagsAfterLast, getOpenTagText, getOptions, getOptionSet, getPendingEOL, getPendingSpace, getPrefix, getTrailingBlankLines, indent, inPre, insertLine, isPendingSpace, isPreFormatted, isSuppressCloseTagLine, isSuppressOpenTagLine, iterator, line, lineIf, lineOnFirstText, lineWithTrailingSpaces, offset, offsetWithPending, openPre, openPreFormatted, popOptions, popPrefix, popPrefix, popTag, pushOptions, pushPrefix, pushTag, raw, raw, rawIndentedPre, rawPre, removeExtraBlankLines, removeIndentOnFirstEOL, removeLines, setAttributes, setIndentPrefix, setLine, setOptions, setPrefix, setPrefix, setPrefixLength, setSuppressCloseTagLine, setSuppressOpenTagLine, tag, tag, tag, tag, tagClosed, tagIndent, tagLine, tagLine, tagLine, tagLineIndent, tagOpened, tagVoid, tagVoidLine, text, toSequence, toString, toString, unIndent, unIndentNoEol, withAttr, withCondIndent, withCondLineOnChildText
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.vladsch.flexmark.util.sequence.LineAppendable
addOptions, append, append, appendAll, appendTo, appendTo, appendTo, appendTo, appendToSilently, appendToSilently, appendToSilently, appendToSilently, clearLineOnFirstText, copyAppendable, copyAppendable, copyAppendable, copyAppendable, copyAppendable, get, getLineContent, getLinePrefix, getLines, getLines, getLines, getLines, getLinesInfo, getLinesInfo, getTrailingBlankLines, isEmpty, isNotEmpty, noPreserveSpaces, noTrimLeading, preserveSpaces, removeExtraBlankLines, removeOptions, setLineOnFirstText, setOptions, setOptions, toSequence, toSequence, toSequence, toSequence, toString, toString, toString, toString, trimLeading
-
-
-
-
Field Detail
-
stylerMap
public static final java.util.HashMap<java.lang.Class,HtmlStyler> stylerMap
-
-
Method Detail
-
closeAllTags
public HtmlBuilder closeAllTags()
-
toFinalizedString
public java.lang.String toFinalizedString()
-
attr
public HtmlBuilder attr(java.lang.Object... convertible)
-
attr
@NotNull public @NotNull HtmlBuilder attr(@NotNull @NotNull java.lang.CharSequence name, @Nullable @Nullable java.lang.CharSequence value)
- Specified by:
attrin interfaceHtmlAppendable- Overrides:
attrin classHtmlAppendableBase<HtmlBuilder>
-
style
public HtmlBuilder style(java.lang.CharSequence value)
-
attr
@NotNull public @NotNull HtmlBuilder attr(@NotNull @NotNull Attribute... attribute)
- Specified by:
attrin interfaceHtmlAppendable- Overrides:
attrin classHtmlAppendableBase<HtmlBuilder>
-
attr
@NotNull public @NotNull HtmlBuilder attr(@NotNull @NotNull Attributes attributes)
- Specified by:
attrin interfaceHtmlAppendable- Overrides:
attrin classHtmlAppendableBase<HtmlBuilder>
-
span
public HtmlBuilder span()
-
span
public HtmlBuilder span(java.lang.CharSequence text)
-
span
public HtmlBuilder span(boolean withLine, java.lang.Runnable runnable)
-
span
public HtmlBuilder span(java.lang.Runnable runnable)
-
spanLine
public HtmlBuilder spanLine(java.lang.Runnable runnable)
-
closeSpan
public HtmlBuilder closeSpan()
-
addColorStylerClass
public static void addColorStylerClass(java.lang.Class clazz)
-
getHtmlStyler
public static HtmlStyler getHtmlStyler(java.lang.Object item)
-
getAttribute
public static Attribute getAttribute(java.lang.Object item)
-
append
public HtmlBuilder append(java.lang.Object obj)
-
append
public HtmlBuilder append(java.lang.String str)
-
append
public HtmlBuilder append(java.lang.StringBuffer sb)
-
append
@NotNull public @NotNull HtmlBuilder append(@NotNull @NotNull java.lang.CharSequence s)
- Specified by:
appendin interfacejava.lang.Appendable- Specified by:
appendin interfaceLineAppendable- Overrides:
appendin classHtmlAppendableBase<HtmlBuilder>
-
append
@NotNull public @NotNull HtmlBuilder append(@NotNull @NotNull java.lang.CharSequence s, int start, int end)
- Specified by:
appendin interfacejava.lang.Appendable- Specified by:
appendin interfaceLineAppendable- Overrides:
appendin classHtmlAppendableBase<HtmlBuilder>
-
append
public HtmlBuilder append(char[] str)
-
append
public HtmlBuilder append(char[] str, int offset, int len)
-
append
public HtmlBuilder append(boolean b)
-
append
@NotNull public @NotNull HtmlBuilder append(char c)
- Specified by:
appendin interfacejava.lang.Appendable- Specified by:
appendin interfaceLineAppendable- Overrides:
appendin classHtmlAppendableBase<HtmlBuilder>
-
append
public HtmlBuilder append(int i)
-
append
public HtmlBuilder append(long l)
-
append
public HtmlBuilder append(float f)
-
append
public HtmlBuilder append(double d)
-
-