public final class LabelBuilder extends Object
LabelsPlugin.ID plugin LABEL options by a builder.| Modifier and Type | Method and Description |
|---|---|
LabelsOptionsBuilder |
getOptionsBuilder()
Returns the
LabelsPlugin.ID label builder. |
LabelBuilder |
setArc(boolean arc)
Sets if draws label in arc.
|
LabelBuilder |
setColor(IsColor color)
Sets the font color as color.
|
LabelBuilder |
setColor(String color)
Sets the font color as string.
|
LabelBuilder |
setFont(FontCallback<LabelsContext> fontColorCallback)
Sets the font color callback.
|
LabelBuilder |
setFontFamily(String fontFamily)
Sets the font family
|
LabelBuilder |
setFontSize(int size)
Sets the font size.
|
LabelBuilder |
setFontStyle(FontStyle fontStyle)
Sets the font style.
|
LabelBuilder |
setImages(Img... images)
Sets the images when
Render is Render.IMAGE. |
LabelBuilder |
setOutsidePadding(int outsidePadding)
Sets the padding when position is
Position.OUTSIDE. |
LabelBuilder |
setOverlap(boolean overlap)
Sets if draws label even it's overlap.
|
LabelBuilder |
setPosition(Position position)
+ Sets the position to draw label.
|
LabelBuilder |
setPrecision(int precision)
Sets the precision for percentage.
|
LabelBuilder |
setRender(Render render)
Sets what data must be showed.
|
LabelBuilder |
setRender(RenderCallback renderCallback)
Sets the render callback.
|
LabelBuilder |
setShadowBlur(int shadowBlur)
Sets the text shadow intensity.
|
LabelBuilder |
setShadowColor(IsColor shadowColor)
Sets the text shadow color as color.
|
LabelBuilder |
setShadowColor(String shadowColor)
Sets the text shadow color as string.
|
LabelBuilder |
setShadowOffsetX(int shadowOffsetX)
Sets the text shadow X offset.
|
LabelBuilder |
setShadowOffsetY(int shadowOffsetY)
Sets the text shadow Y offset.
|
LabelBuilder |
setShowActualPercentages(boolean showActualPercentages)
Sets if shows the real calculated percentages from the values and don't apply the additional logic to fit the percentages to 100 in total.
|
LabelBuilder |
setShowZero(boolean showZero)
Sets whether or not labels of value 0 are displayed.
|
LabelBuilder |
setTextMargin(int textMargin)
Sets the margin of text when position is
Position.OUTSIDE or Position.BORDER. |
LabelBuilder |
setTextShadow(boolean textShadow)
Sets if draws text shadows under labels.
|
public LabelsOptionsBuilder getOptionsBuilder()
LabelsPlugin.ID label builder.LabelsPlugin.ID label builderpublic LabelBuilder setRender(Render render)
render - what data must be showed.public LabelBuilder setPrecision(int precision)
precision - the precision for percentagepublic LabelBuilder setShowZero(boolean showZero)
showZero - whether or not labels of value 0 are displayed.public LabelBuilder setFontSize(int size)
size - the font size.public LabelBuilder setColor(IsColor color)
color - the font color as color.public LabelBuilder setColor(String color)
color - the font color as string.public LabelBuilder setFontStyle(FontStyle fontStyle)
fontStyle - the font style.public LabelBuilder setFontFamily(String fontFamily)
fontFamily - the font familypublic LabelBuilder setTextShadow(boolean textShadow)
textShadow - true if draws text shadows under labels.public LabelBuilder setShadowBlur(int shadowBlur)
shadowBlur - the text shadow intensity.public LabelBuilder setShadowOffsetX(int shadowOffsetX)
shadowOffsetX - the text shadow X offset.public LabelBuilder setShadowOffsetY(int shadowOffsetY)
shadowOffsetY - the text shadow Y offset.public LabelBuilder setShadowColor(IsColor shadowColor)
shadowColor - the text shadow color as color.public LabelBuilder setShadowColor(String shadowColor)
shadowColor - the text shadow color as string.public LabelBuilder setArc(boolean arc)
arc - if draws label in arc.public LabelBuilder setPosition(Position position)
position - the position to draw label.public LabelBuilder setOverlap(boolean overlap)
overlap - if draws label even it's overlap.public LabelBuilder setShowActualPercentages(boolean showActualPercentages)
showActualPercentages - if shows the real calculated percentages from the values and don't apply the additional logic to fit the percentages to 100 in total.public LabelBuilder setOutsidePadding(int outsidePadding)
Position.OUTSIDE.outsidePadding - the padding when position is Position.OUTSIDE.public LabelBuilder setTextMargin(int textMargin)
Position.OUTSIDE or Position.BORDER.textMargin - the margin of text when position is Position.OUTSIDE or Position.BORDER.public LabelBuilder setImages(Img... images)
Render is Render.IMAGE.images - images when Render is Render.IMAGE.public LabelBuilder setRender(RenderCallback renderCallback)
renderCallback - the render callback to setpublic LabelBuilder setFont(FontCallback<LabelsContext> fontColorCallback)
fontColorCallback - the font color callback.