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 void
addColorStylerClass(java.lang.Class clazz)
HtmlBuilder
append(boolean b)
HtmlBuilder
append(char c)
HtmlBuilder
append(char[] str)
HtmlBuilder
append(char[] str, int offset, int len)
HtmlBuilder
append(double d)
HtmlBuilder
append(float f)
HtmlBuilder
append(int i)
HtmlBuilder
append(long l)
HtmlBuilder
append(java.lang.CharSequence s)
HtmlBuilder
append(java.lang.CharSequence s, int start, int end)
HtmlBuilder
append(java.lang.Object obj)
HtmlBuilder
append(java.lang.String str)
HtmlBuilder
append(java.lang.StringBuffer sb)
HtmlBuilder
attr(Attribute... attribute)
HtmlBuilder
attr(Attributes attributes)
HtmlBuilder
attr(java.lang.CharSequence name, java.lang.CharSequence value)
HtmlBuilder
attr(java.lang.Object... convertible)
HtmlBuilder
closeAllTags()
HtmlBuilder
closeSpan()
static Attribute
getAttribute(java.lang.Object item)
static HtmlStyler
getHtmlStyler(java.lang.Object item)
HtmlBuilder
span()
HtmlBuilder
span(boolean withLine, java.lang.Runnable runnable)
HtmlBuilder
span(java.lang.CharSequence text)
HtmlBuilder
span(java.lang.Runnable runnable)
HtmlBuilder
spanLine(java.lang.Runnable runnable)
HtmlBuilder
style(java.lang.CharSequence value)
java.lang.String
toFinalizedString()
-
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 HtmlBuilder attr(@NotNull java.lang.CharSequence name, @Nullable java.lang.CharSequence value)
- Specified by:
attr
in interfaceHtmlAppendable
- Overrides:
attr
in classHtmlAppendableBase<HtmlBuilder>
-
style
public HtmlBuilder style(java.lang.CharSequence value)
-
attr
@NotNull public HtmlBuilder attr(@NotNull Attribute... attribute)
- Specified by:
attr
in interfaceHtmlAppendable
- Overrides:
attr
in classHtmlAppendableBase<HtmlBuilder>
-
attr
@NotNull public HtmlBuilder attr(@NotNull Attributes attributes)
- Specified by:
attr
in interfaceHtmlAppendable
- Overrides:
attr
in 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 HtmlBuilder append(@NotNull java.lang.CharSequence s)
- Specified by:
append
in interfacejava.lang.Appendable
- Specified by:
append
in interfaceLineAppendable
- Overrides:
append
in classHtmlAppendableBase<HtmlBuilder>
-
append
@NotNull public HtmlBuilder append(@NotNull java.lang.CharSequence s, int start, int end)
- Specified by:
append
in interfacejava.lang.Appendable
- Specified by:
append
in interfaceLineAppendable
- Overrides:
append
in 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 HtmlBuilder append(char c)
- Specified by:
append
in interfacejava.lang.Appendable
- Specified by:
append
in interfaceLineAppendable
- Overrides:
append
in 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)
-
-