Package it.smartio.docs.builder
Class CodeBuilder
- java.lang.Object
-
- it.smartio.docs.builder.NodeBuilder
-
- it.smartio.docs.builder.SectionBuilder
-
- it.smartio.docs.builder.ContentBuilder
-
- it.smartio.docs.builder.CodeBuilder
-
public class CodeBuilder extends ContentBuilder implements CodeNode
TheCodeBuilderclass.
-
-
Constructor Summary
Constructors Constructor Description CodeBuilder(boolean styled)Constructs an instance ofCodeBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContent(java.lang.String content)<N extends NodeBuilder>
NaddNode(N node)Add a childNodeBuilder.java.lang.StringgetBackground()Gets the background color.java.lang.StringgetBorderColor()Gets the border color.java.lang.StringgetFontSize()Gets the background color.java.lang.StringgetPadding()java.lang.StringgetTextColor()Gets the border color.booleanisInline()Returntrueid the code has no padding and radiusbooleanisStyled()Returntrueid the code is styled.voidsetBackground(java.lang.String background)voidsetBorderColor(java.lang.String borderColor)voidsetFontSize(java.lang.String fontSize)voidsetInline(boolean inline)voidsetPadding(java.lang.String padding)voidsetStyled(boolean styled)voidsetTextColor(java.lang.String textColor)-
Methods inherited from class it.smartio.docs.builder.ContentBuilder
addFootnote, addInline, addInlineCode, addLink
-
Methods inherited from class it.smartio.docs.builder.SectionBuilder
addBreak, addCode, addImage, addLineBreak, addList, addOrderedList, addParagraph, addStyledCode, addVirtualTable
-
Methods inherited from class it.smartio.docs.builder.NodeBuilder
add, iterator, nodes
-
-
-
-
Constructor Detail
-
CodeBuilder
public CodeBuilder(boolean styled)
Constructs an instance ofCodeBuilder.- Parameters:
isSimple-
-
-
Method Detail
-
isStyled
public final boolean isStyled()
Returntrueid the code is styled.
-
setStyled
public final void setStyled(boolean styled)
-
isInline
public final boolean isInline()
Returntrueid the code has no padding and radius
-
setInline
public final void setInline(boolean inline)
-
getFontSize
public final java.lang.String getFontSize()
Gets the background color.- Specified by:
getFontSizein interfaceCodeNode
-
getBackground
public final java.lang.String getBackground()
Gets the background color.- Specified by:
getBackgroundin interfaceCodeNode
-
getTextColor
public final java.lang.String getTextColor()
Gets the border color.- Specified by:
getTextColorin interfaceCodeNode
-
getBorderColor
public final java.lang.String getBorderColor()
Gets the border color.- Specified by:
getBorderColorin interfaceCodeNode
-
getPadding
public java.lang.String getPadding()
- Specified by:
getPaddingin interfaceCodeNode
-
setFontSize
public final void setFontSize(java.lang.String fontSize)
- Parameters:
background-
-
setPadding
public final void setPadding(java.lang.String padding)
- Parameters:
background-
-
setBackground
public final void setBackground(java.lang.String background)
- Parameters:
background-
-
setTextColor
public final void setTextColor(java.lang.String textColor)
- Parameters:
borderColor-
-
setBorderColor
public final void setBorderColor(java.lang.String borderColor)
- Parameters:
borderColor-
-
addContent
public void addContent(java.lang.String content)
- Overrides:
addContentin classContentBuilder
-
addNode
public final <N extends NodeBuilder> N addNode(N node)
Add a childNodeBuilder.- Parameters:
node-
-
-