Top Fields Constructors Methods
com.vladsch.flexmark.util.html.ui

public Class HtmlBuilder

extends HtmlAppendableBase<HtmlBuilder>
Class Inheritance
Annotations
@SuppressWarnings:WeakerAccess
Imports
com.vladsch.flexmark.util.html.Attribute, .AttributeImpl, .Attributes, .HtmlAppendableBase, com.vladsch.flexmark.util.sequence.LineAppendable, org.jetbrains.annotations.NotNull, .Nullable, javax.swing.plaf.FontUIResource, java.awt.Font, java.util.HashMap

Field Summary

Modifier and TypeField and Description
public static final HashMap<Class<T>, HtmlStyler<T>>

Constructor Summary

AccessConstructor and Description
public
public
HtmlBuilder(int indentSize, int formatOptions)

Method Summary

Modifier and TypeMethod and Description
public static void
public HtmlBuilder
public HtmlBuilder
public HtmlBuilder
public @NotNull HtmlBuilder
append(@NotNull CharSequence
The character sequence to append. If csq is null, then the four characters "null" are appended to this Appendable.
s
)

Implements java.lang.Appendable.append.

Appends the specified character sequence to this Appendable.

public @NotNull HtmlBuilder
append(@NotNull CharSequence
The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null".
s
,
int
The index of the first character in the subsequence
start
,
int
The index of the character following the last character in the subsequence
end
)

Implements java.lang.Appendable.append.

Appends a subsequence of the specified character sequence to this Appendable.

public HtmlBuilder
append(char[] str)

public HtmlBuilder
append(char[] str, int offset, int len)

public HtmlBuilder
append(boolean b)

public @NotNull HtmlBuilder
append(char
The character to append
c
)

Overrides com.vladsch.flexmark.util.html.HtmlAppendableBase.append.

Implements com.vladsch.flexmark.util.sequence.LineAppendable.append.

Appends the specified character to this Appendable.

public HtmlBuilder
append(int i)

public HtmlBuilder
append(long l)

public HtmlBuilder
append(float f)

public HtmlBuilder
append(double d)

public HtmlBuilder
attr(Object... convertible)

public @NotNull HtmlBuilder
public @NotNull HtmlBuilder
attr(@NotNull Attribute... attribute)

public @NotNull HtmlBuilder
attr(@NotNull Attributes attributes)

public HtmlBuilder
public HtmlBuilder
public static Attribute
public static HtmlStyler<T>
public HtmlBuilder
span()

public HtmlBuilder
public HtmlBuilder
span(boolean withLine, Runnable runnable)

public HtmlBuilder
span(Runnable runnable)

public HtmlBuilder
spanLine(Runnable runnable)

public HtmlBuilder
public String
Inherited from com.vladsch.flexmark.util.html.HtmlAppendableBase:
addIndentOnFirstEOLaddPrefixaddPrefixappendappendappendappendappendToattrattrattrblankLineblankLineblankLineIfchangeOptionsclosePreclosePreFormattedcloseTagcolumnendsWithEOLgetAfterEolPrefixDeltagetAttributesgetBeforeEolPrefixgetBuildergetEmptyAppendablegetIndentPrefixgetLinegetLineCountgetLineCountWithPendinggetLineInfogetLinesgetLinesInfogetOpenTagsgetOpenTagsAfterLastgetOpenTagTextgetOptionsgetOptionSetgetPendingEOLgetPendingSpacegetPrefixgetTrailingBlankLinesindentinPreinsertLineisPendingSpaceisPreFormattedisSuppressCloseTagLineisSuppressOpenTagLineiteratorlinelineIflineOnFirstTextlineWithTrailingSpacesoffsetoffsetWithPendingopenPreopenPreFormattedpopOptionspopPrefixpopPrefixpopTagpushOptionspushPrefixpushTagrawrawrawIndentedPrerawPreremoveExtraBlankLinesremoveIndentOnFirstEOLremoveLinessetAttributessetIndentPrefixsetLinesetOptionssetPrefixsetPrefixsetPrefixLengthsetSuppressCloseTagLinesetSuppressOpenTagLinetagtagtagtagtagClosedtagIndenttagLinetagLinetagLinetagLineIndenttagOpenedtagVoidtagVoidLinetexttoSequencetoStringtoStringunIndentunIndentNoEolwithAttrwithCondIndentwithCondLineOnChildText

Field Detail

stylerMapback to summary
public static final HashMap<Class<T>, HtmlStyler<T>> stylerMap

Constructor Detail

HtmlBuilderback to summary
public HtmlBuilder()
HtmlBuilderback to summary
public HtmlBuilder(int indentSize, int formatOptions)

Method Detail

addColorStylerClassback to summary
public static void addColorStylerClass(Class<T> clazz)
appendback to summary
public HtmlBuilder append(Object obj)
appendback to summary
public HtmlBuilder append(String str)
appendback to summary
public HtmlBuilder append(StringBuffer sb)
appendback to summary
public @NotNull HtmlBuilder append(@NotNull CharSequence s)

Implements java.lang.Appendable.append.

Doc from java.lang.Appendable.append.

Appends the specified character sequence to this Appendable.

Depending on which class implements the character sequence csq, the entire sequence may not be appended. For instance, if csq is a java.nio.CharBuffer then the subsequence to append is defined by the buffer's position and limit.

The contents of this Appendable are unspecified if the CharSequence is modified during the method call or an exception is thrown when accessing the CharSequence.

Parameters
s:@NotNull CharSequence

The character sequence to append. If csq is null, then the four characters "null" are appended to this Appendable.

Returns:@NotNull HtmlBuilder

A reference to this Appendable

Annotations
@NotNull
appendback to summary
public @NotNull HtmlBuilder append(@NotNull CharSequence s, int start, int end)

Implements java.lang.Appendable.append.

Doc from java.lang.Appendable.append.

Appends a subsequence of the specified character sequence to this Appendable.

An invocation of this method of the form out.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation

    out.append(csq.subSequence(start, end)) 

The contents of this Appendable are unspecified if the CharSequence is modified during the method call or an exception is thrown when accessing the CharSequence.

Parameters
s:@NotNull CharSequence

The character sequence from which a subsequence will be appended. If csq is null, then characters will be appended as if csq contained the four characters "null".

start:int

The index of the first character in the subsequence

end:int

The index of the character following the last character in the subsequence

Returns:@NotNull HtmlBuilder

A reference to this Appendable

Annotations
@NotNull
appendback to summary
public HtmlBuilder append(char[] str)
appendback to summary
public HtmlBuilder append(char[] str, int offset, int len)
appendback to summary
public HtmlBuilder append(boolean b)
appendback to summary
public @NotNull HtmlBuilder append(char c)

Overrides com.vladsch.flexmark.util.html.HtmlAppendableBase.append.

Implements com.vladsch.flexmark.util.sequence.LineAppendable.append.

Doc from java.lang.Appendable.append.

Appends the specified character to this Appendable.

Parameters
c:char

The character to append

Returns:@NotNull HtmlBuilder

A reference to this Appendable

Annotations
@NotNull
appendback to summary
public HtmlBuilder append(int i)
appendback to summary
public HtmlBuilder append(long l)
appendback to summary
public HtmlBuilder append(float f)
appendback to summary
public HtmlBuilder append(double d)
attrback to summary
public HtmlBuilder attr(Object... convertible)
Annotations
@SuppressWarnings:WeakerAccess
attrback to summary
public @NotNull HtmlBuilder attr(@NotNull CharSequence name, @Nullable CharSequence value)
Annotations
@NotNull
@Override
attrback to summary
public @NotNull HtmlBuilder attr(@NotNull Attribute... attribute)
Annotations
@NotNull
@Override
attrback to summary
public @NotNull HtmlBuilder attr(@NotNull Attributes attributes)
Annotations
@NotNull
@Override
closeAllTagsback to summary
public HtmlBuilder closeAllTags()
Annotations
@SuppressWarnings:UnusedReturnValue, WeakerAccess
closeSpanback to summary
public HtmlBuilder closeSpan()
getAttributeback to summary
public static Attribute getAttribute(Object item)
getHtmlStylerback to summary
public static HtmlStyler<T> getHtmlStyler(Object item)
spanback to summary
public HtmlBuilder span()
spanback to summary
public HtmlBuilder span(CharSequence text)
spanback to summary
public HtmlBuilder span(boolean withLine, Runnable runnable)
spanback to summary
public HtmlBuilder span(Runnable runnable)
spanLineback to summary
public HtmlBuilder spanLine(Runnable runnable)
styleback to summary
public HtmlBuilder style(CharSequence value)
toFinalizedStringback to summary
public String toFinalizedString()